yshui / picom

A lightweight compositor for X11 with animation support
https://picom.app/
Other
4.09k stars 586 forks source link

Weird screen update artifacts under mouse cursor with DisplayLink #192

Closed njoyard closed 7 months ago

njoyard commented 5 years ago

I know DisplayLink support on Linux is kind of flimsy, and I'd like to investigate the following issue to determine whether it is actually a compton issue or a driver issue.

This issue disappears when killing compton.

Platform

arch

GPU, drivers, and screen setup

Using a Thinkpad x270 with an integrated Intel HD Graphics 620 and a Dell D6000 docking station (DisplayLink over USB). A second screen is connected to the docking station and duplicates the integrated screen.

$ lspci
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev 02)
$ lsusb
Bus 002 Device 006: ID 17e9:6006 DisplayLink 
$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x47 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 5 associated providers: 1 name:modesetting
Provider 1: id: 0x1ec cap: 0x2, Sink Output crtcs: 1 outputs: 1 associated providers: 1 name:modesetting

evdi 1.6.1-1 mesa 19.0.6-1

$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel Open Source Technology Center (0x8086)
    Device: Mesa DRI Intel(R) HD Graphics 620 (Kaby Lake GT2)  (0x5916)
    Version: 19.0.6
    Accelerated: yes
    Video memory: 3072MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.5
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 620 (Kaby Lake GT2) 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.0.6
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.0 Mesa 19.0.6
OpenGL shading language version string: 1.30
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.0.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Environment

i3-gaps

Compton version

v6.2

$ compton --diagnostics
**Version:** v6.2

### Extensions:

* Shape: Yes
* XRandR: Yes
* Present: Present

### Misc:

* Use Overlay: Yes
* Config file used: /home/njoyard/.config/compton.conf

Compton configuration:

backend = "glx";
glx-no-stencil = true;
glx-copy-from-front = false;
glx-no-rebind-pixmap = true;
shadow = false;
shadow-radius = 5;
shadow-offset-x = -5;
shadow-offset-y = -5;
shadow-opacity = 0.5;
shadow-exclude = [
    "! name~=''",
    "name = 'Notification'",
    "name = 'Plank'",
    "name = 'Docky'",
    "name = 'Kupfer'",
    "name = 'xfce4-notifyd'",
    "name *= 'VLC'",
    "name *= 'compton'",
    "name *= 'Chromium'",
    "name *= 'Chrome'",
    "class_g = 'Conky'",
    "class_g = 'Kupfer'",
    "class_g = 'Synapse'",
    "class_g ?= 'Notify-osd'",
    "class_g ?= 'Cairo-dock'",
    "class_g ?= 'Xfce4-notifyd'",
    "class_g ?= 'Xfce4-power-manager'",
    "_GTK_FRAME_EXTENTS@:c"
];
shadow-ignore-shaped = false;
inactive-opacity = 1;
active-opacity = 1;
frame-opacity = 1;
inactive-opacity-override = false;
blur-background = true;
blur-background-fixed = false;
blur-background-exclude = [
    "window_type = 'dock'",
    "window_type = 'desktop'"
];
fading = true;
fade-delta = 2;
fade-in-step = 0.03;
fade-out-step = 0.03;
fade-exclude = [ ];
mark-wmwin-focused = true;
mark-ovredir-focused = true;
use-ewmh-active-win = true;
detect-rounded-corners = true;
detect-client-opacity = true;
refresh-rate = 0;
vsync = true;
dbe = false;
sw-opti = true;
unredir-if-possible = true;
focus-exclude = [ ];
detect-transient = true;
detect-client-leader = true;
wintypes:
{
    popup_menu =
    {
        opacity = 1;
    };
    dropdown_menu =
    {
        opacity = 1;
    };
    dock =
    {
        shadow = false;
    };
    dnd =
    {
        shadow = false;
    };
    tooltip =
    {
        fade = true;
        shadow = false;
        opacity = 0.85;
        focus = true;
    };
};

Steps of reproduction

Move the cursor around while scrolling in any app, while switching windows (or workspaces in i3), or while changing text selection in any app.

Expected behavior

Correct redraw at previous position of the cursor, cursor stays visible.

Current Behavior

A piece of a different buffer (previous window when switching windows, previous scrolling position when scrolling) is drawn at the previous position of the cursor.

Cursor disappears immediately when scrolling and moving it around (and also when not using unclutter).

Other details

This video is not from me but the graphical issue is identical: https://www.youtube.com/watch?v=vVwa-cVU_cA

njoyard commented 5 years ago

Note: issue disappears when using xrender backend, but then everything is painfully slow.

yshui commented 5 years ago

Does this only happen over DisplayLink?

njoyard commented 5 years ago

Yes, everything is fine with a direct HDMI connection.

yshui commented 5 years ago

@njoyard Then this is probably a driver problem.

Cxarli commented 3 years ago

FWIW I just stumbled upon this as well, and the solution was to disable VSync.

yshui commented 7 months ago

closing as a driver problem, also old.