Skip to content

Instantly share code, notes, and snippets.

@bmcbm
Last active February 22, 2026 15:09
Show Gist options
  • Select an option

  • Save bmcbm/375f14eaa17f88756b4bdbbebbcfd029 to your computer and use it in GitHub Desktop.

Select an option

Save bmcbm/375f14eaa17f88756b4bdbbebbcfd029 to your computer and use it in GitHub Desktop.
NVIDIA Suspend fix
# Use systemd for managing NVIDIA driver suspend in drivers ====>>> PRIOR to version 470 <<<=====
# https://download.nvidia.com/XFree86/Linux-x86_64/450.66/README/powermanagement.html
# https://forums.developer.nvidia.com/t/unable-to-set-nvidia-kernel-module-parameters/161306
# Please note: In Fedora Linux you may need to just install the xorg-x11-drv-nvidia-power pakage
# as sugested by @goombah88 in the comments below.
TMP_PATH=/var/tmp
TMPL_PATH=/usr/share/doc/nvidia-driver-460/
echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=${TMP_PATH}" | sudo tee /etc/modprobe.d/nvidia-power-management.conf
sudo install --mode 644 "${TMPL_PATH}/nvidia-suspend.service" /etc/systemd/system
sudo install --mode 644 "${TMPL_PATH}/nvidia-hibernate.service" /etc/systemd/system
sudo install --mode 644 "${TMPL_PATH}/nvidia-resume.service" /etc/systemd/system
sudo install "${TMPL_PATH}/nvidia" /lib/systemd/system-sleep
sudo install "${TMPL_PATH}/nvidia-sleep.sh" /usr/bin
sudo systemctl enable nvidia-suspend.service
sudo systemctl enable nvidia-hibernate.service
sudo systemctl enable nvidia-resume.service
@simevo
Copy link

simevo commented Feb 22, 2026

On Debian 13 (Trixie) I have fiddled with nvidia CUDA toolkit installed from https://developer.nvidia.com/cuda-downloads, then uninstalled it and opted for the Debian native packages (nvidia-cuda-toolkit).

As reported by others here, after the reboot suspend is broken, and there are broken symlinks:

find /etc/systemd -type l -exec file {} \; | grep broken | grep nvidia
/etc/systemd/system/systemd-suspend.service.wants/nvidia-suspend.service: broken symbolic link to /usr/lib/systemd/system/nvidia-suspend.service
/etc/systemd/system/systemd-suspend.service.wants/nvidia-resume.service: broken symbolic link to /usr/lib/systemd/system/nvidia-resume.service
/etc/systemd/system/systemd-hibernate.service.wants/nvidia-resume.service: broken symbolic link to /usr/lib/systemd/system/nvidia-resume.service
/etc/systemd/system/systemd-hibernate.service.wants/nvidia-hibernate.service: broken symbolic link to /usr/lib/systemd/system/nvidia-hibernate.service

ls -l /etc/systemd/system/systemd-suspend.service.wants/nvidia-resume.service
lrwxrwxrwx 1 root root 45 12 set 07.16 /etc/systemd/system/systemd-suspend.service.wants/nvidia-resume.service -> /usr/lib/systemd/system/nvidia-resume.service

In my case though, I fixed not by removing the symlinks, but by restoring the targets:

sudo apt remove nvidia-suspend-common
sudo apt install nvidia-suspend-common
ls -l /usr/lib/systemd/system/nvidia*
-rw-r--r-- 1 root root  270  8 apr  2025 /usr/lib/systemd/system/nvidia-hibernate.service
-rw-r--r-- 1 root root 1501 17 dic 02.37 /usr/lib/systemd/system/nvidia-persistenced.service
-rw-r--r-- 1 root root  321  8 apr  2025 /usr/lib/systemd/system/nvidia-resume.service
-rw-r--r-- 1 root root  258  8 apr  2025 /usr/lib/systemd/system/nvidia-suspend.service

Now the symlinks are not broken anymore and suspend/resume works again! Hope this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment