XWayland Gets Patches For Better EGLStreams Handling
Written by Michael Larabel in X.Org on 24 May 2018 at 10:49 AM EDT. 18 Comments
X.ORG --
While the recently released X.Org Server 1.20 has initial support for XWayland with EGLStreams so X11 applications/games on Wayland can still benefit from hardware acceleration, in its current state it doesn't integrate too well with Wayland desktop compositors wishing to support it. That's changing with a new patch series.

Olivier Fourdan of Red Hat has sent out five patches for fixing up the XWayland EGLStreams support and allowing the -eglstream command line parameter to activate this EGL support in XWayland. But in cases where the EGLStreams support doesn't work out, it will gracefully handle the situation.

Fourdan explained in the patch series:
To activate EGL support in Xwayland, one needs to pass “-eglstream” to the Xwayland command line.

As Xwayland is automatically started by the Wayland compositors (gnome-shell/mutter, weston, etc.), this needs to be added in the compositor.

However, if the Xwayland was not built with eglstream support, the command line option "-eglstream" is not supported and Xwayland will bail out.

As the Wayland compositor has no (easy) way to tell whether EGL support was enabled and built time in Xwayland, it cannot reliably use “-eglstream”.

But even if Xwayland supports EGL stream, using “-eglstream” on hardware which do not have EGL stream will cause an abort() at startup because the EGL extensions are missing.

Also, if glamor is disabled early (either because "-shm" is passed or "-eglstream" fails to initialize), we would abort() in apply_output_change() because some Wayland events remained unprocessed after InitOutput().

So ideally, one could use “-eglstream” regardless of the hardware and Xwayland would neither crash, abort or even disable glamor altogether because EGL stream is not supported, so that a compositor could decide to add “-eglstream” to the Xwayland command line and Xwayland would adapt automatically and play nice.

This the goal of that series of patches (plus one little code cleanup).
Hopefully this work will make it into the X.Org Server 1.20.1 point release.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week