Wayland they’d called it

Featured image

Let’s commence with a joke. If the British automotive industry of the 70s had been the one to invent the display server protocol, they would have called it British Wayland. Get it? It’s subtle. Very subtle. Anyhow, without focusing too much on the technical lingo, Wayland is a new protocol, designed to replace the sturdy and reliable X Windows System. The idea is to create a more modern, more relevant method of transferring video frames from applications to the on-screen display, in a manner that is fast, efficient and extensible. On paper, it’s an interesting approach to an old problem, but the question is, is there a problem really?

Wayland, today

If you recall, and you must recall, my article on Qt, portability as a gateway to profit seems to be the common theme for most players diverging from the conventional computing form factor, the desktop. Apparently, the efforts needed to power a display on a large computer are not that lucrative when you have to apply them to tiny devices with a very short battery life and few CPU cycles to spare. Development costs and complexity also come to bear, the end result is, upheaval in the Linux community, as another pillar of stability is shaken, not stirred. As with any technology, people clamor for and against.

And so Wayland was started, and it’s moving forward, with the usual friendly dose of forking and uncertainty. For example, Fedora is most likely to use Wayland, which means RedHat should go this way eventually, and that means Gnome for certain. KDE does have an experimental port, but it’s really the question where Qt could go and how. Tizen is there, too. On the other hand, Ubuntu announced its own implementation, called Mir, with focus on Qt/QML, and this complicates things somewhat. In the battle for Android, using Qt as the proxy freedom fighter, someone ought to win eventually, and this might mean more fragmentation and unbalanced support. Or perhaps, both will coexist peacefully. We will see.

If you want to test Wayland

You might be a little disappointed. You do not have that many options. You can download a very basic demonstrator that ought to run on your existing distributions, on top of X. Or you could spend half a day compiling Wayland from sources, with a hope that it might actually work come the sundown. To make things worse, few applications support Wayland, so you might want to consider xwayland. Speaking of graphical backends, Qt applications can switch between X and Wayland at load time. Foresight or chance?

Anyhow, I decided to give it a try. A gentle try. Take Ubuntu 13.04 Raring Ringtail, which I was willing to sacrifice for the sake of this test, and install weston from X-SWAT PPA, a reference implementation of the Wayland window manager.

Once you have weston installed, you can start a session, on top of X, which looks like a nested X session akin to Xephyr, a simple emulated graphics application, or a typical VNC session. Nothing too exciting. At the moment, this stock demonstrator only comes with a terminal window. You can maximize the window, but not minimize it, for some reason.

Weston running on top of X in Ubuntu 13.04

Weston, standalone window, with an open terminal

The other option is to launch a complete weston session. For now, it cannot replace your existing graphical console, but it will start a new one, so you can switch to it with Ctrl + Alt + F8, and then back to your own desktop with F7. Again, there’s little you can do at this point. Not with the very basic options offered with this package. This is what it looks like, notice the lovely artistic sun glow effect that I managed to create here, completely au naturale.

Virtual console with Unity over X

Weston on a separate virtual console

On the official site, though, you can find a plenty of screenshots demonstrating drag & drop, software rendering, flowers and gears, Qt and GTK examples, and more. Here’s a handful, though, all credits go to wayland.freedesktop.org.

Wayland example, glxgears

Wayland example, drag & drop

Wayland example, Qt

Wayland, tomorrow?

All right, so you and I are both convinced that the technology works, and in a few months or years, it will be fully ready for prime time, simple, stable and bug free. However, that means nothing unless the entire markets tunes itself to the change.

For example, one big concern with Wayland is that it only supports open-source drivers. This information may be outdated, or will become irrelevant, but without ATI and Nvidia, the effort is bound to fail. Imagine any OEM supplier having to ship the Wayland stack with their hardware. Effectively, they might end up being limited in the choice of drivers they can provide the end user, and you don’t really want to buy your expensive graphics card so it can gather dust, now do you.

The open-source drivers are just not as good as the proprietary versions. So if you want to do 3D, gaming or other graphics-intensive tasks, you might not want to consider Wayland for your setup. This could effectively partition the Linux community, or even cause projects to wither and die, without target audience, technological merits notwithstanding.

Games on Wayland?

Your gaming might be at risk; click here for a free scan

The big players will surely make their financial considerations, and they will include research and development time, investment in porting and testing, potential profits, and scalability. If Wayland does not offer enough incentive for the mobile market, then Android might not like it, and in turn, Qt might not like it, and in turn smartphone and tablet vendors might drop it altogether. We remain with the desktop, and even there, we could be facing serious issues on the graphics front. The whole idea of Linux going big is creating the necessary critical mass effect. So far, we have not seen that happen, and Steam is probably the first real chance for this, on the desktop. The other way around is, make people like gadgets, then lure them to your other devices and platforms. Hence, Ubuntu, but they are going their own way. See the problem?

Moreover, to replace X, Wayland really needs to be superior. Not having full support for the entire spectrum of options currently available in the existing technology, let alone advancements and improvement, will hamper adoption.

Now, seriously, what for?

Here’s a good philosophical question. Apart from the obvious technological merits under the hood, which would be sort of compressing twenty years of legacy code into an optional blob, does Wayland really offer anything new, revolutionary or useful? This is not a challenge. This is a simple question. Users will not really care much, as long as they get their pretty pictures, video and whatnot. Even today, most people take the display rendering for granted as a sort of a distro magic that happens somehow. For all practical purposes, it should remain like that, which translates into transparency. For the time being. Wayland has no network transparency, nor does it fully support the existing range of drivers, nor does it work well with all the available applications and frameworks.

I’m wondering what’s the angle. The claim of code refresh might be interesting, but it’s not that important. You can claim that kernel 3.0 goes all the way back to kernel 1.0, and that over time, some of the code is completely unneeded. Do you break interfaces? Do you disrupt productivity? What do you gain by making something new? Does new mean better?

My concern, as a user, is whether my stuff will work. I hope the project charter takes this into the equation, because we might end with a beautiful sword, for spreading butter on a toast. There, I just coined a new cheesy catchphrase.


My short experiment with Wayland shows a bunch of interesting technological tidbits. But I am not entirely convinced the technology is advertised in the right way. Obsolete code out, new code in, yes, but why. How will the effort benefit Linux, its various desktop environments and frameworks, its various windows managers and whatnot, how will Compiz be affected, what will happen with Nvidia and ATI? Will we see Linux bloom, because Wayland is so flexible and useful that every company out there will rush to put this on their devices, and then it’s just a simple matter of family lineage to one called Bob, who might then become your uncle.

I fear we will end with X being neglected a bit, Wayland and Mir struggling half way to the top, and users wallowing in despondence. The alternative, Utopia scenario is that we end with a top-notch graphics stack that does magic and wonders, and you grab your phone, and you port your application to desktop in three minutes, and vice versa. Cue in Qt, cue in KDE, with Unity lurking in the shadows.

Well, that is as far as speculations go. This will surely be a colorful battle, if only we knew what the fight is all about. The coming months will reveal more of a market direction, if and when Ubuntu hits the scene with its own mobile devices. I am also curious to see if KDE can manage, and how that will play out. As far as Wayland is concerned, for me, it’s a black, mysterious thing, and I am not yet quite sure how to approach it. One thing is certain, if there’s technology sharply mirroring the biological evolution, that’s Linux. Branch up and down, left and right, prune the losers, promote the winners, converge, and grow. So far, we’re branching and branching. What’s next?


4 responses to “Wayland they’d called it”

  1. Abdel Rebel says:

    My main concern, as an ordinary user, is to see my staff working without headaches so I wouldn’t spend my time fixing things instead of being productive.

  2. Ruel Smith says:

    I’d like to see better support for extended keyboards.

  3. jokeyrhyme says:

    I think the reason you can’t minimise windows in Weston right now is that the Wayland protocol doesn’t (or didn’t in your version) specify how to ask for minimisation. That’s either been very recently added or will be soon (fingers crossed).

  4. Whiley W. Riwte says:

    “if only we knew what the fight is all about”

    At least you could point out a link like this: http://wayland.freedesktop.org/architecture.html to help in explaining how Wayland communicates differently than X.

    You are correct in saying that it looks good on paper. I do believe that this is an important battle because X is too large a package already, too much old stuff, and should be completely optioned if you need it for old crap. Leave rendering over modern networks to younger faster leaner renderers. Wayland has that young mans piss and vinegar alure, and so does Mir.

    Canonical already has several reasons for wanting to replace crappy old X – it’s called Unity because no matter which device you want to use, the interface will be identical but varying only in size respective to the device.

    I can understand that new renderer is important for leaner remote rendering without prohibitively expensive gear to it. I’m talking about wireless connection for remote displays – but remote rendered streams that digitaly flow to a display at frequencies that will have no lag because its rendering on the intelligent display rather than completely on the local GPU.

    Ah, I make no sense. Why do I even bother sometimes!

Leave a Reply