Nvidia GPU not waking from suspend on F41 KDE Wayland

Hihi. I’m encountering an issue that seems to be fairly common with fedora 41, that the screen connected via HDMI will not wake from sleep after inactivity-based sleep/suspend, using an Nvidia GPU using RPM Fusion drivers.
I have followed the RPM Fusion guide here, as well as the section on suspend and followed those instructions, excluding the optional NVreg_TemporaryFilePath step.
I have searched the forums for similar topics, and found these posts:

The third one is only somewhat relevant - their system appears to not boot, but mine does fine and is only problematic on resume from inactivity suspend.

I am currently accessing it through ssh on another device. here is relevant system info, based on those posts, excluding kscreen-doctor which I could not find a man page for on my system (I don’t run commands blindly before reading the man page):

$ lsmod | grep -E 'nouveau|nvidia'
nvidia_drm            151552  139
nvidia_modeset       1830912  71 nvidia_drm
nvidia_uvm           3997696  0
nvidia              97112064  1264 nvidia_uvm,nvidia_modeset
drm_ttm_helper         16384  2 amdgpu,nvidia_drm
video                  81920  2 amdgpu,nvidia_modeset
$ inxi -Fzxx
System:
  Kernel: 6.13.8-200.fc41.x86_64 arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
  Console: pty pts/2 DM: SDDM Distro: Fedora Linux 41 (KDE Plasma)
Machine:
  Type: Desktop Mobo: Micro-Star model: PRO X670-P WIFI (MS-7D67) v: 1.0
    serial: <superuser required> UEFI: American Megatrends LLC. v: 1.A0 date: 08/10/2023
CPU:
  Info: 8-core model: AMD Ryzen 7 7700X bits: 64 type: MT MCP arch: Zen 4 rev: 2 cache:
    L1: 512 KiB L2: 8 MiB L3: 32 MiB
  Speed (MHz): avg: 2988 min/max: 400/5573 boost: enabled cores: 1: 2988 2: 2988 3: 2988 4: 2988
    5: 2988 6: 2988 7: 2988 8: 2988 9: 2988 10: 2988 11: 2988 12: 2988 13: 2988 14: 2988 15: 2988
    16: 2988 bogomips: 144008
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: NVIDIA GA104 [GeForce RTX 3060] vendor: Micro-Star MSI driver: nvidia v: 570.133.07
    arch: Ampere pcie: speed: 2.5 GT/s lanes: 16 ports: active: none off: HDMI-A-2
    empty: DP-4,DP-5,DP-6 bus-ID: 01:00.0 chip-ID: 10de:2487
  Device-2: Advanced Micro Devices [AMD/ATI] Raphael vendor: Micro-Star MSI driver: amdgpu
    v: kernel arch: RDNA-2 pcie: speed: 16 GT/s lanes: 16 ports: active: none empty: DP-1, DP-2,
    DP-3, HDMI-A-1, Writeback-1 bus-ID: 18:00.0 chip-ID: 1002:164e temp: 41.0 C
  Display: unspecified server: Xwayland v: 24.1.6 compositor: kwin_wayland driver:
    gpu: nvidia,nvidia-nvswitch tty: 149x60
  Monitor-1: HDMI-A-2 model: Asus PB278 res: 2560x1440 dpi: 109 diag: 685mm (27")
  API: EGL v: 1.5 platforms: device: 0 drv: nvidia gbm: drv: nvidia surfaceless: drv: nvidia
    wayland: drv: nvidia inactive: x11
  API: OpenGL v: 4.6.0 vendor: nvidia v: 570.133.07 note: console (EGL sourced) renderer: NVIDIA
    GeForce RTX 3060/PCIe/SSE2
  API: Vulkan v: 1.4.304 surfaces: wayland device: 0 type: discrete-gpu driver: N/A
    device-ID: 10de:2487 device: 1 type: integrated-gpu driver: N/A device-ID: 1002:164e device: 2
    type: cpu driver: N/A device-ID: 10005:0000
  Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo de: kscreen-console,kscreen-doctor
    gpu: nvidia-settings,nvidia-smi wl: wayland-info x11: xdriinfo, xdpyinfo, xprop, xrandr
Audio:
  Device-1: NVIDIA GA104 High Definition Audio vendor: Micro-Star MSI driver: snd_hda_intel
    v: kernel pcie: speed: 16 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:228b
  Device-2: Advanced Micro Devices [AMD/ATI] Rembrandt Radeon High Definition Audio
    vendor: Micro-Star MSI driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16
    bus-ID: 18:00.1 chip-ID: 1002:1640
  Device-3: Advanced Micro Devices [AMD] Family 17h/19h/1ah HD Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16 bus-ID: 18:00.6
    chip-ID: 1022:15e3
  Device-4: Micro Star USB Audio driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 3-6:4 chip-ID: 0db0:3130
  API: ALSA v: k6.13.8-200.fc41.x86_64 status: kernel-api
  Server-1: PipeWire v: 1.2.7 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
Network:
  Device-1: Realtek RTL8125 2.5GbE vendor: Micro-Star MSI driver: r8169 v: kernel pcie:
    speed: 5 GT/s lanes: 1 port: d000 bus-ID: 06:00.0 chip-ID: 10ec:8125
  IF: enp6s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: MEDIATEK MT7922 802.11ax PCI Express Wireless Network Adapter driver: mt7921e
    v: kernel pcie: speed: 5 GT/s lanes: 1 bus-ID: 0d:00.0 chip-ID: 14c3:0616
  IF: wlp13s0 state: down mac: <filter>
Bluetooth:
  Device-1: MediaTek Wireless_Device driver: btusb v: 0.8 type: USB rev: 2.1 speed: 480 Mb/s
    lanes: 1 bus-ID: 3-7:5 chip-ID: 0e8d:0616
  Report: btmgmt ID: hci0 rfk-id: 5 state: down bt-service: enabled,running rfk-block:
    hardware: no software: yes address: <filter> bt-v: 5.2 lmp-v: 11
Drives:
  Local Storage: total: 9.78 TiB used: 161.49 GiB (1.6%)
  ID-1: /dev/nvme0n1 vendor: Western Digital model: WD Blue SN570 500GB size: 465.76 GiB
    speed: 31.6 Gb/s lanes: 4 serial: <filter> temp: 34.9 C
  ID-2: /dev/sda vendor: Samsung model: SSD 870 EVO 250GB size: 232.89 GiB speed: 6.0 Gb/s
    serial: <filter>
  ID-3: /dev/sdb vendor: Western Digital model: WD6003FZBX-00K5WB0 size: 5.46 TiB
    speed: 6.0 Gb/s serial: <filter>
  ID-4: /dev/sdc vendor: Samsung model: SSD 870 EVO 4TB size: 3.64 TiB speed: 6.0 Gb/s
    serial: <filter>
Partition:
  ID-1: / size: 93.24 GiB used: 27.86 GiB (29.9%) fs: ext4 dev: /dev/sda2
  ID-2: /boot/efi size: 511 MiB used: 19.4 MiB (3.8%) fs: vfat dev: /dev/sda1
  ID-3: /home size: 457.38 GiB used: 110.68 GiB (24.2%) fs: ext4 dev: /dev/nvme0n1p1
  ID-4: /opt size: 294.23 GiB used: 20.63 GiB (7.0%) fs: ext4 dev: /dev/sdc1
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100 dev: /dev/zram0
  ID-2: swap-2 type: partition size: 15.62 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/sda4
Sensors:
  System Temperatures: cpu: 45.8 C mobo: 30.0 C
  Fan Speeds (rpm): fan-1: 587 fan-2: 0 fan-3: 0 fan-4: 381 fan-5: 611 fan-6: 646 fan-7: 0
    fan-8: 811 fan-9: 0 fan-10: 0
  GPU: device: nvidia screen: :0.0 temp: 35 C device: amdgpu temp: 41.0 C
Info:
  Memory: total: 64 GiB note: est. available: 61.94 GiB used: 5.98 GiB (9.7%)
  Processes: 464 Power: uptime: 1d 13h 17m wakeups: 4 Init: systemd v: 256 target: graphical (5)
    default: graphical
  Packages: pm: rpm pkgs: N/A note: see --rpm pm: flatpak pkgs: 16 Compilers: gcc: 14.2.1
    Shell: Bash v: 5.2.32 running-in: pty pts/2 inxi: 3.3.37

Here are the troubleshooting/confirmation steps I’ve tried, based on those posts (as well as some others that either were dead posts, or had other resolutions the OP discovered)

  1. Confirm nvidia services enabled:
sudo systemctl status nvidia-suspend.service nvidia-resume.service
[sudo] password for indoorjetpacks:
○ nvidia-suspend.service - NVIDIA system suspend actions
     Loaded: loaded (/usr/lib/systemd/system/nvidia-suspend.service; enabled; preset: enabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf, 50-keep-warm.conf
     Active: inactive (dead)

Mar 30 23:33:56 skywalker logger[23826]: <13>Mar 30 23:33:56 suspend: nvidia-suspend.service
Mar 30 23:33:58 skywalker systemd[1]: nvidia-suspend.service: Deactivated successfully.
Mar 30 23:33:58 skywalker systemd[1]: Finished nvidia-suspend.service - NVIDIA system suspend actions.
Mar 30 23:33:58 skywalker systemd[1]: nvidia-suspend.service: Consumed 1.791s CPU time, 1.2G memory peak.
Mar 31 09:27:38 skywalker systemd[1]: Starting nvidia-suspend.service - NVIDIA system suspend actions...
Mar 31 09:27:38 skywalker suspend[29365]: nvidia-suspend.service
Mar 31 09:27:38 skywalker logger[29365]: <13>Mar 31 09:27:38 suspend: nvidia-suspend.service
Mar 31 09:27:40 skywalker systemd[1]: nvidia-suspend.service: Deactivated successfully.
Mar 31 09:27:40 skywalker systemd[1]: Finished nvidia-suspend.service - NVIDIA system suspend actions.
Mar 31 09:27:40 skywalker systemd[1]: nvidia-suspend.service: Consumed 1.637s CPU time, 1G memory peak.

○ nvidia-resume.service - NVIDIA system resume actions
     Loaded: loaded (/usr/lib/systemd/system/nvidia-resume.service; enabled; preset: enabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf, 50-keep-warm.conf
     Active: inactive (dead)

Mar 31 09:01:43 skywalker systemd[1]: Finished nvidia-resume.service - NVIDIA system resume actions.
Mar 31 09:19:26 skywalker logger[27213]: <13>Mar 31 09:19:26 suspend: nvidia-resume.service
Mar 31 09:19:26 skywalker suspend[27213]: nvidia-resume.service
Mar 31 09:19:26 skywalker systemd[1]: Starting nvidia-resume.service - NVIDIA system resume actions...
Mar 31 09:19:26 skywalker systemd[1]: nvidia-resume.service: Deactivated successfully.
Mar 31 09:19:26 skywalker systemd[1]: Finished nvidia-resume.service - NVIDIA system resume actions.
Mar 31 09:32:06 skywalker logger[29606]: <13>Mar 31 09:32:06 suspend: nvidia-resume.service
Mar 31 09:32:06 skywalker systemd[1]: Starting nvidia-resume.service - NVIDIA system resume actions...
Mar 31 09:32:06 skywalker systemd[1]: nvidia-resume.service: Deactivated successfully.
Mar 31 09:32:06 skywalker systemd[1]: Finished nvidia-resume.service - NVIDIA system resume actions.
[indoorjetpacks@skywalker ~]$ ^C
[indoorjetpacks@skywalker ~]$ sudo systemctl status nvidia-suspend.service nvidia-resume.service
○ nvidia-suspend.service - NVIDIA system suspend actions
     Loaded: loaded (/usr/lib/systemd/system/nvidia-suspend.service; enabled; preset: enabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf, 50-keep-warm.conf
     Active: inactive (dead)

Mar 30 23:33:56 skywalker logger[23826]: <13>Mar 30 23:33:56 suspend: nvidia-suspend.service
Mar 30 23:33:58 skywalker systemd[1]: nvidia-suspend.service: Deactivated successfully.
Mar 30 23:33:58 skywalker systemd[1]: Finished nvidia-suspend.service - NVIDIA system suspend actions.
Mar 30 23:33:58 skywalker systemd[1]: nvidia-suspend.service: Consumed 1.791s CPU time, 1.2G memory peak.
Mar 31 09:27:38 skywalker systemd[1]: Starting nvidia-suspend.service - NVIDIA system suspend actions...
Mar 31 09:27:38 skywalker suspend[29365]: nvidia-suspend.service
Mar 31 09:27:38 skywalker logger[29365]: <13>Mar 31 09:27:38 suspend: nvidia-suspend.service
Mar 31 09:27:40 skywalker systemd[1]: nvidia-suspend.service: Deactivated successfully.
Mar 31 09:27:40 skywalker systemd[1]: Finished nvidia-suspend.service - NVIDIA system suspend actions.
Mar 31 09:27:40 skywalker systemd[1]: nvidia-suspend.service: Consumed 1.637s CPU time, 1G memory peak.

○ nvidia-resume.service - NVIDIA system resume actions
     Loaded: loaded (/usr/lib/systemd/system/nvidia-resume.service; enabled; preset: enabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf, 50-keep-warm.conf
     Active: inactive (dead)

Mar 31 09:01:43 skywalker systemd[1]: Finished nvidia-resume.service - NVIDIA system resume actions.
Mar 31 09:19:26 skywalker logger[27213]: <13>Mar 31 09:19:26 suspend: nvidia-resume.service
Mar 31 09:19:26 skywalker suspend[27213]: nvidia-resume.service
Mar 31 09:19:26 skywalker systemd[1]: Starting nvidia-resume.service - NVIDIA system resume actions...
Mar 31 09:19:26 skywalker systemd[1]: nvidia-resume.service: Deactivated successfully.
Mar 31 09:19:26 skywalker systemd[1]: Finished nvidia-resume.service - NVIDIA system resume actions.
Mar 31 09:32:06 skywalker logger[29606]: <13>Mar 31 09:32:06 suspend: nvidia-resume.service
Mar 31 09:32:06 skywalker systemd[1]: Starting nvidia-resume.service - NVIDIA system resume actions...
Mar 31 09:32:06 skywalker systemd[1]: nvidia-resume.service: Deactivated successfully.
Mar 31 09:32:06 skywalker systemd[1]: Finished nvidia-resume.service - NVIDIA system resume actions.

  1. Confirm grub configuration appears to be correct:
$ cat /etc/kernel/cmdline
root=UUID=48bc6bd9-c448-47fc-a147-b321f70e350b ro resume=UUID=929a25d8-afbe-4ff1-b3f0-67f47babd607 rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau
[indoorjetpacks@skywalker ~]$ cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="resume=UUID=929a25d8-afbe-4ff1-b3f0-67f47babd607 rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
  1. Confirm video memory allocation kernel module param is set, info found on arch wiki here
cat /proc/driver/nvidia/params | sort | grep -iE 'memory'
DynamicPowerManagementVideoMemoryThreshold: 200
InitializeSystemMemoryAllocations: 1
MemoryPoolSize: 0
PreserveVideoMemoryAllocations: 1
S0ixPowerManagementVideoMemoryThreshold: 256
  1. Confirm sleep is not set to s2idle which has been known to cause issues in the past:
$ cat /sys/power/mem_sleep
s2idle [deep]

I can also provide any journalctl logs, etc if needed if you point me where to look/what to run (still learning what logs to where, etc)

Some additional things, and possibly to help others find this in the future (future users that may not know, go ‘back’ a level at that url to find your driver, i.e. https://download.nvidia.com/XFree86/Linux-x86_64/):

There is no established public API through which Wayland compositors can power off video memory via RTD3 (Chapter 22, PCI-Express Runtime D3 (RTD3) Power Management).

and following that link finds:

Option “NVreg_DynamicPowerManagement=0x03”
This is the default setting. For desktop computers, irrespective of the GPU(s) used, this value disables runtime D3 power management features.

which can be confirmed via searching the params:

$cat /proc/driver/nvidia/params | sort | grep -iE 'Power'
DynamicPowerManagement: 3
DynamicPowerManagementVideoMemoryThreshold: 200
EnableS0ixPowerManagement: 0
S0ixPowerManagementVideoMemoryThreshold: 256