Getting rid of screen tearing in Firefox (or other applications)

January 6, 2020 - Reading time: 2 minutes

Screen tearing has been an issue since day one, I eventually managed to figure it out, but I recently got again the problems I had before, I forgot that I removed, tried things, and reinstalled NVidia drivers and tools, and this probably why my previous configuration wasn't there anymore.

Here is a reminder in case I have to spend another whole night wondering what I messed in the system.

First I disable the compositor built-in Vsync:

Then I properly configure my screen with nvidia-settings by clicking "Advanced..." to have all settings available:

The important setting is the Force Full Composition Pipeline, but other important settings are my screen resolution and refresh rate (here it shows "60Hz (2)" but this second refresh rate is 59.95Hz which is the right one for my monitor (at least this is the refresh rate that definitely gives best results, the "60Hz (1)" is 59.88Hz for information, the nvidia driver rounds them both to 60Hz as do the system screen configuration).

To make the setting persistent across reboots, it is important to not forget to save the settings by running again the same tool with sudo.

sudo nvidia-settings

Then just click on "Save to X Configuration File", BROWSE TO THE ACTUAL USED X CONFIGURATION FILE, in my case it is /etc/X11/mhwd.d/nvidia.conf, untick the "Merge with existing file" box to discard previous configuration file and create a new one, and eventually click the Save button.