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.
Related videos on Youtube
Gilly
Updated on September 18, 2022Comments
-
Gilly almost 2 years
My 16.04 installation suffers from quite bad screen tearing. If I drag a window, for example, sideways across the screen, it fragments so that the bottom of it is quite a bit behind the top, and when watching a video, the bottom of the screen is a few frames behind the top.
I've tried the solutions given in the following questions, but neither has helped, unfortunately:
My graphics card is an Nvidia GeForce GTX 960M, I am using
NVIDIA binary driver - version 361.42 from nvidia-361
.This problem was also present when I was running 15.10.
-
Riki137 about 8 yearsliterally nothing seems to work to fix this. Only switching to intel graphics, which sucks.
-
user3728501 about 8 years@Riki137 How does one switch back to intel graphics?
-
doug over 7 yearsWhat happened 15.10/16.04 to prevent local edits working anymore was due to a supposed mesa bug. The so called fix was to go to modesetting for Intel while using the nvidia drivers via nvidia-prime. The tearfree option cannot work with modesetting & one is prevented from switching to sna. It is possible to get around this by modifying ubuntu-drivers-common & altering the time to sleep for unity greeter to work around the mesa bug. But will not post as an answer here as not 100% clean solution. (may have a post in UF) There is a fix in xserver, could show up next year in Ubuntu. (or use 14.04
-
Garrett about 7 yearsI also had this problem with Nvidia Quadro M1200, even after updating the driver (to version 381.09), which was only solved by switching to the Intel GPU as in @qwr's answer below.
-
-
Gilly about 8 yearsI couldn't find an option to change the refresh rate within nvidia settings, and neither could I find the option to set Sync to Vblank, Allow Flipping or Use Conformant Texture Clamping. Changing my xorg.conf didn't help, perhaps because I have more than one
Device
section. Thanks for the reply though! -
draoi about 8 yearsReally frustrating problem... more on it here: youtube.com/watch?v=-55y5sgHcbo (also doesn't work for me)
-
user3728501 about 8 yearsWhere is the "Vblank Allow Flipping Use Conformant Texture Clamping"?
-
draoi almost 8 yearsI don't know, looks like if that option ever existed it's gone. At least from the nvidia driver that installs through the driver manager. Maybe you could try installing the nvidia driver from the nvidia website, but you run the risk of hosing your system.
-
mook765 over 7 yearsShipping around a problem and solving a problem are different things. but it is nice that you share your experience here. Welcome to AskUbuntu!
-
Gilly over 7 yearsThanks for the suggestion - even XFCE couldn't solve my screen tearing woes. I think my laptop might just be cursed. Hope this workaround can help someone else though.
-
Jaroslav Záruba over 7 yearsIsn't it a bad practice to run graphical applications with sudo? Isn't gksudo the proper way?
-
nana over 7 yearsThanks, this worked but it also turned one of my monitors black..
-
nana over 7 years...So if that happens just go ahead and enable that display in Displays again.
-
Garrett about 7 yearsWhat do you mean by
/g/
? -
Garrett about 7 yearsFor other noobs out there, keep in mind you can test this in your terminal to see if it works (before adding it to your startup script and re-logging in). Unfortunately, this didn't work for me (Nvidia Quadro M1200, nVidia version 381.09).
-
dat tutbrus almost 7 yearsAlso didn't work for me. Running GF940M. Seems like M chips or computers with enabled integrated graphics can't do this.
-
Managor over 6 years@Garrett that's /g/ board on 4chan