Using Compton for tear-free compositing in XFCE


Recommended Posts

I've always grappled with one major issue when using lightweight DE's like XFCE or LXDE: Video tearing. For me there is nothing more annoying then seeing tearing when watching video in my local video player or in flash player, and seeing ugly tearing when scrolling in firefox. XFCE's built-in xrender based compositor does nothing but exacerbate the issue, and the intel driver's "TearFree" option performs rather poorly.

The obvious solution to this is using an opengl compositor. In the past I had been using compiz in XFCE, which worked but left a lot to be desired when it came to integrating with XFCE and general bugginess; and the last straw is that in 13.04 it seems rather unusable when used outside of unity (severe bugs such as unclickable window decorations), so I searched for another solution. I then found compton: https://github.com/chjj/compton. Compton is a very lightweight compositor that is based on xcompmgr (its a fork of xcompmgr-dana). Compton features a stable opengl backend and working vsync (It also has an xrender backend, but for the purpose of getting tear-free output the opengl backend is recommended). Compton is an excellent fit for XFCE or LXDE because it is very lightweight and it does not need to replace your window manager like compiz does, it purely provides compositing.

The first thing you will want to do is install compton. The compton maintainer has a ppa for compton here: https://launchpad.net/~richardgv/+archive/compton. To add the ppa to your system and install compton, open the terminal and enter the following commands: sudo apt-add-repository ppa:richardgv/compton and sudo apt-get update && sudo apt-get install compton

 

Note: You may want to take a look at: https://github.com/c...pton.1.asciidoc for a good overview of the options available to you, compton is very customizable. You may also want to take a look at this to tweak compton for optimal performance, certain options may perform better on certain hardware/drivers: https://github.com/c...wiki/perf-guide. You may also want to look at the vsync guide if the settings in this guide aren't providing you with tear-free output: https://github.com/chjj/compton/wiki/vsync-guide

Next you will want to create your compton config file. Save the file as .compton.conf in your home directory. Here is the config file I use, I've added a few detailed comments explaining the most important things:

 

backend = "glx"; # Enables Opengl backend
paint-on-overlay = true; # These 3 can improve performance, work well in most cases
glx-no-stencil = true;
glx-no-rebind-pixmap = true;
vsync = "opengl-swc"; # Enables one of the vsync methods. Check here for more info: https://github.com/chjj/compton/wiki/vsync-guide

# Shadow
shadow = true;            # Enabled client-side shadows on windows.
no-dock-shadow = true;        # Avoid drawing shadows on dock/panel windows.
no-dnd-shadow = true;        # Don't draw shadows on DND windows.
clear-shadow = true;        # Zero the part of the shadow's mask behind the window (experimental).
shadow-radius = 7;        # The blur radius for shadows. (default 12)
shadow-offset-x = -7;        # The left offset for shadows. (default -15)
shadow-offset-y = -7;        # The top offset for shadows. (default -15)
shadow-exclude = [
 "! 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'"
];

# Due to how compton draws shadows, some apps will have "glitchy" shadows. I've added all problem apps I ran into here.
#"! name~=''" excludes shadows on "unkown" windows, which fixes a shadow glitch with XFWM's alt tab switcher.

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

detect-client-opacity = true; #Fixes opacity in some apps, such as xfce4-notifyd

# Window type settings
# Disables shadows on tooltips and enables fading on tooltips

wintypes:
{
  tooltip = { fade = true; shadow = false; };
};

(I found most of the config file here: http://crunchbang.or...ic.php?id=25850)

 

Now you are ready to set compton to start automatically upon login.

For XFCE/xubuntu:

 

Make sure you disable XFWM's compositing first (Settings Manager > Window Manager Tweaks > Compositor > uncheck "Enable Display Compositing").

Open the XFCE settings manager: settings manager > session and startup > application autostart > add and add compton -b. Now compton will start automatically when you login.

For LXDE/lubuntu:

edit this file: ~/.config/lxsession/Lubuntu/autostart. You can just create the file if it does not exist:

mkdir -p ~/.config/lxsession/Lubuntu/
touch ~/.config/lxsession/Lubuntu/autostart

If you want to enable compton globally (for every user on the system), you can edit: /etc/xdg/lxsession/Lubuntu/autostart. Once the file is open in your text editor just add your startup command to it with an @ symbol in front of it, for example: @compton -b &

(I don't use lubuntu/lxde so I haven't tested this myself, I've put this together from these sources: http://lubuntublog.blogspot.com/p/compton.html, https://help.ubuntu.com/community/Lubuntu/Boot_Install_Login#How_I_can_autostart_a_program_when_logging_into_Desktop)

And there you have it, if all goes well you should not have quick and stable tear free rendering in XFCE (or the light DE/WM you prefer) :)

 

Alternate Method: 

Some have commented that putting the opengl/vsync settings in their .compton.conf is not having any effect. If this happens you can pass them as command line switches instead. Create a file called compton.sh, make it executable with chmod +x compton.sh, and pass the settings as switches to the compton startup command like so: compton --backend glx --paint-on-overlay --glx-no-stencil --vsync opengl-swc -b &. Save the file, and in the XFCE application autostart settings click "add" and browse to where you saved the file.

 

For LXDE you can just follow the same instructions above to add it to autostart, just change the startup command accordingly.

 

 

5/6/13: edited with updated config file, added some more things to shadow exclusions.

8/13/13: simplified guide, moving all switches into config file based on feedback. added lxde instructions. other misc updates to config file.

  • Like 3
  • 3 weeks later...

Thanks for all of this info about compton. I just discovered it over the weekend, and this adds a lot to my knowledge. A couple of comments:

There is a way to start compton with the gui. Go to Settings Manager: Session and Startup: Application Autostart. Click add, and paste the start command in there, without the ampersand.

While you are in Settings Manager, you may want to turn off compositing in Window Manager Tweaks. :-)

The "man compton" or "compton -h" commands give a list of options.

...

In considering other window managers, did you try Openbox? It's interesting, maybe not worth the trouble if compton and xfce4wm solves your problem. One tip if you try this: Openbox conflicts with xfdesktop in a couple of areas. So the replacement is a bit more complicated than with gala. I disabled xfdesktop (along with xfwm4) and used nitrogen to set my desktop wallpaper.

Thanks for all of this info about compton. I just discovered it over the weekend, and this adds a lot to my knowledge. A couple of comments:

There is a way to start compton with the gui. Go to Settings Manager: Session and Startup: Application Autostart. Click add, and paste the start command in there, without the ampersand.

While you are in Settings Manager, you may want to turn off compositing in Window Manager Tweaks. :-)

The "man compton" or "compton -h" commands give a list of options.

...

In considering other window managers, did you try Openbox? It's interesting, maybe not worth the trouble if compton and xfce4wm solves your problem. One tip if you try this: Openbox conflicts with xfdesktop in a couple of areas. So the replacement is a bit more complicated than with gala. I disabled xfdesktop (along with xfwm4) and used nitrogen to set my desktop wallpaper.

Yeah I just put my startup command in a text file because I had been tweaking the command a lot, and that way all I had to do was edit the text file if I wanted to change it, instead of going into the settings manager every time. And thanks for the reminder about disabling xfwm's compositing, I've edited my OP to warn to make sure xfwm's compositing is set to disabled, otherwise compton won't start at all :)

Regarding openbox, I didn't have any particular interesting in trying it because it wouldn't do anything to solve my tearing problem, because like xfwm it does not have any opengl compositing (so i'd be using compton either way). With intel graphics I get tearing with any window manager that does not have opengl compositing, its really the only way to get full tear-free output with modern intel graphics.

Recent intel hardware is actually designed with only a compositor in mind (quote from an intel developer):

First note that all Intel hardware up to SandyBridge has functional vsync support with no greater cost than stalling the GPU until the blit can proceed.

The problem is that with the agressive powersaving of SandyBridge and the greater decoupling between the display engine and the GPU, the ability to delay rendering until a particular scanline had passed was assumed to be a legacy feature and the GPU commands to do so were removed. By presuming that all updates would then be through a compositor using pageflipping (i.e. their primary target, Windows Vista/7/8), they were then able to make further power savings. If you use an OpenGL (really DRI2) compositor that only pageflips (i.e. doesn't try to take "advantage" of MESA_copy_sub_buffer), you will not see any tearing, suffer very little jitter, and maximise the power savings of the GPU.

The TearFree option (still in its infancy, and really only a proof-of-principle at this stage) is to make sure that even a bare X only ever pageflips. This is primarily because future hardware will have even more widespread aggressive power savings that assume a compositor, and worst case scenario, the display engine will only be functional with a pageflipping compositor.

Yeah I just put my startup command in a text file because I had been tweaking the command a lot, and that way all I had to do was edit the text file if I wanted to change it, instead of going into the settings manager every time.

...

Regarding openbox, I didn't have any particular interesting in trying it because it wouldn't do anything to solve my tearing problem...

I think the config file for compton makes a lot of sense, for the reason you mentioned. I believe you could call compton.sh from Application Autostart in the GUI though. Not a big deal, but some readers might prefer to do it that way.

I'm mostly a Linux hobbyist, running an old HP laptop with an AMD processor. I try things for the learning experience, and because I'm always looking for a good combination of performance, convenience, and ease of use. I find xfce delivers a pleasing balance of those things, but it's fun to try different modifications.

In my testing, Openbox used slightly less memory than xfwm. But since I just upgraded RAM from 1Gb to 2 Gb, I can afford the extra 10 Mb. :-)

I think the config file for compton makes a lot of sense, for the reason you mentioned. I believe you could call compton.sh from Application Autostart in the GUI though.

Thats exactly what I already do, thats what I meant in OP by saying "added to my XFCE autostart" (I've now edited it for clarity) :)

  • 3 weeks later...

Thanks ViperAFK! I have been using Compton as the compositor for MATE for about 2 weeks now, and I really like it. However there are a few things that I did differently than your guide.

  1. Instead of passing all of the switches you chose on the command line, I enabled those options in the configuration file.
  2. I tweaked the shadow, fade, and a few other settings.
  3. I placed my configuration file in ~/.config/compton.conf instead of ~/.compton.conf.
  4. I wrote an initialization script that allows me to easily start Compton at startup, stop it, restart it, or check its status.

My compton.conf:


# Shadow
shadow = false;
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.7;
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;
shadow-exclude = [ "name = 'Notification'", "g:e:Synapse", "n:w:Geany", "n:w:VLC*", "n:w:compton", "class_g = 'Conky'", "n:w:*Iceweasel*", "n:w:*Chromium*", "class_g ?= 'Cairo-dock'", "class_g ?= 'Notify-osd'" ];
# shadow-exclude = "n:e:Notification";
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;
# inactive-dim = 0.2;
# inactive-dim-fixed = true;
# blur-background = true;
# blur-background-frame = true;
blur-background-fixed = false;
blur-background-exclude = [ "window_type = 'dock'", "window_type = 'desktop'" ];

# Fading
fading = true;
fade-delta = 4;
fade-in-step = 0.03;
fade-out-step = 0.03;
# no-fading-openclose = true;
fade-exclude = [ ];

# Other
backend = "glx";
mark-wmwin-focused = true;
mark-ovredir-focused = true;
use-ewmh-active-win = false;
detect-rounded-corners = true;
detect-client-opacity = true;
refresh-rate = 0;
vsync = "opengl-swc";
dbe = false;
paint-on-overlay = true;
sw-opti = false;
unredir-if-possible = true;
focus-exclude = [ ];
detect-transient = true;
detect-client-leader = true;
invert-color-include = [ ];

# GLX backend
glx-no-stencil = true;
glx-copy-from-front = false;
# glx-use-copysubbuffermesa = true;
# glx-no-rebind-pixmap = true;
glx-swap-method = "undefined";

# Window type settings
wintypes:
{
tooltip =
{
fade = true;
shadow = false;
opacity = 0.80;
focus = true;
};
};
[/CODE]

[b]My initialization script (comptond):[/b]

[CODE]
#!/bin/sh

# Set the configuration details
script_name="$0"
screen_name='comptond'
screen_init=1

# Clear the script's global variables
unset compton_pid
unset action

# Get the current Compton PID
get_compton_pid()
{
compton_pid=$(ps -e -o '%p %U %a' | awk '{if($3 ~ /^[\/]*([A-Za-z0-9_\-]+\/)*(awk|grep|ps)/) {} else { if($2 == "'"$USER"'") print $0 }}' | grep compton | grep -viE "$0|screen" | head -n 1)
echo $compton_pid | grep -Eqs '^[ ]*[0-9]+[ ]+'
if [ $? -eq 0 ]; then
compton_pid=$(echo $compton_pid | awk '{print $1}')
fi
}

# Is Compton running?
is_compton_running()
{
get_compton_pid
echo $compton_pid | grep -Eqs '^[0-9]+$'
if [ $? -eq 0 ]; then
return 1
else
return 0
fi
}

# Start the Compton daemon
start_compton()
{
is_compton_running
if [ $? -eq 1 ]; then
echo "Compton (pid: $compton_pid) is already running!"
return 1
fi

if [ $screen_init -eq 1 ]; then
screen -ls | grep -qs $screen_name
if [ $? -ne 0 ]; then
screen -AmdS $screen_name /bin/sh
fi
screen -S $screen_name -p 0 -X stuff 'compton --config ~/.config/compton.conf -b\r'
else
compton --config ~/.config/compton.conf -b &
fi
return 0
}

# Stop the Compton daemon
stop_compton()
{
is_compton_running
if [ $? -eq 0 ]; then
echo "Compton could not be stopped because it is not running!"
return 1
fi

kill $compton_pid

screen -ls | grep -qs $screen_name
if [ $? -eq 0 ]; then
screen -S $screen_name -p 0 -X stuff 'exit\r'
fi

return 0
}

# Restart the Compton daemon
restart_compton()
{
stop_compton
sleep 2
start_compton
return $?
}

# Print the current status of the Compton daemon
print_status()
{
is_compton_running
if [ $? -eq 0 ]; then
echo "Compton is not running in the current context"
else
echo "Compton is running with pid $compton_pid"
fi
return 0
}

# Print the script's help information
print_help()
{
echo "$script_name [start|stop|restart|status|help]"
return 0
}

if [ -n "$1" ]; then
case "$1" in
start)
action='start_compton'
;;
stop)
action='stop_compton'
;;
restart)
action='restart_compton'
;;
status)
action='print_status'
;;
help)
action='print_help'
;;
*)
echo "Invalid Argument -- $1"
exit 1
;;
esac
else
action='start_compton'
screen_init=0
fi

$action
exit $?
[/CODE]

Anyone is welcome to use or modify my Compton initialization script under the terms of the GPLv2.

  • 2 months later...

I've been playing with Compton on Xubuntu 13.04 and it is brilliant. Just what I have been looking for. However, I used his method:

 

http://ubuntuforums.org/showthread.php?t=2144468

 

The last post in that thread:

 

Place compton in the startup with this command:

compton -b

Then I put this in a new text file and saved it as compton.conf and saved it in my home directory:

backend = "glx";
paint-on-overlay = true;
glx-no-stencil = true;
vsync = "opengl-swc";
 
# Shadow
shadow = true; # Enabled client-side shadows on windows.
no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows.
no-dnd-shadow = true; # Don't draw shadows on DND windows.
clear-shadow = true; # Zero the part of the shadow's mask behind the window (experimental).
shadow-radius = 7; # The blur radius for shadows. (default 12)
shadow-offset-x = -7; # The left offset for shadows. (default -15)
shadow-offset-y = -7; # The top offset for shadows. (default -15)
shadow-exclude = [
  "n:e:Notification",
  "n:e:Docky",
  "g:e:Synapse",
  "g:e:Conky",
  "n:w:*Firefox*",
  "n:w:*Chrome*",
  "n:w:*dockbarx*",
  "class_g ?= 'Cairo-dock'",
  "class_g ?= 'Xfce4-notifyd'",
  "class_g ?= 'Xfce4-power-manager'"
];
 
# Fading
fading = true; # Fade windows during opacity changes.
fade-delta = 4; # The time between steps in a fade in milliseconds. (default 10).
fade-in-step = 0.03; # Opacity change between steps while fading in. (default 0.028).
fade-out-step = 0.03; # Opacity change between steps while fading out. (default 0.03).
#no-fading-openclose = true; # Fade windows in/out when opening/closing
 
# Window type settings
wintypes:
{
  tooltip = { fade = true; shadow = false; };
};

@+ViperAFK

 

Please put back the old instructions, as these new ones produce tearing at the very top of the screen. They are luckily still available through Google cache.

 

Basically by copying what Crunchbangs settings are you are also reproducing the tearing that Crunchbang has on Intel at the very top of the screen. Your old .sh instructions do not produce any tearing at the top of the screen or anywhere else on Intel.

 

Here they are for those that want them.

 

 

I previously wrote about how to use elementary OS's gala compositor in XFCE: http://www.neowin.ne...n-xubuntu-1210/
 
While I did like gala, it was very quick with some very nice looking effects, it did seem to be a little on the buggy side when used with XFCE (keyboard shortcuts would randomly stop working) and the integration left a little to be desired.
 
I recently discovered that the lightweight compton compositor now has a decent opengl backend and can do tear-free rendering with most drivers: https://github.com/chjj/compton
 
This is now by far my favorite compositor to use with XFCE (Its ideal for any lightweight DE really, and probably also good for those that just use a WM) because compton does not need to replace the XFCE window manager, it only provides the compositing and I can retain the native XFCE window management and window decorations, so integration-wise its basically perfect. Compton only has some very simple shadows and effects, but it is enough for me, I mainly just want that wonderful tear-free output 
 
It does take a little tweaking to initially setup, so here is a quick guide:
 
1. Obviously, install compton. For ubuntu there is a PPA available here and it is maintained by the compton maintainer: https://launchpad.ne...archive/compton. For arch it is in the AUR as compton-git. Not sure about other distros.
 
2. You will want to take a look at: https://github.com/c...pton.1.asciidoc for a good overview of the options available to you, compton is very customizable. You may also want to take a look at this to tweak compton for optimal performance, certain options may perform better on certain hardware/drivers: https://github.com/c...wiki/perf-guide
 
3. You will need a way to start compton. What I did was make a file called compton.sh in my home dir (don't forget to make it executable!), and added it to my XFCE autostart (Settings Manager > Session and startup> application autostart > add > browse to compton.sh), this way I can easily tweak my compton launch options in the text file.
 
I use the following for my system: compton --backend glx --paint-on-overlay --glx-no-stencil --vsync opengl-swc --config ~/.compton.conf -b &
 
--backend glx enables the opengl backend of compton, by default it uses xrender. You will definitely want to use the opengl backend if you want tear-free output.
 
--paint-on-overlay and --glx-no-stencil are not required, they can effect performance a bit. on my intel card/driver they happened to perform well.
 
--vsync opengl-swc This is the important part, it enables one of the opengl backend's vsync methods. This method should work with intel and nvidia. If it does not work take a look at the other vsync options on the compton documentation, there should be one that works for your driver.
 
--config ~/.compton.conf This tells compton the location of the config file I want it to read from, you can specify any location or config file name you wish. The config file is important for fine tuning things like shadows and effects.
 
-b & forks compton and makes it run in the background as a daemon.
 
note: make sure xfwm's compositing is disabled before attempting to start compton, otherwise compton will not start.
 
4. You will want to make your compton config file, in my case its .compton.conf. I've optimized mine to have some simple shadows and fade effects, and to work well with XFCE (I've removed shadows on tooltips and xfce's notifications, it also has tweaks to fix shadows on synapse and conky):
 
# Shadow
shadow = true; # Enabled client-side shadows on windows.
no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows.
no-dnd-shadow = true; # Don't draw shadows on DND windows.
clear-shadow = true; # Zero the part of the shadow's mask behind the window (experimental).
shadow-radius = 7; # The blur radius for shadows. (default 12)
shadow-offset-x = -7; # The left offset for shadows. (default -15)
shadow-offset-y = -7; # The top offset for shadows. (default -15)
shadow-exclude = [ "n:e:Notification", "n:e:Docky", "g:e:Synapse", "g:e:Conky", "n:w:*Firefox*", "n:w:*Chromium*", "class_g ?= 'Cairo-dock'", "class_g ?= 'Xfce4-notifyd'", "class_g ?= 'Xfce4-power-manager'"];
 
# Fading
fading = true; # Fade windows during opacity changes.
fade-delta = 4; # The time between steps in a fade in milliseconds. (default 10).
fade-in-step = 0.03; # Opacity change between steps while fading in. (default 0.028).
fade-out-step = 0.03; # Opacity change between steps while fading out. (default 0.03).
#no-fading-openclose = true; # Fade windows in/out when opening/closing
 
# Window type settings
wintypes:
{
  tooltip = { fade = true; shadow = false; };
};
 
 
(I found most of the config file here: http://crunchbang.or...ic.php?id=25850)
And there you have it, if all goes well you should not have quick and stable tear free rendering in XFCE (or the light DE/WM you prefer) 
 
5/6/13: edited with updated config file, added some more things to shadow exclusions.

All the compton opengl/vsync settings in the updated instructions are exactly the same as they were in the old ones, I just moved them into the config file instead of having them in the compton startup command...

 

Before I was using these in my startup command: --backend glx --paint-on-overlay --glx-no-stencil  --glx-no-rebind-pixmap --vsync opengl-swc

 

And now I am starting compton with just compton -b  and just have them in the top of my config file instead:

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

I copied the config file in my updated post directly into my own .compton.config just to make sure and it works totally fine here; no tearing anywhere, and it is behaving just as it was before when I had the opengl settings in the startup command.

 

I would double-check the name and location of your config file, maybe compton isn't seeing your config file for some reason so its just launching with default settings? It should be .compton.conf in your home directory (unless you specified another location for it in your compton startup command).

The config and location are fine on my end. It appears that for some reason my PC is not seeing the new switches in the .config like it was with the .sh file.

 

The tearing is at the absolute top of the screen. Have you tried having no panel at the top or auto hiding it to see if when you move a window at the very top edge of the screen that there is no tearing?

The config and location are fine on my end. It appears that for some reason my PC is not seeing the new switches in the .config like it was with the .sh file.

 

The tearing is at the absolute top of the screen. Have you tried having no panel at the top or auto hiding it to see if when you move a window at the very top edge of the screen that there is no tearing?

Yes, and I tried fullscreen video, no tearing anywhere just as expected. Not sure why yours is not parsing those options in the config file, it seems to work fine for everyone else :/

Yes, and I tried fullscreen video, no tearing anywhere just as expected. Not sure why yours is not parsing those options in the config file, it seems to work fine for everyone else :/

Oh, well, at least I have my PC working fine on LXDE with the old method. I was just worried that the new way would not work for others as well. As long as it works for them then there is no problem. Thanks for taking the time.

I'm not sure if i do something wrong or it's something else but it seems that the new method doesn't work, with the old method everything's working fine, with the new for some unknown reason compton refuses to start, mind you i'm on Fedora 19 (xfce)

Are you guys running older versions of compton or something? Works fine for me when I copy and paste that exact config file and startup command from my post on two different laptops I have here, both using latest compton from the ubuntu ppa. And several people (both in this thread and in my ubuntuforums thread) are using them in the config file with no problem.

 

My guess would be the perhaps older versions of compton only recognize those switches when passed to the compton startup command, but not when they are in the config file.

 

I'll edit the post when I get home later and add an "Alternate method" section.

Strange, I believe that should be new enough. I can only guess that your config file doesn't appear to be being parsed properly or something, because it definitely "worksforme" here :) I would try reporting a bug here: https://github.com/chjj/compton/issues

 

And I've added an "alternate method" at the bottom of the guide.

  • 2 years later...

Hi all,

I've been using compton with xubuntu 14.04 for long time with a great result, but now I've a new install with a freshly installed Xubuntu 15.10 and have notice some problems.

Some applications (some games such as torcs) gets blocked when run in fullscreen. I've solve this problem using an script that makes "killall compton" before opening the application and "compton -b" when closing the app.

The bigger problem comes with Google Chrome, it plays videos correctly in "normal" (windowed) mode, but when I go fullscreen video gets frozen althought audio continues. this problem comes with youtube and other webs that plays videos. I've research a bit and youtube uses by default HTML5, so I've move it to flash using a Chrome addon, result? problem is exacty the same. I suppose it's the same problem that comes with those other applications and has nothing to do with html5 or flash.

Of course, if I disable compton then videos works great in fullscreen mode and... here comes the most insteresting thing, I've no tearing!. I mean:

If I disable compton there is tearing on videos played in "non-full-screen" but when go to fullscreen tearing dissapears. It makes me think that Chrome includes now some method to remove tearing in full screen. This should be something good, but it seems to interfere with Compton, so it makes video unplayable in fullscreen.

I've also try to disable hardware acceleration in chrome, for doing this go to the settings and do this. If I do this then video gets no frozen when go to fullscreen, but then I've a huge tearing even with compton enabled. So, this solution is not ok icon_sad.gif

I guess the solution of this problem could be having some way to disable compton when Chrome plays video in fullscreen. How can I do this? I could disable compton when opening chrome and enable again when closing, but it's not desirable since I had no compton in any app (remember, we only wants compton to be disabled when playing a video in full-screen).

Is there any way to disable compton only with chrome and only when play fullscreen? I wonder if I could configure this in "~/.compton.conf".

Many thanks to everyone who reads this, I hope someone can help.

Regards

  • 2 weeks later...

Hi All,

I'm unhappy to see there are no answer at all icon_sad.gif, I can't believe I'm the only one with this problem.

If it helps anyone, I've notice Chrome have problem playing some 1080p 60hz youtuve videos, even with compton disabled, so there could be some problem related to the latest stable version (47.0.2526.73 64 bits). The problem I'm talking about is not complete freeze of image but stops of 0,5 - 1 sec every certain time. This is one of the videos that shows this behaviour:

https://www.youtube.com/watch?v=JBM_gqOeUXY

In the same machine (Intel N3150 with 4GB RAM) using firefox everything works great.

If I disable compton I still have tearing, so it's not an option.

Regards

  • 3 weeks later...
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Microsoft finally admits its default Windows 11 25H2, 24H2 action broke key legacy component by Sayan Sen Microsoft last week released Windows 11 KB5094126 and KB5093998 as the latest Patch Tuesday updates. Following that the company also published the accompanying dynamic updates under KB5094149, KB5095971, and KB5094156. So far the company has acknowledged two known issues that have popped up after the release which include bugged-out Office apps as well as the Recycle Bin; though there could be more at play too. Speaking of bugs and issues, Microsoft seems to have finally acknowledged a problem that probably has been around for close to a year. That's because back in July of 2025 the company made a default change to the latest Windows 11 versions, wherein it switched to JScript9Legacy on Windows 11 24H2 and later releases. Hence following the release of version 25H2 in October 2025, JScript9Legacy also remained default-enabled. As a result there has been a compatibility issue ever since then. For those wondering, by switching to JScript9Legacy Microsoft intended to improve the security of modern Windows PCs by reducing vulnerabilities tied to legacy scripting like cross-site scripting (XSS), among others. XSS exploits can allow cyber-attackers to attach malicious code onto legitimate websites and use them to execute the code when a potential victim loads such a website. Hence the new JScript9Legacy engine enforced stricter execution policies and improved object handling, which should help mitigate such attacks. Microsoft today has published a new support article detailing the problem. Neowin spotted it while browsing. The company says that JScript global definitions and execution context may fail to persist across scripts, potentially breaking older dependent apps and web-based components that relied on this legacy behavior. In the article Microsoft has confirmed that the issue stems from its move away from the older jscript9.dll engine in favor of jscript9legacy.dll. As mentioned above, while the newer engine was designed to address vulnerabilities and strengthen security it also changes how JScript handles execution context. As a result functions and definitions loaded by one script could no longer remain available to subsequent scripts once execution ended. The company notes that some applications worked correctly on earlier Windows versions because the older JScript engine automatically retained global definitions and execution state between scripts. Under the newer model though that behavior is disabled by default causing certain legacy workloads and polyfill-dependent scripts to fail. Microsoft says it addressed the problem via the KB5077241 update though the fix had not been enabled automatically in the following updates. As such admins must explicitly turn on persistent JScript execution context using a Registry setting that the tech giant shared today. The configuration can be applied to individual processes or system-wide through the FEATURE_ENABLE_PERSISTENCE registry key. The steps have been outlined below: Run the following command to create the feature control registry key: reg add "HKLM\Software\Policies\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_ENABLE_PERSISTENCE" Under this key, create a new DWORD (32-bit) value. Configure the value as follows: To enable persistence for specific processes only: Set the value to 1 for each target process name. To enable persistence for all processes: Add * as the key name and set its value to 1. You can find the official support article here on Microsoft's website.
    • The possibility that milk gathers back into a glass implies that gravity can be 'reversed'.
    • VidCoder 12.20 by Razvan Serea  VidCoder is a DVD/Blu-ray ripping and video transcoding application for Windows. It uses HandBrake as its encoding engine. Calling directly into the HandBrake library gives it a more rich UI than the official HandBrake Windows GUI. VidCoder can rip DVDs but does not defeat the CSS encryption found in most commercial DVDs. You’ll need the NET 8 Desktop Runtime. If you don’t have it, VidCoder will prompt you to download and install it. The Portable version is self-contained and does not require any .NET Runtime to be installed. You do not need to install HandBrake for VidCoder to work. Feature list: Multi-threaded MP4, MKV containers Completely integrated encoding pipeline: everything is in one process and no huge intermediate temporary files H.264, H.265, MPEG-4, MPEG-2, VP8, Theora video Hardware-accelerated encoding with AMD VCE, Nvidia NVENC and Intel QuickSync AAC, MP3, Vorbis, AC3, FLAC audio encoding and AAC/AC3/MP3/DTS/DTS-HD passthrough Target bitrate, size or quality for video 2-pass encoding Decomb, detelecine, deinterlace, rotate, reflect, chroma smooth, colorspace filters Powerful batch encoding with simultaneous encodes Customizable Pickers to automatically pick audio and subtitle tracks, destination, titles and more Instant source previews Creates small encoded preview clips Pause, resume encoding VidCoder 12.20 changes: Updated HandBrake core to 1.11.2. Download: VidCoder 12.20 | 47.0 MB (Open Source) Download: Portable VidCoder 12.19 | 89.3 MB Link: VidCoder Home Page | Github | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Too soon, I'm still not over this death!
  • Recent Achievements

    • Week One Done
      Jordan Smith earned a badge
      Week One Done
    • Reacting Well
      BizSAR earned a badge
      Reacting Well
    • First Post
      AndreaB earned a badge
      First Post
    • Week One Done
      Huge Trailer earned a badge
      Week One Done
    • Week One Done
      Classifyskilleducation earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      593
    2. 2
      +Edouard
      185
    3. 3
      PsYcHoKiLLa
      76
    4. 4
      Michael Scrip
      73
    5. 5
      Steven P.
      66
  • Tell a friend

    Love Neowin? Tell a friend!