Nvidia and tearing


I’ve had tearing off and on for years with various video cards. Sometimes, I’ve found a solution that made the problem go away for a while, and sometimes I’ve been stuck with it for a while. It seems to depend on the exact combination of video card and drivers and doesn’t always stay fixed when it’s fixed. That’s why I specifically bought one of the GeForce GTX 10xx series the last time I had to buy a new video card, because I’d read that they’d done something in its design that made tearing never happen - but either I misunderstood, that was a lie, or it only applied to Windows or something, because I definitely get tearing - and it only got worse when I recently upgraded from dual 1920x1200 monitors to dual 2560x1600 monitors. So, I went digging around again online for ways to fix it, and the solution that seems to pop up the most right now is to put

Option     "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"

in your xorg.conf, which I tried, but that just resulted in the system not using my second monitor, which was obviously unacceptable. So, I went digging around some more, and failed to find anything particularly useful. However, it finally occurred to me that the problem with that xorg configuration is that it’s specifically saying what to do with the first monitor but doesn’t say anything about the second. I’ve occasionally seen xorg stuff use the +0+0 syntax for one monitor and +1920+0 for the other. And I was able to figure out that if I did this instead

Option     "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}, nvidia-auto-select +2560+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"

I then got those settings enable for both monitors, and the result does seem to have gotten rid of the tearing, which was a great relief, because I was getting really sick of having videos I was watching marred by it.

So, I’m creating this post in case anyone else is having similar problems and needs a possible solution - especially if dual monitors are involved, since other places online that talk about this solution always seem to assume that you have one monitor. Note that in my case, it has +2560+0 for the second monitor, because my monitors are 2560x1600. So, if you have a dual monitor setup with a different resolution, you’ll need to adjust that number accordingly - and if you have only a single monitor, then the first xorg settings that I posted should work. Of course, whether this will actually fix the tearing or your system, I don’t know, since that seems to vary from system to system depending on the video card and the exact driver version, but it’s a good place to start.


Just to make clear, this Option line goes in the “Device” section where the Driver line says nvidia, correct?


No, it goes in the “Screen” section. I don’t know if it’s even legal to put Option lines in the “Device” section. I think that the “Screen” section is the only place that I’ve ever seen them.


Interesting. Man pages for a lot of drivers have Options for them that go in the Device section. Thanks for the info.


Turns out if you run nvidia-settings, select “X server display configuration”, then “advanced” it will show these options. There is a “save to X configuration file” button that will update your xorg.conf; you may need to sudo or run nvidia-settings as root.
Other settings wind up in $HOME/.nvidia-settings-rc that can be loaded when you log in. If you are using pcdm or another graphical login manager, you may need to put things at a system level or create an autostart for your session that does nvidia-settings --load-config-only for your user.