• Home
  • Linux
  • Fix it!
  • Dogs
  • Contact
  • english
  • deutsch
How To Everything!

Latest 5 in Linux Troubleshooting

  • Automount external hard disks on the Raspberry Pi
  • Speeding up usb storage devices on the Raspberry Pi
  • Nvidia and ATI Graphics Card Problems with Ubuntu (10.04-12.04)
  • Finally No More Tearing Anywhere With Mate Desktop And Compiz
  • Fix Stuttering Video With No Sound

linux tags

driver mint energy imac firmware wifi mate classic ubuntu nvidia gconf-editor sound networking mplayer flash skype compiz lmde webcam ethernet HD 4000 window buttons dvb video ssd imagemagick digitenne isight Ivy Bridge tearing
more tags

share this


Finally No More Tearing Anywhere With Mate Desktop And Compiz

There are a couple of things not everybody notices, but once you've seen it, it just keeps annoying you. Tearing is one of those things, and appears if there is rapid movement in a movie or video game and you suddenly see the picture chopped in a couple of bands that are not aligned. The picture on the right gives an impression what screen tearing looks like. To learn a lot more about it just visit the wikipedia page (also the source of the picture). 


The Issue

Because of the graphics card driver or window manager not correctly aligning with the repeat rate of your monitor, you might experience tearing especially when using watching videos with youtube or your favorite media play in fullscreen. If you are using another window manager like Cinnamon or Gnome 3 you might not experience this problem. This article explains how to get your Mate Desktop by using compiz to make use of the same functionality to avoid tearing. As the other window managers the magic words are compositing and vsync. Enabling compositing alone might not do the trick, but using compiz and tweaking a bit definitely does. This HowTo fixes all tearing in connection with an intelHD or nVidia graphics chip. 

Update: Scroll to the very end of this howto for fixing tearing with Ubuntu 16.04 + Mate


The Fix

1. Install Compiz and Compiz Config Settings Manager

  • open up a terminal window and type: sudo apt-get install compizconfig-settings-manager
    This installs the extended configuration application for compiz and automatically compiz, since it's depending on it. 

2. Set Compiz as default compositing manager for Mate Desktop

  • in the terminal window type: mateconf-editor
  • if it is not installed, type: sudo apt-get install mate-conf-editor
  • go to /desktop/mate/session/required_components/windowmanager
  • replace the entry "marco" with "compiz"
  • log out and in again to make changes work

3. Configure Compiz to fix tearing

  • in your menu go to System/Preferences/CompizConfig Settings Manager
  • enable Composite, Open GL and Work Arounds
  • additionally you might also enable Animations to get some nice desktop effects
  • go to Composite and make sure "Detect Refresh Rate" and "Undirect Fullscreen Windows is checked"
  • this should already fix most full screen tearing issues
  • to remove all tearing go to Workarounds (you can search for it by typing it in the text field on the top left)
  • enable the options "Force complete redraw on initial damage" AND "Force full screen redraws (buffer swap) on repaint"
  • these steps should remove all tearing with intel HD graphics, if you have a nvida based graphics card, please read on

4. Some extra steps with nvidia graphics (using the standard nouveau driver)

  • if you didn't install nvidias proprietary drivers, your card should automatically work with the open source Nouveau driver
  • unfortunately this driver needs to get manually configured to use the "Vsync = on" option
  • open up a terminal and enter the following command (and admin passwort when asked)
    • sudo Xorg :1 -configure
    • this should create the file xorg.conf.new in your home directory
    • this process is necessary, since the Xorg server doesn't need a configuration file anymore, and therefore you can't just edit an existing one
    • if you are logged in as root the file will be created in /root - if this is the case, make sure to change the following commands accordingly
  • you now have to edit this file in order to add the necessary option to enable vsync, still in a terminal window enter
    • gedit ~/xorg.conf.new (if you don't have gedit, use another text-editor)
    • look for the configuration block Section "Device" that contains the line Driver "nouveau"
    • add a new line right before EndSection and paste the following
      • Option "GLXVBlank" "on"
    • copy this configuration the the right location using the following command
      • sudo cp ~/xorg.conf.new /etc/X11/xorg.conf
  • to use the new configuration immediately use the following command
    • Caution: this will hard reset your graphical user interface 
    • you will not be asked to save changes in open applications, save all changes before executing the command
      • sudo /etc/init.d/mdm restart
5. Done
  • Check Youtube or any other site that uses flash and enjoy a tearing free display 
  • Videos played with the media player won't tear no matter how they are played
  • The only downside: this fix can be quite cpu intensive, depending on your gpu. On older systems it might create too much system load to be an option. 

6. Limitations

  • This fix works with Linux Mint Maya, Mate Desktop and Compiz. 
  • The same combination using Linux Mint Nadia still creates some problems, that might prevent you from using this fix. 

Credits

  • The description about installing compiz is based on an article by tux-seven on the linux mint community.


Update for Ubuntu 16.04 + Mate

While the above steps fixed the tearing issues for a couple of versions since this howto was written, the issue disappeared for a while but seems to have come back now with the 16.04 LTS + Mate. But luckily, this time the fix is much easier, so here we go

  • On Mate Desktop go to System > Preferences > Look and Feel > Mate Tweak
  • In the left columns with the big icons, click on "Windows"
  • On the right side locate the pull down menu for "Window Manager / Select a Window Manager"
  • Instead of "Marco (Software Compositor" which is set by default choose "Compiz (Advanced GPU accelerated desktop effects)"
    • Instead you can also choose "Marco (Compton GPU compositor) to fix the tearing, but this combination tends to give you less performance
  • DONE!

How To Everything!

disclaimer image sources some rights reserved

Links

jrhenkelmann.net anchesa kyamara healthy happy joy joy