30

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?

9 Answers 9

22

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.

Original solution with details can be found here by contributor "humblebee". And bug report on launchpad can be found here

11
  • 2
    But is the OP actually using an NVidia driver? And just be a little wary of using 'copy and paste' answers: askubuntu.com/a/1406212/57576
    – andrew.46
    Commented May 2, 2022 at 22:53
  • This did not help me. I tried with 515, 510, 470 versions (Xorg and Wayland). For all I tried above steps. Worked fine with previous Ubuntu versions.
    – Alexey Vol
    Commented Jul 13, 2022 at 11:49
  • Thanks! Worked for me (470, GTX 660, Old MSI MB, B75MA-P45). Note: I tried forcing GDM to use XOrg first, so I've only tested on a XOrg only system.
    – olejorgenb
    Commented Oct 2, 2022 at 10:24
  • This works for Ubuntu 22.04 + Nvidia 515 drivers on my workstation. Commented Oct 17, 2022 at 5:22
  • This does not help me for both 470 and 510. My card is 1660ti. Ubuntu 22.04 Commented Oct 21, 2022 at 8:26
5

In may case downgrading nvidia driver from 510 to 470, via Additional Drivers , solved the issue

2

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

1

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.

1

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:

Installing amdgpu-install and installing the AMD graphic cards components[1] after checking the secure boot support[2]:

amdgpu-install --usecase=graphics

Also, check this launchpad issue[3].

[1]https://amdgpu-install.readthedocs.io/en/latest/install-overview.html

[2]https://amdgpu-install.readthedocs.io/en/latest/install-installing.html#ubuntu-and-debian-based-systems

[3]https://bugs.launchpad.net/ubuntu/+source/linux-signed-hwe-5.19/+bug/2008774

0

-Changing graphics card driver, "nvidia driver 515 tested" worked for me

0

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.

[update]

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.

[update]

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.

0

In my case, none of the other suggestions about drivers worked. The only thing that fixes the problem is logging in to Ubuntu on Xorg.

Ubuntu on Xorg

0

For me on a Debian 12 machine with NVIDIA GP107 [GeForce GTX 1050 Ti] here is the workaround.

I install nvidia driver for my card from debain unstable(sid) repository.

Install nvidia driver

Remove all previous nvidea drivers Installed from current repository or By nvidia website script.

sudo apt purge nvidia-*

Reboot the system to use embedded Intel Graphic card.

Add sid repository to source.list file.

deb http://deb.debian.org/debian sid main non-free-firmware non-free contrib

Download and Install from SID Repository.

sudo apt update
sudo apt -d -u -t sid install nvidia-driver
sudo apt -t sid install nvidia-driver

After that you can remove sid line from source.list then update source.

sudo apt update

Links

After above steps here is info.

$ nvidia-settings

$ lspci -nn | egrep -i "3d|display|vga"
00:17.0 SATA controller [0106]: Intel Corporation Device [8086:43d2] (rev 11)
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] [10de:1c82] (rev a1)

$ lsb_release -a 
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:    12
Codename:   bookworm

nvidia-detect 
Detected NVIDIA GPUs:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] [10de:1c82] (rev a1)

Checking card:  NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1)
Your card is supported by all driver versions.
Your card is also supported by the Tesla drivers series.
Your card is also supported by the Tesla 470 drivers series.
It is recommended to install the
    nvidia-driver
package.


$ nvidia-smi 
Sun Mar 10 15:32:51 2024       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.147.05   Driver Version: 525.147.05   CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  On   | 00000000:01:00.0  On |                  N/A |
| 45%   32C    P0    N/A /  75W |    322MiB /  4096MiB |      5%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A       875      G   /usr/lib/xorg/Xorg                187MiB |
|    0   N/A  N/A      1410      G   xfwm4                               1MiB |
|    0   N/A  N/A      5389      G   ...b/firefox-esr/firefox-esr      129MiB |
+-----------------------------------------------------------------------------+


$ screenfetch 
         _,met$$$$$gg.           esmaeel@system
      ,g$$$$$$$$$$$$$$$P.        OS: Debian 12 bookworm
    ,g$$P""       """Y$$.".      Kernel: x86_64 Linux 6.1.0-18-amd64
   ,$$P'              `$$$.      Uptime: 29m
  ',$$P       ,ggs.     `$$b:    Packages: 2263
  `d$$'     ,$P"'   .    $$$     Shell: bash 5.2.15
   $$P      d$'     ,    $$P     Resolution: 1920x1080
   $$:      $$.   -    ,d$$'     DE: Xfce
   $$\;      Y$b._   _,d$P'      WM: Xfwm4
   Y$$.    `.`"Y$$$$P"'          WM Theme: Default
   `$$b      "-.__               GTK Theme: Xfce [GTK2]
    `Y$$                         Icon Theme: Tango
     `Y$$.                       Font: Sans 10
       `$$b.                     Disk: 76G / 440G (19%)
         `Y$$b.                  CPU: Intel Core i5-10400 @ 12x 4.3GHz [46.0°C]
            `"Y$b._              GPU: NVIDIA GeForce GTX 1050 Ti
                `""""            RAM: 10337MiB / 31947MiB

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .