To get rid of tearing with Nvidia GPU it is simple and doesn’t require all of that, first disable all the vsync/anti-tearing features from the OS:
then use the official Nvidia Settings Panel to select your resolution and refresh rate properly (do not let Auto, manually override with the proper values) in the Advanced mode of the Nvidia drivers, and make sure to enable Full Composition Pipeline.
After applying settings properly make sure to start the nvidia-settings panel again with sudo privileges to save the settings to the nvidia.conf file, in terminal type sudo nvidia-settings
.
Review the settings make sure it is as expected, and click the Save to X Configuration File button, browse to the proper configuration file at /etc/X11/mhwd.d/nvidia.conf
and save.
NOW REBOOT. This is important as Full Composition Pipeline doesn’t work properly when enabled/disabled on the fly. It will work properly after reboot.
Test the tearing in games, movies, or most obvious to me in long web pages by scrolling down. Without Full Composition Pipeline long web pages would have horrible tearing while scrolling in them (and you can easily increase or decrease scrolling speed to amplify or diminish the tearing).
This is as simple as that, no need to do anything else.