Video flicker on triggering OSD in Xorg (but not Wayland)

Bug #1845102 reported by KC
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-mpv (Ubuntu)
Incomplete
Undecided
Unassigned
mpv (Ubuntu)
Incomplete
Undecided
Unassigned
vlc (Ubuntu)
Incomplete
Undecided
Unassigned
xorg-server (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Description: Ubuntu Eoan Ermine (development branch)
Release: 19.10
My specs:
Advanced Micro Devices, Inc. [AMD/ATI] Caicos PRO [Radeon HD 7450]
Intel(R) Core(TM)2 Quad CPU Q9400 @ 2.66GHz

A flicker occurs with video playback in mpv, gnome-mpv, or VLC on X when the OSD is triggered (a volume change), for example: https://imgur.com/a/M6P325u.

This also occurs on 19.04 but with the Adwaita theme enabled instead of Yaru.

This issue does not occur in Wayland.
This issue does not occur if I use the older Yaru theme (in 19.10).

(The Z-shaped tear previously associated with this bug report is fixed by adding TearFree to the radeon Xorg config.)

Tags: eoan
tags: added: eoan
Revision history for this message
KC (kc12) wrote :

With the latest update (the updated dark headerbar theme) this issue no longer occurs.

Revision history for this message
KC (kc12) wrote :

I spoke too soon sorry, it still does.

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

This sounds like a coincidence as I don't think the theme can directly cause screen tearing.

Please run this command to send us more information about the affected machine:

  apport-collect 1845102

affects: yaru-theme (Ubuntu) → mutter (Ubuntu)
Changed in mutter (Ubuntu):
status: New → Incomplete
Revision history for this message
KC (kc12) wrote :

@vanvugt You're right, it's not the theme. I spent some time investigating this:

The tearing occurs while using GNOME-MPV or Celluloid. It's Z-shaped, and constant. It occurs after a slight flicker 5-10 seconds into playing any video. (And doesn't appear in screen captured videos, it sounds like a graphics glitch).

If I use GNOME-MPV and disable client side decorations, or use VLC or any other media player (besides Chromium), there's a noticeable flicker-stutter if I change the volume (when the OSD pops up and disappears). During this time, the desktop icons appear for a fraction of a second, then disappear.

This problem doesn't occur in Arch/vanilla GNOME, but it does occur in 19.04 if I turn on the Adwaita theme (both the Z-shaped tearing and the flicker OSD problem).

I figure that the old Yaru theme was masking this mutter issue somehow. There's probably an extension or some config file causing the desktop to show up for a fraction of a second then disappear.

Turning off all of the extensions (desktop icons, dash to dock etc.) doesn't help the situation.
Removing them from /usr/share/gnome-shell doesn't work either.
I've tested this on three separate computers, they all show the glitch (one was 19.04 with Adwaita enabled, the other two were 19.10 without any tweaking enabled).

This doesn't occur on Wayland though, could it be an xorg configuration issue?
I'm really sorry I'm harping on this so much but I prefer X because I can play video games there :D

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

Let's keep this bug about the Z-shaped tearing. Please start by following the instructions in comment #3.

Changed in gnome-mpv (Ubuntu):
status: New → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please also try MPV, instead of GNOME-MPV.

Revision history for this message
KC (kc12) wrote :

No Z-shaped tearing in MPV but there is that "desktop pops up and disappears" flicker.

https://imgur.com/a/M6P325u

(Same as GNOME-MPV but without CSD)

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Video tearing in Gnome-MPV/Celluloid in Xorg sessions (but not Wayland)

Please also run:

  lspci -k > lspcik.txt

and attach the file 'lspcik.txt'.

no longer affects: mutter (Ubuntu)
summary: - Video tearing in Celluloid with new Yaru theme
+ Video tearing in Gnome-MPV/Celluloid in Xorg sessions (but not Wayland)
Revision history for this message
KC (kc12) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: [radeon] Video tearing in Gnome-MPV/Celluloid in Xorg sessions (but not Wayland)

Thanks. Please also run:

  apport-collect 1845102

per comment #3.

tags: added: radeon
summary: - Video tearing in Gnome-MPV/Celluloid in Xorg sessions (but not Wayland)
+ [radeon] Video tearing in Gnome-MPV/Celluloid in Xorg sessions (but not
+ Wayland)
Revision history for this message
KC (kc12) wrote :

Running it right now, I authorized it for one hour and it sent out some information, hope that worked :D

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

The Z shape is characteristic of some graphics drivers. It's not a problem in the driver but it does suggest the app is displaying half-finished frames (on top of the previous frame).

So next I recommend trying different MPV command line options to change the rendering/decoding method. Sorry I don't know any more details...

Revision history for this message
KC (kc12) wrote :

Okay so, by putting TearFree in /etc/X11 (I added a file, 20-radeon.conf), the Z shaped tearing disappears from GNOME-MPV (Thanks!) But...

... the flicker (the imgur video I sent you) is still there, so I don't think that that flicker is caused by the radeon drivers, especially because it doesn't occur with the old Yaru theme.
I think it would occur regardless of the theme if it was the drivers' fault.

It doesn't occur on Arch either, and Arch uses these same radeon drivers - I tried different variations of these drivers on Arch to see if I could cause the flicker to show up, but I couldn't.

I also tried changing the shell theme in Ubuntu from Yaru to Adwaita and that had no effect.

Using various video output options in MPV yields the same results, bug's still there.

Revision history for this message
KC (kc12) wrote :

By the way, the flicker occurs in VLC too, regardless of what I put under Output.

Revision history for this message
KC (kc12) wrote : Re: Video tearing in MPV/VLC in Xorg (but not Wayland)

I just tried swapping my AMD GPU with my NVIDIA GPU and the flickering's identical.

tags: removed: radeon
summary: - [radeon] Video tearing in Gnome-MPV/Celluloid in Xorg sessions (but not
- Wayland)
+ Video tearing in MPV/VLC in Xorg (but not Wayland)
KC (kc12)
no longer affects: vlc
no longer affects: mpv
KC (kc12)
description: updated
summary: - Video tearing in MPV/VLC in Xorg (but not Wayland)
+ Video flicker on triggering OSD in Xorg (but not Wayland)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mpv (Ubuntu):
status: New → Confirmed
Changed in vlc (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Per comment #5, this bug should be about the tearing only. If you would like to cover the flicker issue then please open a new bug.

I know it's annoying, but separate bugs have separate fixes as you've just found.

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

Wait a minute... How many monitors are you running?

Just one or multiple?

Changed in xorg-server (Ubuntu):
status: New → Incomplete
Changed in mpv (Ubuntu):
status: Confirmed → Incomplete
Changed in vlc (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
KC (kc12) wrote :

@vanvugt The tearing's a nonissue now so it makes sense to refashion this report to deal with the flicker only. I'd really rather not shirk this report with the traction it's received.

Re #19, just the one screen. But that makes no difference either. I have a multiple screen setup on a different computer and this happens there too. It happens everywhere, regardless of hardware. It also happens with all the extensions and modes are pulled out. It happens regardless of what theme or what shell theme I use. And I haven't been able to reproduce this issue on Arch, Fedora Rawhide or Manjaro.

Revision history for this message
KC (kc12) wrote :

P.S. This might also be a security issue. I've noticed that the frame that's stuck inside the flicker reappears when I shut down / restart my computer. That's a potential security issue because you might not be the only person using your computer and all of a sudden this errant frame of video pops up.

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

OK, since we're back to just the flicker issue then we should use bug 1828697. Because it is older, but also because it is not confused by the tearing issue mentioned here.

Revision history for this message
KC (kc12) wrote :

Good idea

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

Other bug subscribers

Bug attachments

Remote bug watches

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