After upgrading to nixpkgs ~18324978d632ffc55ef1d928e81630c620f4f447 (when I first noticed the issue), my system is unable to effectively resume from sleep. When I resume the system, it will forcibly re-suspend itself… until it doesn’t. It usually takes between 3-10 attempts for system to stay awake, with anywhere from 5-30 seconds between resumes and re-suspends.
In the journalctl logs below, you’ll see:
Aug 29 10:47:59 nixos systemd-sleep[137498]: System returned from sleep state.
...
Aug 29 10:48:23 nixos systemd-logind[1156]: The system will suspend now!
Not sure where to start with debugging, since the journal doesn’t (to me) show any obvious kernel/login errors.
Relevant details from neofetch:
OS: NixOS 23.11.20230827.a999c1c (Tapir) x86_64 Kernel: 6.1.47 DE: GNOME 44.3 WM: Mutter CPU: AMD Ryzen 7 2700X (16) @ 3.700GHz GPU: NVIDIA GeForce RTX 3060 Ti
Here’s the bits of my configuration.nix relating to graphics & DE config:
Did you ever find a solution to this problem? I think I have the same issue… I also have a NVIDIA GPU, and I could be wrong, but I don’t remember having this problem prior to adding NVIDIA into my configuration. I had a look in my journalctl, but I couldn’t see any information to track down the root cause.
I have slowly narrowed the issue down, and have lodged an issue with the GNOME team. Please see the linked issue for additional information and to help narrow down whether we have the same problem. For me, it looks to be an issue with the power plugin of the gnome-settings-daemon.
I have the same issue, but for me powerManagement.enable = true; seems to be the culprit. When I set it to false I no longer have suspend/resume cycles.
Confirming hardware.nvidia.powerManagement.enable = false; fixes the suspend/resume cycles — but I forgot I’d turned that on in the first place to fix app crashes on resume