Remove screen tearing with dcompmgr - nVidia

From Manjaro Linux
Jump to: navigation, search


Note: There are a LOT of different 'solutions' or
part solutions floating around. So be aware that 
it seems to come down to the luck of the draw as
to whether a particular solution works for you.

This simple solution (for some at least) is in our
wiki here: [1]

This wiki page is inspired by a post in the forum by excalibur, it has removed the screen tearing that many of us have been living with for a long time. In turn excalibur was inspired by what he read in the wonderful Arch wiki, here: [2]

Install dcompmgr?

First install dcompmgr with yaourt:

yaourt dcompmgr

Always choose yes, except when asked if you want to edit the PKGBUILD file.

Prior preparation may be required

Disable any compositing application that you may be running, such as Compton, Compiz, Mutter...

The way I do this, which is ideal in this situation where we can temporarily test whether dcompmgr works to our satisfaction or not. Is to use htop to kill the compositor that you are running (only if you are running one of course).

To install htop enter the following in your terminal:

pacman -S htop

To kill a running process in htop, put the htop highlight cursor over the process & hit the F9 function key & then hit Enter.

To test dcompmgr

Run the following command in the terminal:

dcompmgr --gl

Then play a movie & find a section with fast moving action (the most likely situation to see tearing) & check the results of using dcompmgr.

If you are happy then you can setup dcompmgr to autostart with your DE/WM.

Turn off the autostart of any other compositors

To disable the XFCE window manager's compositor

Following are two ways to turn off compositing in Xfce.

Using the Xfce GUI:

Settings -> Window Manager Tweaks -> Compositor tab -> 
         uncheck 'Enable display compositing' checkbox

Via the the terminal:

xfconf-query --channel=xfwm4 --property=/general/use_compositing --set=false

For Openbox

Look in the ~/.config/openbox/autostart file & comment out (place a # at the beginning of the line) the call to compton or any other compositor.

To autostart dcompmgr in XFCE

Create an autostart element with the command:

dcompmgr --gl

Using the following command will turn off the fade effect & & also send all of the dcompmgr ourput to null. Which should clear a pile of useless error messages from you logs:

dcompmgr --gl --no-fade >/dev/null 2>&1

To autostart in Openbox

I use the following command placed in the ~/.config/openbox/autostart file:

dcompmgr --gl --no-fade &

On my machine I find that dcompmgr gives me an ongoing list of repetitive & useless errors. If you start it from the terminal it is messy, no matter where you start it from, these useless (to most of us) errors would be being logged somewhere. So I use the following to start dcompmgr , doing so sends all of its output to null.

dcompmgr --gl --no-fade >/dev/null 2>&1 &

Place either of the above two commands below any calls to hsetroot , exsetroot , that you may be using to set your displays background colour, I have the following at the beginning of my .../openbox/autostart file:

## Set a background color
if which hsetroot >/dev/null; then
    if which esetroot >/dev/null; then
   if which xsetroot >/dev/null; then
test -z $BG || $BG -solid "#000000"

dcompmgr --gl --nofade >/dev/null 2>&1 &

The above gives me a black background thou you could change the hex "#000000" to whatever colour you prefer.

A little compositor switcher

december has written a little compositor chooser that operates via a drop-down menu from its app-icon that resides in the tray. It is a python script that calls simple bash scripts that even those of us with little knowledge of bash or python will usually be able to edit to suit our needs, if need be. I added the --gl --no-fade options to the dcompmgr script & commented out the calls to both xfwm & compton.

The purpose of the compositor switcher is to give those that to get the best display, need to use different compositors to suit different applications that they use. OR as in my case, some of us only turn compositing on to when we watch videos & then turn it off when the video is over, as compositors can cause minor lag problems for some users.

Find out how to install the comp switcher (very simple) & just what it does by default, in this Manjaro forum thread: [3]


This section will very likely grow as time goes by from people's input into this wiki page's forum topic (linked below).

Still have some tearing

If you still experience screen tearing, you could try creating another autostart element using the following command:

nvidia-settings -l

VLC volume adjustment causes temporary video freeze

  • Problem: I've noticed that often when changing volume settings using the mouse scroll wheel in VLC, there can be a short temporary freeze of the video, though the sound continues uninterrupted.
  • Workaround: If you put the mouse pointer over the volume control graphic of the full screen VLC pop-up control interface & change the volume with the mouse wheel, this problem does not occur.


Following is a link to this page's forum counterpart where you can post any related feedback: [4]