Laptop Won't Power Off

Hi all, I’m running NixOS 24.05 with the 6.6.32 kernel on a Framework 13 Ryzen 7040. When I try to poweroff the OS, the shutdown sequence occurs, but the laptop does not poweroff and just hangs indefinitely.

From my examination of the journal, it appears as though the OS properly shuts down, even stopping its logging to the journal, but the laptop remains on. Perhaps there is an issue with properly instructing the ACPI to power the machine off? Additionally, this issue has persisted through two separate installs of NixOS and has never not been an issue. Any help would be much appreciated!

I have seen similar issues on forums including this one, but none of the solutions seemed effective.

Journal dump from shutdown call to full OS halt:

Hi, I don’t own a Framework myself but are you using the corresponding nixos-hardware module? nixos-hardware/framework at master · NixOS/nixos-hardware · GitHub

Sounds like I have a similar processor and similar problem to you. ThinkPad T14s won't power down

1 Like

I had the same problem intermittently with a number of different laptops (none were Frameworks) running NixOS 22.05 through to 23.11. I also had occasions where the laptops would shutdown and then suddenly start up again. I can’t definitively say it is gone but I haven’t seen it since 28 March 2024 after removing the following line(s) from configuration.nix in the previous week;
boot.kernelParams = [ "pcie_aspm=off" ];

Prior to that I also removed;
boot.kernelParams = [ "vfio_iommu_type1.allow_unsafe_interrupts=1" ];

Prior to that I added;
powerManagement.enable = true;

The first two bits of config had snuck into the configurations when I was testing and had accidentally been duplicated. The last one was just missing for me. Again not sure if they will help you and I wish you luck. All the laptops I had were steadily getting warmer too if I didn’t realise they hadn’t shutdown properly (scary) until I had did the long power button press to turn them off completely.

This user got it to work by updating the kernel: Framework and NixOS - Day Two :: dade


I just started having the same problem with the same laptop. I had a functional config previously, and then I tried doing a channel update from 23.11 to 24.05 but the build didn’t finish successfully so I reverted. I believe that’s the origin of the problem for me.

I add the same problem but adding boot.kernelPackages = pkgs.linuxPackages_latest; to my configuration fixed it.

I tried that a week ago with no success, but apparently, this reinstall of Nix made the kernel update work. Thanks!