Skip to content

Instantly share code, notes, and snippets.

@bmcbm
Last active November 15, 2025 15:59
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
@actinks
Copy link

actinks commented Oct 8, 2025

sudo systemctl unmask nvidia-suspend
sudo systemctl enable nvidia-suspend
sudo systemctl unmask nvidia-resume
sudo systemctl enable nvidia-resume
sudo systemctl unmask nvidia-hibernate
sudo systemctl enable nvidia-hibernate

This fixed my issues! Ubuntu 24.04.3 LTS, Driver Version: 580.82.07, CUDA Version: 12.8

@audio441
Copy link

Initial tests, this works for me on Mint 22.2, Driver Version: 580.105.08 to get suspend working:
systemctl enable nvidia-suspend.service
systemctl enable nvidia-hibernate.service
systemctl enable nvidia-resume.service

my /etc/modprobe.d/nvidia-graphics-drivers-kms.conf:
options nvidia-drm modeset=1
options nvidia NVreg_PreserveVideoMemoryAllocations=0
options nvidia NVreg_TemporaryFilePath=/var/tmp

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