Framework NixOS (Linux) users self-help

I thought I’d share my config here for my 12th-gen Intel Framework laptop

This is a flake-based config with home-manager as a module. It includes the recommended TLP config from Framework. I’m currently running a pre-release version of System76s COSMIC desktop environment (which is awesome!), but also have configuration for KDE Plasma 6. I also have Firefox and Neovim configured through home-manager.

1 Like

I am in the process of working with the NixOS community right now (literally in chat in another tab) for a community support program.

Soon, once we get everything dialed in, you will see NixOS recommendations in the nearish future.

16 Likes

That’s awesome to hear and is definitely something I would love to participate in! Will you link to any upcoming announcements in this thread?


I’m going insane I have a AMD Framework, Latest BIOS, Latest Kernel, and I keep getting this error which disconnects my USB-C AMP/Headphone Setup like 3 seconds after I connect it (It works for like 3 seconds then makes a pop sound and stops working, and this error shows up, I reconnect it, and it works for 3 more seconds than stops working.)
Even after it stops working, it still shows up as an available output too.
For some reason, TIDaL-HiFi works until I switch my window to Firefox and start playing audio, then it breaks again??? Something with switching windows from TIDaL-Hifi to Firefox and playing audio (e.g a youtube video) breaks it.
image
Kernel: 6.8.2
NixOS: Unstable Branch
GNOME 45

Definitely not NixOS-specific, so it would probably be better to ask in some other thread.

But anyway, are you sure that this error actually appears right after the disconnect? Does it appear every time? Many people are getting this error, so it would be good to confirm that it is actually related. My logs are definitely full of this error and I don’t think it has any negative effect in my setup. You might also consider following e.g. [RESOLVED] AMD F39 USB-C hiccups with external display directly connected via USB-C - #16 by Matt_Hartley.

It is related, I tested multiple times, after the disconnect it shows that error in the log.

Yep, it will be announce here. Nix team has already put this together - I am crafting my asks now to send them. Working directly with them.

Now we need to fill in the blanks with help from the community. This entry is for 11th gen, but we need it for all selections here.
https://wiki.nixos.org/wiki/Hardware/Framework/Laptop_13

We have two spaces, best to start here and let them know you want to join up and help with contributions here. They have set up a dedicated Matrix chat, but best start here and request directions on what works best for their team.

7 Likes

Are you sure that isn’t just this upstream issue?

Yes, I’m sure since it works with other Linux computers (my mom’s computer that’s running Arch currently)

Hi! I am seeing similar - did you find a solution?

Not sure if this solves it, but they did just merge Framework 16 support into the hardware repo here: Reposted added framework 16 by jkoking · Pull Request #915 · NixOS/nixos-hardware · GitHub

I see it includes a tweak for Fix TRRS headphones missing a mic which might be related?

For your information: I found the following wiki pages about Framework Laptop.

I am having an issue where sometimes when I resume from hibernation, the wifi drivers are not loaded. I have to do sudo modprobe -r mt7921e && sleep 10 && sudo modprobe mt7921e to get wifi working again.

I am on an AMD framework running 23.11 with the latest kernel, using the nixos-hardware repo. My disk has luks encryping an LVM that has a root and swap volumns.

Not really sure where to start troubleshooting, but am open to suggestions.

First of all, what are the symptoms? Anything in dmesg? Do you see the physical interface e.g. in ip l? Also what do you mean by “drivers”? You are saing that you have to do modrprobe -r, so sounds like the module gets loaded?

Is it worth making a dedicated subreddit related to framework and nixos called something like r/framework_nixos?

I personally don’t want to make it as I dont want to mod… but I think the reddit format would be better suited to sharing configs / discussions over a forum based…where most of the discussion is in a few threads what do you guys think?

Here is my current NixOS config:

My config is flake based, has the following:
On nixos-unstable (shifted from nixos 23.11)
Wayland
Plasma 6
Home-Manager with Plasma-manager

Looking to fix or add the following to my config:

  • Speaker audio was louder in my initial nixos config.
    Its quieter now be default. Not sure how to fix?
  • Charging via a powerbank does not charge at a decent rate. PowerBank is brand new: Anker 737. Replaced, same issue.
    Charges at 88W when powered off, much lower when framework on (0-4w).
    Error on bootup if powerbank is connected:
    ucsi_acpi USBC000:00: unknown error 256
    ucsi_acpi USBC000:00: con3: failed to register partner alt modes( -5)
    dmesg, last boot log: Warp
  • Not sure how to set a wallpaper. Tried multiple ways and all have failed so far.
  • Replace SSDM theme to sugar dark but hitting issues, raised an issue on vimjoyers github project related to video here:
    sddm-theme sugar dark issues · Issue #2 · vimjoyer/theming-video · GitHub
  • Need to move to a more module based NixOS config

Any suggestions or questions around my config or solutions to my issues are welcome. :smiley:

edit:
didn’t realize I had to run:

fwupdmgr refresh
fwupdmgr get-updates
fwupdmgr update

I am now on bios 3.03. I get less dmesg spam but still get:
UCSI_GET_PDOS failed (-70)

Looking at the framework 13 threads, apparently this is a known framework issue where the kernal can’t negotiate over usb properly and I don’t see a fix? This is pretty bad in my opinion if I can’t use a power bank.
Relevant post in thread:

Is that a typo, and you meant 3.05? If not, that’s the one you should get onto.

EDIT: sorry, didn’t realize you were speaking about FW16. Please ignore. These separate NixOS threads - this and the FW16 one - sure are confusing…

Interesting opportunity for NixOS users!

5 Likes

Might be worth renaming the Thread to “Framework 13 NixOS (Linux) users self-help”.
I can rename it, if everyone is okay with it.

Not sure what the best approach would be. Historically, all things Framework/NixOS ended up in this thread, regardless of the Framework flavor, and despite the Intel vs AMD differences. Then, a dedicated FW16 thread was created, which, arguably, still had a fair bit of content that applies equally to all FW laptops, and that led me to erroneously assume that all FW16 owners were posting there.

I believe, the discussions in both threads - and especially those collected in this one - may benefit all NixOS users, as most of us, it seems, are still figuring out how to best do things on NixOS in general. Maybe, one day the threads could get merged. In the meantime, I am monitoring both.

It would be helpful, and sufficient, I think, if everyone stated at the top of a post which platform they are using, if that’s relevant. But it’s probably not realistic to expect. So, on my end, I’ll just try to be more mindful of the need to figure out which system is talked about, instead of jumping to conclusions :slight_smile:

2 Likes

I would also like to see Framework CPU Usage LED module. I used it and keylightd on an arch install.

I’m still wrapping my head around nix. Only been on the train for a few months.