Describe the bug
after running poweroff the screen goes black; all services stop; but the machine keeps running. Need to hold the power button to turn it completely off.
Mostly opening in the hope any other people are running into this too since upgrading to 20.03 and maybe know a way around this or know a way to debug this.
To Reproduce
Steps to reproduce the behavior:
poweroffExpected behavior
The machine powers off
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Notify maintainers
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
I observed some problems with rngd blocking the poweroff process and on older generations my desktop (1700x, Asus 370 Pro) tended to reboot instead of shutting down. I disabled rngd with security.rngd.enable=false, the shutdown problem fixed itself recently. It may be worth it to check against the current latest kernel, instead of the latest stable kernel.
^ see also #80871
So as far as I can see systemd reaches the end of its shutdown procedure and then the screen goes black. So I don't think it's rngd hanging in my case.
I will try a newer kernel
I always had the same problem with my Asus Desktop (an older AMD Athlon) (I started with 19.03 on this machine.)
Shutdown won't power off the machine (stops at "reached target shutdown"), reboot works. Forcing poweroff/reboot also works, so it is not a Kernel issue for me but rather something with systemd.
Probably running into the MWAIT bug in the Zen1 architecture:
Apr 29 17:20:18 ryzen kernel: [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
Apr 29 17:20:18 ryzen kernel: [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
Apr 29 17:20:18 ryzen kernel: [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
Apr 29 17:20:18 ryzen kernel: [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
Apr 29 17:20:18 ryzen kernel: [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
Apr 29 17:20:18 ryzen kernel: [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
Apr 29 17:20:18 ryzen kernel: [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
Apr 29 17:20:18 ryzen kernel: [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
Found this kernel bug that suggests https://bugzilla.kernel.org/show_bug.cgi?id=196683
settings idle=halt in the kernel commandline. I'll try that now
Switching to linuxPackages_latest fixed this for me.
What is the best place to document these kind of hardware quirks? I assume Zen1/Zen2 is often used by NixOS'ers. NixOS wiki? or the manual?
Ok i'll add my config there. thanks for the help all
Most helpful comment
https://github.com/NixOS/nixos-hardware