Skip to content

udev rules: Add check for nvidia S0ix suspend

By default, there's a check to ensure that nvidia suspend is available before allowing the Wayland session. However, it only applies to the "save memory to disk" mechanism which is toggled by NVreg_PreserveVideoMemoryAllocations. An alternative mechanism which puts the vram on self-refresh exists, toggled by NVreg_EnableS0ixPowerManagement, as see on nvidia's driver documentation. If the latter is available, the former doesn't need to be available.

The Wayland session also works with this suspend mechanism, so this MR adds an additional check for S0ix-based power management. If it's detected, the "save memory to disk suspend" check is skipped. This enables the Wayland session as long as one of the mechanisms is available.

Tested on my Thinkpad P1 gen 6 with a RTX 4000 Ada. The existing "save memory to disk" mechanism is detected. S0ix is detected. Wayland session is disabled if neither are detected.

Merge request reports