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
Just ran into the same problem. Running Gnome and AMD GPU (one machine has dGPU and another iGPU, both have encountered this problem). KDE doesn’t have this issue. The last working revision for me is 76612b17c0ce71689921ca12d9ffdc9c23ce40b2.
Well, it got worse for me. With 24.11 and the 560 drivers I run into unrecoverable situations after resuming (blank screen, crashing applications) without power management. So now I have to enable power management which confronts me in with the suspend/resume cycle bug
I have tested it a couple of times, no more suspend/resume cycles for me with power management enabled, well at least for now, I hope it stays this way.
Also I think for this to work you need to add killall to your installed packages if you haven’t. Don’t know why it isn’t there by default but whatever. EDIT: it seems pkill is the tool of choice these days. I changed the script to use that and also specified the exact name of the gnome-shell process.
Yep, this works for me, for the most part — no more suspend/resume cycles or app crashes on resume.
The system is a bit lethargic on resume; it takes ~30-45 seconds to present the GDM greeter, and some apps are unresponsive for ~15 seconds after that. Everything is normal after that all settles
My display is blanking after ~30 seconds of no input. I have my screen blank set to 10 minutes, and I’ve tried toggling the setting, but no luck. (EDIT: I also tried turning off screen blank entirely, but it still blanks after 30 seconds…) There is nothing in journalctl/dmesg besides a warning from gdm-x-session regarding dropped events from my mouse.
Also, I’m using X, not Wayland, so this does seem to be a cross-protocol issue.
Relevant looking gnome-settings-daemon bug; the screen blanking is cause by some interaction in gnome-settings daemon. I don’t yet understand why I see this on one machine but not on a different machine (The nvidia machine experiences, the amdgpu machine does not, but this may be circumstantial/unrealted to the GPU, and something odd about the configuration).
With the hanging on resume, there are open issues in the nvidia driver ecosystem:
I haven’t yet found a working configuration on wayland. Currently tested 6.6.66 and 6.12 with 565.77 open drivers on a GTX 3060.