Score:1

Black screen after suspend on Ubuntu 21.04

in flag

I've just bought an 'HP 15s-eq1510sa 15.6" AMD Ryzen 5' laptop; obviously my first job was to install Ubuntu Studio over the top of Windows, all was fine until I shut the lid, when I came to reopen it I just got a black screen, this seems to happen 80% of the time but if I'm lucky the screen shows a bit of junk for a second and then works fine and displays the login screen. I've seen this mentioned as an issue with Nvidia cards but my laptop has AMD Radeon. Thanks in advance :-)

NB. I think I may have found the answer! The system was defaulting to the 5.11.0.18 kernel, I switched it (via Grub) to 5.11.0.16 and the problem seems solved! I'll leave this question here for a day or so just to make sure :-)

EDIT: Nope, it was working because I had it plugged in (which as it turns our just switches off the screen when I close the lid), it was set to suspend when the lid was closed on battery which as I've just found out, still blanks the screen on wake up.

eric@eric-linuxbox:~$ lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Renoir IOMMU
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:02.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP Bridge
00:02.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP Bridge
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 51)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 7
01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter
02:00.0 Non-Volatile memory controller: KIOXIA Corporation Device 0001
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Renoir (rev c3)
03:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device 1637
03:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor
03:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1
03:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1
03:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor (rev 01)
03:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller
zean_7 avatar
jp flag
I assume you'd have to restart everytime this happens? You should check your journal for errors in the last boot. Just do a `journalctl -r -b -1` and check what's causing your system to not wake up properly after suspend.
gb flag
Same problem here: HP 15s, AMD Ryzen 3 4300u, Ubuntu 20.04.3 with kernel 5.11
Score:0
cn flag

I have HP 15s-eq2040au, Ryzen 5500u and am on Arch and I think the kernel 5.11 has that problem. Up until 5.12, you could add a patch

1. Patch

#/etc/modprobe.d/options.conf
amdgpu dpm=0

This is a bad fix as it just disables power management on the gpu and it's still running in suspend state.

2. Better Fix

Later kernels have addressed this and you could take the more recent version of the kernel and avoid the gpu issue, I've checked on 5.13 and 5.14-rc3.

However, I still ran into one more problem with IOMMU which caused my SSD to become read-only and systemd wasn't even able to log stuff. Setting

iommu=soft

this kernel parameter during boot solved the issue. You should be able to do it in grub, here's a systemd-boot config.

title Arch Linux (distro)
linux /vmlinuz-linux
initrd /amd-ucode.img
initrd /initramfs-linux.img
options root="LABEL=root" rw splash iommu=soft

Let me know if this worked for you.

Score:0
cn flag

Unfortunately, installing only 5.14-rc5 (as HaoSama wrote) is not enough for me but it is necessary. Also updating DSDT is needed. To do it run:

  1. Create a working directory
mkdir -p /tmp/acpi; cd /tmp/acpi/
  1. Dump all your ACPI files into recently created directory
sudo acpidump -b
  1. And decompile the DSDT:
iasl -e *.dat -d dsdt.dat
  1. Enable S3 state.

4.1. Open dsdt.dsl with a text editor find and replace

    Name (XS3, Package (0x04)
    {
        0x03, 
        Zero, 
        Zero, 
        Zero
    })

with

    Name (_S3, Package (0x04)
    {
        0x03, 
        Zero, 
        Zero, 
        Zero
    })

4.2. also find line begins with DefinitionBlock and increase OEM version (in my case 0x01072009):

DefinitionBlock ("", "DSDT", 2, "HPQOEM", "8707    ", 0x01072009)

by replacing with

DefinitionBlock ("", "DSDT", 2, "HPQOEM", "8707    ", 0x01072010)
  1. Compile the final DSDT
iasl -ve -tc dsdt.dsl
  1. Create a cpio file
mkdir -p kernel/firmware/acpi
cp dsdt.aml kernel/firmware/acpi
find kernel | cpio -H newc --create > acpi_override
sudo cp acpi_override /boot
  1. Update GRUB: Open /etc/default/grub with text editor and append to key GRUB_CMDLINE_LINUX_DEFAULT mem_sleep_default=deep value. For example, my line is GRUB_CMDLINE_LINUX_DEFAULT="splash resume=UUID=ddd96d19-0c4e-4523-86ff-033cffb11d58 mem_sleep_default=deep" Then, add the line GRUB_EARLY_INITRD_LINUX_CUSTOM="acpi_override" below. Finally run
sudo update-grub

My laptop is HP 15s-eq1xxx, Ryzen 3 4300U. I had adapted for my laptop the solution described here.

You can check if S3 System State become available by

sudo dmesg | grep -i acpi | grep supports
Grigory Bogush avatar
ci flag
I have a similar laptop to you hp-15s-eq2xxx. I was able to unlock s3 sleep with your solution however it appears that my file system is readonly (or even unreadable?) after waking up from suspend. Have you encountered this issue? Could you post your bios and kernel versions?
Score:0
in flag

First, check /var/log/Xorg.*.log if you see

(II) systemd-logind: got pause for 

then try this workaround:

 sudo systemctl set-default multi-user.target

reboot, to text console mode, login, try lsmod confirming amdgpu is listed

startx

Peace. So it's a systemd issue that I cannot find any log for further investigation.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.