NVIDIA 575 drivers fail to suspend

After upgrading my system to the latest NVIDIA stable drivers (575.57.08) it won’t successfully suspend anymore. Checking my system’s logs, I think I’ve found the culprit:

PM: Some devices failed to suspend, or early wake event detected
jun 01 09:12:50 tarcisio-desktop kernel: nvidia 0000:29:00.0: PM: failed to suspend async: error -5
jun 01 09:12:50 tarcisio-desktop kernel: nvidia 0000:29:00.0: PM: dpm_run_callback(): pci_pm_suspend returns -5
jun 01 09:12:50 tarcisio-desktop kernel: nvidia 0000:29:00.0: PM: pci_pm_suspend(): nv_pmops_suspend [nvidia] returns -5
jun 01 09:12:50 tarcisio-desktop kernel: NVRM: GPU 0000:29:00.0: PreserveVideoMemoryAllocations module parameter is set. System Power Management attempted without driver procfs suspend interface. Please refer to the 'Configuring Power Management Support' section in the driver README.
jun 01 09:12:50 tarcisio-desktop kernel: ata1.00: Entering standby power mode

Is anyone experiencing the same issues? Possible fixes for this? It was resuming just fine with the previous driver version and now it just blinks the screen and comes back to GNOME’s lockscreen in a very laggy state, then coming back to normal.

try to enable user session suspending

$ cat /usr/lib/systemd/system/systemd-suspend.service.d/disable_freeze_user_session.conf
[Service]
Environment="SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=true"

Deletion of the file and directory would be better.

sudo rm -rf /usr/lib/systemd/system/systemd-suspend.service.d/

that would have been the 2nd step when confirmed that it works :slight_smile:

Do you know if this has to be removed with the latest 570* drivers too?

Systemd removed it as it caused issues.

570 still has the file, the next 575 build will remove it.
xorg-x11-drv-nvidia-power-575.57.08-1 still has the file

I edited the config file for setting the environment variable to true and rebooted my system.

Testing suspend afterward, there are no explicit logs of errors, but the system didn’t go into sleep properly - it just stopped displaying video but kept on for about two minutes without shutting down as it should.

How do I upload a really long log here?

Well I guess this will do: fedora 42 failed suspend attempt system log nvidia 575 drivers - Pastebin.com

Did you bother reading ‘Configuring Power Management Support’ in the readme?

firefox /usr/share/doc/xorg-x11-drv-nvidia/html/powermanagement.html

Does /var/tmp have enough freespace to suspend?

I’m not on my system to check that right now, but can’t /var/tmp tmpfs filesystem use swap if it hasn’t enough capacity? I’d guess it’s the default value for Fedora 39 - version I originally installed. Searching around I’ve found that it usually is half of the available RAM, so probably 8GBs.

My setup has 16GB of swap (zram) and other 4GBs on an HDD for a combined 20GB which should in theory be enough…

I did read it and it should work as is configured by Fedora through systemd + NVreg_PreserveVideoMemoryAllocations parameter

/var/tmp should be on the physical drive not tmpfs, I believe you need equal freespace to video ram (4gb gpu ram needs at least 4gb drive space.

Yeah, that’s right…
I do have an RTX 2060 6GB, and my drive has more than enough space to handle that, what exactly do you mean by free space on /var/tmp? Isn’t that just part of my root drive?

➜  ~ df -k /var/tmp
Filesystem                                             1K-blocks       Used Available Use% Mounted on
/dev/mapper/luks-15212fc9-74f8-45e2-9d6c-463dcf38ca55 1951834112 1620071920 318357360  84% /

EDIT: my setup’s fpaste!

Suspend is working without issue on my workstation

$ inxi -SCGmx
System:
  Host: leigh-pc Kernel: 6.15.0-61.fc43.x86_64 arch: x86_64 bits: 64
    compiler: gcc v: 15.1.1
  Desktop: Cinnamon v: 6.4.9 Distro: Fedora Linux 42 (Cinnamon)
Memory:
  System RAM: total: 64 GiB available: 62.65 GiB used: 47.67 GiB (76.1%)
  Array-1: capacity: 128 GiB slots: 4 modules: 4 EC: None
    max-module-size: 32 GiB note: est.
  Device-1: DIMM_A1 type: DDR4 size: 16 GiB speed: 3200 MT/s
  Device-2: DIMM_A2 type: DDR4 size: 16 GiB speed: 3200 MT/s
  Device-3: DIMM_B1 type: DDR4 size: 16 GiB speed: 3200 MT/s
  Device-4: DIMM_B2 type: DDR4 size: 16 GiB speed: 3200 MT/s
CPU:
  Info: 8-core model: AMD Ryzen 7 5700 bits: 64 type: MT MCP arch: Zen 3
    rev: 0 cache: L1: 512 KiB L2: 4 MiB L3: 16 MiB
  Speed (MHz): avg: 3000 min/max: 421/4654 boost: enabled cores: 1: 3000
    2: 3000 3: 3000 4: 3000 5: 3000 6: 3000 7: 3000 8: 3000 9: 3000 10: 3000
    11: 3000 12: 3000 13: 3000 14: 3000 15: 3000 16: 3000 bogomips: 118407
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: NVIDIA GA107 [GeForce RTX 3050 6GB] vendor: Gigabyte
    driver: nvidia v: 575.57.08 arch: Ampere bus-ID: 01:00.0
  Display: x11 server: X.Org v: 21.1.16 with: Xwayland v: 24.1.6 driver: X:
    loaded: nvidia unloaded: modesetting,nouveau gpu: nvidia,nvidia-nvswitch
    resolution: 3840x2160~60Hz
  API: EGL v: 1.5 drivers: nvidia,swrast platforms:
    active: gbm,x11,surfaceless,device inactive: wayland,device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 575.57.08
    glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce RTX 3050/PCIe/SSE2
  API: Vulkan v: 1.4.313 drivers: nvidia,llvmpipe surfaces: N/A devices: 3
  Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
    gpu: nvidia-settings,nvidia-smi wl: wayland-info x11: xdriinfo, xdpyinfo,
    xprop, xrandr

Does your system suspend right after login?
S2idle (Modern Standby) or the older S3 suspend?

I have a dual boot system and I suspect that suspend is very unreliable if system was rebooted from windows to linux. I have to power down the system for a few seconds and then boot linux.

I’ve never made changes to Fedora’s default suspending despite the one mentioned in this thread, so I believe it’s S3 suspend through systemd-suspend.

My setup will freeze everytime when trying to suspend (it previously worked just fine with NVIDIA 570 drivers). I don’t have dualboot set up, only Fedora installed on my SSD.

Do you have user session suspending enabled or disabled?

I have no idea what that is, is it some gnome thing?

leigh@leigh-pc:~$ cat /sys/power/mem_sleep
s2idle [deep]

I’m referring to this: NVIDIA 575 drivers fail to suspend - #2 by anotheruser

It works with or without that file.