NixOS on the Framework Laptop 16

these patches are for getting GitHub - DHowett/framework-laptop-kmod: Kernel module to expose more Framework Laptop stuff to work, not fw-ectool

didn’t know fw-ectool got moved to gitlab though, do you know if it works on the fw16?

Hey Guys,
I didn’t wanted to bother creating a new topic for these questions but I’d like to take a look at NixOs on my FW16 (as a perfect newbie) and I was wondering if it would be best to wait for the 24.05 release to start a new install or use the actual one 23.11 and then upgrade when it will be out ?

I see a lot of discussion for embedding the latest patches of different pieces of software to get all the hardware enabled… but do you think it will still be necessary when 24.05 will be out ?

The hardware config of the FW16 has been recently added to the hardware repository. Does this base config is sufficient to use it on daily basis as a main computer without tweaking it ? Or is it still experimental ?

Thank’s for your feedback around these questions :pray:

IMHO, “major” upgrades in NixOS are way less disruptive than they are with Ubuntu or Fedora.
All those kernel patches are more linked to the kernel itself not embedding them (yet).
If somehow the 6.9 kernel was released before a 24.05 release it’s entirely possible that you could use it in 23.11.

The config in nixos-hardware seems good enough, there was not much to tweak anyway :partying_face:

1 Like

How is your experience with Steam and the dGPU ?
I’m having some trouble getting some good performance…
I don’t know if it’s DRI vs Vulkan, being on 6.7 (because of ZFS), or something else…

I’m not on NixOs but Fedora 40 with 6.8.7 and to get enough performances on my games (under UE5), I have to use the mesa-git (v24.2) copr to get more speed. It seems still to be quite low comparing to perfs on windows though.
So I guess if I switch to NixOS I’ll have to tweak the mesa version if it’s lower than v24.1.

EDIT: Bad news for me, it’s still on 24.0.x on unstable U_U"
https://search.nixos.org/packages?channel=unstable&show=mesa&from=0&size=50&sort=relevance&type=packages&query=mesa

I’m not entirely sure were in NixOS itself you’d need to plug it to override it but if it’s in unstable, you can mix and match between packages from stable and unstable, so you could use mesa from unstable in a system that mostly relies on packages from stable.

@pdp Interesting. Thank’s !

For the mesa part, it seems to be around the corner to get the 24.1 on unstable. Let’s hope it will be merged soon :slight_smile:

It looks like you can override mesa through hardware.opengl.package: nixpkgs/nixos/modules/hardware/opengl.nix at 2230a20f2b5a14f2db3d7f13a2dc3c22517e790b · NixOS/nixpkgs · GitHub

1 Like

I would not wait, if your setup uses flakes, which you should nowadays you can always just switch the channels or only use specific channels for some packages.
For instance you could use the stable channel for system packages and the nixos-unstable channel for user packages like Gnome Desktop or your favorite IDE.
IMO major upgrades are more useful for servers that run NixOS and not personal desktops.

Upgrading packages or trying out things under NixOS is also pretty safe, as you can always just roll back with relativ ease. As long as you don’t mess up the bootloader or your /nix partition.

If you don’t know where to start or how to structure your config files, it might be worth checking out this repo for some inspiration

1 Like

The experience might get even better soon! Found this today: Exciting Partnership Announcement: Framework Community & NixOS Communities Join Forces! - Announcements - NixOS Discourse

3 Likes

That is amazing to see such a partnership, thank you @Matt_Hartley for fostering it !
I hope it will make Framework laptops an even better platform for NixOS and Linux in general than it already is :heart:

2 Likes

Appreciate that. We’re still getting this sorted, selection, etc. But yes, it’s going to be a community support distro with the NixOS community behind its support.

7 Likes

It looks like it works. I created a flake in my repository (in flakes directory) for it based on Quentin’s module. Do you know what the difference is between the official Framework ectool and DHowett’s?

Nice! I think I’ll stick with the kernel module since it works with DE’s and makes more sense for scripting.

The official ectool doesn’t have the nice commands such as fwchargelimit and such.

DDR5’s performance over DDR4 negates the need for multiple sticks. The bandwidth of a single stick of DDR5 is double that of DDR4. At least this is what I have gathered from DDR5 memory – Everything you need to know | Crucial.com.

I have also figured out my stuttering issues. Turns out it was my power cable causing the laptop to run in a lower power state or something.

It is still single channel memory. AMD prefers dual channel. Bandwidth helps but channels is what is important. At least for AMD. Intel takes less of an issue with how many channels you are using.

Good. At least that takes care of your major issues.

If anybody has the LED panels for next to the keyboard, I’ve created a flake for installing the inputmodule-control program: nix/flakes/inputmodule-rs at main · caffineehacker/nix · GitHub

I’m planning (when I get time) to write a service that can swap between modes and do more complex scenarios. My ideal state is to be able to use them as a ticker tape for notifications and messages.

1 Like

Batch 11 here. Initially had an issue with the keyboard & trackpad but that turned out to be a BIOS setting on the 3.03 BIOS (be sure to leave “Force Power for Input Modules” set to “Require Modules” if neither are working for you).

Everything else is working great on NixOS. For anyone looking for references with documentation: https://github.com/psiri/nixos-config

Some features:

  • Flakes
  • Impermanence
  • Disko (declarative disk formatting, partitioning, FS management)
  • home-manager
  • secrets management with sops-nix.
    • Options for both separate (encrypted) secrets in a private repo (what I use) and repo-local secrets (still encrypted, but for those that want to keep everything in a public repo)
    • Also some references here for injecting build-time secrets into configs which I couldn’t find great documentation for:
      • keeping networkmanager configuration parameters as secrets, etc
  • All key hardware functioning:
    1. fingerprint reader
    2. camera
    3. mic
    4. keyboard/trackpad
    5. Bluetooth & WiFi (added reg domain fix for Mediatek cards from the FW13 thread too)
    6. power management (PPD)
    7. Firmware updates

Shout out to @CodeMichael’s config too - helped a ton

3 Likes

If anybody out there is like me, using XMonad and having problems with Steam, be reassured that it’s not the FW16, it’s not NixOS or ZFS or impermanence or whatever, it’s really just Steam and XMonad: Fixes/workarounds for Steam client menus/flickering by liskin · Pull Request #886 · xmonad/xmonad-contrib · GitHub

hello, I’m having a strange issue with my nixos system. I’m new to nixos and just started yesterday after getting the framework. Shutdowns and reboots work on fedora 40 live USB and nixos live USB, but not on my custom config. I can see systemd shut the whole system down, but the keyboard LED does not turn off and the power button’s LED is also still on. So the screen goes black after systemd shuts the system down, but all the hardware is still active. Reboots have the same behavior but it just stays at a black screen and doesn’t go to the next boot.

Config heavily based on LibrePhoenix’s
Config: GitHub - hyperboly/nix-dotfiles: trying out nix

Edit: resolved. problem was the newest 23.11 kernel (6.1.91). Switched to stable zen kernel fixed it. 6.8.6-zen1.