NOTE – Although I have tested this method on Fedora 16, it should work on any computer with an nVidia GPU and a Linux distribution that uses GNOME 3.
There was a time when video tearing on Linux was easily solvable by forcing your desktop environment and/or GPU to enable VSync, and turning compositing off in a window manager like Compiz. The introduction of GNOME 3, which relies on compositing, has made it a little more difficult than it used to be.
If you have an nVidia chipset, and are using GNOME 3 as your desktop environment, I will be detailing the steps necessary to get your videos working like they should have in the first place (yeah, smooth fullscreen flash isn’t a dream anymore!)
Before we begin, here are the specs of the machine I tested these steps on. While they should work on any computer with an nVidia GPU, your mileage may vary.
Test machine – Dell Inspiron 1520
Specs – Intel Core 2 Duo T5450 @ 1.66 GHz
GeForce 8600M GT/PCI/SSE2
2 GB DDR2 RAM
OS – 32 bit Fedora 16 running GNOME 3
Drivers – Proprietary nVidia drivers installed using this guide (version 290.10)
If you’re wondering why I’ve not chosen to go with the default nouveau drivers (open source) instead, it’s cause they suck IMHO. They’re not ready for primetime yet, leaving us at nVidia’s mercy.
Without further ado, here are the necessary steps –
STEP I – nVidia X Server settings
Open nVidia X Server settings by pressing the Windows key and typing nv in the search box that appears.
In the window that opens up, you should see two sections titled “X Server XVideo Settings” and “OpenGL Settings” to the left. Under each of these, enable the “Sync to VBlank” setting and quit.
STEP II – CompizConfig Settings Manager
Open CompizConfig Settings Manager by pressing the Windows key and typing ccsm in the search box that appears.
In the window that opens up, under the “OpenGL” section, enable the “Sync to VBlank” setting.
Under the “Composite” section, disable “Detect Refresh Rate” and “Unredirect Fullscreen Windows”. Also set the refresh rate manually to about twice the maximum refresh rate supported by your display (for example, if you have a monitor capable of 60 Hz, set it at 120).
STEP III – Startup Applications
Open Startup Applications Preferences. On Fedora this can be achieved by pressing Alt+F2 and typing
Add a startup application to this list. Give it any name you desire (for example, nVidia config) and under the command field type
You may leave the comment field empty. Add this entry and quit.
Hang in there, we’re almost done!
STEP IV – Editing your environment variables file
Open up a terminal window and gain root access by typing
Enter the root password when prompted.
echo CLUTTER_PAINT=disable-clipped-redraws:disable-culling >> /etc/environment
to add the setting for the environment variable CLUTTER_PAINT to the /etc/environment file.
We’re done! Reboot your PC to enjoy tear-free video playback.