Last active
January 12, 2025 03:28
-
-
Save bmcbm/375f14eaa17f88756b4bdbbebbcfd029 to your computer and use it in GitHub Desktop.
NVIDIA Suspend fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
Okay, clearing things up the issue has been resolved:
- Either use LTS kernel (6.6) or 6.12rc.
- Make sure to enable nvidia-suspend, nvidia-resume and nvidia-hibernate systemd services.
- Make sure you have fbdev and NVreg_PreserveVideoMemoryAllocations=1 (and /var/tmp path etc)
- Use nvidia open dkms 565 drivers.
Finally! I had issues for a really long time, had been thru this topic several times but always failed and thus stayed with X11. Now, after upgrading to ubuntu 24.10 I had and additional reason why I needed wayland und installing the 6.12(.3) kernel fixed my problem. This kernel is not yet officially available for 24.10 but there is a decent way with this kernel maintainer's script.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As a side note, mind that a GNOME extension or another program may interfere with suspend by failing to release the
/dev/nvidia
handle (you will seewait
requests sent by the driver to the shell in the logs). In my case it was the Vitals GNOME extension. Once I removed it, Ubuntu 24.04.1 suspends and resumes without any issues.