Tearing with Intel Graphics in Ubuntu Portrait Mode


I use the portrait mode in Ubuntu 20.04 running wayland on i5-9500. The build-in Intel HD Graphics 530 has tearing issues: refresh slowly while scrolling.

After several testing, the solution is to load the dri3 module and enable the “TearFree” option in 20-intel.conf or 20-intel-graphics.conf:

$sudo nano /etc/X11/xorg.conf.d/20-intel.conf 

Section "Module"
        Load "dri3"
EndSection

Section "Device"
        Identifier "Intel Graphics"
        Driver "intel"
        Option "TearFree" "true"
        Option "DRI" "3"
EndSection

The “TearFree” “true” Option

ArchLinux provides a solution about Tearing to those using SNA acceleration which is a replacement of UXA. Just to enable the “TearFree” option in /etc/X11/xorg.conf.d/20-intel.conf. For Intel UHD 620 and 630, enable the “TripleBuffer” option, too.

Section "Device"
        Identifier "Intel Graphics"
        Driver "intel"
        Option "TearFree" "true"
EndSection

But it’s not good enought to me, there are color blocks without “dri3”.

The DRI module and “DRI” “3” option

DRI is Direct Rendering Infrastructure. It is “…the framework comprising the modern Linux graphics stack which allows unprivileged user-space programs to issue commands to graphics hardware without conflicting with other programs…”

Jkasnese suggest to add “DRI” “3” and ignore the “TearFree”. Paul found “…According to the link below, option “TearFree” “true” is not necessary with option “DRI” “3”…”.

If “DRI” “3” is enabled without “TearFree” “true”, there is still viaible tearing on i5-6500. I have to load dri3 and use both options to eliminate tearing completely.

Works on X11 and Wayland

This solution works on both X11 and Wayland.

X11 is the network protocol. X.Org server is the X Window System display server implemented by the X.Org Foundation. Wayland is a more recently developed X Windows System.

In “Settings” ➞ “About”, the “Windowing System” indicates which display server protocol is in use.

Firefox provides native video acceleration on Wayland through VA-API. I may play videos without any issues in portrait mode now.

Reference

  1. archLinux: Intel graphics: Tearing
  2. Wiki: UMA Acceleration Architecture
  3. Wiki: Direct Rendering Infrastructure
  4. askUbuntu: Screen Tearing on Ubuntu Xorg 20.04 with Intel Graphics
  5. askUbuntu: Intel integrated graphics screen tearing
  6. linuxiac: Xorg, X11, Wayland? Linux Display Servers And Protocols Explained

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.