I have terrible screen tearing, and I don't know how to go about trouble shooting it. I would LOVE to switch to Ubuntu completely, but with this tearing, it's just too irritating. It's only present on Ubuntu based distros, (including element OS). On Manjaro (Arch fork), it does not suffer from tearing.
PC Configuration: Motherboard: Aorus Pro Wifi z390 CPU: Intel i7 9700k RAM: 32GB GPU: Nvidia 1060 6GB DisplayPort output connects to monitor's HDMI
Monitor reported refresh rate 75hz, Ubuntu monitor settings reported refresh rate 74.97 (can change to 60hz, doesn't help).
As discussed in the comment, I post the answer.
To solve the tearing problem, add this following command to be run at startup:
nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
To do so, you can search for 'Startup Applications Preferences' and add the command to startup commands by pressing the Add button, pasting the command in the Command field (you can add the name you want in the Name section) then press Add.
Or you can add that command to your Crontab by:
crontab -e
on the terminal.@reboot nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
In order to make the changes effective, you should reboot your computer (for both methods).
If the tearing problem still persists even after applying the steps above, please do the following:
sudo apt install compton compton-conf
compton
to be run at startup following one of the methods already described.If it the screen is still tearing:
touch ~/.config/compton.conf
compton --config ~/.config/compton.conf
And restart your computer.
CREDITS: Fix Screen Tearing in Linux with Nvidia Graphics
The trick already mentioned in the other answer is to check the "Force Full Composition Pipeline" option in the NVIDIA X Server Settings. This option has to be checked for each monitor. You can do this using the
nvidia-settings
command to start the configuration GUI. If that option is not visible, you'll have to click on the "Advanced..." button first. After checking the checkbox, click on "Apply" to save the settings.However, in order to run this automatically on startup you'll need a command line to set these options in crontab or your session startup. To get this command line you can simply query the current settings after setting them in the GUI using
nvidia-settings --query CurrentMetaMode
. For my dual monitor setup, I got this output (formatted for better readability):Everything from the third line can then be directly copy-pasted to the
command. So with the above example this would work:
Theoretically, you could write these settings manually. The important thing is the
ForceFullCompositionPipeline=On
part. But unfortunately, that option can't be set without specifying the arrangement of the monitors. And determining the desired geometry coordinates is a bit more troublesome to do by hand.For ThinkPad W540 I've made this script:
First you must run telinit 3, then those commands. After restart you've got working nvidia 450 drivers with absolutely no tearing. I've run GTA5 from steam on this ancient laptop and it was playable at 1600x900 (of course all settings to low). I've checked it on xubuntu 20.04.