Bug 99330

Summary: Severe flickering with Fiji on Wayland
Product: Mesa Reporter: Vedran Miletić <vedran>
Component: Drivers/Gallium/radeonsiAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED NOTOURBUG QA Contact: Default DRI bug account <dri-devel>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Vedran Miletić 2017-01-09 14:59:17 UTC
I am using

01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Fiji [Radeon R9 FURY / NANO Series] [1002:7300] (rev ca) (prog-if 00 [VGA controller])

on Fedora 25 running GNOME 3 with Mesa git and LLVM git on two 4K monitors. When using Wayland, there is a noticeable flickering in the upper part of the screen when switching between desktops. Nothing relevant is shown in dmesg.

Also, when using Xorg, everything works fine.

Would a screenshot be useful? Any other info I can provide?
Comment 1 Ernst Sjöstrand 2017-01-09 15:53:50 UTC
Which exact version is that of gnome-shell and mutter?
Comment 2 Vedran Miletić 2017-01-09 17:33:05 UTC
(In reply to Ernst Sjöstrand from comment #1)
> Which exact version is that of gnome-shell and mutter?

gnome-shell-3.22.2-2.fc25.x86_64
mutter-3.22.2-3.fc25.x86_64
Comment 3 Ernst Sjöstrand 2017-01-09 20:05:14 UTC
I happen to have 2 4K monitors and a Fury as well actually.

I actually couldn't run Wayland at all for some time, perhaps it was fixed by:
mutter (3.22.2-3) unstable; urgency=medium

  [ Jeremy Bicha ]
  * Add git_flush_all_swap_notifies_on_idle.patch:
    - Add patch from 3.22 branch that fixes freezes with multiple monitors
      on Wayland
landing in my Ubuntu repos.

Anyway, today I can run gnome shell in Wayland and I don't have any flickering.

Do you have the very latest firmware from http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git ?

Guess the devs always like dmesg and xorg... wait nevermind that last part. :-)
Maybe journalctl /usr/bin/gnome-shell  ?
Comment 4 Ernst Sjöstrand 2017-01-09 21:12:07 UTC
Wait, actually after some DPMS and
[ 4378.466823] [drm:amdgpu_atombios_dp_link_train [amdgpu]] *ERROR* clock recovery tried 5 times
[ 4378.466834] [drm:amdgpu_atombios_dp_link_train [amdgpu]] *ERROR* clock recovery failed

journalctl /usr/bin/gnome-shell now show a bunch of stuff like:
jan 09 22:06:51 mammut gnome-shell[1675]: Failed to flip: Invalid argument
jan 09 22:06:52 mammut org.gnome.Shell.desktop[1675]: Window manager warning: Failed to read EDID of output DP-3: Filen eller katalogen finns inte
jan 09 22:06:52 mammut gnome-shell[1448]: Failed to apply DRM plane transform 0: Access denied 
jan 09 22:06:52 mammut gnome-shell[1448]: Failed to apply DRM plane transform 0: Access denied
jan 09 22:06:52 mammut gnome-shell[1675]: Failed to apply DRM plane transform 0: Invalid argument
jan 09 22:06:52 mammut gnome-shell[1675]: Failed to apply DRM plane transform 0: Invalid argument
jan 09 22:06:53 mammut org.gnome.Shell.desktop[1675]: Window manager warning: Failed to read EDID of output DP-3: Filen eller katalogen finns inte
jan 09 22:06:53 mammut org.gnome.Shell.desktop[1675]: Window manager warning: Failed to read EDID of output DP-3: Filen eller katalogen finns inte
jan 09 22:06:53 mammut org.gnome.Shell.desktop[1675]: Window manager warning: Failed to read EDID of output DP-3: Filen eller katalogen finns inte
jan 09 22:06:53 mammut org.gnome.Shell.desktop[1675]: Window manager warning: Failed to read EDID of output DP-3: Filen eller katalogen finns inte
jan 09 22:06:53 mammut org.gnome.Shell.desktop[1675]: Window manager warning: Failed to read EDID of output DP-3: Filen eller katalogen finns inte
jan 09 22:06:53 mammut org.gnome.Shell.desktop[1675]: Window manager warning: Failed to read EDID of output DP-3: Filen eller katalogen finns inte
jan 09 22:06:53 mammut org.gnome.Shell.desktop[1675]: Window manager warning: Failed to read EDID of output DP-3: Filen eller katalogen finns inte
jan 09 22:06:53 mammut gnome-shell[1448]: Failed to apply DRM plane transform 0: Access denied
jan 09 22:06:53 mammut gnome-shell[1675]: Failed to apply DRM plane transform 0: Invalid argument

Still, this could just as well be a gnome-shell bug?

Does it work with an older mesa/llvm version for you?
Comment 5 Vedran Miletić 2017-01-10 15:27:09 UTC
(In reply to Ernst Sjöstrand from comment #3)
> I happen to have 2 4K monitors and a Fury as well actually.
> 
> I actually couldn't run Wayland at all for some time, perhaps it was fixed
> by:
> mutter (3.22.2-3) unstable; urgency=medium
> 
>   [ Jeremy Bicha ]
>   * Add git_flush_all_swap_notifies_on_idle.patch:
>     - Add patch from 3.22 branch that fixes freezes with multiple monitors
>       on Wayland
> landing in my Ubuntu repos.
> 

That's also in Fedora as far as I can tell: https://koji.fedoraproject.org/koji/buildinfo?buildID=823521

(In reply to Ernst Sjöstrand from comment #4)
> Does it work with an older mesa/llvm version for you?

Mesa 13 and LLVM 3.8 in stock Fedora doesn't help.
Comment 6 Vedran Miletić 2017-01-10 16:46:43 UTC
Got it, thanks Ernst:

Jan 10 17:44:30 localhost.localdomain gnome-shell[22110]: Failed to flip: Invalid argument

I also got the following in dmesg, but it's likely unrelated as I get it with Xorg as well:

[Tue Jan 10 17:44:29 2017] [drm:amdgpu_crtc_page_flip [amdgpu]] *ERROR* failed to get vblank before flip
Comment 7 Michel Dänzer 2017-01-11 09:49:23 UTC
Please attach the dmesg output, preferably captured after the problem occurred.

(In reply to Vedran Miletić from comment #6)
> Jan 10 17:44:30 localhost.localdomain gnome-shell[22110]: Failed to flip:
> Invalid argument
> 
> I also got the following in dmesg, but it's likely unrelated as I get it
> with Xorg as well:
> 
> [Tue Jan 10 17:44:29 2017] [drm:amdgpu_crtc_page_flip [amdgpu]] *ERROR*
> failed to get vblank before flip

It might be related. There might be similar messages about the page flip ioctl failing in the Xorg log file, Xorg might just be more resilient against it.
Comment 8 Vedran Miletić 2017-01-16 17:42:55 UTC
Somehow can't reproduce it right now. The only related package I see in my today's updates is GTK3 3.22.6-2.fc25 [1] which fixes [2]. Could be that. Will report if it happens again.

[1] https://koji.fedoraproject.org/koji/buildinfo?buildID=832589
[2] https://bugzilla.gnome.org/show_bug.cgi?id=769835

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.