Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/nvidia: intermittent suspend resume failure on proprietary drivers due to systemd freezing #371058

Open
epetousis opened this issue Jan 5, 2025 · 0 comments
Labels
0.kind: bug Something is broken

Comments

@epetousis
Copy link
Contributor

Describe the bug

Occasionally when suspending my RTX 3080 based system while using the Nvidia proprietary drivers, systemd-sleep will fail to freeze the user slice before sleeping:

Jan 05 12:42:28 evan-pc systemd-sleep[63989]: Failed to freeze unit 'user.slice': Connection timed out
Jan 05 12:42:28 evan-pc systemd-sleep[63989]: Performing sleep operation 'suspend'...
Jan 05 12:42:28 evan-pc kernel: PM: suspend entry (deep)

This appears to cause Gnome to lock up when resuming from suspend. I often end up force rebooting out of laziness, rather than attempting to recover the system.

@MinerSebas raised this a few months ago as it was mentioned as a known issue in the systemd 256 changelogs, but it appears to have fallen by the wayside (possibly because everyone is opting for the open drivers?).

It seems like the solution is to apply the changelog's suggested environment variable to the systemd-suspend service:

systemd.services.systemd-suspend.environment.SYSTEMD_SLEEP_FREEZE_USER_SESSIONS = "false";

So far I am not running into the issue after adding this to my system module. I would assume this should go into the Nvidia module and be enabled when hardware.nvidia.open = false, but the maintainers may have other thoughts on this.

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 6.12.2-zen1, NixOS, 25.05 (Warbler), 25.05.20241211.5d67ea6`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Lix, like Nix) 2.91.1
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/epetousis/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/epetousis/.local/share/flatpak/exports/etc/xdg/nix/nix.conf:/var/lib/flatpak/exports/etc/xdg/nix/nix.conf:/home/epetousis/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/epetousis/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/epetousis/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/984rvyvf2mvwhgyx7bwhrjvsgv6ln42d-lix-2.91.1/share`
 - nixpkgs: `/nix/store/rhn4fkh7hqjlqs9j6naaq623qpl62yz0-source`

Notify maintainers

@Kiskae @edwtjo


Note for maintainers: Please tag this issue in your PR.


Add a 👍 reaction to issues you find important.

@epetousis epetousis added the 0.kind: bug Something is broken label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

1 participant