Framework NixOS (Linux) users self-help

I’m searching nixos options for a way to activate wayland under plasma, closest I found is programs.xwayland.enable = true;. It seems to have worked quite well, though!

EDIT: Found this on nixos wiki services.xserver.displayManager.defaultSession = "plasmawayland";

Thanks for thermald! Hadn’t seen that around.

1 Like

I made my own notes on nix, after a few months in, because the documentation is chaotic.

Hope it’d be useful here :slight_smile:

1 Like

Has anyone managed to get NixOS to work on the AMD 7040 series? I created a bootable USB for NixOS using BalenaEtcher and the KDE ISO from the downloads page. For whatever reason it shows up as

EFI USB Device (SMI USB DISK) boot failed.

When I use the same bootable USB on my 13th gen Intel it works fine (I get to the NixOS live USB menu), and also a Fedora bootable USB works fine on the 7840U (get to grub menu).

Any ideas? Perhaps there’s some BIOS thing I have to do that I may have already done on the 13th gen?

1 Like

You need to disable Secure Boot in UEFI settings.

3 Likes

That was it. I missed that setting since it’s in a different place than the rest of the BIOS Security setup (TPM etc). Thanks!

1 Like

Hi,

I received my FW13 a few weeks ago, installed the latest BIOS (3.03 as of today) and NixOS on the machine. For the most part, it works without problem apart from issues with 3D graphics on Wayland (and X, actually, but I didn’t test it thoroughly yet) - but they might be the topic of another post.

From time to time, when I’m actively using it, the program I’m using crashes, and I can’t do anything on the machine: if I go to an already open shell (because sometimes I can’t open a new one), whatever I do triggers either an “I/O error” or a “read-only filesystem” error. I can’t find anything clearly related to these failures in last boot’s journald logs - if something would have been written, it couldn’t have because of the I/O failures.

So far, I ran SMART tests on my SSD (nothing remarkable), memtest86+ (a few complete cycles) didn’t show anything either. It might come from another piece of hardware failing, but I wouldn’t know how to test it. It looks like this issue.

I have no specific problem with suspend (it can happen either anytime before or after having suspended). The only thing I’m sure about is that this failure doesn’t trigger when I’m not actively using the computer. Sometimes it runs for hours (spread over days, using it actively), sometimes it fails 5 minutes after a reboot.

I use:

  • NixOS (nixos-unstable, nixpkgs-unstable)
  • Kernel 6.1.62, by means of nixos-hardware)
  • sway (Wayland)

Is it an already known issue? What can I do to troubleshoot further? I can provide more information if needed.

6.1 is old and has known issues with the newish hardware in the fw13 - I don’t know how nixos handles kernels but if you can ideally get onto a 6.7 branch or 6.5 distro kernel (the one in fc39 is mostly ok) you’ll be in a better place.

1 Like

Based on you saying that you installed bios 3.03, I assume you have the AMD one, but that topic is from Intel, so probably not something AMD-specific.

Also, I have SN770 1Tb and I’m not experiencing anything like this. I also highly doubt that it is related to NixOS in anyway, so I would probably ask in some other thread, where others, not only NixOS users, will see it. Given your symptoms, though, it does sound like hardware, so, like, I don’t know, have you tried removing the SSD and plugging it again? If you can, borrow another SSD from a different laptop or a friend and try with it. After this, probably, the only thing left is contacting the support.

1 Like

Thanks for the answers. I have the AMD board indeed - it was stated in the title of the post I created but disappeared on merging :smiley:

I used kernel 6.6 for a while, but it didn’t make the problem disappear (though it seems that it happened less frequently). I installed 6.5 as mentioned, we’ll see if it helps the problem go away - 6.7 is not easily available on NixOS yet. I also found some information mentioning bootargs for randomly disconnecting NVMe drives, like in this issue. That might be my problem though I can’t troubleshoot it as no logs are written anywhere (neither dmesg not journald work at this point, and after rebooting, journald -b -1 doesn’t have anything incriminating written in it). I’d like to try these bootargs out, do you have any more information about them and how they could be relevant?

If ever this is useful, my drive is a WD Blue SN550 1 TB. I just updated it to the last firmware, maybe the older firmware was part of the general problem.

FWIW, while 6.7 doesn’t even technically exist yet, on NixOS unstable you get 6.7-rc2 in linuxPackages_testing. Of course, then you’re running an RC kernel, which is most of the time okay, but can cause a lot of damage in the unlikely case something goes wrong.

2 Likes

Just thought I’d say thanks to this thread. Up and running very easily just taking the SSD out of my old thinkpad, installing it into my shiny new AMD framework and after a brief spell on wired ethernet and importing the 7040-amd module most stuff seems to be working. I’m using sway on wayland, and expected a bit more of a fight to be honest.

2 Likes

13th gen intel motherboard upgrade may have been a mistake. Maybe the new AMD was the correct choice— I think my screen tearing issues are entirely there, since a fresh ubuntu 23 default gnome install also had screen tearing.

I never had screen tearing once on the 11th gen motherboard.

Also, zulip, mattermost, and slack all have completely blank desktop apps now, across x (none+wm) or wayland (gnome) or kwin (plasma). (this I haven’t tested in the fresh ubuntu).

Thank you for the report I am waiting for my FW AMD 13 to ship soon.

Can you please post the module or link it here?

What happened?

See Framework NixOS (Linux) users self-help - #35 by jon for the community hardware setup.

On first boot my wifi wasn’t working. It would find the wifi AP but didn’t seem to connect. I plugged in a wired ethernet USB dongle to get everything else setup and rebooted. At this point I got around to looking at the problem but wifi was working and has continued to work, so I’m not sure what happened. It started working before I’d added <nixos-hardware/framework/13-inch/7040-amd>.

1 Like

@Alan_Clucas

Thank you! I added the nixos-hardware module in my flake config: feat(framework): framework 13 amd nixos-hardware by storopoli · Pull Request #12 · storopoli/flakes · GitHub.

I bought my 12th Gen Framework last January and tried various distros until landing on NixOS a month ago. I am running the Cinnamon DE and have created a Specialisation that allows me to switch between laptop mode and connecting to my Sonnet EGPU/Radeon Rx 6650xt.
SpecialisationEGPU
Running in laptop mode boots to the Intel graphics and the laptop performs as expected, wakes from hybrid sleep normally, etc. However, when using the EGPU, the laptop boots and runs normally, including excellent graphics, but fails approximately 60-90 seconds after waking from hybrid sleep. I can wake and keep working until the laptop crashes and reboots. This happens every time I wake from hybrid sleep.


I am using kernel 6.1.62 and am not sure if that is the source of the problem, or if I’ve missed something important in my configuration for the AMD GPU.

I’ve searched the Nix sites, Discord, and here, but not found much on NixOS and “split locks”. Perhaps I’m not using to correct terms. Any guidance would be appreciated.

@Andrew_Sorenson I wonder if being on a newer kernel would help? I know that more eGPU support was added there. You can do that with this option in your configuration.nix

boot.kernelPackages = pkgs.linuxPackages_latest;

Then rebuild and reboot:

sudo nixos-rebuild switch

2 Likes

@ahoneybun That appears to have done the trick. Thanks for the reply. Such a simple fix.

1 Like

I have the framework laptop 13 amd. I can’t seem to get the integrated microphone working with pipewire. I have included the working and broken config snippets below. Broken config

  #audio
  services.blueman.enable = true;
  security.rtkit.enable = true;
  #sound.enable = false;
  #hardware.pulseaudio.enable = false;

services.pipewire = {
    audio.enable = true;
    alsa.enable = true;
    pulse.enable = true;
    wireplumber.enable = true;
};

Working config

 hardware.pulseaudio = {
          enable = true;
          package = pkgs.pulseaudioFull;
        };

I also have the nix hardware enabled

fwamd-nixos = nixpkgs.lib.nixosSystem {
     specialArgs = {inherit nixpkgs-unstable inputs outputs;};
     modules = [
       
       ./nixos/fw-configuration.nix
       agenix.nixosModules.default
       nixos-hardware.nixosModules.framework-13-7040-amd
       lanzaboote.nixosModules.lanzaboote

     ];
   };

Maybe this guy here you are missing:

Or you can even delegate all those shenanigans to nixos/nix-hardware by doing:

{
  description = "NixOS configuration with flakes";
  inputs.nixos-hardware.url = "github:NixOS/nixos-hardware/master";

  outputs = { self, nixpkgs, nixos-hardware }: {
    # replace <your-hostname> with your actual hostname
    nixosConfigurations.<your-hostname> = nixpkgs.lib.nixosSystem {
      # ...
      modules = [
        # ...
        # add your model from this list: https://github.com/NixOS/nixos-hardware/blob/master/flake.nix
        nixos-hardware.nixosModules.framework.amd-7040
      ];
    };
  };
}

Like I do in here: https://github.com/storopoli/flakes/blob/main/flake.nix#L67-L68