To note for anyone running AMD, the nixos-hardware default module ‘framework’ sets nvme.noacpi=1 kernel param which is affecting standby. There’s some useful configuration in that module aside from that, so if you want to keep the module import you can force override the kernel param list with something like:
boot.kernelParams = lib.mkOverride 999 (builtins.filter (p: p != "nvme.noacpi=1") config.boot.kernelParams);
There’s also the common AMD cpu and gpu modules which are useful for import.
AFAIU it’s not a generic module, it’s a misnamed config specifically for the 11th Gen Intel version, retained under that name for backwards compatibility reasons. It also (via the generic “laptop” config) enables TLP, which Framework explicitly recommends against on the AMD version, so, I dunno.
Yeah, I just had it enabled since I migrated from the 11th gen. Just wanted to put it out there in case other people run into the same thing.
The framework folder definitely needs some restructuring, but obviously making necessary changes makes it backwards incompatible, which I guess is up to the maintainers. It will definitely need to change with the impending FW16 release.
I didn’t bother with any harware specific configs on my 7040. Running the unstable channel and used the latest kernel with
boot.kernelPackages = pkgs.linuxPackages_latest;
As far as I can tell, everything is working fine with KDE (with 3.03 BIOS everything is working great!). Up to 8 hours with light web browsing and screen at 25% brightness.
Same - things have moved fast this week for sure. I hit a couple bumps but am happy on 3.03 beta, updated fingerprint firmware, and kernel 6.5.9 on Nix unstable.
In case it helps others, here’s some random bits from my config.
Firmware updates
services.fwupd.enable = true;
# this might be unnecessary, but I was having trouble with fwupdmgr hanging 🤷
# services.fwupd.daemonSettings.DisabledPlugins = [ "synaptics_mst" ];
# 3.03 is still in beta
services.fwupd.extraRemotes = [ "lvfs-testing" ];
Kernel
# 6.1 also worked fine
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = [
# reported to help with flashing display issues
# "amdgpu.sg_display=0"
# this is supposed to improve power-saving
# but seems to cause a freeze on wake for me
# "nvme.noacpi=1"
# https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html#active-mode
# note: if you're using 6.1, use "passive"
"amd_pstate=active"
];
# https://git.exozy.me/a/zenpower3
boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
Power-saving
This isn’t really Framework-specific, and I’d interested to hear others’ configs, but this is a reasonable starting point IMO. See also the amd_pstate kernel param
Hey guys
Followed some of the suggestions! Thanks for that!
Relatively newish to Linux so I can’t really make out dmesg gibberish yet. I have an issue where the Framework 13 7840U won’t resume from sleep correctly. I get thrown into GNOME with my display flashing white depending on how much action is on the screen. When I log out and in again, everything works.
Anyone got any ideas or maybe even the same problem?
Can provide more info if this is novel behaviour. Cheers guys
Follow-Up question though: I’m getting a white screen as soon as I open gnome-video or smplayer in fullscreen by double-clicking on the video. Did anyone have the same problem?
EDIT: Also got that fixed by using the LTS kernel version:
❯ uname -srm
Linux 6.1.42 x86_64
Got the white screen failure on fullscreen with a kernel 6.4.x
My PR for nixos-hardware to add a config for the FW13 7040 AMD was merged, so the framework-13-7040-amd profile can be used as a target now.
I submitted another PR (#776) to rearrange the folder structure for better consistency and shared configuration. It adds a framework-11th-gen-intel profile as well to replace the framework base profile that was used for the 11th gen.
I’m new to NixOS-- is it possible to experiment with the FW13 7040 AMD config in a VM? Or does it not work because the virutalized hardware is not the same as the host hardware?
The root question is how can I experiment with this config without fully committing to running NixOS directly on hardware? Ideally I’d like to play with a config in the VM environment, and be able to just use that same config on the FW13 7040 AMD hardware.
I mean in general, NixOS allows you to do exactly that very easily, except for the part where this specific configuration module is dealing exclusively with the hardware compatibility, so… it kinda doesn’t really make sense to “test” it on a VM rather than on the actual device. How exactly were you planning to play with it?
If you just want to play with NixOS, you can just play with vanilla NixOS in a VM / container, and then, once you decide that you like it, switch to real hardware keeping you configuration + adding that module, which will (ideally) do nothing else but guarantee that everything is smooth.
If, however, you want to experiment specifically with those hardware-related settings, I guess, you real options are installing onto a separate partition or, like, onto a USB drive / microSD / external drive and booting from there.
@gaben I’ve been running NixOS in VMware on an M1 Macbook Air for the last year or so following https://github.com/mitchellh/nixos-config’s configs. I wanted to exit from the Apple ecosystem, so I got a Framework 13 AMD. Knowing the hardware was super new, I decided to once again run NixOS via virtualization on a Framework Ubuntu Host for stability. Here’s some notes to hopefully get you started - Let me know if you have any questions, I’m happy to help – I feel I’m always going to be a nix newbie lol. I’m close to finally ironing out all the issues I’ve experienced in this setup. (Though now with the above PR merged, I’m likely to go full bare metal install with NixOS…)
VMware - I tried this initially as I was using this on MacOS; however, I hit too many performance and odd issues, so decided to try VirtualBox out.
Wayland is just kinda a no-go it seems on any virtualization program, so I switched from sway wm back to i3wm.
VirtualBox - After setting the below configs in the host and inside the VM… it’s ‘mostly’ stable and relatively performant, though I’m still trying to debug, what I expect, is a video acceleration issue (dmesg shows [drm:vmw_msg_ioctl [vmwgfx]] ERROR Failed to open channel) and performance isn’t as good as on Ubuntu when compiling or transcribing via local whisper.cpp projects I’m working on.
VirtualBox Host:
Setup as described in my README.md below. (You’ll need to portforward on VB 2222 host to 22 guest, if you want to install like I’m doing in my nixos-config)
Increase video ram (VB has a max of 128MB in the GUI and 256MB in a cli config): VBoxManage modifyvm “Name of VM” --vram 256
8 core // 10GB ram
set display scaling to 133% (when using my resolution set, see GitHub link below)
fwiw, I made a video of installing NixOS on a Framework. It’s too long, badly edited, contains mistakes which I fix, and doesn’t have the fingerprint reader working yet. But it does show setting up the system with a Flake and adding the hardware quirks and SSD optimisation.
I dunno, might be useful for anyone who likes to see it to believe it.
The (very simple) config is here if you want to “skip to the end”, as it were:
Naturally, you will want to use whatever regdomain code is relevant for your regulatory domain. After this, I’m getting much faster speeds according to fast.com and dropping no packets while doing so.
Since the regulatory domain would require an argument based on the user’s domain, I’m not sure exactly how we would add it there. Maybe I’ll poke around and see if there are other modules that take arguments and submit a similar PR.
Any KDE people? I’m finding plasma5 with default KWin is chopping up my firefox window, at both default compositor settings and `switching compositor off. I want to try KDE, it’s the only time I’ve seen screentearing outside of gaming though. Is there anything we know about intel? the framework is a 13 from batch 5 (2 years old), but mainboard updated to 13th gen a couple months ago.
note: for World of Warcraft (through lutris) in particular, KDE is the least finicky desktop with respect to screentear in my experiments. I tried services.picom.enable = true; and it may haev made the WoW usecase slightly worse, but I didn’t check choppiness/tear in firefox (it could be a different question). I’m also uncertain how often I should be relogging / rebooting to test stuff like turning the compositor off and on.
The other thing about KDE is that my fan has literally not stopped running once, even when I’m on a light computational load.
also its odd that I run fwupdmgr update about once a month, it always tells me there’s nothing. Then today I do it and it offers a jump from 33 to 371 on UEFI dbx.
╔══════════════════════════════════════════════════════════════════════════════╗
║ Upgrade UEFI dbx from 33 to 371? ║
╠══════════════════════════════════════════════════════════════════════════════╣
║ Insecure versions of the Microsoft Windows boot manager affected by Black ║
║ Lotus were added to the list of forbidden signatures due to a discovered ║
║ security problem.This updates the dbx to the latest release from Microsoft. ║
║ ║
║ Before installing the update, fwupd will check for any affected executables ║
║ in the ESP and will refuse to update if it finds any boot binaries signed ║
║ with any of the forbidden signatures.Applying this update may also cause ║
║ some Windows install media to not start correctly. ║
║ ║
╚══════════════════════════════════════════════════════════════════════════════╝
Any downside to letting this run (it asked me yes or no)? I’ve never had fwupdmgr return any possible updates before.
Update: I ran it, rebooted, everything seems fine no noticeable difference. Still odd that it jumped from 33 to 371 so quickly, maybe the local index was wrong before.
I’m searching nixos options for a way to activate wayland under plasma, closest I found is programs.xwayland.enable = true;. It seems to have worked quite well, though!
EDIT: Found this on nixos wiki services.xserver.displayManager.defaultSession = "plasmawayland";