Some months ago I have written a post about a Nvidia option, which at that time seemed to help to overcome problems with a suspend to deep S3 sleep state [Suspend to RAM] and a flawless resume operation from the S3 state.
In my experience things have changed a bit since the named post. Therefore, I give a brief summary of other settings which appear to support a relatively problem-free suspend-to-ram and resume operations on my Leap 15.6 system with KDE Plasma, X11 and a newer Nvidia driver.
Card, driver, services, grub_cmdline
I describe the settings for just one of my systems. The board is an older ASRock Z170 extreme+. The Nvidia card is a 4060 TI. My present driver is the proprietary Nvidia driver of version 580.95.05. It was installed from the usual repository. In particular the The RPM “nvidia-driver-G06-kmp-default” is installed. I have not checked whether things work on other systems and with Wayland, yet.
The default grub cmdline contains the parameter setting
nvidia-drm.modeset=1
The services
- nvidia-suspend.service
- nvidia-hibernate.service
- nvidia-resume.service
- nvidia-persistenced.service
- nvidia-powerd.service
are all enabled.
Nvidia configuration settings
In the directory “/etc/modprobe.d”, I have a file 50-nvidia.conf”, which contains the following option
options nouveau modeset=0
options nvidia NVreg_DeviceFileUID=0
options nvidia NVreg_DeviceFileGID=33
options nvidia NVreg_DeviceFileMode=0660
options nvidia NVreg_TemporaryFilePath=/var/tmp
options nvidia NVreg_EnableS0ixPowerManagement=1
options nvidia NVreg_PreserveVideoMemoryAllocations=1
options nvidia-drm modeset=1
#
options nvidia_modeset vblank_sem_control=0
Dependency on other things – like the resume-button and the sleep-time
I start suspending to RAM by command options offered on the KDE Plasma desktop. My ASRock-board shows that memory contents is written to the harddisk by indicating a respective SSD-activity ahead of reaching the S3 state. When the deep suspend state S3 is reached the power button starts blinking.
The default keyboard-button for triggering a resume from sleep is the “blank” key. Using the keyboard to trigger a resume operation seems to work flawlessly so far. Usually, I get to the Plasma lock/login-screen for my running KDE session, which is restored in the state before suspend – with all interrupted processes running again. Independent of the duration of the sleep time. Logs show that a time jump is recognized and that the system adapts to it.
However and notably:
Resume does not work always by pressing the power button on my case briefly. Actually, pressing the power button shortly after a sleep time >≈ 15 minutes often leads to a resume that ends up in a SDDM login-screen for a new KDE Plasma session. The logs then show that the old Plasma session could not be restored. The system then obviously turns into workaround: It forgets the old KDE-session, restarts into the default graphical target and starts SDDM for a new graphical user session.
This strange behavior does not happen when pressing the default keyboard button to trigger a resume operation.
Conclusion
The suspend/resume behavior on Leap-systems changes depending on kernel and Nvidia’s driver versions. Presently, I have fortunately reached a relatively stable status regarding suspend-to-RAM and resume for KDE Plasma on a X11-basis. I hope this post helps some readers who experience problems with suspend/resume on Leap systems with Nvidia graphics cards.