Patreon Logo Support us on Patreon to keep GamingOnLinux alive. This ensures all of our main content remains free for everyone. Just good, fresh content! Alternatively, you can donate through PayPal Logo PayPal. You can also buy games using our partner links for GOG and Humble Store.
Title: Screen tearing
Liam Dawe 26 Apr 2016
I seem to get rather a lot of screen tearing on Ubuntu/Unity with my Nvidia card.

I always use ForceFullCompositionPipeline which seems to bugger all.

What are you guys using to reduce it?

Edit: For those wondering, I solved it: https://www.gamingonlinux.com/articles/i-have-finally-found-a-way-to-sort-out-screen-tearing-on-nvidia-with-linux.7213
tuubi 26 Apr 2016
User Avatar
Is it just the desktop or full screen games as well? Does enabling triple buffering in nvidia-settings help?
Liam Dawe 26 Apr 2016
Where do you enable that exactly?
kDomb 11 years 26 Apr 2016
there is no triple buffering option in nvidia-settings!?
just generate a xorg.conf file:
nvidia-xconfig
and in the Screen section add:
Option "TripleBuffer" "1"

example:
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
Option "TripleBuffer" "1"
EndSection

you can also remove ForceFullCompositionPipeline
works for me with kwin
tuubi 26 Apr 2016
User Avatar
My bad. I didn't remember you had to set it in xorg.conf. Sorry, should have checked. It's been a while since I needed that particular option.
Liam Dawe 26 Apr 2016
Further info:

It seems the tearing only happens on my 4K screen and not my 1080p screen.
Shmerl 26 Apr 2016
For Unity games I simply use KWin compositing, since I'm using KDE in general (not switching it off for fullscreen windows). It works very well to prevent tearing.

Triple buffering is enabled for me, but it doesn't help on its own.
Liam Dawe 26 Apr 2016
Seems it's fine in Cinnamon, so I will stick with it.
Xpander 26 Apr 2016
triplebuffer option is bad when you want to record gameplay's. even with nvenc it kills perf on some games and quite a lot. + causes all sorts of weird framerate issues. Not Every game is affected by it though.

ForceCompositionPipline fixes everything for me.. but i have no idea about 4K resolution.. might be broken there?
BlackBloodRum 26 Apr 2016
I use Compton compositor. Tbh, I've not had screen tearing in a long time on XFCE with Compton, even in games I just disable vsync in games as the compositor handles it just fine.

My massive compton start command:
compton --vsync opengl-swc --paint-on-overlay --backend glx --glx-no-stencil -c
Xpander 27 Apr 2016
compton is all good but makes the windows move slower and takes a bit perf hit.
also recording will be pain with compton. there will be screen tearing on the video
tuubi 27 Apr 2016
User Avatar
Quoting: Xpandercompton is all good but makes the windows move slower and takes a bit perf hit.
also recording will be pain with compton. there will be screen tearing on the video
Try compton's xr-glx-hybrid backend. Might require a recent git snapshot of compton, I'm not sure. Makes the desktop very snappy. That's what I do on my work computer. I'm happily using the glx backend on my gaming box though, as window move performance is hardly a priority. Compton has no effect on fullscreen gaming or video as far as I can see. I haven't tried recording on either, but that's where tweaking compton's vsync method might help.
Liam Dawe 12 May 2016
So, I have basically solved it using two scripts.

Thanks to this tweet: https://twitter.com/HeavyHDx/status/730818366148071424

Essentially I now have a shortcut assigned for two scripts, one to set ForceFullCompositionPipeline on at 4K resolution and one to set ForceFullCompositionPipeline on at 1080p resolution.

It seems when games change the monitor resolution instead of stretching a fullscreen window (hello Stellaris), the ForceFullCompositionPipeline option is actually reset.

Why am I doing some games at 1080p? Performance, text being too small etc.

So I am just doing this:
nvidia-settings --assign CurrentMetaMode="DP-4:3840x2160_60 +0+0 { ForceFullCompositionPipeline = On }, DVI-I-1:1920x1080_60 +3840+0 { ForceFullCompositionPipeline = On }"

And this:
nvidia-settings --assign CurrentMetaMode="DP-4:1920x1080_60 +0+0 { ForceFullCompositionPipeline = On }, DVI-I-1:1920x1080_60 +1920+0 { ForceFullCompositionPipeline = On }"
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon Logo Patreon. Plain Donations: PayPal Logo 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!
Login / Register