SDL2 On Linux Now Prefers Wayland Over X11

Written by Michael Larabel in Linux Gaming on 26 January 2022 at 01:22 PM EST. 13 Comments
With today's SDL2 Git, Wayland is now preferred over X.Org/X11 by default without having to set the SDL video driver environment variable.

As of today's Git development code for the Simple DirectMedia Layer and what will be the behavior in the upcoming SDL 2.0.22, Wayland is now preferred when present. While SDL2 has offered Wayland support for some time now, SDL2 would out-of-the-box prefer X11 (and XWayland in turn) support. The SDL_VIDEODRIVER=wayland environment variable can be used for forcing the Wayland code path while now it's the preferred route.

Wayland support has matured rather well in recent years... It's been a long journey, but things are coming together. Far better than the early days as pictured.

This change by developer Ethan Lee puts Wayland ahead of X11 now for the SDL video code. This is good news for ultimately getting more Linux games running on native Wayland where applicable rather than through XWayland, at least for games not having other interconnected dependencies on X11.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of 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 automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week