[amdgpu] Screen fails to wake up after sleep using 5.4.0-66, but 5.4.0-65 works

Bug #1916950 reported by Anders Aagaard
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Linux
New
Unknown
linux (Ubuntu)
Incomplete
High
Unassigned
linux-meta-hwe-5.8 (Ubuntu)
Fix Released
High
Unassigned

Bug Description

It looks an awful lot like this issue : https://gitlab.freedesktop.org/drm/amd/-/issues/1427.

I'm hitting these:
[11596.268677] [drm:dce112_get_pix_clk_dividers [amdgpu]] *ERROR* dce112_get_pix_clk_dividers: Invalid parameters!!
[11596.269781] [drm:dm_restore_drm_connector_state [amdgpu]] *ERROR* Restoring old state failed with -22

Switching to tty2 wakes it up and allows me to switch back and recover my xorg session.

Should this be filed against the kernel, xorg, or amd drivers? I'm not sure..

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: xorg 1:7.7+19ubuntu14
ProcVersionSignature: Ubuntu 5.4.0-66.74-generic 5.4.86
Uname: Linux 5.4.0-66-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu27.16
Architecture: amd64
BootLog: Error: [Errno 13] Permission denied: '/var/log/boot.log'
CasperMD5CheckResult: skip
CompositorRunning: None
CurrentDesktop: KDE
Date: Thu Feb 25 21:07:28 2021
DistUpgraded: 2020-04-22 17:41:41,681 DEBUG Running PostInstallScript: './xorg_fix_proprietary.py'
DistroCodename: focal
DistroVariant: ubuntu
DkmsStatus:
 virtualbox, 6.1.16, 5.4.0-64-generic, x86_64: installed
 virtualbox, 6.1.16, 5.4.0-65-generic, x86_64: installed
 virtualbox, 6.1.16, 5.4.0-66-generic, x86_64: installed
 zfs, 0.8.3, 5.4.0-65-generic, x86_64: installed
 zfs, 0.8.3, 5.4.0-66-generic, x86_64: installed (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!)
ExtraDebuggingInterest: Yes
GraphicsCard:
 Advanced Micro Devices, Inc. [AMD/ATI] Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] [1002:699f] (rev c7) (prog-if 00 [VGA controller])
   Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] [1002:0b04]
 NVIDIA Corporation GP104 [GeForce GTX 1070] [10de:1b81] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: Gigabyte Technology Co., Ltd GP104 [GeForce GTX 1070] [1458:3701]
InstallationDate: Installed on 2019-08-15 (560 days ago)
InstallationMedia: Ubuntu 18.04.3 LTS "Bionic Beaver" - Release amd64 (20190805)
MachineType: Gigabyte Technology Co., Ltd. X570 AORUS PRO
ProcKernelCmdLine: BOOT_IMAGE=/BOOT/ubuntu_fnpezh@/vmlinuz-5.4.0-66-generic root=ZFS=rpool/ROOT/ubuntu_fnpezh ro usbcore.autosuspend=-1 quiet splash amd_iommu=on iommu=pt video=efifb:off,vesafb=off,simplefb=off nouveau.modeset=0 rd.driver.blacklist=nouveau,nvidia,nvidia_uvm,nvidia_drm,nvidia_modeset usbhid.quirks=0x1b1c:0x1b44:0x20000408 usbcore.quirks=1b1c:1b44:gn crashkernel=384M vt.handoff=1
SourcePackage: xorg
Symptom: display
UpgradeStatus: Upgraded to focal on 2020-04-22 (309 days ago)
dmi.bios.date: 02/17/2021
dmi.bios.vendor: American Megatrends International, LLC.
dmi.bios.version: F33c
dmi.board.asset.tag: Default string
dmi.board.name: X570 AORUS PRO
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.asset.tag: Default string
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.version: Default string
dmi.modalias: dmi:bvnAmericanMegatrendsInternational,LLC.:bvrF33c:bd02/17/2021:svnGigabyteTechnologyCo.,Ltd.:pnX570AORUSPRO:pvr-CF:rvnGigabyteTechnologyCo.,Ltd.:rnX570AORUSPRO:rvrx.x:cvnDefaultstring:ct3:cvrDefaultstring:
dmi.product.family: X570 MB
dmi.product.name: X570 AORUS PRO
dmi.product.sku: Default string
dmi.product.version: -CF
dmi.sys.vendor: Gigabyte Technology Co., Ltd.
modified.conffile..etc.default.apport: [modified]
mtime.conffile..etc.default.apport: 2020-03-23T10:46:45.197962
version.compiz: compiz N/A
version.libdrm2: libdrm2 2.4.102-1ubuntu1~20.04.1
version.libgl1-mesa-dri: libgl1-mesa-dri 20.2.6-0ubuntu0.20.04.1
version.libgl1-mesa-glx: libgl1-mesa-glx 20.2.6-0ubuntu0.20.04.1
version.xserver-xorg-core: xserver-xorg-core 2:1.20.9-2ubuntu1.2~20.04.1
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:19.1.0-1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20200226-1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.16-1

Revision history for this message
Anders Aagaard (aagaande) wrote :
tags: added: amdgpu
summary: - Screen fails to wake up after sleep
+ [amdgpu] Screen fails to wake up after sleep
affects: xorg (Ubuntu) → linux (Ubuntu)
Revision history for this message
Anders Aagaard (aagaande) wrote : Re: [amdgpu] Screen fails to wake up after sleep

Switching to linux-image-generic-hwe-20.04 seems to have solved the problem - but I don't think it immediately showed up. Will report back if I run into the issue again.

Changed in linux-meta-hwe-5.8 (Ubuntu):
status: New → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The fix mentioned in the upstream bug appears to be one that we don't have, even in the HWE kernel: https://gitlab.freedesktop.org/agd5f/linux/-/commit/8768ff5efae35acea81b3f0c7db6a7ef519b0861

So either the bug is not really fixed, or we've linked to the wrong upstream bug.

Changed in linux-meta-hwe-5.8 (Ubuntu):
status: Fix Released → Incomplete
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Anders Aagaard (aagaande) wrote :

Based on the latest comment in https://gitlab.freedesktop.org/drm/amd/-/issues/1427 it looks like this got reverted in 5.4.88, which is presumably why this works for me in HWE?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I was already looking at the HWE source code and the revert is not in that kernel version.

Revision history for this message
Veron Rado (junket) wrote :

I have this issue too. (@Anders Aagaard, thanks for the tty2 workaround).

Distro: Ubuntu 20.04.2 LTS (Focal Fossa)
Kernel: 5.4.0-66-generic x86_64
compiler: gcc v: 9.3.0
Desktop: Gnome 3.36.4
wm: gnome-shell
dm: GDM3 3.36.3

Graphics:
Device-1: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
driver: amdgpu
Display: server: X.Org 1.20.9
driver: amdgpu
compositor: gnome-shell
OpenGL: renderer: AMD Radeon RX 480 Graphics (POLARIS10 DRM 3.35.0 5.4.0-66-generic LLVM 11.0.0) v: 4.6 Mesa 20.2.6

Revision history for this message
Veron Rado (junket) wrote :

The tty2 workaround didn't work for me.
I have to do a couple of sleep/wake cycles and eventually the screen stays on.

Revision history for this message
Nate Vick (natevick) wrote :

This issue is also affecting me. I booted up with kernel 5.4.0-65-generic which resolved the issue.

Ubuntu 20.04.2 LTS
5.4.0-66-generic

AMD Radeon RX5700XT

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

^^^
Anders, can you please try booting 5.4.0-65-generic ?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Aha! Yes indeed the offending commit first appeared in amdgpu_dm.c in 5.4.0-66, so reverting to 5.4.0-65 should work around the problem.

summary: - [amdgpu] Screen fails to wake up after sleep
+ [amdgpu] Screen fails to wake up after sleep using 5.4.0-66, but
+ 5.4.0-65 works
tags: added: regression-update
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Changed in linux-meta-hwe-5.8 (Ubuntu):
status: Incomplete → Confirmed
Changed in linux (Ubuntu):
importance: Undecided → High
Changed in linux-meta-hwe-5.8 (Ubuntu):
importance: Undecided → High
Changed in linux (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sorry, I read that wrong. The fix is in the 5.8 HWE kernel already.

Changed in linux-meta-hwe-5.8 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Anders Aagaard (aagaande) wrote :

Everything was working fine for me up until I created this bug.

I checked dpkg logs + my reboot times and it's when I booted from 5.4.0-65 to 5.4.0-66 that this broke. So this adds up nicely 👍

Revision history for this message
Veron Rado (junket) wrote :

Can also confirm rolling back to 5.4.0-65-generic fixes the issue.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

As a permanent fix you can apply right now, you might wish to jump to the HWE (5.8) kernel:

  sudo apt install linux-generic-hwe-20.04

Revision history for this message
Veron Rado (junket) wrote :

@Daniel van Vugt That's a good idea. Thank you. I didn't know what the HWE kernel was. This explains it nicely
https://askubuntu.com/questions/248914/what-is-hardware-enablement-hwe

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

That sounds like the fix was published yesterday. Please test it:

  sudo apt update
  sudo apt full-upgrade

and reboot.

Changed in linux (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Veron Rado (junket) wrote :

I installed the HWE kernel using :

   $ sudo apt-get install linux-generic-hwe-20.04

What is the recommended way to remove it and go back to the regular kernel again?

Changed in linux:
status: Unknown → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.