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
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
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.