I am going Crazy with NVIDIA and Suspend

I seriously tried a lot but nothing works. TW simply cannot suspend and resume.

I shall post any information … but I don’t have high hopes…this issue has been reocuring since forver. on multiple linux distros.

Linux literally cant Suspend / Resume properly…

 inxi -F     
System:
  Host: localhost.localdomain Kernel: 6.13.1-1-default arch: x86_64 bits: 64
  Desktop: KDE Plasma v: 6.2.5 Distro: openSUSE Tumbleweed 20250209
Machine:
  Type: Desktop Mobo: ASRock model: B450M Pro4-F serial: <superuser required>
    UEFI: American Megatrends v: P2.00 date: 12/16/2019
CPU:
  Info: 6-core model: AMD Ryzen 5 1600 bits: 64 type: MT MCP cache: L2: 3 MiB
  Speed (MHz): avg: 3393 min/max: 1550/3200 cores: 1: 3393 2: 3393 3: 3393
    4: 3393 5: 3393 6: 3393 7: 3393 8: 3393 9: 3393 10: 3393 11: 3393 12: 3393
Graphics:
  Device-1: NVIDIA GP107 [GeForce GTX 1050 Ti] driver: nvidia v: 570.86.16
  Display: x11 server: X.Org v: 21.1.15 with: Xwayland v: 24.1.5 driver: X:
    loaded: nvidia unloaded: modesetting,vesa gpu: nvidia,nvidia-nvswitch
    resolution: 1: 1920x1080~60Hz 2: 1920x1080~60Hz
  API: EGL v: 1.5 drivers: nvidia platforms: gbm,x11,surfaceless,device
  API: OpenGL v: 4.6.0 vendor: nvidia v: 570.86.16 renderer: NVIDIA GeForce
    GTX 1050 Ti/PCIe/SSE2
  API: Vulkan v: 1.4.304 drivers: N/A surfaces: xcb,xlib
  Info: Tools: api: eglinfo, glxinfo, vulkaninfo
    de: kscreen-console,kscreen-doctor wl: wayland-info
    x11: xdpyinfo, xprop, xrandr
Audio:
  Device-1: NVIDIA GP107GL High Definition Audio driver: snd_hda_intel
  Device-2: Advanced Micro Devices [AMD] Family 17h HD Audio
    driver: snd_hda_intel
  Device-3: GN Netcom Jabra EVOLVE 20 SE MS
    driver: jabra,snd-usb-audio,usbhid type: USB
  API: ALSA v: k6.13.1-1-default status: kernel-api
  Server-1: PipeWire v: 1.2.7 status: active
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    driver: r8169
  IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: a8:a1:59:24:60:69
Bluetooth:
  Device-1: Broadcom BCM2035B3 Bluetooth Adapter driver: btusb type: USB
  Report: btmgmt ID: hci0 state: up address: 00:1A:7D:00:3B:0D bt-v: 1.1
Drives:
  Local Storage: total: 4.09 TiB used: 331.3 GiB (7.9%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO Plus 500GB
    size: 465.76 GiB
  ID-2: /dev/sda vendor: Toshiba model: MQ04UBB400 size: 3.64 TiB type: USB
Partition:
  ID-1: / size: 463.26 GiB used: 331.28 GiB (71.5%) fs: btrfs
    dev: /dev/nvme0n1p2
  ID-2: /boot/efi size: 511 MiB used: 20.6 MiB (4.0%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-3: /home size: 463.26 GiB used: 331.28 GiB (71.5%) fs: btrfs
    dev: /dev/nvme0n1p2
  ID-4: /opt size: 463.26 GiB used: 331.28 GiB (71.5%) fs: btrfs
    dev: /dev/nvme0n1p2
  ID-5: /var size: 463.26 GiB used: 331.28 GiB (71.5%) fs: btrfs
    dev: /dev/nvme0n1p2
Swap:
  ID-1: swap-1 type: partition size: 2 GiB used: 0 KiB (0.0%)
    dev: /dev/nvme0n1p3
Sensors:
  System Temperatures: cpu: 31.9 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 16 GiB available: 15.54 GiB used: 5.61 GiB (36.1%)
  Processes: 419 Uptime: 0h 22m Shell: Zsh inxi: 3.3.37

Yes I have disabled bluetooth, uninstalled bluez, still hangs on resume

this may be related :
https://www.reddit.com/r/pop_os/comments/1i1kxzj/nvidia_driver_56577_completely_broke_suspend/

solved by going back to 550 (from 570)

Not sure if your solution will last come the next update? I see you have a similar Graphics Card to me I have GTX 1060 to your 1050ti & from another thread on here it seems they may be too old to support the power options hence the problem. With a bit of searching I found the following: from here https://download.nvidia.com/XFree86/Linux-x86_64/555.58.02/README/powermanagement.html

Known Issues and Workarounds (at bottom of page in chapter 21)

On some systems, where the default suspend mode is "s2idle", the system may not resume properly due to a known timing issue in the kernel. The suspend mode can be verified by reading the contents of the file /sys/power/mem_sleep. The following upstream kernel changes have been proposed to fix the issue:

https://lore.kernel.org/linux-pci/20190927090202.1468-1-drake@endlessm.com/

https://lore.kernel.org/linux-pci/20190821124519.71594-1-mika.westerberg@linux.intel.com/

In the interim, the default suspend mode on the affected systems should be set to "deep" using the kernel command line parameter "mem_sleep_default" -

mem_sleep_default=deep

So you could try checking that I then changed this in my boot file as per these instructions:
Changed with these instructions from Chat GPT
To set mem_sleep_default=deep in openSUSE, follow these steps:

1. Edit the Bootloader Configuration

Open a terminal and edit the GRUB configuration file:

sudo nano /etc/default/grub

Find the line that starts with:

GRUB_CMDLINE_LINUX_DEFAULT="..."

and append mem_sleep_default=deep to it. For example:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem_sleep_default=deep"

2. Update GRUB Configuration

After saving the file (Ctrl + X, then Y, then Enter), update GRUB:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

3. Reboot the System

Restart your machine to apply the changes:

sudo reboot

4. Verify the Setting

After rebooting, check if the setting is applied:

cat /sys/power/mem_sleep

The output should show:

s2idle [deep]

The deep option should be in brackets ([deep]), indicating that it is the active sleep mode.

Mine seems to be working fine now, but I don’t know if this “fix” will also get wiped out by the next kernel update? Maybe more knowledgeable admin types on here will be able to tell me if that’s the case or that this was a bad idea!? Hope this might help.

Changes to /etc/default/grub are considered local system configs and survive “zypper dup”, whatever package might be upgraded in the process.

1 Like

Thank you for confirming that, so hopefully I should be fine now going forward.

Ill try this with 570 and see it i can still have the latest driver with my 1050

  ~ inxi -G
Graphics:
  Device-1: NVIDIA GP107 [GeForce GTX 1050 Ti] driver: nvidia v: 570.86.16
  Display: x11 server: X.Org v: 21.1.15 with: Xwayland v: 24.1.5 driver: X:
    loaded: nvidia unloaded: modesetting,vesa gpu: nvidia,nvidia-nvswitch
    resolution: 1: 1920x1080~60Hz 2: 1920x1080~60Hz
  API: EGL v: 1.5 drivers: nvidia platforms: x11,surfaceless,device
  API: OpenGL v: 4.6.0 vendor: nvidia v: 570.86.16 renderer: NVIDIA GeForce
    GTX 1050 Ti/PCIe/SSE2
  API: Vulkan v: 1.4.304 drivers: N/A surfaces: xcb,xlib
  Info: Tools: api: eglinfo, glxinfo, vulkaninfo
    de: kscreen-console,kscreen-doctor gpu: nvidia-smi wl: wayland-info
    x11: xdpyinfo, xprop, xrandr

➜  ~ cat /sys/power/mem_sleep

s2idle [deep]

Unfortunatelly No. Black screen and system hang after resume.

Going back to 550, and disabling my nvidia repo

@jjis thanks for the suggestion anyway!

[quote=“billyboo, post:8, topic:182545”]
Ok sorry it didn’t work for you. I’m on Gnome whereas you seem to be on KDE as far as I can tell & I don’t seem to have the EGL stuff installed, but not sure if that matters? Did you try a reboot?
inxi -G
Graphics:
Device-1: NVIDIA GP106 [GeForce GTX 1060 3GB] driver: nvidia v: 570.86.16
Display: wayland server: X.org v: 1.21.1.15 with: Xwayland v: 24.1.5
compositor: gnome-shell v: 47.4 driver: X: loaded: nvidia
unloaded: modesetting,vesa gpu: nvidia,nvidia-nvswitch resolution:
1: 3440x1440~60Hz 2: 1920x1080~60Hz
API: OpenGL v: 4.6.0 vendor: nvidia v: 570.86.16 renderer: NVIDIA GeForce
GTX 1060 3GB/PCIe/SSE2
API: EGL Message: EGL data requires eglinfo. Check --recommends.
Info: Tools: api: glxinfo gpu: nvidia-settings,nvidia-smi
x11: xprop,xrandr

I was hopeful this would help since we have the same card, but my s2idle was already [deep] and adding the parameter anyway didn’t help.

In case you didn’t downgrade yet, do you have any access to the OS after the system hangs? Sometimes spamming Esc or causing the nvidia driver to crash by turning displays off and on again lets me log in and use the system (with a crashed plasmashell) just enough to run dmesg on a previously open terminal.

I’m asking because I get a CPU soft lockup [nvidia-sleep.sh:3805] upon sleep/resume, and I’m curious whether it’s possibly connected to the issue. My dmesg.

Also I notice you have Vulkan v: 1.4.304 drivers which I think could be the problem as the 570 is only beta for that with 550 being the main stable. See: Vulkan Driver Support | NVIDIA Developer

:man_shrugging:

Yes this can also make it work for me. hitting esc etc

but it was like 10% of the times

Had a crash earlier today.
I can send you any info you like, just tell me what command you’d like

Try dmesg before sleeping to see any preexisting anomalies, then after.

Here it works every time but it’s slow, ~30s or more for the display to get signal. Sometimes I only get the cursor so I hover it over the area the password would go in the lock screen, type it blindly and I’ll get image again upon login. Plasmashell will have crashed and will refuse to start again so no window manager, shortcuts, etc, hence leaving a terminal open and maximized. The system will also be slow and have minor freezes.

sorry I couldnt be bothered to install 570 again but here is the full dmesg from last 4hours that I tried it (like 2h ago)

It’s fine. Do you remember if you had fbdev=1 in the bootloader when you captured that info? At first glance your system didn’t report the same issues as mine, but that param can suppress warnings.

nah I didnt…i guess the driver just fails to resume probably cause of external monitors and 1050ti card or something

I have a possible solution if you have an iGPU and are willing to use it for the OS!

I just found out that:

  • Enabling the iGPU and still using the GPU as default device stabilizes my system somewhat with 570. It doesn’t solve the issue, plasmashell will crash and restart upon wake up, but the system wakes up faster without my intervention.

  • Using the iGPU as default fully solves the sleep issue. I can still use the GPU through switcheroorctl, it’s just not the default for starting new programs. No crashes, no lags, no black screens, the system promptly wakes up.

If you’re able to fully use the 550 I’d stick with it. In my case I can’t get openCl 550 to work, it’s conflicting with my system, so I’m using the iGPU as default now.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.