What’s Taking Wayland So Long?

Waiting for Wayland

By

 
What do we do now? 
Wait. 
Yes, but while waiting. 
What about hanging ourselves? 

– Samuel Beckett, Waiting for Godot

 

Wayland was begun by Kristian Høgsberg in 2008. Version 1.0 was released in October 2012. Nearly six years later, Wayland has become the default display server in only a couple of distributions. Considering it has been developed for a decade, users might start to wonder when, exactly, Wayland will completely replace the antiquated X Window System (X). What is the delay?

To start, Wayland was never intended as a replacement for X. Høgsberg originally described Wayland as "a tiny display server + compositing manager," and the first mention of it in the media speculated that it might become "a server used by GDM, as the screensaver server, for a safe-mode display server, or for graphical text consoles […] among other possible uses. Wayland could also be a great fit for embedded systems." However, within six months of Wayland’s announcement, it was widely assumed to be the next generation display server for Linux, and expectations have remained high ever since. The project’s scope shifted to match the expectations, and today the opening sentence on the home page describes Wayland as “a simpler replacement for X.”

This shift was probably inevitable. First released in 1984, even in 2008 the X Window System was showing its age. In 2013, Wayland contributor Daniel Stone explained that although some of the issues with X were traceable to the core protocol, the main problem was that the average modern X server runs an average of 23 of X’s 27 extensions. Moreover, because the policy is to preserve backward compatibility, X.org, the implementation of X used in most distributions, had four different input models, four display models, and two rendering models, despite the fact that some are obsolete. As Stone said, developers have been coming around to the idea that “we’ve kicked that can as far down the road as we can.” In other words, a fresh start has become simpler and more efficient than continuing to patch X.

By contrast, Høgsberg summarizes the initial goals for Wayland by saying, “The core idea is that all windows are redirected, we can do all rendering client side and pass a buffer handle to the server, and the compositing manager runs in the display server. One of the goals is to get an X server running on Wayland, first in a full screen window (like Xnest), then rootless, since X just isn’t going away anytime soon.” Over the years, the project’s goals have evolved, but more or less remained: the development of a simpler, more efficient, and more secure display server.

However, developing a completely new display server based on different design principles is no easy task. If Wayland’s long history is not proof enough of that statement on its own, Canonical’s efforts to develop the alternative Mir display server has proved equally slow. Although Canonical originally hoped to include Mir in the 13.10 release of Ubuntu, in April 17, that still had not happened, and as part of the streamlining of Canonical, its founder Mark Shuttleworth announced that Mir development would continue only for smart devices, and no longer for the Ubuntu desktop. Instead, Ubuntu 17.10 will be shipping with Wayland.

Yet even Wayland adoption is challenging. Will Cook, Canonical’s Engineering Director of Desktop talks about the challenges of preparing an Ubuntu release for Wayland: “The biggest challenge is having to make sure that Wayland works reliably on so many different hadware configurations – different video cards, different hardware revisions of the supposedly same video card, varying quality drivers, different amounts of RAM, and so on. Ubuntu users use a huge variety of systems and ideally we need the desktop to ‘just work’ on all of them.”

Such complexity, says Richard Brown, a member of the openSUSE board of directors, “has led to a simple deadlock: developers didn't move their software to support Wayland that quickly, while waiting for users to demand it, but users didn’t demand it because they were waiting for developers to start moving their software to Wayland. Now there is a growing momentum behind Wayland, you’re seeing a much more rapid growth in adoption.” More than anything else, this double-bind explains the delay in the use of Wayland.

Roadblocks to Adoptions

Brown is right in saying that Wayland adoption is accelerating. However, the transition continues to have issues. For example, because Wayland has a tighter security model than X, currently graphical applications cannot be run using su or sudo without a workaround.

Even more importantly, several major desktop environments do not run natively under Wayland. Neither Cinnamon nor MATE, Linux Mint’s popular desktops, are expected to run under Wayland for at least a couple of years. Currently, Xfce has no plans to support Wayland at all. Although these desktops, as well as legacy window managers, will presumably run under XWayland, a version of X that runs under Wayland, this lack of native support can affect their performance and in the future may affect their popularity.

KDE’s Plasma runs under Wayland, but how usable it is “depends on what users do with their system,” says Martin Flöser, Plasma’s Wayland maintainer. Flöser’s Plasma/Wayland web page lists numerous problems, ranging from the use of Nvidia video cards and Wacom tablets to the inability to use mouse gestures, virtual windows, and Activities – all features that are among Plasma’s major attractions for users – to crashes while logging out, the inability to use multiple screens, and the deactivating of the Compose key, which is required for international keyboard support. Flösser does say that “we are very close to having everything working,” but he adds that “there are still some general problems which we as the community cannot solve. For example, if your work flow depends on TeamViewer [a proprietary app for remote access to the desktop], you won’t be able to use Wayland, as Wayland security mechanisms prevent that.”

Currently, Gnome offers the best experience under Wayland. Yet even in Gnome, Fedora Leader Matthew Miller says that remote logins and screensharing continue to be a problem, according to Fedora Leader Matthew Miller, as well as running Pipewire, the new multimedia processor intended as a substitute for PulseAudio and Jack. Even on Gnome, Wayland still has some distance to go.

Slow Adoptions, with Fallbacks

Despite such problems, Wayland adoption continues. So far, though, among the major distributions, only Fedora and Ubuntu are using Wayland by default in their latest releases. According to Fedora leader Mathew Miller, the transition has been largely “invisible” to users. “If apps use a modern toolkit like Gtk3 or Qt5, they’ll just work. Apps which use older toolkits or some weird custom thing need to be rewritten to take advantage of Wayland, or of course they can just run under XWayland.” User reaction, Miller says, has been “overwhelmingly positive.”

Similarly, Cook says that XWayland “will allow legacy applications to run. Applications using Gtk (Gnome apps) or Qt (KDE apps) get Wayland through their toolkits, and so the applications themselves don't need to be rewritten. The users should not notice any difference between the Wayland session or the X.org one.”

Other distributions, though, are being more cautious by including Wayland, but not defaulting to it. In openSUSE, Wayland has been an option in Tumbleweed, its rolling release, since 2012, and in Leap, its traditional release, since 2015. According to Brown, openSUSE is also “considering it as a default for Gnome in our upcoming Leap 15.” By contrast, Debian, always the most conservative of distributions, includes Wayland packages in its repositories, but is unlikely to default to Wayland until its next release, which is probably at least a couple of years away.

Moreover, even Fedora and Ubuntu are being cautious in defaulting to Wayland. In Ubuntu, for example, “X.org is installed by default on 17.10, but the session will aim to use Wayland first. There is logic in the Gnome Display Manager to fall back to the X session if the hardware setup is known not to work with Wayland. If the user is having problems with Wayland, they can switch the displace server from the [login] greeter.“ Other distributions are generally expected to retain X as a fallback as well.

In the end, other distributions will be joining Fedora and Ubuntu. However, judging from these two examples, XWayland and an easy fallback to X will continue to accompany it for the foreseeable future. My guess is that Wayland will not completely replace the X Window System until at least 2019, if not later. After years of expectation, Wayland in many distributions and on many desktops has still not actually arrived.

Related content

  • Canonical Ditches Wayland for Mir

    Canonical ditches Wayland for a brand new graphics stack.

  • Tech Tools
    • New Intel Xeon Phi
    • Intel-HP HPC Center
    • Oracle Supports Azure Cloud
    • Wayland 1.2 Released
    • Java Enterprise Edition 7 Released
  • Fedora 21

    Fedora 21 appears with a new vision and some interesting new tools for developers and system administrators.

  • Wayland 1.4 Challenges X11

    X marks the target for the next-generation windowing system.

  • Hawaii Desktop

    The Hawaii desktop relies on Qt Quick, supports Wayland, and comes with its own compositor. Thanks to the Maui Linux system, you can test Hawaii on a Live CD or on a VMware virtual machine.

comments powered by Disqus

Issue 205/2017

Buy this issue as a PDF

Digital Issue: Price $9.99
(incl. VAT)

News