yshui / picom

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

Graphical artifacts in chromium browser #923

Closed roghed closed 1 year ago

roghed commented 1 year ago

Platform

Ubuntu 22.10 (Kinetic Kudu) amd64

GPU, drivers, and screen setup

lspci -k | grep -EA3 'VGA|3D|Display'

00:02.0 VGA compatible controller: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] (rev 01)
        Subsystem: Lenovo TigerLake-LP GT2 [Iris Xe Graphics]
        Kernel driver in use: i915
        Kernel modules: i915

Environment

LXQt Release 1.1.0 with Openbox 3.6.1 Qt 5.15.6

picom --diagnostics output:

**Version:** v9.1

### Extensions:

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

### Misc:

* Use Overlay: Yes
* Config file used: /home/janek/.config/picom.conf

### Drivers (inaccurate):

Intel

### Backend: glx

* Driver vendors:
 * GLX: Mesa Project and SGI
 * GL: Intel
* GL renderer: Mesa Intel(R) Xe Graphics (TGL GT2)
* Accelerated: 1

Configuration:

fading = true;
fade-in-step = 0.1;
fade-out-step = 0.1;
backend = "xrender";
vsync = false;
log-level = "warn";
wintypes:
{
  tooltip = { fade = true; shadow = true; opacity = 0.8; focus = true; full-shadow = false; };
  dock = { shadow = false; clip-shadow-above = true; }
  dnd = { shadow = false; }
};

I've tried enabling/disabling different options: detect-client-leader - no effect detect-transient - no effect use-ewmh-active-win - no effect detect-client-opacity - no effect mark-ovredir-focused - no effect mark-wmwin-focused - no effect vsync - no effect backend - all three options have no effect fading - no effect transparent-clipping - no effect force-win-blend - no effect xrender-sync-fence - no effect use-damage/no-use-damage - no effect

Steps of reproduction

  1. Open chromium browser
  2. Hover the mouse cursor over the browser window, and move it around

Expected behavior

The window is correctly rendered

Current Behavior

Graphical artifacts are produced

Stack trace

no crashes

OpenGL trace

trace.zip

Other details

The bug also happens on the preinstalled version of compton that came with my distro (Lubuntu)

Recording: https://user-images.githubusercontent.com/25582773/202255833-4be22ea7-ed25-4719-90ec-965e56efed05.mp4

yshui commented 1 year ago

Probably a bug in the intel driver.

backend = "xrender";

Can you try backend = "glx"?

roghed commented 1 year ago

Yeah as I've written above, I've tried all three options for backend: glx, xrender and hybrid. They all produce the artifacts. If it's a bug in the intel driver, how come the artifacts only occur: a) in chromium browser b) with compton/picom compositor running

yshui commented 1 year ago

Can you run with environment variable LIBGL_DEBUG=verbose and post the output here?

roghed commented 1 year ago

picom:

libGL: using driver i915 for 7
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/me/.drirc: No such file or directory.
libGL: using driver i915 for 7
libGL: pci id for fd 7: 8086:9a49, driver iris
libGL: MESA-LOADER: dlopen(/usr/lib/x86_64-linux-gnu/dri/iris_dri.so)
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/me/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/me/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/me/.drirc: No such file or directory.
libGL: Using DRI2 for screen 0

chromium:

libGL: using driver i915 for 21
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/me/snap/chromium/2193/.drirc: No such file or directory.
libGL: using driver i915 for 21
libGL: pci id for fd 21: 8086:9a49, driver iris
libGL: MESA-LOADER: dlopen(/snap/chromium/2193/gnome-platform/usr/lib/x86_64-linux-gnu/dri/iris_dri.so)
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/me/snap/chromium/2193/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/me/snap/chromium/2193/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/me/snap/chromium/2193/.drirc: No such file or directory.
libGL: Using DRI2 for screen 0
yshui commented 1 year ago

Ah, DRI2 strikes again.

Did you configure your X server to use DRI2?

roghed commented 1 year ago

I've added Option "DRI" "3" to my xorg.conf, now I don't notice the artifacts anymore. I assume DRI3 needs to be enabled for picom/compton to work correctly?

yshui commented 1 year ago

DRI3 is widely enabled by default unless it's disabled, or DRI2 is force enabled somewhere in your config.

roghed commented 1 year ago

According to this bug report it's disabled by default for Intel i8xx, i9xx drivers which is what I'm using. Is there any obvious reason for why picom would produce those artifacts without DRI3?

yshui commented 1 year ago

@roghed the bug you linked is from 8 years ago.

Is there any obvious reason for why picom would produce those artifacts without DRI3?

Because the DRI2 codepath in mesa is not as actively maintained as the DRI3 one - because it's old - so there will be bugs. And mesa when running on DRI2 doesn't interact well with application using libxcb, one of which is picom.

Close as won't fix

yshui commented 1 year ago

Please check your config - if you really don't have DRI2 explicitly enabled, then your distro might be doing it - report it to them.

I have older intel GPUs with DRI3 enabled by default, and it was years ago.