Ubuntu mate 18.04 marco and DRI3

@bwat47 - I’ve been digging through this a bit, and I think Ubuntu is shipping an outdated version of the Present library, which has issues identifying windows in a 64 bit environment. I would need to recompile Xorg to confirm, though, and I haven’t really had the chance. Work has been quite busy these days, so I only have a tiny amount of time left for this, unfortunately :frowning:

@bwat47 - okay, just checked and Ubuntu ships the correct version, so that’s definitely not the problem…

When we created this feature, it consistently worked on 32-bit versions of Ubuntu, but only worked on 64-bit when using the nouveau drivers (in case of machines with nvidia).

I know that @Wimpy managed to get it to work in Ubuntu with the intel drivers when enabling DRI3 manually, but I’ve had no such luck. I don’t know whether he used 64-bit or 32-bit. Also I’m using bumblebee and bbswitch to fumble around with my graphics card drivers, so I wonder if that affects my testing…

I did some tests here as well and while I seem to have gotten tear free working, the results are a bit puzzling.

First, I verified that the modesetting driver is active and that I’m using dri3 - still getting tearing and marco complains about xpresent support.

then, I created a 20-intel.conf file in xorg.conf.d explicitly setting the modesetting driver and dri3 for good measure and rebooted, no change.

I also tried uninstalling the intel ddx driver and rebooting, no change.

Then, I re-installed the intel ddx driver and adjusted my 20-intel.conf file to enable the intel driver instead of modesetting and rebooted again.

Now, I seem to be getting tear free rendering (tested dragging windows around and scrolling in firefox, I’m not observing any tears), however if I do marco --replace in the terminal it still complains about xpresent support…

Note: I did NOT enable the tearfree option in my 20-intel.conf file

1 Like

This seems to be a Debian bug with the package libxpresent. This is affecting XFCE users as well. I sent an e-mail to the debian package maintainer, can someone correctly submit a bug report for this?

– start of the e-mail –

Hello Julien,

I saw in the Debian package list that you are the maintainer of the package libxpresent1.
I would like to ask you if you are aware of this: https://lists.x.org/archives/xorg-devel/2017-June/053874.html
I’m using Ubuntu with XFCE and I think there is a bug with the libxpresent1 package affecting users of XFCE and probably Mate trying to make use of XPresent now that these DE’s window manager supports DRI.

As you can see here: https://www.bountysource.com/issues/47151407-screen-tearing-xfwm-4-13
The problem seems to be related to libxpresent not being build against presentproto 1.1

Can you please investigate this? I thinks this is affecting Debian users as well who are trying to use XFWM 4.13 or Mate 1.20 to solve their Screen Tearing problems.

Thank you.

Kolmar Kafran

1 Like

Having the same issue with inspiron 5378, kaby lake.
Xpresent is not compatible…
Libxpresent1 installed.

Actually, if i choose Marco/Compton manually via tweak tool the screen tearing seems to be solved, still marco --replace & return Xpresent error…

Selecting Marco/Compton makes it so that compton is used for compositng instead of marco’s compositor. Comtpon has opengl compositing and will get rid of tearing as you saw. I prefer marco’s compositing though as there’s less input lag and the alt tab switcher works better (has window thumbnails).

On my kaby lake system I got marco’s tear free compositing to work by doing the following (though for some reason marco still complains about xpresent support as I mentioned above, even though it definitely seems to be working):

  1. make sure xserver-xorg-video-intel is installed
  2. create the file /usr/share/X11/xorg.conf.d/20-intel.conf with the contents: https://hastebin.com/bixagixuha.vbs
  3. Reboot

and now you should see there’s no tearing with just marco’s compositing enabled

Basically it seems like marco’s xpresent support is not working with the generic modesetting driver on ubuntu (which ubuntu now enables by default instead of the intel ddx driver). The above steps enabled the intel driver instead of the generic modesetting driver.

This definitely seems to be a debian/ubuntu specific issue. On every other mate 1.20 distro I’ve tried (solus, fedora, opensuse) marco’s xpresent compositing works fine with the modesetting driver

2 Likes

Investigating further, it looks like enabling the intel driver gets rid of tearing not because it’s getting Marco’s xpresent support to work, but rather it seems that the intel ‘TearFree’ option is enabled (even though it’s not specified in my config file).

I always remembered the intel TearFree option being disabled by default so I didn’t think to check this (since I didn’t enable it myself), but Xorg.0.log shows:

4.048] (==) intel(0): TearFree enabled

I suppose it does the trick and gets rid of tearing in the meantime though. Performance might not be as good compared to using mate’s xpresent compositing though, as with this you’re basically enabling a driver level compositor.

2 Likes

Still doesn’t work with 18.10 :frowning:

Is there any ubuntu and/or debian bug report one can follow for this?

For video tearing with intel or amd i had a site with the fix. Www.apolitech.blogspot.com this is what remained of it.

1 Like

Looks like there is a bug report now: https://bugs.launchpad.net/ubuntu/+source/libxpresent/+bug/1801071

hope this can be fixed for ubuntu 19.04. Seems silly for this to still be an issue when all it needs is a package recompiled…

2 Likes

Just live booted the first 19.04 Beta and this is still present :frowning:

I've added this to our development Trello so we can investigate.

1 Like

Just live booted the 19.04 release and still get tearing in video playback using Firefox and DRI3 compositing (default settings). Still have to switch to Compton to get reliable tear free performance. Like @bwat47 I don't get tearing in other Mate distros OOTB. Anyone else?

https://bugs.launchpad.net/ubuntu/+source/libxpresent/+bug/1801071/comments/3

4 Likes

Bit of a necro post, but just live booted the latest daily build of 20.04 and tearing seems to be all gone using the built in Marco compositor.

A bug that's irritated me since 16.04 now finally appears to be squashed! Looking forward to the final release later in the year, and in the meantime I may well get a 20.04 VM spun up from this daily image and test it a bit.

Thanks @Wimpy!

Ah, close but no cigar!

Just live booted the final 20.04 release and found the following:

  • Default adaptive DRI3 compositor - tearing in top 5%ish of the screen in full screen videos in Firefox and Chrome - Big Buck Bunny using Celluloid and VLC is tear free

  • Installing Compton from the repos and selecting it in MATE Tweak - tearing all over the place in full screen videos in Firefox and Chrome and thumbnail taskbar previews are garbled. Big Buck Bunny using Celluloid and VLC is tear free

  • Setting MATE Tweak to no compositor and running my own custom config file (https://pastebin.com/b07CWqyn) no tearing at all anywhere

I tried taking screenshots but the tearing doesn't show up on them - it's definitely there though - using this YouTube video to test: https://www.youtube.com/watch?v=5xkNy9gfKOg

The final method has been the only way to get smooth tear-free fullscreen video playback for me since 16.04 on multiple machines (almost all of which use Intel integrated GPUs).

The custom config for Compton I've linked works fine, but it would be great to one day get DRI3 working with no tearing whatsoever.