Screen Tearing Ubuntu 18.04

For Firefox do this:

  • Type "about:config" on the address bar.
  • Search for layers.acceleration.force-enabled (default is false).
  • Change it to true by double-clicking.
  • Save and restart Firefox.

Make sure that you have hardware acceleration enabled in your browser and supported by your GPU driver.

Google Chrome / Chromium

  1. Go to Settings -> Advanced -> System
  2. Check Use hardware acceleration when available

For debug open this URL (paste it into your address bar):

chrome://gpu/

Firefox

  1. Go to Preferences -> Performance
  2. Un-check Use recommended performance settings
  3. Check Use hardware acceleration when available

For debug open this URL (paste it into your address bar):

about:support

and look for Graphics info

Checking GPU drivers

To check what driver is in use open terminal and type:

lspci -v | less

then press /, type VGA and press ENTER

In the VGA section you'll see your video card model, available drivers and drivers in-use.

Example:

01:00.0 VGA compatible controller: NVIDIA Corporation [GeForce] (rev a1) (prog-if 00 [VGA controller])
(...)
        Kernel driver in use: nvidia
        Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

Depending on your graphics card you may want to switch between open source and proprietary driver.

Open source drivers are better for 2D rendering, but have lower performance for 3D acceleration.

Switching drivers

Go to System settings -> Updates -> Settings -> Additional drivers.

You should be able to also open this tab via terminal with:

/usr/bin/python3 /usr/bin/software-properties-gtk --open-tab 2

Then you can switch between drivers, then reboot your PC.

Intel graphics

For Intel integrated graphics go to https://01.org/linuxgraphics/downloads/

NVIDIA screen tearing

You may find these answers useful:

  • https://askubuntu.com/a/992333/950482
  • https://askubuntu.com/a/1110975/950482

There is a video here that fixed it for me. The short version for Ubuntu 19, is that I had to open "Startup Applications" and add a new item with the command:

nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"