I was attempting to use i3 on my ubuntu installation the other day. I noticed however that when I would logout and switch to using i3 I would start to see tearing when watching videos or scrolling through websites. This is something I do not notice when using unity. I would really like to be able to use i3 but currently cannot due to screen issues.

Would anyone have a suggestion as to what might be causing this? What ends up being different between i3 and unity as far as displaying the screen? Most of the threads I read about screen tearing referred to compiz. Wouldn't compiz be the same on both ubuntu and i3?

up vote 23 down vote accepted

The Unity Shell UI is a plugin of the Compiz compositing window manager (Unity Wiki) while i3 a standalone window manager without native compositing features. That means that by default Unity utilizes all manner of graphics acceleration features and i3 uses "plain" X11.


In order to get compositing features in i3, you will have to start a composite manager (not a compositing window manager). compton is a quite popular choice to use with i3.

Installation is easy as packages for Ubuntu are available in the official repository for trusty and newer. After installation you have to create a configuration, for example at ~/.config/compton.conf (as the location of the configuration file can be passed as argument to compton, the choice is yours). My compton.conf looks like this:

# basic configuration
backend = "glx";
vsync = "opengl-swc";

glx-copy-from-front = true;
glx-swap-method = 2;
xrender-sync = true;
xrender-sync-fence = true;

# transparancy settings for i3
opacity-rule = [
    "0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];

It is possible that you need to adjust it for your system. Now you can start compton:

compton --config ~/.config/compton.conf -b

After you made sure that it works well, you can start it automatically by adding

exec --no-startup-id compton --config ~/.config/compton.conf -b

to your ~/.i3/config.

Note: I strongly suggest updating i3 to at least version 4.12 (the current release at time of posting). It solves a few rendering issues i3 has in conjunction with compton, at least when cairo ≥ 1.14.4 is available (xenial comes with cairo 1.14.6; see i3 Release Notes).

  • compton is a very nice lightweight compositor. – Olathe Mar 29 '16 at 0:34
  • @Adaephon Thank you so much! This has been a headache of mine for a while. – Charles S Mar 30 '16 at 23:10
  • Man, I'm so glad I found this answer. I had no idea the backend option existed. Setting it to glx basically fixed everything for me. All tearing is gone and browser scrolling is silky smooth. – Hubro Oct 19 '17 at 10:59

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.