Screen Tearing

I’ve been struggling with screen tear in portrait mode for weeks now, trying many recipes from the web. I tried half a dozen versions of Ubuntu and its derivatives with the same miserable result. It seems that selling my Nvidia graphics card was unwise. Here is what I have now with Kubuntu 20.04:

paul@desktop:/etc$ inxi -G
Graphics:  Device-1: Intel UHD Graphics 630 driver: i915 v: kernel 
           Display: x11 server: X.Org 1.20.11 driver: modesetting unloaded: fbdev,vesa resolution: 1600x1200~60Hz 
           OpenGL: renderer: llvmpipe (LLVM 12.0.0 256 bits) v: 4.5 Mesa 21.0.3 

Obviously, I tried many variants of 20-intel.conf:

paul@desktop:/etc/X11/xorg.conf.d$ head 20-intel.conf 
Section "Device"
        Identifier      "Intel Graphics"
        Driver          "i915"
        Option          "TearFree"      "True"
        Option          "AccelMethod" "uxa"
        Option  "DRI"    "3"
        Option          "TripleBuffer" "true"
EndSection

I tried all options of Compositor -> Tearing prevention ("vsync"). Nothing helps.

Also, I’m getting:

paul@desktop:/etc/X11/xorg.conf.d$ xdpyinfo | grep DRI
    DRI2

even if I have:

Option 	        "DRI3"    "true"

or

Option 	        "DRI"    "3"

in 20-intel.conf file.

I just tried Fedora 34 and the tearing is gone. Is it due to X11 replaced by Wayland, llvmpipe replaced by Mesa?

[liveuser@localhost-live xorg.conf.d]$ inxi -G
Graphics:  Device-1: Intel CoffeeLake-S GT2 [UHD Graphics 630] driver: i915 v: kernel 
           Display: wayland server: X.Org 1.21.1.1 driver: loaded: i915 note: n/a (using device driver) - try sudo/root 
           resolution: 1200x1600~60Hz 
           OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 21.0.2 

You are right that’s a bug in the default Xorg modesetting driver. But I can see your efforts to work around it contain errors.

If you want to avoid tearing in Xorg then you would install:

sudo apt install xserver-xorg-video-intel

and configure:

Driver "intel"
Option "TearFree" "True"

But since the “intel” Xorg driver is old, poorly supported and buggy its own ways, I would recommend logging into ‘Ubuntu on Wayland’ to avoid all tearing. It’s an option in the menu from the icon on the bottom right of the login screen.

1 Like

Thank you for responding, and sorry for hijacking this thread. I was desperate and couldn’t get meaningful advice in other places I posted.

Unfortunately, Kubuntu 20.04, which is my preference at the moment, doesn’t have Ubuntu on Wayland login option.

For the time being, I will settle for the option with the least amount of artifacts: Compositor > Tearing Prevention > Full screen repaints.