Display adapter won't wake up after suspend

Hi all,

After having problem to suspend my computer (it was complaining that it was not able to put the NVIDIA display adapter into sleep node), and found out that I need to install a new package, `xorg-x11-drv-nvidia-power` and enable this 3 services,

sudo systemctl enable nvidia-{suspend,resume,hibernate}

now my computer will go to sleep mode, but on resume the display adapter won’t wake up. keyboard is working, and I can restart the computer with `alt+sysreq+b` but nothing else, `alt+#` to change terminal won’t do anything, and even removing the laptop from the dock-station and opening the display won’t show anything.

I’m running Fedora 34/KDE with NVIDIA proprietary driver version 470.63

❯ rpm -qa | ag nvidia | sort -V
akmod-nvidia-470.63.01-1.fc34.x86_64
kmod-nvidia-5.13.13-200.fc34.x86_64-470.63.01-1.fc34.x86_64
kmod-nvidia-5.13.14-200.fc34.x86_64-470.63.01-1.fc34.x86_64
kmod-nvidia-5.13.16-200.fc34.x86_64-470.63.01-1.fc34.x86_64
nvidia-persistenced-470.63.01-1.fc34.x86_64
nvidia-settings-470.63.01-1.fc34.x86_64
xorg-x11-drv-nvidia-470.63.01-3.fc34.x86_64
xorg-x11-drv-nvidia-cuda-470.63.01-3.fc34.x86_64
xorg-x11-drv-nvidia-cuda-libs-470.63.01-3.fc34.x86_64
xorg-x11-drv-nvidia-kmodsrc-470.63.01-3.fc34.x86_64
xorg-x11-drv-nvidia-libs-470.63.01-3.fc34.x86_64
xorg-x11-drv-nvidia-power-470.63.01-3.fc34.x86_64

Edit #1

Until now I was using the discreet GPU only, (i.e Intel device was disabled). Now I tried to work in Hybrid Mode and suspend & resume works.

Edit #2

I’m back to the discreet GPU only, for some reason, I can’t see the screens connected to the dock station, when using the Hybrid Mode.
So I’m back to square 2, where I can suspend, but can’t resume.

Edit #3

I switched to the drivers from negativo17 repo. Same problem … :frowning:

Edit #4

Just found this post at phoronix,

Fixed a bug that could cause the /proc/driver/nvidia/suspend power management interface to fail to preserve and restore video memory allocations when the NVreg_TemporaryFilePath module parameter for nvidia.ko specified an invalid path.

Edit #5

Installed this newer driver from negativo17, same problem.

Any thoughts ?

Have you done as is recommended at rpmfusion?

Also some have luck with copying the template file /usr/share/X11/xorg.conf.d/nvidia.conf to /etc/X11/xorg.conf.d/nvidia.conf so it enables the nvidia screen recovery better. Using that file seems to enable the discrete GPU to manage all the attached screens and without it there are sometimes issues with different screen arrangements.

Several have reported issues with the laptop screen being disabled when an external monitor is attached and the nvidia GPU is active until that file has been put into place.

That file is also where I have configured the discrete GPU as primary on my laptop.

Yes, I did tried, and it didn’t help

Also (based on this comment) I tried setting NVreg_PreserveVideoMemoryAllocations=0 which caused the computer to hand completely when trying to resume, while with NVreg_PreserveVideoMemoryAllocations=1 still allow me to reset the computer from the keyboard.

rpmfusion has some information about suspend/resume here.

### Suspend

NVIDIA has provided some experimental scripts to enable clean resume on suspend to RAM or suspend to disk (hibernate) that might be specially needed in some environment. Theses scripts will prevent artefacts on resume by moving the full content of the graphic memory into either host RAM (or disk). Packaging is currently (as of 2021-08-23) in in-between state and will be improved as discussed in https://bugzilla.rpmfusion.org/show_bug.cgi?id=6066

sudo dnf install xorg-x11-drv-nvidia-power sudo systemctl enable nvidia-{suspend,resume,hibernate} # Optional: tweak "nvidia options NVreg_TemporaryFilePath=/var/tmp" from /etc/modprobe.d/nvidia.conf as needed if you have issue with /tmp as tmpfs with nvidia suspend )

I do not use suspend, but from what I have been reading here the NVreg_PreserveVideoMemoryAllocations=1 you tried seems necessary to save the video memory during suspend.

I tried when mention on the RPMFusion site, but it didn’t help. not sure when but I’m pretty sure it was around the 470.x version release of the driver.

I just tried to downgrade, to 465.X version of the nvidia driver, but for some reason the driver won’t compile on newer kernel versions.

So I don’t know what else I can do.

OK … something changed after I downgraded to 465 and then upgraded back to 470. Now suspend and resume working again, except for when resuming I lose my dual display arrangement, and on wake, all the displays are turn on including the laptop (which is docked) display, and I have to rearrange the displays all over again.