[amdgpu] Flickering screen after waking up from Suspend

Bug #1874588 reported by Pavel Golikov
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Just did a fresh install of Ubuntu 20.04 LTS and everything was fine, display worked perfect. Then I put the machine in Suspend mode (by clicking on GUI button), left for 5 minutes, came back, woke up the machine (by clicking a key on the keyboard), and upon waking up, the display started flickering heavily.

Relevant Specs (Sorry if I missed anything):

AMD® Ryzen 9 3900x 12-core processor × 24
AMD® Radeon rx 5700 xt
GNOME version 3.36.1
Windowing System X11
I am running 3 monitors: Samsung with resolution 3840x2160 and 2 LG monitors with resolution 1920x1080, all at 60Hz

Most of the flickering is happening on Samsung, although once in a while, other monitors flicker a little bit as well.

Things to note: When I switch Samsung to lower resolution, the flickering goes away. When I come back to 3840x2160, it comes back. When I switch to lower resolution, suspend and come back, everything is fine.

If I reboot the machine, the display is fine until I suspend and wake up again (if I am in higher resolution).

I tried changing the refresh rate of Samsung to 30.00 and 29.97 (the only two available when I turn off FreeSync), and the issue still persists. Turning FreeSync on and off does nothing.

Thank you,

Pavel.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: linux-image-5.4.0-26-generic 5.4.0-26.30
ProcVersionSignature: Ubuntu 5.4.0-26.30-generic 5.4.30
Uname: Linux 5.4.0-26-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: pavel 1870 F.... pulseaudio
 /dev/snd/controlC0: pavel 1870 F.... pulseaudio
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Thu Apr 23 21:14:00 2020
InstallationDate: Installed on 2020-04-23 (0 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
MachineType: System manufacturer System Product Name
ProcEnviron:
 LANGUAGE=en_CA:en
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
ProcFB: 0 amdgpudrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.4.0-26-generic root=UUID=02f6301e-c22b-462d-a4e5-71a78b7eb203 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-5.4.0-26-generic N/A
 linux-backports-modules-5.4.0-26-generic N/A
 linux-firmware 1.187
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 11/19/2019
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 1405
dmi.board.asset.tag: Default string
dmi.board.name: TUF GAMING X570-PLUS (WI-FI)
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: Rev X.0x
dmi.chassis.asset.tag: Default string
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.version: Default string
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr1405:bd11/19/2019:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKCOMPUTERINC.:rnTUFGAMINGX570-PLUS(WI-FI):rvrRevX.0x:cvnDefaultstring:ct3:cvrDefaultstring:
dmi.product.family: To be filled by O.E.M.
dmi.product.name: System Product Name
dmi.product.sku: SKU
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
Pavel Golikov (pavel1986) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Ian Cameron (orithan) wrote : Re: Flickering screen after waking up from Suspend

I've experienced a similar issue on boot, with a Ryzen 7 3800x and a 5700xt on GNOME 3.36.2.

It may be related to a new error message when booting:

amdgpu: [powerplay] failed to send message: NumOfDisplays (64) $param:0x00000003 response

But, contrarily, my flickering issue can be corrected by readjusting the resolution from 1440p to 1080 and back again.

Revision history for this message
WXYZ (wxyzer) wrote :

I had the same issue with Ryzen 5 3600x and Radeon 5600xt. For a different mouse flickering issue when using xrandr, I had to set following xrandr after I set correct resolution and panning.

xrandr --output DisplayPort-2 --scale 0.9999x0.9999

DisplayPort-2 is my primary display. With the above setting my mouse flickering went away.

Surprisingly this also fixed the screen flickering issue after wake up from suspend.

Revision history for this message
WXYZ (wxyzer) wrote :

I was wrong in my previous comment. I had to recompile the kernel and move to a more recent one than 5.4.x that's shipped with 20.04. Tested this on a fresh 20.04 installation.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Pavel, are you still seeing the same issue after recent kernel updates?

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Reid (mrwowsers) wrote :

Hello,
I've been noticing what sounds like the same issue as the original post. This is brand new install of Ubuntu 20.04 after running all updates and restarting. A clean boot show has no display problems but after I suspend my system I get a lot of tearing/flashing. If I drop the rate on the larger monitor from 144Hz to 59.95Hz the problem goes away. I have also tried the other supported rates of 120.00 and 99.95 which still have tearing.

If I try the same process but with just my larger screen enabled, the resume doesn't have the flickering.

This does not seem to be happening in Fedora 32 in the same system. Since that runs 5.6 and 3.36 on Wayland maybe the issue is in the kernel. I am mostly a user so I can't really draw better conclusions.

I can provide a video and logs as needed.

My setup:
AMD® Ryzen 5 2600x six-core processor × 12
AMD® Radeon rx 5600 xt
GNOME version 3.36.3
Kernel: 5.4.0-40-generic #44-Ubuntu SMP Tue Jun 23 00:01:04 UTC 2020
Windowing System X11 (also happens when using Wayland)
2 monitors:
  Samsung 32" with resolution 3840x2160 @ 144.00 Hz
  Asus 24" 1920x1080 at 60Hz

Revision history for this message
Pavel Golikov (pavel1986) wrote :

My apologies. I wasn't checking this often enough. I upgraded the kernel top 5.16 and the issue went away.

Revision history for this message
Ian Cameron (orithan) wrote :

Update: After much testing, the only thing I discovered would fix the issues (including error messages on startup) was to downgrade the kernel to 5.3.X. Upgrading wouldn't solve it.

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

Ian, and everyone other than Pavel,

Please open your own bugs by running:

  ubuntu-bug linux

so that we can investigate and track the status of your individual issues.

Revision history for this message
Robert Tharp (robtharp) wrote :

I have a Radeon 5700 XT and Ryzen 3900X as well. My symptoms are a bit different though. I'm running 2 identical monitors at 2560x1440 120Hz. Flickering affects both monitors simultaneously. As in they flicker at exactly the same time. Often related to how much is changing on the screen. They normally start flickering right after login, even off a fresh boot. People are discussing this over at https://bbs.archlinux.org/viewtopic.php?id=253272 and they say it is solved by kernel 5.4, but I am on linux-image-5.4.0-42-generic and it still flickers.

Running this does stop the flickering for me:
xrandr --output DisplayPort-1 --mode 1024x768; sleep 1; xrandr --output DisplayPort-1 --mode 2560x1440 -r 120

Interestingly I only have to run it for one monitor, not both and it stops the flickering for both.

tags: added: amdgpu
summary: - Flickering screen after waking up from Suspend
+ [amdgpu] Flickering screen after waking up from Suspend
Revision history for this message
Steven Valsesia (steven-valsesia) wrote :

I have a radeon 5700XT with 2 screens running at 144Hz and have this problem when I wake up my fresh install unbutu out of sleep.

Workaround: For the moment I set the frequency ON BOTH monitor at 60Hz, and I cancel the setting to get back at 144Hz, and it works.
If I put only one on my double screen at 60Hz, flickering continue ON BOTH.

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

Closed per comment #8 where the original reporter mentions the problem is fixed.

Anyone else still experiencing issues, please open a new bug for each issue.

Changed in linux (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

That said, it's unclear what kernel "5.16" is :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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