9

Hi everyone I just installed Ubuntu 22.04, every time I suspend or lock my screen there is a black screen and I have to force shutdown.

I have NVIDIA 940MX

I have tried all the options on the Internet to downgrade the version from 510 to 470,390 , I tried to reconfigure the grub and I changed gdm to lightdm. Nothing worked out I tried those solutions:

  1. System freeze after suspend
  2. https://forums.developer.nvidia.com/t/solved-suspend-resuming-and-wakeup-with-nvidia370-28/45282
  3. how to solve black screen after suspension with Ubuntu 22.04 LTS?

I've been trying for almost 2 days nothing is working can someone please help me and guide me to solve this problem

I really appreciate any help you can provide.

  • while in black screen, press ctrl+alt+f1 simultaneously; wait a couple of seconds and the login screen should appear. In the event if it doesn't work, kindly indicate what configurations you are in now since you mentioned you've tried a few of them. – ManOnTheMoon May 31 '22 at 04:36
  • When I close my screen, lock or suspend the laptop freeze and I'm not able to use my keyboard, well I undo all the configuration because nothing worked out, I'm using Nvidia 510 latest driver – Patrick Abi Saber Jun 01 '22 at 18:27

6 Answers6

7

Solution that worked for me:

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

sudo rm /lib/systemd/system-sleep/nvidia

Detailed answer: how to solve black screen after suspension with Ubuntu 22.04 LTS?

xDrd
  • 81
3

Did you try to disable nvidia's services in systemctl?

To display a list of all services from nvidia:

systemctl list-unit-files | grep nvidia

I have this output:

nvidia-hibernate.service disabled enabled

nvidia-persistenced.service static -

nvidia-resume.service disabled enabled

nvidia-suspend.service disabled enabled

where first column is the name of the service, second column is the current state and the last one is the vendor's preset.

If those services are enabled you could try to disable them:

sudo systemctl disable nvidia-hibernate

sudo systemctl disable nvidia-resume

sudo systemctl disable nvidia-suspend

3

I had a similar issue, my HTPC does not suspend or lock, I just turn off the TV when I'm not watching. Each morning I would find the black screen and have to force shutdown (or you can get a shell and sudo systemctl restart gdm).

In the end I have worked around this problem and am very happy, here's what I did:

sudo apt install ubuntu-mate-desktop -y

That replaces gdm with lightdm (you should make it your default when asked during setup).

My setup:

  • Ubuntu 22.04
  • Nvidia GTX1650
  • Nvidia driver: nvidia-driver-515 (from PPA)
Beoski
  • 29
  • 3
1
  1. Have you tried removing nvidia drivers and then checking if the issue persists?

  2. Could you paste the output of nvidia-smi?

  3. Have you tried by reinstalling the drivers?

I would install a suitable version of nvidia driver (for e.g. nvidia-driver-470) along with cuda toolkit (11.2 or 11.4) using instructions here and here. In the instructions, you can follow the commands for Ubuntu distro.

0

With my ASUS Zenbook Pro 15 UX550 with a GeForce GTX 1050 Mobile, in order to get it working again, I had to downgrade to the Nvidia driver nvidia-driver-470 (meta) package and follow the instructions in the setup script here.

Rishon_JR
  • 1,013
Piers
  • 1
  • Not an answer as the OP has said in the question they tried the driver you suggest. – David Apr 27 '23 at 09:47
  • I disagree - It points to a driver combination with a scripted solution, that has worked for 22.04. The script and the associated conversation that I have pointed to with https://gist.github.com/bmcbm/375f14eaa17f88756b4bdbbebbcfd029 shows a history of solving what would appear to be a related problem - please look again. – Piers Apr 28 '23 at 12:13
0

The same issue was with me. 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.

although there was no problem with the VGA port or cable.

Martin
  • 1