Framework NixOS (Linux) users self-help

@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

@BountySpace perhaps this?:

Enable Pipewire

security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};

That worked for someone else.

1 Like

Hi,
I got my new Framework laptop!! 13 inch AMD 7840.

I want to get into nixos, but struggle early in the installation. Each time, I try to boot from my usb stick, I get EFI USB Device boot failed.

Testing with Ubuntu, it worked easily.

I was using BelenaEtcher to install the nixos AMD Plasma image found here:

any tips?

Ive checked my bios version and its 3.03, the latest for amd I th

I had the exact same issue and it was due to not having disabled Secure Boot. Are you absolutely certain it’s disabled?

1 Like

I had also issues booting the live image from the right back USB-A port, apart from disabling Secure Boot, of course.

2 Likes

What @lytedev would make sense @Maxime_Thomassin since Ubuntu has Secure Boot support out of the box.

Yep I had the same experience with Fedora.

that solved for me thank you !
Time to have fun exploring nixos and framework!

2 Likes

Greetings, all. I’ve had my Framework 13 AMD 7040 for a couple of months now. I tried a Fedora Sway remix on it for a while, then loaded Windows 11, and am now test installing NixOS. I used Linux a lot a long time ago and am really enjoying the philosophy behind the Nix / NixOS.

Special shoutout to @kjhoerr for your guide. I’ve begun the process of adapting it to my needs [here](https://github.com/jbgreer/Nixfiles/) to dig a little deeper into an organized approach for cross-machine administration, and to play with a few new things (Impermance, btrfs, etc.)

I would especially appreciate any feedback / criticisms. Thanks.

1 Like

Welcome @James_Greer ! I had not seen Secure Boot used with NixOS and also nice to see BTRFS and LUKS! I have mine setup like this:

1 Like

@ahoneybun , to be really clear: I’m (ab)using the guide from @kjhoerr though obviously any issues or mistakes are my own. I continue to consider the pros and cons of using file system and partition labels rather than UUIDs, but it makes the installation more generic.

I am still getting things working… In particular, secure boot isn’t yet, but I’m trying to track that down.

My other focus is to document every step; hopefuly when finished I’ll have a step-by-step guide of everything I’ve done at the keyboard to install on a couple of machines. Just for me, really, but hoping that someone else can learn what or what not to do.

Thanks for sharing your link - I’ll check it out.

Of course, learning is certainly part of the fun but sharing the information I think is the best!

Does anyone have services.logind.lidSwitch set, and to which value? I have the AMD framework and whenever I close my lid with any of the proposed values, it seems to either freeze the screen or fallback to a tty interface which I can’t get out of without having to reboot. I’m on the latest BIOS firmware (BIOS 3.03).

@woutdp I actually haven’t used that before so I’m not quite sure. You tried all of the types on this page?:

https://search.nixos.org/options?channel=23.11&show=services.logind.lidSwitch&from=0&size=50&sort=relevance&type=packages&query=services.logind.lidSwitch

You should work through the arch wiki entry I linked. I had to set some kernel modules, use a newer kernel, and other things you can find in my nix config. Unfortunately, it doesn’t just work with the config you posted alone.