-
-
Save kelleyk/6beba22586ac0c40aa30 to your computer and use it in GitHub Desktop.
# This is my compton configuration after a quick cleanup. (It's still none too organized; sorry about that.) | |
# With this file at ~/.config/compton.conf, I can run compton without any arguments (just plain `compton`). | |
# | |
# In the hopes that explaining my software and hardware environment might be helpful to you: | |
# | |
# I use this configuration on Ubuntu 15.10 (and have used it on previous releases); I am currently using the 352.63 ("long-lived | |
# branch") NVIDIA binary drivers, installed from the Ubuntu software repositories. I use fluxbox as my window manager; most of | |
# the other components of my desktop environment are borrowed from Xfce. | |
# | |
# My workstation at home has an i7-4930K and a GTX 970 in it, which are together more than enough to drive several 4K displays | |
# without tearing or lagging. Even with quite a few windows open at the moment, 'nvidia-smi' shows the X.org server using | |
# about 600 MiB of video memory; both the CPU and the GPU are effectively idle. | |
# | |
# I use the version of compton packaged in my PPA (https://launchpad.net/~kelleyk/+archive/ubuntu/compton). As of the time of this | |
# writing, that is d7f95b5, which is the what's on the master branch of the upstream compton repository. | |
# | |
# My X11 configuration is very "normal". On 15.04, I did have the following in a file in /etc/X11/xorg.conf.d/; I have not | |
# investigated yet, but I haven't noticed any ill effects from *not* having it since installing 15.10 a few hours ago. | |
# In some cases, UseEvents can make things unstable (though I haven't run into that in a long time); however, not enabling | |
# it will cause the X server to spin (leading to high CPU usage) while waiting for certain resources. | |
# --------------------------- | |
# Section "Device" | |
# Identifier "Device0" | |
# Option "UseEvents" "True" | |
# EndSection | |
# --------------------------- | |
# | |
# Good luck! | |
# References: | |
# - https://github.com/chjj/compton/wiki | |
# - http://ubuntuforums.org/showthread.php?t=2144468 | |
### Backend/performance options | |
backend = "glx"; | |
paint-on-overlay = true; | |
glx-no-stencil = true; | |
glx-no-rebind-pixmap = true; | |
# (TODO: Clean up my notes about selecting a vsync implementation.) | |
xrender-sync-fence = true; | |
vsync = "opengl-swc"; | |
# This option throttles refresh rates. Not compatible with vsync=drm/opengl/opengl-oml. | |
# (Note: for me, enabling this just makes the choppy dragging more noticeable, like the update rate has gone down.) | |
sw-opti = true; | |
# # Per compton performance tips (from the GitHub wiki), only one of these three | |
# # (glx-use-copysubbuffermesa, glx-copy-from-front, glx-swap-method) | |
# # should be used. | |
# glx-use-copysubbuffermesa = true; | |
# glx-copy-from-front = false; | |
# glx-swap-method = "undefined"; | |
glx-swap-method = "exchange"; # requires "allow fipping" in nvidia-settings | |
### Shadow | |
shadow = true; | |
no-dnd-shadow = true; | |
no-dock-shadow = true; | |
clear-shadow = true; | |
shadow-radius = 7; | |
shadow-offset-x = -7; | |
shadow-offset-y = -7; | |
shadow-opacity = 0.5; | |
# shadow-red = 0.0; | |
# shadow-green = 0.0; | |
# shadow-blue = 0.0; | |
shadow-exclude = [ | |
# From the Ubuntu forums link ('screaminj3sus') | |
"! name~=''", | |
"n:e:Notification", | |
"n:e:Plank", | |
"n:e:Docky", | |
"g:e:Synapse", | |
"g:e:Kupfer", | |
"g:e:Conky", | |
"n:w:*Firefox*", | |
"n:w:*Chrome*", | |
"n:w:*Chromium*", | |
"class_g ?= 'Notify-osd'", | |
"class_g ?= 'Cairo-dock'", | |
"class_g ?= 'Xfce4-notifyd'", | |
"class_g ?= 'Xfce4-power-manager'" | |
]; | |
shadow-ignore-shaped = false; | |
# shadow-exclude-reg = "x10+0+0"; | |
# xinerama-shadow-crop = true; | |
### Opacity | |
menu-opacity = 0.90; | |
# inactive-opacity = 0.85; | |
# active-opacity = 0.8; | |
frame-opacity = 0.90; # i.e. titlebars, borders | |
inactive-opacity-override = false; | |
alpha-step = 0.06; | |
# opacity-rule = [ "80:class_g = 'URxvt'" ]; | |
# inactive-dim = 0.2; | |
# inactive-dim-fixed = true; | |
### Blur options | |
# blur-background = true; | |
# blur-background-frame = true; | |
# blur-kern = "3x3box" | |
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" | |
# blur-background-fixed = true; | |
blur-background-exclude = [ "window_type = 'dock'", "window_type = 'desktop'" ]; | |
### Fading | |
fading = true; | |
fade-delta = 4; # 30; | |
fade-in-step = 0.03; | |
fade-out-step = 0.03; | |
# no-fading-openclose = true; | |
fade-exclude = [ ]; | |
### Other | |
mark-wmwin-focused = true; | |
mark-ovredir-focused = true; | |
# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events. | |
# Usually more reliable but depends on a EWMH-compliant WM. | |
use-ewmh-active-win = true; | |
# # Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on. | |
# detect-rounded-corners = true; | |
detect-client-opacity = true; | |
refresh-rate = 0; | |
dbe = false; | |
unredir-if-possible = true; | |
# unredir-if-possible-delay = 5000; | |
# unredir-if-possible-exclude = [ ]; | |
focus-exclude = [ "class_g = 'Cairo-clock'" ]; | |
detect-transient = true; | |
detect-client-leader = true; | |
invert-color-include = [ ]; | |
# resize-damage = 1; | |
# Window type settings | |
wintypes: | |
{ | |
tooltip = { fade = true; shadow = false; opacity = 0.75; focus = true; }; | |
}; | |
Oh, read about it on the wiki. Matching patterns, got it 👍
Glad that you figured it out!
For anyone else who comes across this old gist, I switched to xmonad
a few years ago, but I still use a nearly identical compton
configuration on my workstations (which are currently a 16.04 LTS machine with a GTX 970 and an 18.04 LTS machine with a GTX 1060, both using the most-recent "long-lived branch" graphics drivers) and haven't had any trouble.
Awesome, thx.
[ 0.08 ] error 4 BadPixmap request 152 minor 22 serial 610: "BadPixmap (invalid Pixmap parameter)"
[ 0.08 ] error 9 BadDrawable request 156 minor 4 serial 611: "BadDrawable (invalid Pixmap or Window parameter)"
[ 0.08 ] error 161 Unknown request 152 minor 16 serial 0: "GLXBadPixmap"
[ 0.08 ] error 161 Unknown request 152 minor 16 serial 0: "GLXBadPixmap"
[ 0.08 ] error 161 Unknown request 152 minor 23 serial 637: "GLXBadPixmap"
[ 0.08 ] error 4 BadPixmap request 152 minor 22 serial 716: "BadPixmap (invalid Pixmap parameter)"
[ 0.08 ] error 9 BadDrawable request 156 minor 4 serial 717: "BadDrawable (invalid Pixmap or Window parameter)"
[ 0.08 ] error 161 Unknown request 152 minor 16 serial 0: "GLXBadPixmap"
this is what i get with this conf file? how can i fix it?
Please tell us what hardware you are using, what operating system you are using, exactly which version of compton
you are using, and anything else that you think might be helpful!
[ 0.08 ] error 4 BadPixmap request 152 minor 22 serial 610: "BadPixmap (invalid Pixmap parameter)" [ 0.08 ] error 9 BadDrawable request 156 minor 4 serial 611: "BadDrawable (invalid Pixmap or Window parameter)" [ 0.08 ] error 161 Unknown request 152 minor 16 serial 0: "GLXBadPixmap" [ 0.08 ] error 161 Unknown request 152 minor 16 serial 0: "GLXBadPixmap" [ 0.08 ] error 161 Unknown request 152 minor 23 serial 637: "GLXBadPixmap" [ 0.08 ] error 4 BadPixmap request 152 minor 22 serial 716: "BadPixmap (invalid Pixmap parameter)" [ 0.08 ] error 9 BadDrawable request 156 minor 4 serial 717: "BadDrawable (invalid Pixmap or Window parameter)" [ 0.08 ] error 161 Unknown request 152 minor 16 serial 0: "GLXBadPixmap"
I get similar issues when I use compton with Nvidia hardware but those errors emit immediately after starting the compton and I have no visual artefacts so I guess that's okay.
I run compton with following command line in case it makes a difference:
compton --config /dev/null --backend glx -o 0.3 -r 8 -l -12 -t -12 --shadow --vsync opengl-swc --glx-swap-method exchange --paint-on-overlay --xrender-sync-fence --glx-no-rebind-pixmap --shadow-exclude '_GTK_FRAME_EXTENTS@:c'
The shadow exclude rule is needed to make GTK3 CSD windows look nice with Xfwm4.
In the shadow-exclude section, what are the n:e, g:w and so on?