chjj / compton

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

Screen "freezing" with GLX backend #396

Open andoruB opened 7 years ago

andoruB commented 7 years ago

I've had Compton with GLX backend enabled work well previously, but lately I've been getting this annoying behaviour, when the screen would freeze at random times, especially if I were to select stuff, or switch between windows. The only way to get the screen to update properly would be to switch to another TTY, then back to the graphical TTY. Here's the current configuration I'm using: https://hastebin.com/woqopuwihi

I've also tried disabling certain features from the first section of the config file, like 'glx-no-stencil' and 'glx-use-copybuffermesa', and others, but it did not seem to change much. Removing the backend setting from the file (and I'm assuming it's falling back on xrender) has so far fixed things, but it's slow and clunky at times (I get some flickers when some objects on the screen update, or when I play certain videos). I've also tried switching between UXA and SNA acceleration, and both have the same problem. I'm using the IGA of an i5 Haswell CPU (so it's basically HD Graphics 4600) on Debian Sid.

Is there anything I can do to fix this issue? Thanks in advance!

licaon-kter commented 7 years ago

Debian Sid here too, have this for a while but on a compton fork, iirc, X got updated some weeks ago, I guess that's at fault.

I'll try to get some sort of log, I can repro but they're no straight steps.

smlx commented 7 years ago

Is this with the nvidia binary driver?

-- Regards, Scott.

licaon-kter commented 7 years ago

For me, yes. Latest 375.20.

Recompiled compton but did not help.

morgoth6 commented 7 years ago

I can observe same problem here and it starts recently. Currently I run F25 with NVidia binary drivers (375.26) Screen stops refreshing suddenly and switching to text console and 'killall compton' restores it to normal state.

I made some experiments and I was able to make it work by removing completely 'glx-swap-method' option and set sw-opti to false. It seems to be fine for hybrid glx and I guess glx too. I can see some weird flashing on screen (mostly on firefox window and xfce4 panels) but no display freezes.

# Shadow
shadow = true;
no-dnd-shadow = true;
no-dock-shadow = true;
clear-shadow = true;
shadow-radius = 3;
shadow-offset-x = -3;
shadow-offset-y = -3;
# shadow-opacity = 0.7;
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;
shadow-exclude = [
    "! name ~= ''",
    "name *= 'Notification'",
    "name *= 'VirtualBox'",
    "class_g ?= 'i3-frame'",
    "class_g ?= 'Conky'",
    "class_g ?= 'Cairo-clock'",
    "class_g ?= 'Notify-osd'",
    "class_g ?= 'VirtualBox'",
    "class_g ?= 'Xfce4-notifyd'",
    "class_g ?= 'Xfce4-power-manager'",
    "class_g ?= 'Xfce4-panel'",
    "class_g ?= 'Xfce4-screenshooter'",
    "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
    "_NET_WM_OPAQUE_REGION@:c",
    "_GTK_FRAME_EXTENTS@:c",
    "!I3_FLOATING_WINDOW@:c"
];
shadow-ignore-shaped = true;
# shadow-exclude-reg = "x10+0+0";
# xinerama-shadow-crop = true;

# Opacity
menu-opacity = 0.9;
# inactive-opacity = 0.8;
# active-opacity = 0.8;
# frame-opacity = 0.8;
inactive-opacity-override = false;
# alpha-step = 0.06;
# inactive-dim = 0.2;
# inactive-dim-fixed = true;
blur-background = true;
blur-background-fixed = true;
blur-kern = "3x3box";
blur-background-exclude = [
    "class_g ?= 'i3-frame'",
    "class_g ?= 'Xfce4-panel'",
    "window_type = 'dock'",
    "window_type = 'desktop'",
    "_GTK_FRAME_EXTENTS@:c"
];
opacity-rule = [
    "93:class_g ?= 'Termite' && !_NET_WM_STATE@:32a",
    "0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
    "90:_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'"
];

# Fading
fading = false;
# fade-delta = 7;
# fade-in-step = 0.05;
# fade-out-step = 0.05;
fade-exclude = [
    "class_g ?= 'Xfce4-notifyd'"
];

# Window type settings
wintypes:
{
    tooltip = { fade = true; shadow = false; opacity = 0.75; focus = true; };
    # fade: Fade the particular type of windows.
    # shadow: Give those windows shadow
    # opacity: Default opacity for the type of windows.
    # focus: Whether to always consider windows of this type focused.
    # menu = { fade = true; shadow = false; opacity = 0.8; focus = true; };
    dropdown_menu = { fade = false; shadow = true; opacity = 1; focus = true; };
    popup_menu = { fade = false; shadow = true; opacity = 1; focus = true; };
    # combo = { fade = true; shadow = false; opacity = 0.8; focus = true; };
};

glx-copy-from-front = false;
paint-on-overlay = true;
glx-no-stencil = true;
glx-no-rebind-pixmap = false;
unredir-if-possible = false;

backend = "xr_glx_hybrid";
vsync = "opengl-swc";
sw-opti = false;
refresh-rate = 0;

vsync-use-glfinish = true;

mark-wmwin-focused = true;
mark-ovredir-focused = true;
use-ewmh-active-win = true;
detect-rounded-corners = true;
detect-client-opacity = true;
detect-transient = true;
detect-client-leader = true;
# invert-color-include = [ ];
focus-exclude = [
    "class_g ?= 'Cairo-clock'",
    "x = 0 && y = 0 && override_redirect = true"
];
andoruB commented 7 years ago

Yup, that seems to have fixed the issue on the Intel open source driver too.

EDIT: I still get the occasional freezes (mostly when objects fade), but at least this is not as annoying as the screen freezing after each thing you do on the screen.

klingtnet commented 6 years ago

I am using the open-source intel driver too and my desktop freezes as soon as I disconnect the external monitor. Switching to a TTY and killing compton unfreezes the desktop. My compton.conf can be found here, used in Arch Linux 4.15.15 with mesa 18.0.0 and compton build from latest master branch.

davidvontamar commented 4 years ago

I would like to note that this bug still persists. This is Debian Sid with Lxqt, Openbox, Intel graphics, and Compton version 0.14.1.

The Intel driver decided to remove support for TearFree on X11, so now we're forced to use a software compositor to do the job. Compton with GLX is the only viable solution I know of with Openbox.

WorMzy commented 4 years ago

This is Debian Sid with Lxqt, Openbox, Intel graphics, and Compton version 0.14.1.

Then you're seeking support in the wrong place -- chjj/compton stalled at v0.1beta2. For later releases you will likely be using the active fork of Compton maintained by yshui (now re-branded as picom): https://github.com/yshui/picom