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
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.
-
DebConf24 to be Held in South Korea
Busan will be the location of the latest DebConf running July 28 through August 4
-
Fedora Unleashes Atomic Desktops
Fedora has combined its solid distribution with rpm-ostree system to make it possible to deliver a new family of Fedora spins, called Fedora Atomic Desktops.
-
Bootloader Vulnerability Affects Nearly All Linux Distributions
The developers of shim have released a version to fix numerous security flaws, including one that could enable remote control execution of malicious code under certain circumstances.