I have just installed Ubuntu 22.04 LTS. It works fine but after I suspend the session, the screen remains black after restarting the session.
How can I solve it?
Got an update from the launchpad. There is a work around for Nividia 510 using the solution from Nividia 470.
Disable NVIDIA systemd services
sudo systemctl stop nvidia-suspend.service
sudo systemctl stop nvidia-hibernate.service
sudo systemctl stop nvidia-resume.service
sudo systemctl disable nvidia-suspend.service
sudo systemctl disable nvidia-hibernate.service
sudo systemctl disable nvidia-resume.service
Remove NVIDIA systemd script
sudo rm /lib/systemd/system-sleep/nvidia
Reboot and you should be able to suspend and resume properly with driver 510 for 22.04 for both x11 and wayland
The original workaround was for 470. However, I've tested it and the solution works for 510 on 22.04 with x11 and wayland.
It's more of a workaround, but i am able to resume the GUI session after a black screen caused by a suspend by switching to a virtual console (ctrl+alt+F1 to F7 depending on your computer) and then reverting to GUI session (ctrl+alt+FX, again, the FX depending of your computer, F2 for me).
Works for me with nvidia driver 515 and cuda 11.7
I was having this exact same problem on my HP Pavilion 14 on Ubuntu 22.04. It worked fine a few days ago but I encountered this problem after an update. Lots of stack answers pointed to some problems with Nvidia drivers, but I don't have Nvidia graphics. I have an integrated AMD Radeon along with AMD Ryzen 7.
What worked for me:
amdgpu-install and installing the AMD graphic cards components after checking the secure boot support:
Also, check this launchpad issue.
Upgrading Nvidia Driver to version 525 solved this problem for me on Ubuntu 22.04 with graphic card model GeForce GTX 1060 (via "Software & Updates"). Note that a user of Linux Mint with the same graphic card had the same problem 10 months ago.
I'm using AMD CPU, and after wakeup, the screen keeps blank.
I fixed it by pressing Ctrl + Alt + F1.
Sometimes I have to keep pressing Ctrl + Alt + F1, but once it gives output to the screen, if I suspend the PC again, it will automatically wake up with the display output properly.
Finally, I found a permanent solution, and the problem is HDMI. If I connect it to a VGA cable, the screen lights up as normal.
It seems my monitor is missing the proper information to wake up from the PC, so I tried to change my HDMI cable, and yes, it works. Before, I was using a cheap $1.7 HDMI cable.