XWayland Gets Patches For Better EGLStreams Handling
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:
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.Hopefully this work will make it into the X.Org Server 1.20.1 point release.
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).
18 Comments