FWIW, sleep isn’t working perfectly for me either since the 565 update (I am on the latest, 565.77, 6.12.8 respectively) on Arch, RTX3070 Max Q laptop, Ryzen 5800h.
As mentioned above (but summarized below):
in /etc/modprobe.d/nvidia-pm.conf:
options nvidia “NVreg_DynamicPowerManagement=0x02”
options nvidia “NVreg_EnableS0ixPowerManagement=1”
I have my laptop setup to boot with the dGPU (I haven’t tested hybrid in a while). I have the following services enabled (by default, they are disabled…):
nvidia-hibernate.service
nvidia-persistenced.service
nvidia-powerd.service
nvidia-resume.service
nvidia-suspend.service
*Note: The nividia-powerd.service isn’t listed in Chapter 21 of the README, but nevertheless it’s installed with the driver (the systemd entry exists, it’s just disabled by default). It looks like this is used to turn on “Dynamic Boost”, e.g. temporary overclocking of the GPU/CPU (in tandem?), perhaps to a combined TDP target. I really wish this stuff was maybe part of the nvidia-settings tool…same with the driver options above…and the modeset option below…
I have this in my /etc/mkinitcpio.conf:
…
MODULES=(amdgpu nvidia nvidia_modeset nvidia_uvm nvidia_drm)
…
I use the following kernel params when booting:
nvidia-drm.modeset=1
Now, for me suspend works, it goes to sleep reliably. Waking from sleep has sporadic behavior at times. I am using Cinnamon desktop, and have it set to “Lock” the screen upon sleep.
I get one of the following scenarios (seemingly at random) when waking:
1a) Often, it just works fine and comes up to the lock screen, prompting me for the password…about 75% of the time.
1b) Sometimes, the same thing happens, but my account is locked out for 10 minutes “3 failed attempts”…somehow wake from sleep intermittently sends gibberish to the Lock screen text field and I have to ALT+F2 to login as a super user on console and unlock my account…this sometimes happens a lot, other times it seems to go away for a while…
2a) Sometimes, wake from sleep comes up to a black screen with just my cursor, or sometimes it shows the lock screen but no login prompt…consoles work, but the desktop environment is hosed. The screen is frozen, and shows me the clock from when I put it to sleep…this happens the remaining 25% of the time.
2b) Sometimes, similar to 3, but if I wait a while (30 seconds?) it recovers; the clock starts to update again, and the login prompt works
2c) In some cases, the screen remains frozen, but I can get audible feedback from typing…e.g. I can enter in my password, and sometimes this results in it going to an unlocked desktop.
3) I’ve seen at least a few occasions where when the display initially comes up, my desktop is shown, unlocked, for a moment before the lock screen activates…implies a race condition with the suspend event, the lock screen being activated, and the machine actually going to sleep. Not sure if this is related to the nVidia driver at all.
It would resume from sleep every time in the 560 and prior drivers. I don’t know why it got worse, but it did.