You can sign up to get a daily email of our articles, see the Mailing List page!
Support me on Patreon to keep GamingOnLinux alive. Funding me on Patreon allows us to have no adverts, no paywalls, no timed articles. Just good content for you to keep up with Linux gaming. Alternatively, you can support me on Paypal.

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

Posted by , 11 January 2017 at 3:57 pm UTC / 27010 views
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.
8 Likes, Who?
Comments
Page: 1/7»
  Go to:

Corben 11 January 2017 at 4:05 pm UTC
For reverting the resolution, after a game didn't set it back, I used so far:
xrandr --output DP0 --mode 1920x1080
Have to check if this affects tearing, if the corresponding settings are saved in the xorg.conf file.
fabry92 11 January 2017 at 4:34 pm UTC
i need to set every reboot 144 Hz... Btw "force full composition" disable gsync. I use it only for vulkan games beacuse gsync on vulkan it's not supported at moment


Last edited by fabry92 at 11 January 2017 at 4:36 pm UTC
MayeulC 11 January 2017 at 4:38 pm UTC
Hopefully nVidia users will be able to use Wayland soon too
Twomby 11 January 2017 at 4:49 pm UTC
Weird. I've been having screen tearing issues for a while, but when I launch the NVIDIA X Server Settings application under Linux Mint 18.1, what I get is a different screen from you. I don't know how to resolve this issue, as I'd really like to get rid of tearing, especially on my external monitor. Video Playback on my BenQ external monitor is pretty bad.

image

Anyone has a clue? Would be much grateful for some help


Last edited by Twomby at 11 January 2017 at 4:51 pm UTC
liamdawe 11 January 2017 at 4:52 pm UTC
@Twomby, you likely need to update your driver.
Also, as stated, click Advanced.


Last edited by liamdawe at 11 January 2017 at 4:52 pm UTC
Twomby 11 January 2017 at 4:55 pm UTC
liamdawe@Twomby, you likely need to update your driver.
Also, as stated, click Advanced.

Whether I click Basic or Advanced, I get the same screen.

image
Should have posted a screengrab with Advanced settings to avoid confusion. My NVIDIA drivers are the latest version (375.10 BETA).


Last edited by Twomby at 11 January 2017 at 5:01 pm UTC
tuubi 11 January 2017 at 5:00 pm UTC
View PC info
  • Supporter
Hmm... I wonder why I've had no need for this stuff on at least three generations of Nvidia cards. Maybe it's down to my choice of compositor? I remember having trouble with video tearing at some point, but that was before VDPAU support in players.


EDIT:

Twomby
liamdawe@Twomby, you likely need to update your driver.
Also, as stated, click Advanced.

Whether I click Basic or Advanced, I get the same screen. Should have posted a screengrab with Advanced settings to avoid confusion. My NVIDIA drivers are the latest version (375.10 BETA).

Did you update nvidia-settings as well? Also, the latest version is 375.26, right?


Last edited by tuubi at 11 January 2017 at 5:02 pm UTC
liamdawe 11 January 2017 at 5:01 pm UTC
Twomby
liamdawe@Twomby, you likely need to update your driver.
Also, as stated, click Advanced.

Whether I click Basic or Advanced, I get the same screen. Should have posted a screengrab with Advanced settings to avoid confusion. My NVIDIA drivers are the latest version (375.10 BETA).
Try the 375.26 driver.
Solar 11 January 2017 at 5:06 pm UTC
I haven't had any tearing with Ubuntu or ROSA8 with the 375.26 driver.
I was under the impression they fixed it a long time ago.

Oh well, now it's easy mode for those who still suffer.


On a side note, these are the type of fixes that will appeal to curious Windows users, easy modes. And thus, will appeal to devs as it's less work for them in the long run.
Well done Nvidia.


Last edited by Solar at 11 January 2017 at 5:08 pm UTC
Twomby 11 January 2017 at 5:08 pm UTC
Liamdawe, Tuubi, you are absolutely right. Somehow I ended up on the BETA drivers page, and wasn't aware there was a new stable release. Will install and report back. Thanks guys! (I must admit I feel a little bit stupid at the moment.)


Last edited by Twomby at 11 January 2017 at 5:09 pm UTC
  Go to:
While you're here, please consider supporting GamingOnLinux on Patreon. We have no adverts, no paywalls, no timed exclusive articles. Just good, fresh content. Without your continued support, we simply could not continue!

We also accept Paypal donations! If you already are, thank you!

Due to spam you need to Register and Login to comment.


Or login with...

Livestreams & Videos
Popular this week
View by Category
Contact
Latest Forum Posts
Facebook