19

I am very new to linux. On my laptop I have a multiboot with Windows 10 and Ubuntu 20.04 on the same disk.

The problem is when I suspend to RAM and then wake it up by pressing the power button, the disk starts running, however the screen remains black. I tried logging in blind (the screen was still black and I tried using the keyboard), opening terminal and typing reboot and that works.

Looking for solution, I found this thread. One of the solutions were to sudoedit /etc/default/grub and add nouveau.modeset=0 to the line that says GRUB_CMDLINE_LINUX. Apparently it's an nvidia driver bug. Except I have AMD CPU with Radeon graphics, so this isn't my case, right?

Another solution was installing xscreensaver, which I already had installed. I also checked the possibility of having the swap partition encrypted which also wasn't the case.

Is it some problem with AMD drivers? Can you please help me find a solution?

My hardware is HP Probook 455 G7 with AMD Ryzen 3 4300U, AMD Radeon Graphics and 16 GB RAM. I am running 64bit Ubuntu 20.04.1 LTS, GNOME 3.36.3 and kernel 5.4.0-47

2
  • 1
    Wake is always difficult in linux... You should seach in Google if something wrote some about your computer with some suspend, wake,... and your comuter name keywords.
    – Oli
    Sep 14, 2020 at 18:49
  • 1
    All these answers about Nvidia when OP clearly states they're using AMD. Sep 1, 2022 at 12:58

6 Answers 6

4

Seems like an amdgpu issue, which is resolved in kernel 5.8. As the current kernel is 5.4, you should do:

sudo apt install linux-generic-hwe-20.04-edge

I found the answer here: Is there a kernel 5.8 ppa for ubuntu 20.04?

5
  • 4
    I use kernel 5.8 and I am facing this issue too
    – bigless
    Jan 28, 2021 at 17:30
  • 2
    5.10 and same problem...
    – Z4-tier
    Feb 3, 2021 at 18:32
  • 3
    5.11 and same problem. Apr 26, 2021 at 6:00
  • Kernel 5.13.0-37 AMD CPU, same problem Once monitor is going to sleep (or disconnected or turned off), only a full reboot revives it.
    – arielf
    Mar 28, 2022 at 5:17
  • 5.15.0-46 same thing. I'm having to reboot. Aug 24, 2022 at 12:48
2

I stumbled across this post and have an Nvidia card. The sudo ubuntu-drivers autoinstall fixed the issue for me.

So for anyone with Nvidia cards, it seems that clicking on 'additional drivers' doesn't have what an autoinstall does.

Update: Yes the above fixed if one has Nivida and same blank screen after suspend, yet found issue remain if logged in, and suspend resumed as normal if I logged out first then suspend. Then resume normal. Strange.

For debugging I use to have separate home partition and swap partition and all this now since found do not need seaparate partitions. Anyway found another post suggested:

... sudo apt install gnome-screensaver ...

Now No more blank screen after suspend resume. So an easy fix:

... sudo ubuntu-drivers autoinstall && apt install gnome-screensaver ...

p.s. I think it is to do with 'no-more' separate swap and root partitions, and current Nvidia video drivers. not technical so just saying. Thank you all at ask Ubuntu, posting this for others. Happy puppy :-)

2
  • 1
    As noted yesterday, ubuntu-drivers autoinstall is for proprietary drivers, such as Nvidia's. However the OP has AMD graphics, which require open source drivers. Aug 3, 2021 at 7:08
  • seems the title of this question is causing people with other graphics hardware to land on this question. Answers like this can be here to help them I guess
    – Zanna
    Aug 3, 2021 at 12:00
2

On my Legion 5 pro with NVIDIA GeForce RTX 3050Ti this solution works for me (It fixes both issues: change brightness and wake up after suspend)

  1. Select discrete card in BIOS setup
  2. Install drivers
ubuntu-drivers autoinstall
  1. Open Software & Updates application on tab Additional drivers select nvidia-driver-470, it does not works with nvidia-driver-510

Restart system

  1. Go to /sys/class/backlight and get available brightness acpi
> ls /sys/class/backlight
nvidia_0    # <- if you have here nvidia_0 then it's ok
  1. Create backlight rule
sudo nano /etc/udev/rules.d/backlight.rules

add this content

ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="nvidia_0", GROUP="video", MODE="0664"
RUN+="/bin/chgrp video /sys/class/backlight/nvidia_0/brightness"
RUN+="/bin/chmod g+w /sys/class/backlight/nvidia_0/brightness"

Save file

  1. Update grub
sudo nano /etc/default/grub

update line with GRUB_CMDLINE_LINUX_DEFAULT

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=nvidia_0 nvidia.NVreg_RegistryDwords=EnableBrightnessControl=1"

save file

sudo update-grub

Restart system

3
  • 1
    Amazing. Tried every possible combination from other answers and nothing helped. It works in Ubuntu 21.10, Lenovo Legion 7 RTX 3070 May 15, 2022 at 16:42
  • Finally this worked. nvidia-driver-470 proved to be the key. For brightness I found that the backlight rule could be skipped.
    – Jurrian
    Oct 6, 2022 at 16:06
  • What if the directory /sys/class/backlight is empty after switching to the nvidia-driver-470?
    – martin36
    May 22, 2023 at 17:13
0

The problem can come from GPU drivers. Try this one, then restart your laptop:

sudo ubuntu-drivers autoinstall
2
  • 3
    Not applicable. ubuntu-drivers autoinstall is only for proprietary drivers. AMD graphics drivers are open/source. Aug 1, 2021 at 11:21
  • 1
    Not applicable to this question yes, but it did solve this same issue I had in my box with an NVIDIA card. Thanks @Walllter .
    – petobens
    Mar 15, 2022 at 20:10
0

I've noticed that I have issues coming back from suspend if the video driver and line 11 of /etc/default/grub do not correlate to the following:

if using the NVIDIA proprietary driver go into /etc/default/grub and change line 11 to GRUB_CMDLINE_LINUX=""

if using the X.org driver go into /etc/default/grub and change line 11 to GRUB_CMDLINE_LINUX="nouveau.modeset=0"

After making the change depending on which driver I'm using it has resolved the issue.

0
0

if using the NVIDIA proprietary driver go into /etc/default/grub and change line 11 to GRUB_CMDLINE_LINUX=""

if using the X.org driver go into /etc/default/grub and change line 11 to GRUB_CMDLINE_LINUX="nouveau.modeset=0"

and... You need to check the settings of the NVIDIA driver!!! Mine was on balanced and nothing helped until I changed to the FullPower-NVIDIA or the Powersaving Xorg driver...

1
  • 1
    Welcome to Ask Ubuntu! Thanks for posting an answer. Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. Also, see askubuntu.com/help/formatting
    – Error404
    Jan 22, 2022 at 11:08

You must log in to answer this question.

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