Resuming from suspend issue (driver 450.57, Fedora 32, modesetting enabled, GTX 750 Ti)

I have enabled Wayland/modesetting as per Negativo17.org’s instructions It seems to run just fine, but every time it resumes from suspend, screen comes back completely corrupted, there is noise all around, round corners and fonts appear as blocks. System is still functional, though.

Was this supposed to work, or is modesetting still experimental and not intended for general use?

nvidia-bug-report.log.gz (124.5 KB)

In order for the driver to be able to save the contents of video memory during suspend & resume, you need to enable a few things. In particular, the NVreg_PreserveVideoMemoryAllocations module parameter and the nvidia-suspend, nvidia-resume, and nvidia-hibernate systemd services. Please see the README for more details: https://download.nvidia.com/XFree86/Linux-x86_64/450.57/README/powermanagement.html

I’m curious to hear whether this works for you – I’m trying to track down a bug where some video memory is not preserved correctly in some cases so I’m interested to hear your feedback.

Hi @aplattner thank you very much for reaching out. Indeed, the proper configuration seems to be only partially implemented:

  • systemd nvidia service files are in place, but all services are disabled
  • /usr/bin/nvidia-sleep.sh exists
  • /lib/systemd/system-sleep/nvidia is missing, and I don’t have the samples from where to copy it (there is no /usr/share/doc/NVIDIA_GLX-1.0/samples)
  • EDIT: /usr/lib/modprobe.d/nvidia.conf contains options nvidia NVreg_DynamicPowerManagement=0x02, assuming this is right, I guess I would need to add the NVreg_PreserveVideoMemoryAllocations=1 there.

Also, /sys/power/mem_sleepcontains s2idle [deep], which got me confused whether it is or not already set to “deep”…

So, it seems understandable that it is not working properly… I will share the information you provided to negativo17.org’s maintainer so that he can address these issues. As soon as I have any additional info, I will let you know.

EDIT: In the meantime, I will be more than happy to do additional testing, I just need a little push on the right direction – more specifically, I just need to install a proper /lib/systemd/system-sleep/nvidia ;-)

BTW running with Wayland does seem to improve things, more noticeably with overlays (like volume up/down) and YouTube transitioning to/from full screen (both operations show some lag on X11, and none on Wayland). Looks promising… =)

Hi @aplattner, I finally managed some time to get back to this. Unfortunately, things seemed to have gotten worse :-(

I followed your instructions to the letter, and Wayland loads just fine. Suspend also seems to work as expected. However, it doesn’t resume. Keyboard is active (numlock and capslock are responsive), but screen remains dark – monitors remain on power save mode. After a while, keyboard becomes unresponsive. I can’t even get to run nvidia-bug-report.sh.

One thing that did not work according to the instructions was the kernel suspend mode; on my case, it shows s2idle [sleep], not sure if that’s fine. systemd services are enabled

Any help will be much appreciated. I will happily provide any additional info you need, just let me know.

Just wanted to say that I’m also trying to get suspend to work correctly on my system (some more info in this thread). I also had the problem in locating the nvidia sample scripts on my system. Apparently, when installing drivers from distribution repository they are placed somewhere else. Whoever comes across this in the future, use find / -name "nvidia-suspend.service" 2>/dev/null to locate the sampl files. On Debian Buster they are in /usr/share/doc/xserver-xorg-video-nvidia/examples. Now, there are two problems I am facing n my system:

  1. The suspend scripts don’t seem to be running at all when entering suspend. The nvidia-suspend service shows as enabled but inactive on my system. @andre.ocosta, you seem to have gotten past this stage. Any advice here?

  2. I tried running nvidia-sleep.sh suspend; nvidia-sleep.sh resume. The result is that the screen enters power saving mode and there’s nothing I can do but reboot. I assume this is the same problem as @andre.ocosta is facing after waking from suspend.

Hi @jwstolarek, I can’t really say I managed to have it working perfectly, sorry. IIRC the service was also enabled but inactive, and I activated it manually. And, yes, problem #2 seems to be exactly what I was also experiencing.

The truth is that I gave up insisting on this, and have been using nouveau since then. It gives me pretty acceptable performance (plain desktop use, nothing fancy), runs Wayland smoothly, and suspend works as expected. The main reason for the switch is that I realized how much better Wayland is compared to Xorg. This is not really a permanent move, I will be following Nvidia’s progress, and will migrate back once there is some solid advance. But, for the time being, I guess I’ll stay with nouveau.

I wish you luck, and, please, do post any updates here. Cheers!