NVIDIA Linux Video Game Tearing Fix

Today’s quick tip should help you to deal with a common NVIDIA video issue that plagues many of us. Some things to consider before going forward include:

1) You’re using X11 and NOT Wayland.

2) This addresses horizontal video game tearing that affects many Linux gamers using NVIDIA cards with the current proprietary video drivers.

3) This assumes you have used sudo nvidia-settings to create and save your own xorg.conf file. Doing this will allow you to make proposed changes (to be mentioned shortly) a permanent part of your video card configuration.

The first step is to see if my suggested tweak will work for you. Do this by pasting this into a terminal window.

nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceCompositionPipeline = On }"

What this does is set up a single monitor to use the Composition Pipeline option. You’ll notice that we didn’t use sudo. The reason why is because we’re merely testing this for errors at the user level. If the screen flickers, you start a game and tearing is fixed – then we can make this permanent.

If the game you’re testing shows no signs of horizontal tearing, then it sounds like this fix has worked for you. Now let’s make the changes permanent. You’ll need to run this from a terminal.

sudo nvidia-settings
  • Once the application opens, click on Xserver Display Configuration.
  • Advanced button at the bottom. Verify that Force Composition Pipeline is checked.
  • Click Save to Configuration File. Browse to /etc/X11/ and save the file as xorg.conf
  • Save to X Configuration File, then Quit.

If a xorg.conf file already exists, I recommend backing it up before overwriting it.

Reboot to make sure the settings are good. It’s also worthwhile to paste this in a terminal before rebooting to verify the settings stuck to the xorg.conf file.

cat /etc/X11/xorg.conf

If you see something similar to this in the Section “Screen” area, you’re all set:

Option "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On}"

The nvidia-auto-select section may be different. However if the CompositionPipeline section is the same as above, you’re good to go.

Other tweaks and considerations

If you’re still seeing tearing, odds are good you’re using GNOME, KDE or something similar. Try installing XFCE, LXDE, or MATE. I run all my gaming on a MATE desktop and this tweak works great.

Remember – you’re making tweaks to your display server. So it’s your responsibility to backup your configuration before making permanent changes. That said, if you use the userland test mentioned above, you will be able to test this without screwing up anything. Just reboot and everything is reset to normal. The key is to only use the sudo nvidia-settings after a successful tweak test. Good luck!

Also check out...

Matt Hartley
Founder at Freedom Penguin
Freedom Penguin’s founder & talking head – Matt has over a decade working with Linux desktops, his operating system experience consists of both Windows and Linux operating platforms. In addition to writing articles on Linux and open source technology for Datamation.com and OpenLogic.com/wazi, Matt also once served as a co-host for a popular Linux-centric podcast.

Matt has written about various software titles, such as Moodle, Joomla, WordPress, openCRX, Alfresco, Liferay and more. He also has additional Linux experience working with Debian based distributions, openSUSE, CentOS, and Arch Linux.

Leave a Reply

2 Comments on "NVIDIA Linux Video Game Tearing Fix"

Notify of
Sort by:   newest | oldest | most voted
disqus_LgNNUTeEZu
Member

Thank you SO much! I have had a tearing problem for a while, though not during video games, just ordinary scrolling. This fixed it!

However I was not able to do the nvidia-settings step since “Force Composition Pipeline” did not appear anywhere on that screen (maybe because I am running an older version, 340). I’m hoping editing the config directly will do the trick. If not then I will just do that “userland test” upon startup.

Matt Hartley
Member

After backing up your xorg.conf (in case this goes south on ya), try this in the section marked in my example. http://pastebin.com/dqvQCRDB

Note, this goes in Section “Screen” area. 😉

wpDiscuz