Black screen (monitor doesn't wake) after waking up from suspend
NVIDIA Open GPU Kernel Modules Version
525.85.05-2
Does this happen with the proprietary driver (of the same version) as well?
No
Operating System and Version
Arch Linux
Kernel Release
6.1.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 24 Jan 2023 21:07:04 +0000 x86_64 GNU/Linux
Hardware: GPU
NVIDIA GeForce GTX 1660
Describe the bug
After wake up from suspend, the monitor does not wake up (no signal), the system unit wakes up, the coolers make noise, the keyboard backlight turns on. The indicator changes its state when the num-lock key is pressed, but only for the first 5-10 seconds, then the keyboard stops responding to pressing. The only way to get out of this state is to do a hard reset.
The problem appears on both Wayland and Xorg, but only on an open driver (nvidia-open), on a proprietary driver (nvidia) the computer wakes up without problems.
To Reproduce
(It is enough to do the first two steps, reboot, and send the computer to sleep. But I will describe all the actions I have done.)
- Install
nvidia-openpackage; - remove
kmsfrom theHOOKSarray in/etc/mkinitcpio.confand regenerate the initramfs. - add the
nvidia_drm.modeset=1kernel parameter; - create
/etc/modprobe.d/nvidia-power-management.confwith content:
options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp
- enable services
nvidia-suspend.service,nvidia-hibernate.service,nvidia-resume.service
Bug Incidence
Always
nvidia-bug-report.log.gz
More Info
The problem and symptoms are the same as described by another user here. Perhaps some of the information he provided will be useful.
I also experience this exact problem. RTX 3070 FE. Only occurs on open drivers too.
On a ryzen 2700x RTX 3080 Kernel 6.1 I had the issue happen this morning after having rtcwake run. The PC woke up, but the screen remained black after returning from a suspended mode. The amusing bit is that driver 525.85.05 patch notes made a point in addressing this issue: "Improved the reliability of suspend and resume on UEFI systems when using certain display panels. " https://www.nvidia.com/download/driverResults.aspx/198554/en-us/
This is the reason I have switched back to the proprietary drivers. The suspend issue is only present on the open kernel modules.
This is the reason I have switched back to the proprietary drivers. The suspend issue is only present on the open kernel modules.
I solved this issue by installing the proprietary drivers from the Nvidia website and running the .run file in the terminal. Installing the drivers via the systems autoinstall causes this current issue. Installing manually via the .run file provided on the Nvidia website fixed my problem. I don't have a clue why, but I am currently running driver 525.85.05 with no sleep or a black screen issue
See https://github.com/NVIDIA/open-gpu-kernel-modules/issues/223: Suspend/Resume is currently not supported on the open-source drivers. Unfortunately Nvidia didn't mention when exactly that's getting implemented.
How can you turn off pm to stop it going into suspend then?
How can you turn off pm to stop it going into suspend then?
According to nvidia's documentation(https://download.nvidia.com/XFree86/Linux-x86_64/515.65.01/README/powermanagement.html) the power management is either triggered through systemd or the kernel itself. There is probably an obscure way to prevent the gpu to go to suspend with these methods(For systemd probably removing the nvidia services and disabling some sort of ACPI device, but don't quote me on that), when the CPU and the rest of the system is sleeping. I doubt however that such workarounds will fix the suspend issues on the open source drivers. It is however probably possible to never even suspend the whole system in the first place.
How can you turn off pm to stop it going into suspend then?
According to nvidia's documentation(https://download.nvidia.com/XFree86/Linux-x86_64/515.65.01/README/powermanagement.html) the power management is either triggered through systemd or the kernel itself. There is probably an obscure way to prevent the gpu to go to suspend with these methods(For systemd probably removing the nvidia services and disabling some sort of ACPI device, but don't quote me on that), when the CPU and the rest of the system is sleeping. I doubt however that such workarounds will fix the suspend issues on the open source drivers. It is however probably possible to never even suspend the whole system in the first place.
I have enabled NVreg_PreserveVideoMemoryAllocations=1 in /etc/modprobe.d/nvidia.conf and also HandleNvidiaSleep=yes in /etc/elogind/logind.conf and I'm now using the kernel-open drivers in Gentoo.
Hi All, Could you please test with driver 530.41.03 and share test results.
I would test 530 however I'm experiencing other issues with that driver. I'm unable to use my main monitor on wayland, which is 1440p, at its highest refresh rate @ 170hz. It works fine on 120hz but I'm not willing to test until it's fixed. Here's an arch bugtracker link to the issue: Arch BugTracker
And also a Reddit post experiencing a similar issue: reddit
From the testing on my arch system, suspend still doesn't work properly on the new driver, I'm running nvidia-open 530.41.03, and systemctl suspend leaved my displays blank on resume, with no way too access tty, I have Nvidia systemd services enabled
@Fxzzi This is known issue internally and we are working on it. You can refer below thread for more updates. https://forums.developer.nvidia.com/t/cant-boot-into-kde-wayland-session-with-530-30-02/244559/4
@Hellzbellz123 Could you please share nvidia bug report from repro state. If by any chance system is inaccessible post suspend/resume action, please hard reboot it and then capture bug report and share with us.
From the testing on my arch system, suspend still doesn't work properly on the new driver, I'm running nvidia-open 530.41.03, and systemctl suspend leaved my displays blank on resume, with no way too access tty, I have Nvidia systemd services enabled
I'm on this, still have the settings above and seems to be fine waking up.
@Fxzzi This is known issue internally and we are working on it. You can refer below thread for more updates. https://forums.developer.nvidia.com/t/cant-boot-into-kde-wayland-session-with-530-30-02/244559/4
bumping here because y'all are doing jack crap about this major bug
@Fxzzi Are you using openrc or systemd? What about elogind?
@Fxzzi Are you using openrc or systemd? What about elogind?
SystemD, so probably elogind also.
Systemd should handle it for you as they bothered to write scripts for that, elogind had to be extended to do the same thing.
Have you put logging statements into /usr/bin/nvidia-sleep.sh to see what it's doing, or if it's even called?
I haven't used this driver for a long time, because the problem with "suspend" prevented me from using the computer normally. And I simply didn't have time to experiment/try to figure out the cause of the problem. Now I have some free time and I decided to try this driver again. And now everything works, the computer wakes up correctly!