Framework NixOS (Linux) users self-help

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

I am having another issue recently.

I can not reconnect my bluetooth earbuds after restart. It used to work flawlessly but for a week or two i am not able to just reconnect them. They connect and disconnect instantly. The solution to use them with the framework 13 is to remove the device and pair them again.

1 Like

Try building bluez 5.78:

NixOS bluez is months out of date. Thereā€™s at least 3 separate PRs for updating it, but the approved one ended up on a branch for stuff that has a lot of dependencies (lots of things reference bluez), and it still hasnā€™t been merged to master in the month or so since I saw it.

1 Like

@dinterface Same here, nice to hear this is not a me problem or a my headphones problem.