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.