Wayland display server protocol
Changing of the Guard
The X11 graphics protocol is showing some serious signs of age, but Wayland is poised to come to the rescue.
The X Window System has provided a framework for desktop graphics in Unix and Linux for more than 30 years. X has gone through many phases since it first appeared in 1984, but it stabilized long ago. Version 11 of the X protocol (referred to as X11) has been around since 1987, and it is a fundamental part of the Linux landscape; however, computers have changed a lot since 1987, and many experts believe the X Window System needs to be replaced.
The Wayland display server protocol, developed since 2008 under the direction of Intel employee Kristian Høgsberg, is primed to take over for X11. Wayland could eventually solve a load of problems that developers have to contend with when integrating Linux applications with a graphic desktop, but is Wayland equal to the task? This article looks at the state of Wayland integration.
The Turning Point
X11 is a patchwork of code difficult to maintain and almost impossible to expand. Serious mistakes often emerge that have remained hidden in the code for years. For example, a security vulnerability in the font server dating from 1991 wasn't discovered until 2014 [1]. Rigorously practiced backward compatibility is also part of the reason X11 is not considered secure. Several of the core components carried over from the early days are no longer of any real use, but they have to be available by default.
The focus at the beginning of development was also completely different from what is expected of a modern graphics stack today. Modern graphics libraries now draw circles and rectangles or move windows, without having to resort to an X Server. The modern environment also supports shared libraries, which means graphics-capable applications don't have to carry around a ballast of graphics functions. Modern clients just expect the display server to allocate an area where they can write and display the content, which is what Wayland provides.
Detours and Wrong Turns
The person perhaps most responsible for Wayland's position as an heir to X11 now no longer supports the Wayland protocol. In 2010, Mark Shuttleworth announced that Ubuntu would run with Wayland instead of X11 from version 12.04 onward [2]. This announcement gave the Wayland project, which originally was meant to prove only that X11 could be rebuilt without too much effort, strong standing as a possible heir apparent for X11. Shuttleworth later decided to develop his own, new Mir display server rather than support Wayland.
Most Linux distributions will eventually switch to Wayland, although X11 will be around for a few more years. The Wayland developers created XWayland, a slightly modified X server that serves as a compatibility layer, to eliminate problems during the transition phase for applications that still require X11. The first major distribution that natively uses Wayland by default will probably be Fedora, which was considering making Wayland the default system in Fedora 24, although a recent blog post by developer Matthias Clasen [3] said, despite all the work put in toward that goal, Wayland was not quite ready for production distros.
Wayland/X11 Differences
Wayland differs from X11 conceptually and functionally. In the Wayland environment, the compositor is the display server. In X11, on the other hand, the compositor is an external component that requires an additional processing step. Wayland is just the protocol, and Weston is the reference implementation of a compositor (Figure 1). The differences between Wayland, X11, and XWayland become clearer if you look at how the display servers process an event such as a mouse click (Figures 2-4).
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Gnome 48 Debuts New Audio Player
To date, the audio player found within the Gnome desktop has been meh at best, but with the upcoming release that all changes.
-
Plasma 6.3 Ready for Public Beta Testing
Plasma 6.3 will ship with KDE Gear 24.12.1 and KDE Frameworks 6.10, along with some new and exciting features.
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.