You are not logged in.

#1 2015-09-28 09:29:41

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Some help configuring compton with awesome wm.

Hello all,

I started using awesome window manager recently. Before awesome, I was using fluxbox with compton with no problems. Now, I am trying to configure compton as compositor with awesome. I have collected some info about several compton settings and started creating a
compton.conf configuration file.

#################################
# Backend

# Backend to use: "xrender" or "glx".
# GLX backend is typically much faster but depends on a sane driver.
backend = "glx";


glx-no-stencil = true;

# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all.
# My tests with nvidia-drivers show a 10% decrease in performance when the whole screen is modified,
# but a 20% increase when only 1/4 is.
# My tests on nouveau show terrible slowdown.
# Useful with --glx-swap-method, as well.
glx-copy-from-front = false;

# GLX backend: Use MESA_copy_sub_buffer to do partial screen update.
# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated.
# May break VSync and is not available on some drivers.
# Overrides --glx-copy-from-front.
# glx-use-copysubbuffermesa = true;

# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe).
# Recommended if it works.
# glx-no-rebind-pixmap = true;


# GLX backend: GLX buffer swap method we assume.
# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1).
# undefined is the slowest and the safest, and the default value.
# copy is fastest, but may fail on some drivers,
# 2-6 are gradually slower but safer (6 is still faster than 0).
# Usually, double buffer means 2, triple buffer means 3.
# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers.
# Useless with --glx-use-copysubbuffermesa.
# Partially breaks --resize-damage.
# Defaults to undefined.
glx-swap-method = "undefined";

xrender-sync-fence = true;
vsync drm/opengl/opengl-mswc = true;
sw-opti = true;
vblank = true;
paint-on-overlay = true;

unredir-if-possible = true;

#################################
#
# Shadows
#
#################################

# Enabled client-side shadows on windows.
shadow = true;
# Don't draw shadows on DND windows.
no-dnd-shadow = true;
# Avoid drawing shadows on dock/panel windows.
no-dock-shadow = true;
# Zero the part of the shadow's mask behind the window. Fix some weirdness with ARGB windows.
clear-shadow = true;
# The blur radius for shadows. (default 12)
shadow-radius = 5;
# The left offset for shadows. (default -15)
shadow-offset-x = -5;
# The top offset for shadows. (default -15)
shadow-offset-y = -5;
# The translucency for shadows. (default .75)
shadow-opacity = 0.5;

# Set if you want different colour shadows
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;

# The shadow exclude options are helpful if you have shadows enabled. Due to the way compton draws its shadows, certain applications will have visual glitches
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
shadow-exclude = [
    "! name~=''",
    "name = 'Notification'",
    "name = 'Plank'",
    "name = 'Docky'",
    "name = 'Kupfer'",
    "name = 'xfce4-notifyd'",
    "name *= 'VLC'",
    "name *= 'compton'",
    "name *= 'Chromium'",
    "name *= 'Chrome'",
    "name *= 'Firefox'",
    "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'"
];
# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners)
shadow-ignore-shaped = false;

#################################
#
# Opacity
#
#################################

menu-opacity = 1;
inactive-opacity = 1;
active-opacity = 1;
frame-opacity = 1;
inactive-opacity-override = false;
alpha-step = 0.06;

# Dim inactive windows. (0.0 - 1.0)
# inactive-dim = 0.2;
# Do not let dimness adjust based on window opacity.
# inactive-dim-fixed = true;
# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
# blur-background = true;
# Blur background of opaque windows with transparent frames as well.
# blur-background-frame = true;
# Do not let blur radius adjust based on window opacity.
blur-background-fixed = false;
blur-background-exclude = [
    "window_type = 'dock'",
    "window_type = 'desktop'"
];

#################################
#
# Fading
#
#################################

# Fade windows during opacity changes.
fading = true;
# The time between steps in a fade in milliseconds. (default 10).
fade-delta = 4;
# Opacity change between steps while fading in. (default 0.028).
fade-in-step = 0.03;
# Opacity change between steps while fading out. (default 0.03).
fade-out-step = 0.03;
# Fade windows in/out when opening/closing
# no-fading-openclose = true;

# Specify a list of conditions of windows that should not be faded.
fade-exclude = [ ];

#################################
#
# Other
#
#################################

# Try to detect WM windows and mark them as active.
mark-wmwin-focused = true;
# Mark all non-WM but override-redirect windows active (e.g. menus).
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 _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
# This prevents opacity being ignored for some apps.
# For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
detect-client-opacity = true;

# Specify refresh rate of the screen.
# If not specified or 0, compton will try detecting this with X RandR extension.
refresh-rate = 0;

# Set VSync method. VSync methods currently available:
# none: No VSync
# drm: VSync with DRM_IOCTL_WAIT_VBLANK. May only work on some drivers.
# opengl: Try to VSync with SGI_video_sync OpenGL extension. Only work on some drivers.
# opengl-oml: Try to VSync with OML_sync_control OpenGL extension. Only work on some drivers.
# opengl-swc: Try to VSync with SGI_swap_control OpenGL extension. Only work on some drivers. Works only with GLX backend. Known to be most effective on many drivers. Does not actually control paint timing, only buffer swap is affected, so it doesn’t have the effect of --sw-opti unlike other methods. Experimental.
# opengl-mswc: Try to VSync with MESA_swap_control OpenGL extension. Basically the same as opengl-swc above, except the extension we use.
# (Note some VSync methods may not be enabled at compile time.)
#vsync = "opengl-swc";

# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing.
# Reported to have no effect, though.
dbe = false;
# Painting on X Composite overlay window. Recommended.
paint-on-overlay = true;

# Limit compton to repaint at most once every 1 / refresh_rate second to boost performance.
# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already,
# unless you wish to specify a lower refresh rate than the actual value.
sw-opti = false;

# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
# Known to cause flickering when redirecting/unredirecting windows.
# paint-on-overlay may make the flickering less obvious.
unredir-if-possible = true;

# Specify a list of conditions of windows that should always be considered focused.
focus-exclude = [ ];

# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time.
detect-transient = true;
# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time.
# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too.
detect-client-leader = true;

#################################
#
# Window type settings
#
#################################

wintypes:
{
    tooltip =
    {
        # fade: Fade the particular type of windows.
        fade = true;
        # shadow: Give those windows shadow
        shadow = false;
        # opacity: Default opacity for the type of windows.
        opacity = 0.85;
        # focus: Whether to always consider windows of this type focused.
        focus = true;
    };
};

I don't know what every one setting of these do. I would like to learn controlling compton somehow. I am taking info from this, this and this . I have problems with awesome, when screen lags or freezes but everything behind still working such as music, after that i have to reboot. Also, Those screenshots are about how windows look with the above compton settings first and second . This transparency issue how can be solved for example?

My graphics card driver is amd catalyst legacy, with hd4890 graphics card. Thanks in advance.

Offline

#2 2015-09-28 10:07:07

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: Some help configuring compton with awesome wm.

Copying and pasting configuration from God knows where without knowing what it's doing is not going to help you learn. If I were you, I'd ditch the config file and run the options from the command line, starting off just with what you really need and adding more as you go along. Once you get to the point where you have a ridiculously long command, then you use a config file. So what do you really need for Compton? Well you want it to run as a daemon so use -b. You probably want shadows so use -c. You probably want to use OpenGL so use --backend glx. You probably want vsync so use --vsync opengl-swc. So all in all, start off with something like this:

$ compton -b -c --backend glx --vsync opengl-swc

and take it from there.

See the man page for a full list of options.

Offline

#3 2015-09-28 10:29:45

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Re: Some help configuring compton with awesome wm.

thanks for replying. I have this file because i did not find elsewhere ( maybe i did not search in the right places smile ) compton options-settings. The man link you posted seems to be what I need.

$ compton -b -c --backend glx --vsync opengl-swc

Can I see difference between  vsync options? For example, swc or mswc? For easier testings, is there any command to kill compton so that i can test other settings without rebooting?

Offline

#4 2015-09-28 10:40:56

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: Some help configuring compton with awesome wm.

I don't have enough experience with Compton to make a fair judgement but from what I've read, and my own experience tallies with this, the swc option is the best at combating video tearing. I guess the only way to find out is to test them all and see.

As for trying out different configuration, a reboot definitely isn't required.

$ kill $(pgrep compton)

should end the compton process. Then re-run it using different options.

Last edited by Chazza (2015-09-28 10:41:35)

Offline

#5 2015-09-28 10:58:01

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Re: Some help configuring compton with awesome wm.

$ compton -b -c --backend glx --vsync opengl-swc

I tried this, but screen freezes and cannot do anything, but music etc working in the background. Do you think this is awesome-related?

Offline

#6 2015-09-28 11:01:19

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: Some help configuring compton with awesome wm.

No, I think it's the vsync option. The man page does mention that they only work with some drivers.  Does --vsync none work?

Last edited by Chazza (2015-09-28 11:03:08)

Offline

#7 2015-09-28 11:06:21

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Re: Some help configuring compton with awesome wm.

Chazza wrote:

No, I think it's the vsync option. The man page does mention that they only work with some drivers.  Does --vsync none work?

Nope, it doesn't. Actually, the only thing i can see is the wallpaper, top panel of awesome disappears such as any windows.

Maybe this is related link, or not?

Last edited by zabrielza (2015-09-28 11:08:07)

Offline

#8 2015-09-28 11:08:38

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: Some help configuring compton with awesome wm.

Weird. Maybe try falling back to xrender? --backend xrender and get rid of the --vsync option altogether.

Last edited by Chazza (2015-09-28 11:09:28)

Offline

#9 2015-09-28 11:12:57

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Re: Some help configuring compton with awesome wm.

Chazza wrote:

Weird. Maybe try falling back to xrender? --backend xrender and get rid of the --vsync option altogether.

It worked,

zab ~ $  compton -b -c --backend xrender --vsync none
zab ~ $ kill $(pgrep compton)
zab ~ $  compton -b -c --backend xrender
zab ~ $ ps aux | grep compton
zab       1183  0.1  0.0  65036  2948 ?        Ss   14:04   0:00 compton -b -c --backend xrender
zab       1190  0.0  0.0  10728  2264 pts/0    S+   14:05   0:00 grep compton
zab ~ $ 

Although, when compton was started with awesome on the startup, glx backend was working. Should i try starting with this command in the startup

compton -b -c --backend glx --vsync opengl-swc

?

Also, with xrender i have the same problems with transparency, image

Last edited by zabrielza (2015-09-28 11:16:08)

Offline

#10 2015-09-28 11:15:41

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: Some help configuring compton with awesome wm.

Yes, give it a go, see what happens.

Offline

#11 2015-09-28 11:20:49

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Re: Some help configuring compton with awesome wm.

Chazza wrote:

Yes, give it a go, see what happens.

Yes, at the startup no problem.

zab ~ $ ps aux | grep compton
zab        640  6.0  1.0 128448 37368 ?        Ss   14:13   0:01 compton -b -c --backend glx --vsync opengl-swc
zab       1069  0.0  0.0  10732  2400 pts/0    S+   14:13   0:00 grep compton
zab ~ $ 

Although, same issues with transparency. What should i try now?

Last edited by zabrielza (2015-09-28 11:25:19)

Offline

#12 2015-09-28 11:32:02

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: Some help configuring compton with awesome wm.

Ok well go with that then. I don't know why it fails to start correctly on subsequent attempts I'm afraid.

Regarding transparency, it's all in the man page I linked to (should also be available by running $ man compton in the console of course).

Active and Inactive window opacity can be controlled with --active-opacity= and --inative-opacity= respectively - the value should be a number between 0.0 and 1.0. You might also want to use --detect-client-opacity which means that Compton will try and detect the opacity for windows which have their own opacity specified (xfce4-notifyd popups for instance).

Last edited by Chazza (2015-09-28 11:35:12)

Offline

#13 2015-09-28 11:38:21

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,528
Website

Re: Some help configuring compton with awesome wm.

zabrielza wrote:

What should i try now?

Please don't look to have your hand held and your thinking done for you; that is help vampirism. Compton has lots of options. Read the manpage, try a few, and see what works best for your setup.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#14 2015-09-28 15:32:44

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Re: Some help configuring compton with awesome wm.

WorMzy wrote:
zabrielza wrote:

What should i try now?

Please don't look to have your hand held and your thinking done for you; that is help vampirism. Compton has lots of options. Read the manpage, try a few, and see what works best for your setup.

It is not easy for me to figure out if the problem is compton-related, awesome-related or driver-related. The problem i am facing is transparency in some regions of the window, not everywhere. I have searched compton options, i am trying them now, all of them, one by one. As I said i intend to learn, not to be a help vampire. So, I tested with --active-opacity= but nothing changed. How can we be sure that it is not awesome-related? Do you think that i should move on searching for log files or something?

I just tested with --paint-on-overlay and had some "minimal" improvement. I will describe this problem a little more, now with --paint-on-overlay, on firefox for example, transparency is in let's say the toolbar region, but when i refresh the page is all over the window until i scroll up or down when the problem is in fewer regions again., if this means something...

Last edited by zabrielza (2015-09-28 15:46:39)

Offline

#15 2015-09-28 16:04:24

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: Some help configuring compton with awesome wm.

zabrielza wrote:

How can we be sure that it is not awesome-related?

Well think about it logically. True transparency requires compositing. awesomewm does not provide compositing. Therefore, the problem probably isn't with awesomewm. The problem will either lie with your composite manager (compton) or your graphics drivers.

Like Wormzy said, go through the manpage, read the descriptions of the options thoroughly and try them out. If you have thoroughly exhausted all compton options, you can try falling back to the vesa driver to see if it's a driver issue. There's nothing more I can suggest.

Offline

#16 2015-09-28 16:35:51

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Re: Some help configuring compton with awesome wm.

It seems that --glx-use-copysubbuffermesa did the trick. No transparent regions at all.

It actually caused compton not to start. I was wrong. No improvement. Laugh with me smile

Last edited by zabrielza (2015-09-28 16:50:23)

Offline

#17 2015-09-29 07:15:23

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Re: Some help configuring compton with awesome wm.

I tried many many compton options. None of them improves the situation. I also installed cairo compmgr, but same visual effects. So, I suppose that it wan not compton related. I can say that because as I said previously, I was using compton with fluxbox with the same graphics card driver with the same settings, and everything was working like a charm. I even changed my xorg file. Here it is :

Section "ServerLayout"

#	InputDevice					"Keyboard"	"CoreKeyboard"
	Identifier     "Layout"
	Screen      0  "0-Primary" 0 0
	Screen         "1-Secondary" LeftOf "0-Primary"
EndSection

Section "Files"
	ModulePath   "/usr/lib/xorg/modules"
	XkbDir		"usr/share/X11/xkb"
EndSection

Section "Module"
	Load  "extmod"
	Load  "glx"
	Load  "dri"
	Load  "dri2"
	Load  "dbe"
	Load  "record"
	Load  "xtrap"
	Load  "type1"
	Load  "freetype"
EndSection

Section "ServerFlags"
	Option	    "DontZap" "on"
	Option	    "BlankTime" "20"
	Option	    "StandbyTime" "20"
	Option	    "Xinerama" "off"
	Option	    "AIGLX" "on"
	Option	    "DRI2" "on"
	Option	    "GlxVisuals" "all"
	Option	    "AutoAddDevices" "on"
	Option	    "AutoEnableDevices" "on"
EndSection

Section "Monitor"
	Identifier   "0-CRT2"
	VendorName   "LG"
	HorizSync    30.0 - 83.0
	VertRefresh  56.0 - 75.0
	Option	    "DPMS" "on"
	Option	    "Primary" "on"
	Option	    "PreferredMode" "1920x1080"
	Option	    "Position" "0 0"
	Option	    "RightOf" "1-Secondary"
	Option	    "Enable" "on"
	Option	    "TargetRefresh" "60"
EndSection

Section "Monitor"
	Identifier   "1-CRT1"
	VendorName   "Belinea"
	HorizSync    31.0 - 83.0
	VertRefresh  56.0 - 75.0
	Option	    "DPMS" "on"
	Option	    "Primary" "on"
	Option	    "PreferredMode" "1280x1024"
	Option	    "Position" "-1920 0"
	Option	    "LeftOf" "0-Primary"
	Option	    "Enable" "on"
	Option	    "TargetRefresh" "60"
EndSection

Section "Device"
	Identifier  "HD 4890"
	Driver      "fglrx"
	Option	    "OpenGLOverlay" "1"
	Option	    "AccelMethod" "EXA"
	Option	    "AGPMode" "on"
	Option	    "AGPFastWrite" "on"
	Option	    "ColorTiling" "on"
	Option	    "EnablePageFlip" "on"
	BusID       "PCI:2:00:0"
EndSection

Section "Device"
	Identifier  "HD 4200"
	Driver      "fglrx"
	Option	    "OpenGLOverlay" "1"
	Option	    "AccelMethod" "EXA"
	Option	    "AGPMode" "on"
	Option	    "AGPFastWrite" "on"
	Option	    "ColorTiling" "on"
	Option	    "EnablePageFlip" "on"
	BusID       "PCI:1:05:0"
EndSection

Section "Screen"
	Identifier "0-Primary"
	Device     "HD 4890"
	DefaultDepth     24
	Option	    "NoMTRR" "off"
	SubSection "Display"
		Viewport   0 0
		Depth     24
		Modes    "1920x1080"
	EndSubSection
EndSection

Section "Screen"
	Identifier "1-Secondary"
	Device     "HD 4200"
	DefaultDepth     24
	Option	    "NoMTRR" "off"
	SubSection "Display"
		Viewport   0 0
		Depth     24
		Modes    "1280x1024"
	EndSubSection
EndSection

Section "DRI"
                                   # May help enable direct rendering.
	Mode         0666
EndSection

Section "Extensions"
	Option	    "Composite" "Enable"
EndSection

Also, I found this awesome page , in this page somewhere says,

Find a backend for awsetbg

If awsetbg has a working backend, it will happily start using that one instead. Backends currently confirmed to fix the issue are:

    feh

Simply install one of them with the package-manager of your choice and restart awesome.

awsetbg -i

will tell you which backend it is currently using or recommend some if none could be found.

but then i get

zab ~ $ awsetbg -i
bash: awsetbg: command not found

.

Also, Found this, maybe it is related somehow, link

Same visual effects with unagi composite manager.

Last edited by zabrielza (2015-09-29 07:55:28)

Offline

#18 2015-09-30 15:52:48

zabrielza
Member
Registered: 2015-03-02
Posts: 125

Re: Some help configuring compton with awesome wm.

Finally, after a lot of compton testing. And after switching to unagi and cairo compmgr with the same visual problems, I changed my window manager and tested on xmonad. compton is working great. I have not tested the other two yet. So, it seems like an awesome-related problem. I had awesome configured as I wanted. The only thing was compositing. So, now xmonad is configured differently. Maybe I should drop awesome and play with xmonad from now on.

Offline

Board footer

Powered by FluxBB