Bug 107053 - Flicker/tearing on MacBook Pro 11.5 Ubuntu 18.04
Summary: Flicker/tearing on MacBook Pro 11.5 Ubuntu 18.04
Status: RESOLVED INVALID
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Ext/DRI (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-27 15:30 UTC by cen.is.imba
Modified: 2018-07-05 14:04 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
xorg log (65.04 KB, text/plain)
2018-06-27 15:30 UTC, cen.is.imba
no flags Details
dmesg (81.05 KB, text/plain)
2018-06-27 15:44 UTC, cen.is.imba
no flags Details
Journalctl when running a Wayland session, might be relavant (or not) (1.77 KB, text/plain)
2018-07-02 11:05 UTC, cen.is.imba
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description cen.is.imba 2018-06-27 15:30:51 UTC
Created attachment 140366 [details]
xorg log

Symptom: flicker or tearing (not sure what to call it) at the bottom of the screen as seen in this videos:
Fedora 28 (old install): https://www.youtube.com/watch?v=q9tHH2LdYOc
Ubuntu 18.04 (currently installed, with glxgears info in description): https://youtu.be/CsFHt74HY3A

Tested on: Debian Jessie KDE, Kubuntu 18.04, Fedora 28, Elementary OS Loki, Ubuntu 18.04, all exact same symptom.

Hardware: Macbook Pro 11.5

lshw:
*-display                 
       description: VGA compatible controller
       product: Venus XT [Radeon HD 8870M / R9 M270X/M370X]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:01:00.0
       version: 83
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
       configuration: driver=radeon latency=0
       resources: irq:51 memory:80000000-8fffffff memory:b0c00000-b0c3ffff ioport:3000(size=256) memory:b0c40000-b0c5ffff

Added TearFree, DRI3 and glamor to try to remedy the symptom, nothing changed:
cat /usr/share/X11/xorg.conf.d/20-radeon.conf 
Section "Device"
    Identifier "Radeon"
    Driver "radeon"
    Option "TearFree" "on"
    Option "DRI" "3"
    Option "AccelMethod" "glamor"
EndSection


Xorg log attached. Some device busy errors seen at the bottom, not sure if it has any relation.

Nothing really interesting in dmesg.

Symptop appears even at single monitor, however, my current setup is triple external plus native hidpi:
xrandr --fbmm 11520x4200 --output eDP --pos 4320x2400 --mode 2880x1800 --scale 1x1 --primary --output DisplayPort-1 --pos 0x0 --mode 1920x1200 --scale 2x2 --output DisplayPort-0 --pos 3840x0 --mode 1920x1200 --scale 2x2 --output HDMI-0 --pos 7680x0 --mode 1920x1200 --scale 2x2
Comment 1 Michel Dänzer 2018-06-27 15:43:26 UTC
Please attach the corresponding dmesg output as well.
Comment 2 cen.is.imba 2018-06-27 15:44:53 UTC
Created attachment 140367 [details]
dmesg

attached dmesg
Comment 3 Michel Dänzer 2018-06-29 09:56:30 UTC
From the Xorg log file:

[   158.424] (WW) RADEON(0): flip queue failed: Device or resource busy
[   158.424] (WW) RADEON(0): Page flip failed: Device or resource busy
[   158.424] (EE) RADEON(0): present flip failed

This looks like a page flip is attempted while another one is still pending. Unfortunately, handling that better turns out to be a surprisingly tricky problem, but I think the best place would be xserver/present/present_scmd.c, delaying the page flip until the previous one has completed.

Meanwhile, if you can try a GNOME on Wayland session, that might work better.
Comment 4 cen.is.imba 2018-07-02 08:30:49 UTC
Wayland seems to resolve this issue. Unfortunately I probably won't be able to use it since there is no xrandr on Wayland so I can't also have my uber monitor setup with correct per-monitor scaling.
Comment 5 Michel Dänzer 2018-07-02 08:50:03 UTC
(In reply to cen.is.imba from comment #4)
> Unfortunately I probably won't be able to use it since there is no xrandr on Wayland

Right, you have to configure the display layout in the corresponding desktop environment settings.

> so I can't also have my uber monitor setup with correct per-monitor scaling.

Actually, Wayland is superior to Xorg when it comes to per-monitor scaling as well. It may depend on the specific (version of) Wayland compositor you're using though.
Comment 6 cen.is.imba 2018-07-02 09:39:09 UTC
Yeah in theory it should "just work". In reality when setting to default scaling my HiDPI is still tiny and externals are normal. When setting to 200% scaling, externals are huge. Even if I get this default to work it still doesn't work for xwayland apps which are plenty. KWin seems to be better about this (so I read).

Also, gnome Display settings does not persist across reboots (I have to rearrange monitors on every boot, annoying as hell). Which was one of the reasons I had to use xrandr script in the first place.

This of course has nothing to do with this bug so I will either live with the flicker for now or deep dive into Wayland and try getting it to work somehow. 


Thanks.
Comment 7 cen.is.imba 2018-07-02 10:10:04 UTC
Looks like I spoke too soon. After another reboot into wayland session it is now also flickering on wayland.
Comment 8 cen.is.imba 2018-07-02 11:05:09 UTC
Created attachment 140421 [details]
Journalctl when running a Wayland session, might be relavant (or not)
Comment 9 cen.is.imba 2018-07-04 16:35:00 UTC
Booted into Mac OS, same issue appears. I think this might actually be hardware problem and has nothing to do with the drivers.
Comment 10 Michel Dänzer 2018-07-05 14:04:07 UTC
That's too bad, but thanks for the follow-up, resolving accordingly.


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.