Leap 15.6, Nvidia driver 580 – resume from S3 deep sleep state after suspend to RAM?

Some months ago I wrote a post about a Nvidia option, which at that time helped to overcome a specific problem with a suspend-to-RAM [leading to a deep S3 sleep state] action and a following incomplete resume operation from the S3 state to the original desktop session. The setting “nvidia_modeset vblank_sem_control=0” at least remedied a result which had been described by many users of different Linux flavors: The resume process ended up in a black screen with only a mouse cursor being visible. This situation was difficult to control – and typically one had to reboot the system.

In my experience things have changed a bit since the named post. Therefore, I give a brief summary of other settings below. These settings appear to support relatively stable suspend-to-ram and resume operations on my Leap 15.6 system with my X11-based KDE Plasma a newer Nvidia driver of version 580. However, though not leading to black screens any more, the resume process will not always restore the interrupted KDE/Plasma session. Notably, after a series of extended tests the suspend/resume processes seem to work significantly more stable with Wayland than with X11.

Note, 11/08/25: I had to change this post after some more systematic tests. While I could confirm my general impression that driver Nvidia 580.105 has brought more stability to resume processes from deep S3 sleep, on a X11 based KDE/Plasma desktop, resume processes do fail sometimes – in 20%-30% of the cases. Probably due to race conditions during the restoration of the interrupted KDE/Plasma-session (see below). This did not happen in a series of tests with different sleep time intervals for a Plasma desktop based on Wayland.

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 Nvidia driver is the proprietary Nvidia driver of version 580.105.08. It was installed from the usual repository. In particular the The RPM “nvidia-driver-G06-kmp-default” is installed. KDE is of version 5.115, Plasma of version 5.27, t5 of version 5.15.12.

Note: I have not checked whether things work on other systems or with Gnome based desktops, 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

blacklist nouveau
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

Resume-buttons

I usually start suspending to RAM by options offered on the KDE Plasma desktop. But things work also from the command line or with automatic invocation after some idle time of the desktop. My ASRock-board shows that (video) memory contents is written to the system’s root filesystem (see option ) by indicating a respective storage-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. I can also use the power button on my PC case to start the resume process. If the resume process leads to the old KDE/Plasma session – which it does in more than 60% of the cases with X11 – this session is restored in the state before the suspend-process, 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.

Results after a series of tests on X11 and Wayland based KDE Plasma desktop

In contrast to previous versions of this post, I have now investigated the behavior of the resume processes a bit more systematically, both for X11 and Wayland. For each of the platforms, I have tested the success of suspend/resume processes 15 to 20 times – with growing duration of the sleep interval between 5 minutes up to 40 minutes. The tests also varied with respect to the triggering of the suspend action, regarding both direct user action or, alternatively, an automatic start of a suspend process after some defined idle time. In the latter case a lock/login screen was invoked some minutes before suspend started. (You find respective options in KDE-5’s “systemsettings5”.)

X11-based KDE/Plasma
In the case of X11 a return to the interrupted KDE Plasma session fails in around 30% of the cases. In such cases the resume process 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 due to some error (see below). The system then obviously turns into a workaround: It forgets the old KDE-session, restarts into the default graphical target and starts SDDM for a new graphical user session. So, the problem with a blank screen and only the mouse cursor blinking appears to have gone (maybe due to the settings “nvidia_modeset vblank_sem_control=0” or due to other improvements; this still has to be checked).

Note, 11/08/25: A previously assumed dependency of the resume success on using the power button or, alternatively, the keyboard to start the resume operation has disappeared after a larger number of tests. There still seems to be a dependency on the duration of the sleep time.

This result means that users of KDE/Plasma should take care of saving all their work before leaving their KDE/plasma desktop unattended with settings that automatically trigger suspend after a defined idle time.

Wayland-based KDE/Plasma
Let me first mention that Wayland meanwhile works really well for the wide range of applications I regularly use. For all the 20 times I tested suspend/resume on Wayland, each trial ended in a successful and complete restoration of the interrupted KDE/Plasma session (which could be entered via login to my KDE session lock-screen).

Race conditions during resume for X11-based KDE/Plasma desktop?

Afterwards, I have checked the logs for X11 and found that the failed resume processes have led to a situation were the X11-session appeared to be broken for certain starting applications as pulseaudio and gkrellm. This may be the result of race conditions between X11-restoration and processes requiring an X11-connection already during resume. In such a case the restart of the default graphical target happened.

Conclusion

The suspend/resume behavior on Leap-systems obviously changes depending on kernel and Nvidia’s driver versions. Presently and on Leap 15.6 systems, we have only reached a relatively stable status regarding suspend-to-RAM and resume for KDE Plasma on a X11-basis: In more than 60% of the cases, the interrupted KDE/Plasma session is fully restored. In other cases I, at least, did not experience blank screens, but a return to the SDDM login-screen for a new desktop session. X11 users should therefore save all their work before leaving the desktop.

The good news is that suspend/resume appears to work flawlessly with Wayland (at least on my conservative Leap system).

I hope this post helps some readers who experience instability problems with suspend/resume on Leap systems with Nvidia graphics cards.

 

Keras 3/TF vs. PyTorch – small model performance tests on a Nvidia 4060 TI

There are many PROs and CONs regarding the choice of a Machine Learning [ML] framework for private studies on a Linux Workstations. Two mainly used frameworks are PyTorch and a Keras/Tensorflow combination. One aspect for productive work with ML models certainly is performance. And as I personally do not have TPUs or other advanced chips available, but just a consumer Nvidia 4060 TI graphics card, performance and optimal GPU usage are of major interest – even for the training of relatively small models.

With this post I just want to point out that the question of performance advantages of some framework on a CUDA controlled graphics card can not be answered in a unique way. Even for small neural network [NN] models the performance may depend on a variety of relevant settings, on jit-/xla-compilation and the chosen precision level of your training or inference runs.

Continue reading