How to launch Wayland or other method to fix screen tearing in portrait mode on Intel Graphics

Based on MATE Desktop 1.26 Released with Initial Wayland Support + More - OMG! Ubuntu! there is (some) Wayland support now. I have a portrait mode screen tearing issue with Intel UHD Graphics 630. I tried recommended elsewhere 20-intel.conf:

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

which indeed fixed the tearing, but also disabled SPDIF audio somehow. Another recommendation is to dump X11 and use Wayland, but when I go to MATE Tweak, the only option for Window Manager I see is Marco.

The tearing is well visible in Chrome and VS Code. I didn't notice it with other applications. Any advice how to fix it or how to get Wayland working?

In MATE-Tweak you can choose Marco with Compton GPU Compositor.

I also used to get tearing with Intel chipsets, and I used Compton to solve this.
It just might work for you too.

At the moment there is not yet a Wayland-protocol compatible compositor for Mate that is ready for prime time. It is still in experimental phase and there is still a lot of work to do before it is ready.

You would think that, because the wayland-protocol is a standard, that every 'wayland'-compositor would be usable.

Yeah, well, no.

Every desktop-environment has its own quirks and demands that must be implemented in the compositor as additions to the standard protocol
(like support for MATE-panel in MATE-desktop) so we can't just drop in 'mutter' or 'kwin' (wayland-protocol-compatible-compositors of resp. Gnome and KDE) and call it a day. It won't work on MATE.

Under Window Manager I have only two options:

  • Marco (no compositor)
  • Marco (adaptive compositor)

I don't see Compton, but I vaguely recall seeing it somewhere else.

Thankfully it is still in the repository.


sudo apt-get install compton

try MATE-tweak again and the option should be there.
(you maybe need to logout/login again, i'm not sure about that)

I have Marco (Compton GPU Compositor) now, but the tearing is still there. I could argue it's a bit worse: instead of a tear along a single scan line, I have tears along multiple scan lines in the same area now.

Even without '20-intel.conf' ? (which might get in the way)
That is stunning.

The weird part is that you get tearing with an IDE and a browser (something i've never encounterd before) instead of tearing with video (which usually is the case)

Well, there is another compositor for you to try: compiz

sudo apt-get install compiz compizconfig-settings-manager

After install it will appear in MATE-Tweak
It might just work.

I tried Compiz (advanced GPU accelerated desktop effects) and no cigar. To be clear, I observe tearing in portrait mode when scrolling with web technology based applications, e.g. Chrome, Typora (Webkit) and VS Code (Electron). Other applications, e.g. Okular, don't tear.

If you only have tearing with web-engine based applications...

Maybe a stupid idea, but could you also test with firefox ?
AFAIK Chrome, Typora snd Electron are all (more or less) webkit based.
Firefox has a completely different render-engine so that could point to a conflict with webkit and portrait-display-handling.

Oh, btw, if you want to test this with wayland, try a live-ISO of Fedora
As far as I know, Fedora has wayland by default.
Probably the fastest way to discover if wayland would be a solution.

Firefox has the same tearing artifacts.

Then it's not an render engine problem.
It also can not be solved by using a compositor.
I'm afraid that this is due to the immediate-mode drawing of the Xserver.
In my opinion, the only options you have are:

  1. keep the 20-intel.conf and see if you can solve the sound issue
  2. switch over to wayland, which means:
    1. Try the highly experimental MATE version
      (lots of things will be broken)
    2. Try a (live)distro that fully supports wayland (like Fedora-live-ISO)

If anyone wants to chime in with other solutions, please do.
I'm out of ideas :slight_smile:

I was conflating two at least partially independent issues in this post:

The audio problem is solved in the linked post.
The easiest solution to screen tearing is 20-intel.conf file, after all. I'm using this one:

## /etc/X11/xorg.conf.d
Section "Device"
	Identifier  "Intel Graphics"
	Driver      "Intel"
	Option      "AccelMethod"  "sna"
	Option      "TearFree"	"True"
	Option      "Tiling"	"True"
	Option      "SwapbuffersWait" "True"
	#Option      "AccelMethod"  "uxa"
1 Like