Finally, Linux Nvidia Tearing Issue Fix Has Been Found! + Bonus: Nvidia Optimization

Latest Nvidia drivers have introduced a rather excruciating bug which decreases the overall performance of your machine and causes a lot of frustration amongst Linux users.

Updated Mar 20, 2016Quick Fix

Whether the blame completely belongs to Nvidia or perhaps in part belongs to another component of your OS such as, the compositor or Xorg for example is yet remains not entirely clear.

However if you find yourself suffering from one or more of the following symptoms, then you’ll probably want to apply this fix in order to save yourself a lot of frustration.

Are You Experiencing The Bug?

Symptoms: general video tearing, slow or delayed – typing or scrolling or erasing, screen doesn’t redraw / repaint / refresh as it should i.e. either it’s delayed or the picture (screen) comes out choppy, screen-freezes momentarily.

Most noticeable apps in which you encounter these symptoms are:

Text editors such as – Gedit, Kwrite, Mousepad, etc… Terminal – you may encounter scrolling delay, web browsers – you might notice lags when switching tabs, file-managers – naming files / erasing file names and also switching tabs might lag, and of course video players – frames get torn up.

Now, many promises had been made lately that pledge these issues would all be gone once desktop environments will make the switch to Wayland display manager, but that doesn’t seems like it’s going to happen anytime soon, so what shall we do until then?

Well, a few months back, when the bug was relatively fresh, iWillFolo has offered its readers a workaround to temporarily bypass the issue.

That workaround still works but it’s not without a cost and that’s running your card to the max which leads to the waste of unnecessary power and also excess hit coming out from your machine.

Hence that fix was definitely not ideal, and certainly requiered a better, permanent solution.

Nvidia tearing

Fixing Nvidia Tearing + Optimizing The Driver For Your System

Warning: before using any of the below commands, please note that messing with your graphics configuration files may cause your distro not to display properly or even a black screen upon login.Use at your own risk. Use only If you know what you’re doing.

In order to fix the issue we are going to tweak Nvidia’s configuration a little bit, don’t worry though, it’s nothing too complicated, and the good part is this tweaking will also make it more optimized for your machine, ready? let’s do this.

Open up Terminal and type:

sudo nvidia-xconfig

This will generate an automatic /etc/X11/xorg.conf file which is suitable to run on your computer. Next, type:

sudo nvidia-settings

Set your screen resolution and refresh rate in the X Server Display Configuration (I set mine to 1920×1080 @59hz) and click Save to X configuration File.

Note: if you’re not sure about your screen resolution and refresh rate, install a tool called xrandr (if it’s not installed on your OS yet), then type xrandr in Terminal to see what is your resolution and refresh rate.

Also, inside OpenGL Settings, tick:  Sync to Vblank, Allow Flipping, Use Conformant Texture Clamping. Close the app

Return to Terminal and type:

sudo kwrite (or gedit whichever you have installed) /etc/X11/xorg.conf

Edit the device section like so:

Section “Device”
Identifier “Device0”
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName “GeForce GTX 650” (use your own board name, if you don’t know then add a “#” sign to the left of the line without the quotes)
Option “RegistryDwords” “PerfLevelSrc=0x2233”
Option “TripleBuffer” “True”

Save the file and close the app. Done! restart your computer to apply the changes.

Note: xorg.conf is being depreciated, meaning some distros don’t use it, others will stop using it eventually so you might want to move the file and rename it thusly:

sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.d/nvidia.conf


Use the following parameters to maximize your performance even more.

sudo dolphin  (or nautilus, whichever file-manager you have)

Now go into /etc/profile.d and create a text file, you may name it, and copy pate the following lines:

export __GL_YIELD="USLEEP"

Note: do not use both at the same time. GL_THREADED_OPTIMIZATIONS may cause some applications to act strange, thus, in most cases its use is deprecated.

Save and close, reboot to apply the changes.

COMMENTS (beta 4)

Add your comment here...
beyonim Mar '17
Thank you! I will hope found the solution for a few years!
Dimitrios Charalampidis Sep '15
I know this article will be 1 year old in a few days, but I followed the instructions, my machine booted normally but tearing is still there and it is a lot of it... (Running ROSA Desktop Fresh R6)
petran79 Jan '15
unfortunately Ubuntu 14.04 fails to load and brings me to command line. Have to reset xorg.conf settings. Only solution is the maximum performance option.
Guido Oct '14
Hi, i've tried this and now I can't boot into ubuntu, it stays on the logo screen freeze. do you know what should I do?
Liron Oct '14 Guido
Hi, I'm sorry to hear that, well if you're Ubuntu doesn't boot because of the herein modifications, the first I would do would be to remove the config files created: When you boot to Ubuntu and reach the login screen, press Ctrl + Alt + F1 or F2 this should take you to a different run level (you'll see a terminal like screen), enter "root" for login and then your password. Now, if you wish to remove the config files entirely - use one of the following commands (depends where the config files are stored): rm /etc/profile.d/ rm /etc/X11/xorg.conf rm /etc/X11/xorg.conf.d/nvidia.conf when you're done type reboot and enter to reboot. If you don't wish to remove the config files completely but to edit them, use nano to do so: again, when you're inside the the Terminal-like screen, replace the "rm" in above commands with "nano" like so - nano /etc/X11/xorg.conf edit the file the way you need, press *Ctrl + X > y > enter* to save and exit. Hopes this helps...
Guido Oct '14 Liron
Great, thanks man, I'll try that tonight and let you know if someone had the same problem
Guido Oct '14 Liron
After deleting worked like a charm :) Thanks for the help man!
Liron Oct '14 Guido
Great! thanks for letting anyone who visits this page know...
delawyn Sep '14
This worked great on Fedora 20, thank you!
Liron Sep '14 delawyn
Happy to hear that, you welcome ;)