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.
Edit: added βUp toβ on the battery life as YMMV
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";