chjj / compton

A compositor for X11.
Other
2.25k stars 501 forks source link

Mesa 18.0.0: GLX backend broken #477

Open ghost opened 6 years ago

ghost commented 6 years ago

Platform: Gentoo GNU/Linux 17.1 Hardened GPU, drivers, and screen setup: AMD Radeon HD 5670, latest radeon in kernel + linux-firmware-20180119, one monitor only

Compton version: master (2017-02-01)

Compton configuration: Bottom of issue

Steps of reproduction

After emerging media-libs/mesa-18.0.0, simply restart compton.

Expected behavior

The colors on the screen to be normal.

Current Behavior & Other details

Compton config:

# General
#daemon = true;

# Shadow
shadow = true;
clear-shadow = false;
no-dock-shadow = false;
no-dnd-shadow = false;

shadow-opacity = 0.60;
shadow-radius = 5;
shadow-offset-x = -8;
shadow-offset-y = -5;

menu-opacity = 0.85;
inactive-opacity = 0.9;
active-opacity = 1;
frame-opacity = 0.85;

shadow-exclude = [ 
  "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",       # hidden
  "bounding_shaped",                                    # shadow-ignore-shaped
  "class_g *= 'Dmenu'"
];

# Fading
fading = true;
fade-in-step = 0.1;
fade-out-step = 0.08;
fade-delta = 20;

# Opacity
opacity-rule = [ 
  "90:class_i ^= 'scratchpad_' && !_NET_WM_STATE@:32a",   # scratch 90%
  "0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",       # hidden 0%
  "0:class_g = 'Transparent Conky'"              # lemonbar placeholder
];

vsync = "opengl-swc";

backend="glx";
# GLX backend
glx-no-stencil = true;
glx-use-copysubbuffermesa = true;
glx-no-rebind-pixmap = true;
glx-swap-method = 3;

blur-background=true;
blur-kern="11x11gaussian";
deprecated7 commented 6 years ago

I can confirm this bug with compton 0.1_beta2.5-10 and mesa 17.3.3-2 (as well as mesa-git 99909.464d057c86-1) on Arch Linux in XFCE. I have the exact same artifacting issues.

etam commented 6 years ago

openSUSE Tumbleweed, Radeon RX 470, running i3wm with compton gives me the same results. Although, it affects mostly window decorations and pop-ups (like when drag-and-dropping).

Most of applications are normally visible. So far I've only found that konsole is affected.

screenshot: http://susepaste.org/35963166

config:

backend = "glx";
paint-on-overlay = true;
glx-no-stencil = true;
vsync = "opengl-swc";

shadow = false;

unredir-if-possible = true;
unredir-if-possible-exclude = "class_g = 'Firefox'";
kris004 commented 6 years ago

Same issue here, happens only with open source drivers amdgpu and nouveau, nvidia proprietary drivers work fine. Happens with mesa 18, and mesa git compiled yesterday.

ghost commented 6 years ago

@chjj Hi, can you please give us updates on this? 18.0.0 is rc4 right now and is likely to hit the repos of major distros soon (Gentoo has it in testing already, and I think Arch has it too).

DelusionalLogic commented 6 years ago

You forgot to write what the actual current behavior is. Maybe add an image?

chtk commented 6 years ago

I have the same issue on my Gentoo machine, using mesa built from git and the open source amdgpu driver.

A screenshot can be found at https://imgur.com/a/1DDmD

My compton config can be found at: https://raw.githubusercontent.com/chtk/dotfiles/master/.config/compton.conf%23%23Linux.beesje-iii

DelusionalLogic commented 6 years ago

Interesting. That wasn't what i was expecting. I don't really know what causes that :/

jmfernandez commented 6 years ago

Hi, I'm also a Gentoo user who updated to mesa-18.0.0_rc4 . I'm using compton in a laptop which I use for speeches. Since the mesa update, when I need to plug an external screen, I have to stop or restart compton in order to use it properly.

The symptoms are that the external screen shows an snapshot of the laptop's screen as it was taken just before the external screen was activated. If I move the mouse pointer to the external screen, it is visible. But, when I drag a window to the external screen, only the pointer is shown, like if the window were behind the snapshot.

The issue happens both with the Xorg drivers intel and modesetting drivers, both of them set up to DRI3.

jmfernandez commented 6 years ago

I have just found an additional way to avoid this issue, which has been switching to the xrender backend.

dinotheextinct commented 6 years ago

Still no fix for this? I cant use my i3 with all the tearing without a working compton.

aufkrawall commented 6 years ago

This can be fixed by starting Compton with "allow_rgb10_configs=false compton": https://bugs.freedesktop.org/show_bug.cgi?id=104597 This will likely become unnecessary once the fix lands in the Xorg server.

dinotheextinct commented 6 years ago

You saved my eyes, thank you!

jmfernandez commented 6 years ago

Unfortunately, the fix proposed by @aufkrawall did not help with the external screen problem I described

aufkrawall commented 6 years ago

Have you tried safe settings like

backend = "xr_glx_hybrid";
glx-no-stencil = false;
glx-no-rebind-pixmap = false;
glx-copy-from-front = false;
glx-use-copysubbuffermesa = false;
vsync = "none";
glx-swap-method = "0";
resize-damage = false;
paint-on-overlay = true;
unredir-if-possible = false;

?

jmfernandez commented 6 years ago

I have tested the settings you have proposed, both with the master branch and stable version at Gentoo. In the first case, it was half broken, as many visual components (LXQt taskbar, windows) where blinking or started skipping refreshes and receiving the previous one. I was playing with the parameters you provided, with no success. In the second one, as that version does not support xr_glx_hybrid backend, it did not work.

jmfernandez commented 6 years ago

I have found next:

https://wiki.archlinux.org/index.php/Intel_graphics#DRI3_issues

So, I have disabled DRI3, tested glx backend again, and it has worked

FichteFoll commented 6 years ago

mesa 18 is now live on Arch repositories and I ran into this problem as well (see https://github.com/chjj/compton/issues/487#issuecomment-380142297).

The allow_rgb10_configs=false compton workaround worked for me.

CyberShadow commented 6 years ago

Another way to apply this fix from this reddit comment: Add <option name="allow_rgb10_configs" value="false" /> to the device section in /etc/drirc and restart compton. Worked for me.

yshui commented 6 years ago

I pushed a fix to my fork here: yshui/compton@bf29b2d. With this you don't need to disable rgb10.

Try it and see if it fix the problem for you.

aufkrawall commented 6 years ago

It would be really great if at some point someone could provide patches to allow Compton to actually render with 10 bits per channel. :)

yshui commented 6 years ago

@aufkrawall Kinda pointless when the contents of all windows are 8 bits.

aufkrawall commented 6 years ago

Currently, yes, but there always has to be start first. Xorg 1.20 will support it and some applications will follow sooner or later.

yshui commented 6 years ago

@aufkrawall I'll fix it properly when that actually happens