Repository navigation
Open
Labels
Description
NVIDIA Open GPU Kernel Modules Version
525.85.05
Does this happen with the proprietary driver (of the same version) as well?
Yes
Operating System and Version
Linux Mint 21.1
Kernel Release
Linux pc 5.19.15-xanmod1 #0~20221012.git85103f7 SMP Wed Oct 12 15:04:07 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Hardware: GPU
GPU 0: NVIDIA GeForce RTX 3060 Ti (UUID: GPU-039a34f7-087c-dc8f-a607-e0d937443d0f)
Describe the bug
An error occurs when trying to boot into the system after suspend if PreserveVideoMemoryAllocations is enabled:
[ 10.255125] NVRM: GPU 0000:05: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.
[ 10.255127] nvidia 0000:05:00.0: PM: pci_pm_freeze(): nv_pmops_freeze+0x0/0x20 [nvidia] returns -5
[ 10.255200] nvidia 0000:05:00.0: PM: dpm_run_callback(): pci_pm_freeze+0x0/0xc0 returns -5
[ 10.255203] nvidia 0000:05:00.0: PM: failed to quiesce async: error -5
To Reproduce
- Create a file
/etc/modprobe.d/nvidia-power-management.confwith the following content:
options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp
sudo update-initramfs -c -k allto re-generate the kernels.- Reboot.
- Go to suspend mode.
- Get an error when trying to load a saved state.
Bug Incidence
Always
nvidia-bug-report.log.gz
More Info
https://forums.developer.nvidia.com/t/cannot-suspend-gtx3060-laptop/244143/9
https://forums.developer.nvidia.com/t/preservevideomemoryallocations-systemd-services-causes-resume-from-hibernate-to-fail/233643/3
Reacted by Narcélio, Robert Platov, Sijisu, Relief.Melone, Julius Marozas, Fabio, miguno, Joe Clack, fazzi, Luca Leon Happel and 50 more
Reacted by Narcélio, Can H. Tartanoglu, fazzi, Luca Leon Happel, Andrew Kvapil, phiwan, Rishi Kumar, Anton Potapov, Jakob Hofer, gp27 and 4 more
Reacted by David7ce
Activity
David7ce commentedon Mar 12, 2023
Same bug with suspend mode on Arch Linux, when I suspend I get a black screen. Running:
aaronp24 commentedon Mar 13, 2023
How did you trigger suspend on this system? It looks like the relevant systemd units are enabled but I don't see any evidence that they were triggered. Something needs to run
/usr/bin/nvidia-sleep.sh suspendbefore suspend and/usr/bin/nvidia-sleep.sh resumeafter resume.For context, the video memory preservation process needs to happen before the kernel's low-level suspend process is triggered. The message from the driver implies that something bypassed "System Power Management attempted without driver procfs suspend interface. Please refer to the 'Configuring Power Management Support' section in the driver README" implies that that bracketing didn't happen for some reason.
David7ce commentedon Mar 14, 2023
With NVIDiA propietary graphics suspend mode and wake up (with NVIDIA RTX 2060 Super or Turing) works fine.
And I suspend the systems with KDE GUI or via terminal typing systemctl suspend. And the problem was when I tried to wake up the system, always black screen...
Monsterovich commentedon Mar 17, 2023
Nevertheless, all these services are enabled in my system, but they don't work as they should.
amrit1711 commentedon Jun 5, 2023
Hi All,
Please test with latest released driver 535.43.02 and share test results.
Sid127 commentedon Jun 15, 2023
still doesn't work with 535.43.02, though works fine on proprietary module
Monsterovich commentedon Jul 1, 2023
@amrit1711
NVidia driver 535.54.03.
Regular suspend now doesn't work on open-source driver (works on proprietary module just as @Sid127 has mentioned). The screen simply turns off after waking up.
dmesg.log
Suspend to disk doesn't work either. The same message as in the first post.
I also see garbage messages in dmesg:
and
But I guess they don't affect anything.
zaltysz commentedon Jul 6, 2023
Same problem on GTX 3080 with kernel 6.4.2 and open driver 535.54.03.
During suspend preparation, after nvidia-suspend.service has been activated kernel complains:
Looks like some sort of GSP firmware and driver incompatibility/miscommunication.
hugh712 commentedon Jul 10, 2023
I'm also has this issue in
FlorianFranzen commentedon Jul 13, 2023
Suspend leads to similar error logs before suspend and a kernel panic while waking up from suspend on my system.
It is a laptop with an AMD Ryzen 7 5800H and an RTX 3070 Mobile running kernel 6.3.9 and version 535.54.03. I boot with the following flags:
nvidia-drm.modeset=1 NVreg_EnableResizableBar=1 nvidia.NVreg_PreserveVideoMemoryAllocations=1 nvidia.NVreg_OpenRmEnableUnsupportedGpus=1Before suspend I find the following in the logs:
After suspend I get more error logs and a kernel panic:
aritger commentedon Jul 13, 2023
Thank you for the reports and logs. We understand the issue, and NVIDIA internal bug 4193761 tracks this.
Unfortunately it will probably be the release cycle after 535.xx, at the earliest, before NVreg_PreserveVideoMemoryAllocations works correctly with the open-gpu-kernel-modules. Sorry, and thanks for your patience.
Longhao-Chen commentedon Sep 29, 2023
Is there any progress?
200 remaining items
veganomy commentedon Mar 12, 2026
Here's the temporary workaround. Use hibernate instead of sleep. In the cases of hibernate lock up, the swapfile successfully stores all the memory. Hard rebooting can still resume your session.
On GNOME :
Install Power Off Options extension to get hibernation entry in the quick settings.
Settings > Power > Power Button BehaviortoHibernateinstead of suspend.aaronp24 commentedon Mar 14, 2026
That looks like a known interaction problem with SELinux on Fedora. I have a driver change to work around the problem but it requires a corresponding selinux-policy update that hasn't been merged yet. In the meantime, you can disable SELinux, update your local policy based on the AVC messages in the system log, or disable
NVreg_UseKernelSuspendNotifiersand go back to the oldNVreg_PreserveVideoMemoryAllocations=1suspend path.francoism90 commentedon Mar 14, 2026
@aaronp24 Shouldn't it right to /var/tmp instead?
GA251 commentedon Mar 14, 2026
The new version of the driver appears to save in a anonymous file that is only accessed by the driver, which appears to be broken due to SELinux policies not being configured accordingly.
@aaronp24 Thanks for the fast response and hoping the graphical corruption after resume Is fixed, can’t wait to test after SELinux is patched to function properly with the new driver.
aaronp24 commentedon Mar 14, 2026
The driver currently defaults to an anonymous file in
/tmp. You can change it to/var/tmpor wherever else using theNVreg_TemporaryFilePath=parameter.A future driver is planned to switch to using
shmem_file_setupby default ifNVreg_TemporaryFilePath=isn't specified. That's what the selinux-policy update targets but that change isn't in a released driver yet. I can post it as a patch if that would be helpful, though (e.g. if you want to test the selinux-policy change).francoism90 commentedon Mar 15, 2026
@GA251 How is your monitor connected? I'm having the same issue over HDMI, but not over DP.
GA251 commentedon Mar 15, 2026
My display is connected via a DisplayPort.
The display is a ASUS VG24VQR
and the graphics card is NVIDIA GeForce RTX™ 3060 12GB
VRR is on @ 48-120Hz mode, though also happens on 48-165Hz mode
francoism90 commentedon Mar 15, 2026
@GA251 I don't think they are related, but I have disabled VRR because I'm using it over USB-C to DP. If I do enable it, it causes my screen to turn blank. Over HDMI I don't think it supposed to work, but somehow can be made working.
I think that's more a bandwidth issue? For now I disabled VRR.
GA251 commentedon Mar 15, 2026
I'm not sure on whether its a bandwidth issue because VRR works perfectly fine until the system goes to sleep.
I have my display plugged into the DP port on the GPU itself.
Our issues might not even be related in that case.
veldenb commentedon Apr 11, 2026
Tried suspend on Ubuntu 26.04, but it's broken again using Ubuntu kernel 7.0.0-12-generic and nvidia drivers 595.58.03. Using
NVreg_UseKernelSuspendNotifiers=1or the "old" way withNVreg_PreserveVideoMemoryAllocations=1and systemd hooks doesn't seem to make a difference. I managed to catch the stacktrace using SSH because after the crash the entire system freezes. Suspend worked fine on Ubuntu 25.10 with kernel 6.16 and nvidia drivers 595.58.03.edit: seems to be reported here: #1095
edit2: It's fixable by adding an extra script to DKMS (#1095 (comment))
Stack trace from log:
mirao commentedon Jun 14, 2026
My issue was solved by the driver 595 with
options nvidia NVreg_UseKernelSuspendNotifiers=1in a modprobe config.With any driver before 595 I had to use a suspend script pausing Gnome Shell, otherwise the suspend quite often froze. With 595 it's not needed anymore. I'm using it for more than 2 month.
Tested on Ubuntu 24.04.4 LTS, with kernel 6.17.
mikkorantalainen commentedon Jun 28, 2026
The kernel flag
NVreg_UseKernelSuspendNotifiers=1does help a lot with driver version 595 but user mode programs may require additional workarounds. I found out after lot of trial and error that the version of Picom provided by Ubuntu 24.04 LTS hangs after S3 sleep if I useNVreg_UseKernelSuspendNotifiers=1. This results in apparently frozen display and the user may think that the system crashed.I built the currently latest code from source code
https://github.com/yshui/picom.gitand that fixed the issue totally. The tip of the project was commitg6d676824which also includes NVidia specific fix in the code which is probably worth having, too.EGmux commentedon Aug 30, 2026
System Information
6.12.0-211.49.1.el10_2.x86_64610.57.0413.3Workaround Applied
To resolve suspend failures caused by SELinux blocking the NVIDIA driver's new suspend notifier path (
NVreg_UseKernelSuspendNotifiers=1), the driver is now configured to use/var/lib/systemd/sleepas the temporary file directory for preserving GPU memory during suspend.This directory was created with the correct SELinux context (
systemd_sleep_var_lib_t) to allowsystemd_sleep_tto write to it without triggering AVC denials. The modprobe configuration setsNVreg_TemporaryFilePath=/var/lib/systemd/sleepand enables the kernel suspend notifiers. After rebuilding initramfs withdracut --forceand rebooting, suspend now works cleanly without locking up the system.Status: ✅ Verified working on the above kernel and driver versions.
Commands Used
veganomy commentedon Sep 20, 2026
@EGmux Arch doesn't come with selinux suite so you have to give us some other ways to deal with this.
Organized92 commentedon Nov 11, 2026
Version 620.70.06 with Kernel 7.3.1 on openSUSE Tumbleweed also has problems with SELinux blocking the suspend procedure
Suspend works again as soon as SELinux is set to permissive.
The problem only occurs with
NVreg_UseKernelSuspendNotifiers=1