How do I remove screen tearing in 16.04 with nvidia GTX 960 M?

Solution 1:

Easy fix I found on /g/. Add this command to your startup commands

nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"

Of course this works if you're using Nvidia drivers.

EDIT: So for multimonitor setups I would suggest using the Nvidia X server settings program, go to X Server Display Configuration and use Save to X configuration file. Now seek out /etc/X11/xorg.conf and add { ForceCompositionPipeline = On} after each monitor setting (the +0+0 and +something+someting)

Additionally you can do sudo apt install compton and add compton to your startup commands.

EDIT: I don't know how long this has been the case but the NVIDIA X Server Settings program nvidia-settings has an option to do ForceFullCompositionPipeline graphically. In the 'X Server Display Configuration' menu click on 'Advanced...', tick 'Force Full Composition Pipeline' and hit 'Save to X Configuration File'. If you have no predefined path to the configuration file, type /etc/X11/xorg.conf to the file path text box and save.

Solution 2:

The only solution I've tried so far that's done anything isn't great, but it's something: Use the Intel GPU instead of Nvidia GPU. It reduces most screen tearing.

In Nvidia X Server settings (nvidia-settings) go to PRIME Profiles and select Intel (Power Saving Mode). Alternatively sudo prime-select intel.

I'm using nvidia-370, which is the current official release, with Nvidia 940MX. It seems like ironically their driver is still worse than Intel drivers. On the bright side, my battery life nearly doubled, so it was a pretty good trade off.

Update: Using the default Intel drivers for kernel 4.7.0, there are no screen tearing issues at all. nvidia-387 with nomodeset in grub seems to be fine but brightness changing is disabled, so I'm not using it for now.

Solution 3:

This comes a little bit late, but I would honestly suggest you to switch to XFCE4 or similar non-compositing DE. At least in my case (Lenovo Y580, opensuseLeap 42.1 + bumblebee), this how I got rid of screen tearing and slow scrolling in firefox. Cheers!!!!

Solution 4:

I've had this problem for ages, now I just have the nouveau driver installed. Try the solution from this post, I'd be interested to know if it works: http://ubuntuforums.org/showthread.php?t=2235382

Also this maybe? But it didn't work for me... https://psyq123.wordpress.com/2015/09/20/another-way-to-fix-tearing-and-vsync-issues-using-the-nvidia-driver/

Ok, took some doing, but I fixed it as follows:

Open a CLI and do:

sudo nvidia-xconfig

Then:

sudo nvidia-settings

Set your screen resolution and refresh rate in the Xserver settings (I set mine to 1920x1200 @60hz) and save it to xorg.conf

Then do:

sudo nano /etc/X11/xorg.conf

Edit the device section thusly:

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 650"
Option "RegistryDwords" "PerfLevelSrc=0x2222"
Option "TripleBuffer" "True"
EndSection

This sets the card to performance mode and enables triple buffering.

In nvidia-settings/OpenGL set:

Sync to Vblank
Allow Flipping
Use Conformant Texture Clamping

Save your configuration and restart the X-server.