Sleep & Hibernate Issues. Running Nvidia RTX 3060

Hello. Basically if I’m running Wayland, I cannot return from sleep. Sometimes I’ll get a frozen screen with the login page, but generally I’m stuck until a hard reboot. I’ve put nvidia-drm.modeset=1 in my /etc/default/grub and updated grub with grub2-mkconfig -o /boot/grub2/grub.cfg, however I don’t know how else to diagnose this without bricking the system.
The reason I don’t just use X11 is because I have a dual monitor set up. My primary monitor has a 165Hz refresh rate, and my second monitor has a 60Hz refresh rate. For some reason, the only part of my monitor that will be at the correct refresh rate is my mouse. None of my games or applications are taking advantage of it.

All I ask is that if I have to go back to Xorg, that there be a solution for my mutli refresh rate situation.

Here is my inxi output

System:
  Host: localhost.localdomain Kernel: 6.6.3-1-default arch: x86_64 bits: 64
    Desktop: KDE Plasma v: 5.27.9 Distro: openSUSE Tumbleweed 20231201
Machine:
  Type: Desktop System: Dell product: Precision T1650 v: 01
    serial: <superuser required>
  Mobo: Dell model: 0C3YXR v: A01 serial: <superuser required> UEFI: Dell
    v: A28 date: 06/28/2018
CPU:
  Info: quad core model: Intel Core i7-3770 bits: 64 type: MT MCP cache:
    L2: 1024 KiB
  Speed (MHz): avg: 2001 min/max: 1600/3900 cores: 1: 3002 2: 1600 3: 1600
    4: 2417 5: 1600 6: 1600 7: 2018 8: 2171
Graphics:
  Device-1: NVIDIA GA106 [GeForce RTX 3060 Lite Hash Rate] driver: nvidia
    v: 545.29.06
  Device-2: Microdia IC800 1080P HD driver: snd-usb-audio,uvcvideo type: USB
  Display: wayland server: X.org v: 1.21.1.9 with: Xwayland v: 23.2.2
    compositor: kwin_wayland driver: X: loaded: nvidia gpu: nvidia resolution:
    1: 1920x1080 2: 1920x1080
  API: EGL v: 1.5 drivers: nvidia,swrast
    platforms: gbm,wayland,x11,surfaceless,device
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 545.29.06
    renderer: NVIDIA GeForce RTX 3060/PCIe/SSE2
  API: Vulkan v: 1.3.268 drivers: nvidia surfaces: xcb,xlib,wayland
Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio
    driver: snd_hda_intel
  Device-2: NVIDIA GA106 High Definition Audio driver: snd_hda_intel
  Device-3: C-Media Audio Adapter (Unitek Y-247A)
    driver: cmedia_hs100b,snd-usb-audio,usbhid type: USB
  Device-4: Microdia IC800 1080P HD driver: snd-usb-audio,uvcvideo type: USB
  API: ALSA v: k6.6.3-1-default status: kernel-api
  Server-1: PipeWire v: 1.0.0 status: active
Network:
  Device-1: Intel 82579LM Gigabit Network driver: e1000e
  IF: em1 state: up speed: 1000 Mbps duplex: full mac: b8:ca:3a:9b:d5:57
Bluetooth:
  Device-1: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) driver: btusb
    type: USB
  Report: btmgmt ID: hci0 state: up address: 00:1A:7D:DA:71:11 bt-v: 4.0
RAID:
  Hardware-1: Intel SATA Controller [RAID mode] driver: ahci
Drives:
  Local Storage: total: 4.57 TiB used: 2.38 TiB (52.1%)
  ID-1: /dev/sda vendor: Lexar model: SSD NS100 1TB size: 953.87 GiB
  ID-2: /dev/sdb vendor: Seagate model: ST4000NM0035-1V4107 size: 3.64 TiB
Partition:
  ID-1: / size: 937.79 GiB used: 228.17 GiB (24.3%) fs: btrfs dev: /dev/sda2
  ID-2: /boot/efi size: 511 MiB used: 5.8 MiB (1.1%) fs: vfat dev: /dev/sda1
  ID-3: /home size: 937.79 GiB used: 228.17 GiB (24.3%) fs: btrfs
    dev: /dev/sda2
  ID-4: /opt size: 937.79 GiB used: 228.17 GiB (24.3%) fs: btrfs
    dev: /dev/sda2
  ID-5: /var size: 937.79 GiB used: 228.17 GiB (24.3%) fs: btrfs
    dev: /dev/sda2
Swap:
  ID-1: swap-1 type: partition size: 15.57 GiB used: 149.5 MiB (0.9%)
    dev: /dev/sda3
Sensors:
  System Temperatures: cpu: 43.0 C mobo: 23.0 C
  Fan Speeds (rpm): cpu: 1020 mobo: 1123
Info:
  Processes: 287 Uptime: 0h 8m Memory: total: 16 GiB available: 15.57 GiB
  used: 2.51 GiB (16.1%) Shell: Bash inxi: 3.3.31

Could be the nvidia-hibernate,resume and suspend sevice are disabled.
Can you try starting the services at boot then reboot and see if it will work.

Can confirm that’s not the issue.
Running # systemctl list-unit-files --type=service gets the following result

UNIT FILE                                    STATE           PRESET  
nvidia-hibernate.service                     enabled         disabled
nvidia-persistenced.service                  disabled        disabled
nvidia-powerd.service                        disabled        disabled
nvidia-resume.service                        enabled         disabled
nvidia-suspend.service                       enabled         disabled

@rainmaker0102 You might want to peruse the README file, always a good source of information and tips… https://download.nvidia.com/XFree86/Linux-x86_64/545.29.06/README/powermanagement.html

Now this is interesting.
There’s a bit at the bottom talking about how there’s an issue with kernel timing on the default “s2idle” mode. Having done grep 'Video Memory Self Refresh' /proc/driver/nvidia/gpus/0000\:01\:00.0/power shows Video Memory Self Refresh: Not Supported which would lead me to believe that my RTX 3060 doesn’t support s2idle according to the readme. The readme isn’t clear how to switch to a legacy version of power management, or if that’s even recommended.

I know the system is using s2idle because /sys/power/mem_sleep says s2idle [deep].

Thoughts on where to go from here?

@rainmaker0102 Is secure boot enabled mokutil --sb-state? You could try temporarily disabling and test again?

Secure boot has been disabled

So what I’ve found out thus far.
Sleep does not work on Wayland. Sometimes i’ll see a frozen image of the lock screen, sometimes a black screen with my mouse, but for the most part it’s just black.
Sleep sometimes works on X11, but when it doesn’t I get an issue that’s something like “error with head flipping”.
When running both plasma wayland and plasma X11, Video Memory Self Refresh is not supported, even though s2idle is the sleep mode.

There has to be something from this logic I’m missing, but the documentation says otherwise.

@rainmaker0102 In X11, if you fire up nvidia-settings under OpenGL Settings is ‘Allow Flipping’ option checked?

Hi, there is a new driver from nvidia with fix for s2idle

@conram openSUSE G06 series is way past that one… 545.29.06

Hi, I am referring to the latest production branch version.
I know that new feature branch version and that is giving me a black screen with mouse after waking from suspend so a shifted to the production branch version. :wink:

I have been having the more or less “same” issue with reviving from suspend, with nvidia card, in Leap 15.6 && Slow Roll . . . but not TW. TW is working fine at this moment. I prolly have a bug report on it filed . . . doesn’t seem to be generating much concern. I am running X11, haven’t found wayland to be “reliable” in my Pop_OS machine.

Allow flipping is disabled

@rainmaker0102 check the box and see how that goes…