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](https://www.gamingonlinux.com/uploads/articles/article_media/14841498571.jpg)
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:
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.
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](https://www.gamingonlinux.com/uploads/articles/article_media/14841498571.jpg)
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.
Some you may have missed, popular articles from the last month:
libstrangle seems really great, thank you!
0 Likes
I am on 367.45 driver on my main gaming rig. I've had no visual tearing but this is due to using Compton on Ubuntu Mate 16.10 64 bit with some startup settings enabled.
0 Likes
Quoting: fabry92i 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
I used to have to set my refresh rate to 144hz on every reboot, until I found out that you have to hit APPLY in the "Display" program on ubuntu after applying it in the nvidia settings. Mint may have a similar method?
1 Likes, Who?
Quoting: tuubiI am using SMPlayer (mpv backend).Quoting: monnefThe tearing is very visible when watching full hd video. Sadly it is working fine in Windows 10 (dual boot), so it shouldn't be a hw issue.Which player? Use something that supports VPDAU, like mpv or Kodi. Or are you talking about Flash video on the web?
EDIT: Sorry, just noticed your earlier message. I remember having trouble with video tearing as well back before I started using Compton.
With those 6 env. variables mentioned in previous post I got very bad fps drops when using vdpau, nothing changed in opengl mode.
I tried several different combinations of env. variables, smplayer settings and nvidia settings. I found a working combo - NO special env. variable (that was probably breaking it for me earlier, namely __GL_YIELD and __GL_THREADED_OPTIMIZATIONS), in nvidia settings only check "force full composition pipeline" on a "tv" monitor (and save the config, in my case [kubuntu] to /usr/share/X11/xorg.conf.d) and in SMPlayer use opengl or vdpau output driver. Yey, finally got smooth video playback :D.
0 Likes
Quoting: warrengbrnQuoting: fabry92i 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
I used to have to set my refresh rate to 144hz on every reboot, until I found out that you have to hit APPLY in the "Display" program on ubuntu after applying it in the nvidia settings. Mint may have a similar method?
THANK YOU!! FINALLY I FIXED IT T_T
0 Likes
This worked perfectly, although I didn't have nearly the amount of advanced options you did. I just generated the .conf file, edited it as per your instructions, and that was it. It's the first time I've experienced no screen-tearing on Linux. Though when I started up my PC the next day, I couldn't get past grub. I had to use a different virtual terminal to delete the .conf file and it booted again.
0 Likes
liamdawe...if you're able to make it to E3 this year,I owe you a high five for this!
0 Likes
Quoting: Gutterdrumsliamdawe...if you're able to make it to E3 this year,I owe you a high five for this!Hah I wish I was, far too poor for that!
1 Likes, Who?
Hmm. I just built a side rig and installed 375.66 for and Nvidia GTX 960 on Ubuntu Mate and I do not see the same settings. I still have to use a script to remove the tearing @ startup.
0 Likes
See more from me