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
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.
-
New KDE Slimbook Plasma Available for Preorder
Powered by an AMD Ryzen CPU, the latest KDE Slimbook laptop is powerful enough for local AI tasks.