Screen Tearing In Ubuntu With NVIDIA
Screen tearing on some systems has been a common problem for users with Ubuntu based distros and running NVIDIA cards, I've never experienced it on any of my laptops (even though NVIDIA Optimus is another problem...), but I seem to be getting it quite frequently on stationary computers, especially with high-res screens.
No need to worry though, the solution is quite simple and as far as I can tell after some testing in games - the response times are next to not affected at all by the fix.
- Open the NVIDIA X server settings control panel
- Go to X Server Display Configuration
- At the bottom, click on the Advanced button
- Enable Force Full Composition Pipeline
Optionally to have the settings stored, save to X Configuration File.
And that should do it, after enabling this the screen tearing i had (very occasionally) in Ubuntu and in (very often) games disappeared. To explain what the 'Force Full Composition Pipeline' does, here is a quote for the NVIDIA forums:
The difference is scaling between ViewPortIn and ViewPortOut. If the display hardware can do the scaling, then the driver will use it even if ForceCompositionPipeline is enabled. However, ForceFullCompositionPipeline will disable the display scaling and use the GPU's shaders to do the scaling instead.
There's no difference if there's no scaling.
There will be somewhat of an impact to power draw and performance, but it's hard to quantify and depends heavily on your scaling configuration.
Good luck and hope it solves any screen tearing issues you may have!