Framework NixOS (Linux) users self-help

Welcome to the forum. Seek and ye shall find.

Here’s another

1 Like

Welcome to the forum, check this out for some additional information and help.
The nixos-hardware repo specifically, has pre-defined configs you can import to work-around quirks or improve functionality.

1 Like

Thx, also (unrelated) but I see you are another Fairphone user! I’m using a Fairphone 5 and it’s going strong 6 months in.

Has anybody had any luck getting NixOS on the new Intel Ultra mainboard? Just got mine today, having issues getting sddm to start, looks like the most recent nixos-hardware is still just 13th gen.

Edit: Ah, user error, was using “intel” instead of “modesetting” for the video driver, switched to the right driver and now things seem to be working.

2 Likes

There’s currently a driver issue causing the latest kernel to fail to build on Framework laptops. This only affects you if all of the below applies to you:

  • You use the latest kernel, set via boot.kernelPackages = pkgs.linuxPackages_latest;.
  • You use a Framework laptop
  • You either use nixos-hardware for sourcing your Framework-laptop-specific configurations, or you use the framework-laptop-kmod drivers, set via boot.extraModulePackages = with config.boot.kernelPackages; [ framework-laptop-kmod ];

Upon updating your inputs (whether through channels or flakes) and rebuilding, you’ll see a build failure. This is due to the current Framework drivers on nixpkgs being incompatible with the new kernel. The great news is that the functionality of this driver has seemingly been added into the 6.11 kernel, largely superseding the need for this driver.

I’ll split the steps for solving this build failure into two sections: people that use nixos-hardware, and people who do Framework hardware configuration manually.

I don’t use nixos-hardware, and configure hardware features manually

Your life should be relatively easy! As the kernel now seems to support what the drivers do, you can just remove the line boot.extraModulePackages = with config.boot.kernelPackages; [ framework-laptop-kmod ]; from your configuration.

You use nixos-hardware

While the functionality of the drivers may have been superseded by kernel 6.11, nixos-hardware still includes the drivers. I plan on making a PR to remove these in the future.

A patch to the drivers to support 6.11 has been merged upstream to nixpkgs in both unstable and stable (24.05). However, these updates haven’t landed in any channels yet. Unstable is pretty close, as tracked here, but it’ll be a bit longer before stable gets this fix. Once these patches land on your relevant nixpkgs branch, everything should just work.

If you’re using nixos-hardware, and want a temporary solution until these land, you have several solutions. These include:

  • Overriding what nixos-hardware does so the drivers aren’t included: boot.extraModulePackages = lib.mkForce [];
  • Locking your kernel version to 6.10, like this: boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linuxKernel.kernels.linux_6_10);. This is what I’m currently doing, and it’s working great for me.
3 Likes

Worth pointing out this only applies to framework-laptop-kmod. 6.11.0 is fine without it.

1 Like

Yep, I updated the post to reflect this (and other changes)

1 Like

Update: the fix has landed in both unstable and stable! I’m having difficulty updating the original post, but you should now be able to update your flake inputs, and everything will work perfectly.

2 Likes

Anyone else running into issues with (I think) amdgpu on Linux 6.11 / linux-firmware 20240909? On KDE, once or twice a day, the whole UI would just kind of grind to a halt. To better understand, I switched over to Cosmic Alpha 2 and what I find is that as soon as I start using firefox, chromium, or falkon, the whole UI will lock up quickly. The only browser that’s usable is Gnome’s epiphany, though that also locks the whole laptop if I go into tab overview mode.

I see a lot of amdgpu updates in recent linux-firmware commits, and hopefully the next release will resolve all of this. Just wondering if anyone else is running into the same problem, or if I’m maybe missing some vital NixOS configuration related to FW13?

1 Like

Apologies if this has already been answered; I looked at the thread but there is quite a bit there.

I just got my Framework 13 Intel Core Ultra yesterday and got NixOS on it fairly easily, but I’m having an issue with external displays that I can not seem to resolve. I’m trying to connect to an external monitor via usb-c (where the usb also supplies power to the laptop), and I’m getting “no signal”. I’ve verified that it’s not a cable or laptop issue by installing Ubuntu, where the external monitor works fine.

The USB hub works, I can plug a keyboard into the monitor and use that keyboard with no issue, but I’m not getting any video signal.

I’ve seen threads around indicating that I may need to set the xserver’s display module to something but in the few hours I spent trying to find the magic sauce I had no luck.

This is my first time on NixOS, but I’ve been using the package manager for some time now so I kinda have an idea of how the config files work but not what specific thing I need to do to get this working. Also the first time running Intel in many years so I have no knowledge base on the issues it may have.

I know the Intel Core Framework is super new (and doesn’t seem to be represented on nixos-hardware) so I’m hoping this is just a simple setting that I should already know about but don’t.

edit: I came across this and tried it with no success: Displaylink - NixOS Wiki

What display manager are you using? GNOME? Plasma? That may be an important detail. In general, the more of your configuration you can share, the better.

I’ve tried gnome and plasma, neither of which worked.

Just for my own sanity I installed fedora kde and ubuntu gnome, both of which worked fine out of the box so I feel pretty confident that it’s just a config issue. Back on NixOS now trying to get it working.

edit: I also noticed that on the other distros I could get 120hz refresh rate and fractional scaling working out of the box, but nixos gnome seems to be locked at 60hz and there’s no option for fractional scaling.

I can confirm similar issues on the AMD 13 (7840u). I’ve temporarily downgraded to 6.10 which seems to resolve for now.

It’s almost certainly a side-effect of the amdgpu improvements they released a couple/few weeks back. Fingers crossed for a patch soon!

1 Like

Thanks, agreed. There is a workaround for 6.11 documented here. This resolved all the lock-ups I’d seen on Cosmic (I guess KDE too). Workaround until the amdgpu fixes come through.

Having the same issue here.

I downgraded too, but the problem still occurs on 6.10.13.

Let’s hope this gets fixed soon.

Following up: the issue here was that nix ships with an old kernel, forcing the kernel to latest fixed most of my problems immediately.

Just tried switching and, Interestingly, I have different problems with 6.11.3 with my setup at least. I run two 4k monitors off of a usb4 dock connected to the top right expansion slot.

Under 6.10.14, no problems… the laptop can drive both monitors at 60Hz. Under 6.11.3 however, I have to run one of the monitors at 30Hz. I’m not 100% sure why the port’s bandwidth / dock compatibility is limited under the new kernel :frowning:

Anyone get framework_tool working on their amd framework 16?

When i run
sudo framework_tool --test

I see this error

Self-Test
  SMBIOS Platform:     Framework16
  Dump EC memory region
Failed to open /dev/cros_ec. Because: Os { code: 2, kind: NotFound, message: "No such file or directory" }
thread 'main' panicked at framework_lib/src/chromium_ec/cros_ec.rs:70:34:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I’m running
Linux nixos 6.6.54 #1-NixOS SMP PREEMPT_DYNAMIC Fri Oct 4 14:30:05 UTC 2024 x86_64 GNU/Linux