I have two laptops with the same CPU package, both exhibit significant screen tearing when running glxgears -fullscreen using Marco using and the default configuration on Ubuntu MATE 18.04 daily. Compiz doesn’t exhibit any screen tearing when running glxgears -fullscreen on the same default configuration. Here are the details:
Graphics: Card: Intel Device 5926
Display Server: x11 (X.Org 1.19.5 )
drivers: modesetting (unloaded: fbdev,vesa)
Resolution: 1920x1080@59.93hz
OpenGL: renderer: Mesa DRI Intel Iris Plus Graphics 640 (Kaby Lake GT3)
version: 4.5 Mesa 17.2.2
The output of xdpyinfo | grep DRI gives the following:
DRI2
DRI3
The output of grep DRI /var/log/Xorg.0.log shows that DRI2 is being used:
[ 6.228] (II) glamor: EGL version 1.4 (DRI2):
[ 6.422] (II) modeset(0): [DRI2] Setup complete
[ 6.422] (II) modeset(0): [DRI2] DRI driver: i965
[ 6.422] (II) modeset(0): [DRI2] VDPAU driver: i965
[ 6.436] (II) GLX: Initialized DRI2 GL provider for screen 0
And LIBGL_DEBUG=verbose glxinfo | grep libgl reports:
libGL: Using DRI3 for screen 0
However, screen tearing can be completely eliminated by creating /usr/share/X11/xorg.conf.d/20-intel.conf with the following contents:
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
EndSection
This forces the use of the intel driver rather than modesetting which was made the default in 16.10 I believe.
After a reboot xdpyinfo | grep DRI and LIBGL_DEBUG=verbose glxinfo | grep libgl report the same as before but grep DRI /var/log/Xorg.0.log now reports:
[ 5.033] (II) intel(0): [DRI2] Setup complete
[ 5.033] (II) intel(0): [DRI2] DRI driver: i965
[ 5.033] (II) intel(0): [DRI2] VDPAU driver: va_gl
[ 5.033] (II) intel(0): direct rendering: DRI2 DRI3 enabled
[ 5.079] (II) GLX: Initialized DRI2 GL provider for screen 0
So DRI3 is shown to be enabled now. Running glxgears -fullscreen using either Marco or Compiz is entirely tear free. Perhaps this suggests the modesetting driver is not able to provide a tear free experience on some devices?