Don't want to see articles from a certain category? When logged in, go to your User Settings and adjust your feed in the Content Preferences section where you can block tags!
We do often include affiliate links to earn us some pennies. See more here.

How To: An update on fixing screen-tearing on Linux with an NVIDIA GPU

By - | Views: 135,712
My original guide on how to help fix screen-tearing on Linux with an NVIDIA GPU is a bit dated, so here’s an even easier way.

Notes
You will likely need the 375.26 driver or newer for this to show up in "nvidia-settings".

These options may cause a loss in performance. For me personally, the loss is next to nothing.

It probably won't work with Optimus right now, but this may be fixed in future.

What to do
Previously you needed to edit config files, and it was a little messy. Thankfully, NVIDIA added options in nvidia-settings to essentially do it all for you. The options were added in a more recent NVIDIA driver version, so be sure you're up to date.

Load "nvidia-settings" and you will need to go to this screen and then hit “Advanced” at the bottom (my screenshot doesn't have the button, as this is what you see after you hit it):
image
Tick the boxes for “Force Composition Pipeline” and “Force Full Composition Pipeline” and then hit "Apply".

You can then enjoy a tear-free experience on Linux with an NVIDIA GPU. It really is that damn easy now.

Note: You will likely need to run nvidia-settings with “sudo” for the below to work.
If you want this applied all the time on startup (without needing to do anything), you can hit “Save to X Configuration File”. I have mine located at “/etc/X11/xorg.conf.d/xorg.conf” on Antergos, but your location may be different. I also recommend backing any existing xorg.conf file up if one exists.

This step isn't needed, but it's a fun and useful extra!
I also have mine set to a script and then to a keyboard shortcut, for those times when a game reverts the desktop to a low resolution after exiting, or when a game turns off a second monitor, this will turn it back on.

For that I manually set the resolution like so:
nvidia-settings --assign CurrentMetaMode="DVI-I-1:1920x1080_60 +0+0 { ForceFullCompositionPipeline = On }, HDMI-0:1920x1080_60 +1920+0 { ForceFullCompositionPipeline = On }"
Edit that for your details, like your resolution and monitor connections (you can see them by running "xrandr --query" in terminal), and then save it as an easy to remember filename. You can then set it as a custom shortcut, I use “CTRL+ALT+F4” as it’s not used for anything else.

This has been tested and works for me perfectly across Ubuntu Unity, Ubuntu MATE and Antergos KDE. Article taken from GamingOnLinux.com.
Tags: HOWTO, NVIDIA
11 Likes
About the author -
author picture
I am the owner of GamingOnLinux. After discovering Linux back in the days of Mandrake in 2003, I constantly came back to check on the progress of Linux until Ubuntu appeared on the scene and it helped me to really love it. You can reach me easily by emailing GamingOnLinux directly. Find me on Mastodon.
See more from me
The comments on this article are closed.
59 comments
Page: «3/6»
  Go to:

rea987 Jan 11, 2017
Quoting: TwombyWasn't able to upgrade to latest version. Got a bunch of issues with the installer under Mint 18.1. Reverted back to 367.57 for the time being, but will definitely try again when I have more time on my hands. Thanks for this article and for the support provided by commenters!

You most probably have Nvidia/Intel hybrid laptop just like me. I am having the same "x screen 0 (no scanout)" screen name with GeForce 940M on Ubuntu 16.04 based Mint 18.1 for no reason. I can even use my Philips 32" TV as a HDMI output via system's default "mate-display-properties" while using proprietary Nvidia drivers. I have Nvidia driver 375.26 installed via "Proprietary GPU Drivers : “Graphics Drivers” team" PPA. I even tried several lower version drivers; no go... I will try Ubuntu Mate 16.10 soon, but I do not expect any difference; cause the problem exists also in Mint 17.3...
natewardawg Jan 11, 2017
Thanks, this has been something really annoying to me for a while now :)
tuubi Jan 11, 2017
View PC info
  • Supporter
Quoting: GuestFor those who don’t know already, you can also use Compton to disable tearing, which may work with more than just the nvidia drivers:
compton --vsync opengl-swc --backend glx
Compton seems to be a popular choice for Xfce users like us, and for me it works pretty much perfectly, but looking at this I think the optimal settings might be different for different graphics hardware. In fact the guide suggests that it might be better to use VSync options provided by the driver over Compton's own, if available.

The new Mint 18.1 Xfce actually includes a setting to use Compton as the compositor instead of Xfwm's own, making the switch as easy as clicking a checkbox, but I haven't looked at their default Compton config.

BTW: Compton's VSync guide also has this to say about NVidia's ForceFullCompositionPipeline option:
QuoteHowever it’s indicated that it introduces huge (~30%) performance loss on some OpenGL applications.
I guess this info could be old and obsolete though?
knotted10 Jan 11, 2017
Quoting: rea987
Quoting: TwombyWasn't able to upgrade to latest version. Got a bunch of issues with the installer under Mint 18.1. Reverted back to 367.57 for the time being, but will definitely try again when I have more time on my hands. Thanks for this article and for the support provided by commenters!

You most probably have Nvidia/Intel hybrid laptop just like me. I am having the same "x screen 0 (no scanout)" screen name with GeForce 940M on Ubuntu 16.04 based Mint 18.1 for no reason. I can even use my Philips 32" TV as a HDMI output via system's default "mate-display-properties" while using proprietary Nvidia drivers. I have Nvidia driver 375.26 installed via "Proprietary GPU Drivers : “Graphics Drivers” team" PPA. I even tried several lower version drivers; no go... I will try Ubuntu Mate 16.10 soon, but I do not expect any difference; cause the problem exists also in Mint 17.3...

I've made a research about this issue, it will be fixed on the release for xorg server 1.19, having kernel 4.5+ and latests would fix every screentearing issue for optimus laptops :D
I'm actually waiting for the moment that the arch linux release that xorg version to the stable repos and i'll switch to manjaro right away
Guys who have laptops with two graphics cards: don't waste your time reinstalling drivers. As for now, Nvidia isn't really bothering with optimizing drivers for laptops. Editing xorg.conf seems like the only way to go for us; but I don't know if it would work.
Edit: Read the comment about x.org 1.19. Really hope it would fix the issue.


Last edited by iplaygameswearingatux on 11 January 2017 at 8:43 pm UTC
rea987 Jan 11, 2017
Quoting: knotted10I've made a research about this issue, it will be fixed on the release for xorg server 1.19, having kernel 4.5+ and latests would fix every screentearing issue for optimus laptops :D
I'm actually waiting for the moment that the arch linux release that xorg version to the stable repos and i'll switch to manjaro right away

That's interesting. Cause, Linux Mint will stick with kernel 4.4 for 2 years until the next LTS of Ubuntu released. Of course it will be possible to install backports but it still will be a hassle for end users.

Quoting: iplaygameswearingatuxGuys who have laptops with two graphics cards: don't waste your time reinstalling drivers. As for now, Nvidia isn't really bothering with optimizing drivers for laptops. Editing xorg.conf seems like the only way to go for us; but I don't know if it would work.

Yeah, I figured that out long time ago. But finding a magical xorg.conf for the exact hardware is quite hard...
Liam Dawe Jan 11, 2017
Quoting: knotted10Not working on my optimus laptop, I have the same problem @Twomby has, even with the latest drivers (375.26)

I think that I'll need to wait until xorg server 1.19 comes out to stop seeing the damn annoying screen tearing
I don't think this works om Optimus chips.

Quoting: tuubiBTW: Compton's VSync guide also has this to say about NVidia's ForceFullCompositionPipeline option:
QuoteHowever it’s indicated that it introduces huge (~30%) performance loss on some OpenGL applications.
I guess this info could be old and obsolete though?
That's very outdated information, my own tests have shown it to be a 2-3FPS difference, so that can be written off for benchmark differences each time you run it. Old cards may have more of an impact, but it hasn't been a problem for quite some time.
tuubi Jan 11, 2017
View PC info
  • Supporter
Quoting: rea987Cause, Linux Mint will stick with kernel 4.4 for 2 years until the next LTS of Ubuntu released. Of course it will be possible to install backports but it still will be a hassle for end users.
No need for backports. 4.8 is available in the official repositories, and can be installed using Mint's kernels dialog. It only takes a few clicks.


Quoting: liamdawe
Quoting: tuubiBTW: Compton's VSync guide also has this to say about NVidia's ForceFullCompositionPipeline option:
QuoteHowever it’s indicated that it introduces huge (~30%) performance loss on some OpenGL applications.
I guess this info could be old and obsolete though?
That's very outdated information, my own tests have shown it to be a 2-3FPS difference, so that can be written off for benchmark differences each time you run it. Old cards may have more of an impact, but it hasn't been a problem for quite some time.
Good to hear.
knotted10 Jan 11, 2017
Quoting: rea987
Quoting: knotted10I've made a research about this issue, it will be fixed on the release for xorg server 1.19, having kernel 4.5+ and latests would fix every screentearing issue for optimus laptops :D
I'm actually waiting for the moment that the arch linux release that xorg version to the stable repos and i'll switch to manjaro right away

That's interesting. Cause, Linux Mint will stick with kernel 4.4 for 2 years until the next LTS of Ubuntu released. Of course it will be possible to install backports but it still will be a hassle for end users.

Quoting: iplaygameswearingatuxGuys who have laptops with two graphics cards: don't waste your time reinstalling drivers. As for now, Nvidia isn't really bothering with optimizing drivers for laptops. Editing xorg.conf seems like the only way to go for us; but I don't know if it would work.

Yeah, I figured that out long time ago. But finding a magical xorg.conf for the exact hardware is quite hard...

for me was pretty straight forward: open update manager --> view --> linux kernels --> selected 4.5
yzmo Jan 11, 2017
Somehow none of those checkboxes show up for me... :(
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
The comments on this article are closed.