SDL2 Reverts Its Wayland Preference - Goes Back To X11 Default
Written by Michael Larabel in Wayland on 18 April 2022 at 12:26 PM EDT. 104 Comments
WAYLAND --
Back in January was the change pushed into SDL2 Git where the library prefers Wayland by default where available rather than defaulting to using X11 support. However, pushed today into SDL2 is a revert on that earlier change due to Wayland issues that the developers are more comfortable sticking to X11/XWayland by default until various Wayland problems are addressed.

Sam Lantinga a few minutes ago reverted the January change of preferring Wayland over X11. That Wayland default preference made it into last week's 2.0.22-RC1 but after further testing, the Wayland support for this widely-used library by multi-platform games isn't good enough yet. Thus those Linux gamers running Wayland compositors will find that by default SDL2-using games will stick to using the X11/XWayland path. Or end-users can also express their Wayland interest if desired via the SDL_VIDEODRIVER=wayland environment variable.

Lantinga commented with the revert, "SDL Wayland support is stable, but there are a number of issues with third-party software (NVIDIA drivers, libwayland event overflow, libdecor not handling plugin load failures, Steam overlay not working with Wayland, etc.) that make it better to default to X11 at this time."


There is no word when they will re-evaluate the default decision but will likely be some time before those various issues are resolved and found across prominent Linux distributions. Sam did note though that games preferring Wayland can use the SDL API to indicate their individual preference: "Games which would like to prefer wayland when available can use the following code before SDL_Init(): SDL_SetHint(SDL_HINT_VIDEODRIVER, "wayland,x11");"
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, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week