Bug 1417778

Summary: wayland: video corruption with amd RX480 and 4k display
Product: [Fedora] Fedora Reporter: Ralph Giles <giles>
Component: waylandAssignee: Adam Jackson <ajax>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: adiazreb, ajax, alf.tanner, anelson, chris, ischoegl, jaas, jan.public, nushoin
Target Milestone: ---Keywords: Desktop
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-30 23:42:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ralph Giles 2017-01-30 23:21:35 UTC
Description of problem:

I get a lot of video corruption on my 4k display. It usually shows up as bands of the background image or gnome-shell status bar flickering across the display at different vertical positions. Things work fine if I select 'Gnome under X.Org' from the login screen instead of wayland.

Version-Release number of selected component (if applicable):

libwayland-server 1.12.0-1.fc25
mesa-dri-drivers 13.0.3-4.fc25
linux 4.9.3-200.fc25.x86_64

How reproducible:

This has happened since I first installed Fedora 25 on the new machine. The form of the artefacts have varied some over different updates. The bands were mostly larger earlier in the release, and smaller now with different data in them.

Steps to Reproduce:
1. Log in to gnome-shell in wayland
2. Open gnome-terminal and maximize on the 4k display.
3. Do something to trigger redraws, like scrolling text in the terminal.

Actual results:

4k display flickers, showing drawing artifacts on update.

Expected results:

Display updates cleanly.

Additional info:

This is a recent Lenovo P710 workstation (dual Xeon E5v4, C610/X99 bridge) with an AMD RX 480 pci graphics card. Attached are one 4k (3640x2160) and two 2k (1200x1920) displays. The 2k displays have never shown artefacts.

Comment 1 Ralph Giles 2017-07-26 21:50:42 UTC
I'm still seeing this with Fedora 26.

Comment 2 Josh Aas 2017-07-26 22:15:21 UTC
I have the exact same issue being reported here, with both Fedora 25 and Fedora 26. I'm using a 4k Dell display with an AMD RX 480 graphics card. The desktop is unusable because of the strain that the constant flickering puts on my eyes.

Comment 3 Ralph Giles 2017-07-26 23:17:21 UTC
Hi Josh. My 4k monitor is a Dell P2715Q, running at 3840x2160, 60 Hz over the full-size Display Port input, MST off.

Comment 4 Josh Aas 2017-07-26 23:33:55 UTC
Exactly the same display and setup here.

Nice to virtually run into you, fellow Mozillian :)

Comment 5 Andrew N 2017-08-11 17:34:34 UTC
I'm seeing the same thing on F26 with an RX460 and a 4K display running at 380x2160@59Hz.

The flicker most often happens for me after the display comes out of the screen lock/power save.  I've had my system go for several days without issue, or multiple times within the same day.  The flicker is most pronounced when moving a window about, such as a web browser, but will also happen randomly when no applications are running.  Most often the top tenth to top quarter of the screen is flickering.  Rarely does it involve the whole screen or half of the screen.

The flicker will go away when logging out and logging back into the GUI session.  It seems to return about the same as if the system were rebooted.

Looks like there are a few other bugs related to this:
https://bugzilla.redhat.com/show_bug.cgi?id=1443581
Closed as a "duplicate" of an Xorg flicker problem (https://bugzilla.redhat.com/show_bug.cgi?id=1353008)

Other comments seem to indicate that reducing resolution does not lead to flickering (which is not a helpful fix).  It is also worth noting that I used to run the nouveau drivers with a latest generation Nvidia, however that would randomly crash.  That crash also appeared to be screen related.

Comment 6 Ralph Giles 2017-08-11 17:44:58 UTC
I'm pleased someone at Red Hat can reproduce. That's good news.

The flicker has been particularly bad lately, for example, bands of the background image flashing through the browser window on the 4k screen whenever a build output scrolls in a terminal on a secondary display.

I haven't bothered to file a bug for the third display cycling through primary colours instead of blanking, but that started a after an update a week or two ago.

Comment 7 ischoegl 2017-08-25 21:35:49 UTC
I've been having the exact same problem as described above ever since I installed the 4K display on my machine (under wayland under both FC25 and FC26). I originally switched back to the Gnome/Xorg as artifacts were severe; it may be slightly improved on Fedora 26, but is still quite straining. Symptoms are largely equivalent to what is reported above (mostly affects top 1/10th of the 4K (Asus 3840x2160@59Hz); a second standard display (1920x1080@60Hz) is rock-solid); I've tried both Nvidia and AMD graphics cards (currently running a Sapphire Pro), to no avail.

Comment 8 nushoin 2017-10-19 10:09:25 UTC
I know that this is a Fedora bug-tracker, however I'm having the same problem with Ubuntu 17.04 running Gnome Shell 3.24 Wayland session. I'm using AMD RX560 video card, using the 'amdgpu' kernel driver. lspci shows

01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Polaris11] [1002:67ff] (rev cf)

The monitor is Dell P2715Q running at 4K (3840x2160).
If I hard-disable screen suspend in the Mutter source code, the problem is gone:

diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c
index dc1d960..3addbe6 100644
--- a/src/backends/meta-monitor-manager.c
+++ b/src/backends/meta-monitor-manager.c
@@ -225,7 +225,7 @@ power_save_mode_changed (MetaMonitorManager *manager,
     return;
 
   /* If DPMS is unsupported, force the property back. */
-  if (manager->power_save_mode == META_POWER_SAVE_UNSUPPORTED)
+  //if (manager->power_save_mode == META_POWER_SAVE_UNSUPPORTED)
     {
       meta_dbus_display_config_set_power_save_mode (META_DBUS_DISPLAY_CONFIG (manager), META_POWER_SAVE_UNSUPPORTED);
       return;


However this of course disables screen power save.

If I now turn the display off using the power button on the screen, then turn it back on the problem returns even with the patched libmutter.

I'll check to see if the problem persists with Gnome 3.26 once I update to Ubuntu 17.10. Will also install Fedora 27 once it's out and test there as well.

Comment 9 nushoin 2017-10-19 10:12:29 UTC
(In reply to nushoin from comment #8)
> I know that this is a Fedora bug-tracker, however I'm having the same
> problem with Ubuntu 17.04 running Gnome Shell 3.24 Wayland session. I'm
> using AMD RX560 video card, using the 'amdgpu' kernel driver. lspci shows
> 
> 01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc.
> [AMD/ATI] Baffin [Polaris11] [1002:67ff] (rev cf)
> 
> The monitor is Dell P2715Q running at 4K (3840x2160).
> If I hard-disable screen suspend in the Mutter source code, the problem is
> gone:
> 
> diff --git a/src/backends/meta-monitor-manager.c
> b/src/backends/meta-monitor-manager.c
> index dc1d960..3addbe6 100644
> --- a/src/backends/meta-monitor-manager.c
> +++ b/src/backends/meta-monitor-manager.c
> @@ -225,7 +225,7 @@ power_save_mode_changed (MetaMonitorManager *manager,
>      return;
>  
>    /* If DPMS is unsupported, force the property back. */
> -  if (manager->power_save_mode == META_POWER_SAVE_UNSUPPORTED)
> +  //if (manager->power_save_mode == META_POWER_SAVE_UNSUPPORTED)
>      {
>        meta_dbus_display_config_set_power_save_mode
> (META_DBUS_DISPLAY_CONFIG (manager), META_POWER_SAVE_UNSUPPORTED);
>        return;
> 
> 
> However this of course disables screen power save.
> 
> If I now turn the display off using the power button on the screen, then
> turn it back on the problem returns even with the patched libmutter.
> 
> I'll check to see if the problem persists with Gnome 3.26 once I update to
> Ubuntu 17.10. Will also install Fedora 27 once it's out and test there as
> well.

Forgot to mention, the display is running at 60Hz (settings shows 59Hz) and connected over display port.

Comment 10 Ralph Giles 2017-10-24 20:53:39 UTC
I restarted after installing the latest fedora 26 updates today and the flickering is particularly bad. I uploaded a rough video as an example of the behaviour at https://people.xiph.org/~giles/2017/bug-1417778_20171024.webm

The band you can see at the top of the screen in the last frame of the video is part of the background image.

linux 4.13.5-200.fc26
wayland 1.13.0-1.fc26
mesa-dri-drivers 17.2.2-2.fc26

Comment 11 nushoin 2017-10-26 10:24:12 UTC
(In reply to Ralph Giles from comment #10)
> I restarted after installing the latest fedora 26 updates today and the
> flickering is particularly bad. I uploaded a rough video as an example of
> the behaviour at
> https://people.xiph.org/~giles/2017/bug-1417778_20171024.webm
> 
> The band you can see at the top of the screen in the last frame of the video
> is part of the background image.
> 
> linux 4.13.5-200.fc26
> wayland 1.13.0-1.fc26
> mesa-dri-drivers 17.2.2-2.fc26

Yep got the exact same issues.

Comment 12 nushoin 2017-10-26 18:04:49 UTC
Tested on Ubuntu 17.10 GNOME Wayland session (GNOME 3.26.1, Linux 4.13, Radeon RX560 using amdgpu, Dell P2715Q monitor running at 4K@59, mesa 17.2.2).

The hack that I posted above solves the problem in this setup as well. I'll test on Fedora 27 once it's out, but I suspect that the result will be the same.

Comment 13 Ralph Giles 2017-11-16 18:18:04 UTC
Still occurs for me with Fedora 27.

Comment 14 Antonio Diaz 2017-12-29 09:37:50 UTC
Same issue here.

Ubuntu 17.10 GNOME Wayland session (GNOME 3.26.2, Linux 4.13, Radeon RX560 using amdgpu, Lenovo l24q-10 monitor running at 2k (2560x1440@ 59.95Hz).

If using X session instead of Wayland there's no flickering.

Comment 15 Nicola 2018-01-10 02:39:33 UTC
Add a "me too". F27 x64 with latest updates as of 9th of January, Using Displayport connector with an Amd RX 560 to 4k display Samsung U32H850.

Exactly like in the video posted in comment 10. Doesn't occur under Xorg, just Wayland. After a few screen locks. Logging out and in again cures it.

A question to other fellows: do you observe the same behaviour with HDMI connection as well, or it is a "feature" of Displayport? Haven't tested yet.

Sometimes I observe the following kernel messages (several versions):

drm:amdgpu_atombios_dp_link_train [amdgpu]] *ERROR* displayport link status failed
[drm:amdgpu_atombios_dp_link_train [amdgpu]] *ERROR* clock recovery failed

appears unrelated to flickering, however.

Comment 16 Jan Vlug 2018-03-10 16:55:48 UTC
confirming on:
Graphics:  Card: Advanced Micro Devices [AMD/ATI] Baffin [Radeon RX 460/560D / Pro 450/455/460/560]
           Display Server: wayland (X.org 119.6 )
           drivers: modesetting,fbdev,vesa
           Resolution: 1680x1050, 2560x1440
           OpenGL: renderer: Radeon RX 560 Series (POLARIS11 / DRM 3.23.0 / 4.15.6-300.fc27.x86_64, LLVM 5.0.1)
           version: 4.5 Mesa 17.3.6

Only on display link HiDPI display in dual screen setup. Using Wayland.

Is there an official AMD GPU bug tracker where this can be reported?

Comment 17 Jan Vlug 2018-03-10 17:11:06 UTC
I cannot add this to the 'see also', but here is a link to Gnome GitLab:
https://gitlab.gnome.org/GNOME/mutter/issues/22

Comment 18 Jan Vlug 2018-03-10 17:43:38 UTC
Maybe related: https://bugs.freedesktop.org/show_bug.cgi?id=96868

Comment 19 Jan Vlug 2018-03-18 11:21:58 UTC
Since the last round of updates the behavior has changed for me.
After resume for suspend, the display connected to the displaylink port does not wake up at all, the display connected to the dvi port does. When I use Ctrl-Alt-F3 to switch to a CLI terminal and Ctrl-Alt-F1 to switch back to the graphical mode, the displaylink connected display wakes up.

I do not have the flickering any more, but there is a minor disruption of one pixel high on the dvi connected display (random pixels, slightly flickering).

Kernel:
Linux nyx 4.15.8-300.fc27.x86_64 #1 SMP Fri Mar 9 18:11:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Graphics:  Card: Advanced Micro Devices [AMD/ATI] Baffin [Radeon RX 460/560D / Pro 450/455/460/560]
           Display Server: X.org 1.19.6 drivers: modesetting,fbdev,vesa
           Resolution: 3840x2160, 1680x1050
           OpenGL: renderer: Radeon RX 560 Series (POLARIS11 / DRM 3.23.0 / 4.15.8-300.fc27.x86_64, LLVM 5.0.1)
           version: 4.5 Mesa 17.3.6

I'm curious what behavior the other commenters of this bug see.

Comment 20 Jan Vlug 2018-03-18 14:05:40 UTC
Apologies, the behavior described in my comment above is on X-org.

Comment 21 Jan Vlug 2018-03-24 10:59:27 UTC
I'm a bit in doubt where to provide updates for this bug, as it is also reported for:

Ubuntu: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1740484
Gnome: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1740484

For now I will post comments in Gnomes GitLab, as the issue seems not to be distribution specific.

But, is Gnomes GitLab the best place, as this seems to be a driver issue? If not please let me know where this issue should be reported.

Comment 22 Jan Vlug 2018-03-24 11:01:13 UTC
Link to Gnomes GitLab in comment above should be:
https://gitlab.gnome.org/GNOME/mutter/issues/22

Comment 23 Chris Hubick 2018-11-07 22:09:18 UTC
Me too. F29, Radeon RX Vega M GH (NUC8i7HVK), Samsung QLED TV 4K@30hz.

Comment 24 Ben Cotton 2018-11-27 13:37:05 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 25 Ben Cotton 2018-11-30 23:42:34 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.