Why is Wayland better?

As recently announced by Mark Shuttleworth, Ubuntu will be moving towards using Wayland as its display manager.

What are biggest differences between X11 and Wayland? Why will Wayland make Ubuntu better?

Asked By: Hillar


Simply put, the hope is for better graphics (less buggy, faster, easier to use).
Even things might be possible one day that were not before.
I personally think this will at least spice up things, as competition always does.

Answered By: ido

The major difference in my eyes is that Wayland is closer to the kernel than X-Server. With the move of graphics drivers from X to the kernel (known as kernel mode setting, KMS), Wayland plans to use this new functionality to replace X. You could expect to see the following…

Less of a footprint than X – because the display is handled by the kernel Wayland will not have to implement as much to become usable. This goes both ways as I suspect X forwarding (look at one screen on another PC) may go away with X.

KMS features: Being able to change screen resolution without restarting X server (though I believe this was fixed in X a while back, at least for nvidia), debug console on kernel panic for intel chipsets (moving to nouveau) if you’re into that sort of thing.

Can anyone correct me on any of this if I’m wrong?

Answered By: TGM

You can see the Wayland architecture page to see how it differs in design. It’s supposed to simplify the whole graphics stack by forcing everything through a standard GEM/DRM stack straight into the kernel and managing compositing itself.

Compare that to the X stack where you have bits and bobs all over the place. Some of the X mess has been through flexible design, some have been growing pains. All the compositors (Compiz/Metacity/Mutter/KWin/etc) have been added as an afterthought. They are, at their core, hacks to do what X should probably be doing itself. If things carry on expanding outwards like they have been, we’ll get to a point where the project become unmaintainable.

All in all, when hardware support is there, it should make the whole stack more efficient and less painful to use in standard setups.

However there are a couple of issues that I haven’t seen remedies for so far:

  • X is pretty network-aware. You can send windows to other computers, you can have multiple screens with remote logins and all sorts of funky things like that. This might seem fairly specialist but it’s widely used technology. Wayland appears fairly local and static in comparison.

  • There’s also driver support. Closed-source drivers are yet to support the KMS/shared-GEM/shared-DRM technologies that Wayland thrives upon. A purist might be okay with Nouveau but somebody who pays £100-400 on a high performance 3D graphics card won’t be happy with the flaky poor 3d performance they’d get with the current open driver.

    Update: Nvidia is working to support both Wayland and Mir.

2018 update. 17.10 used Wayland as the default display server (unless you had a closed driver, or a driver that didn’t support it, or needed X). 18.04 and 18.10 both use X as global default (though you can install Wayland).

I’m not in charge of anything but from this position, it seems like we’re still a metric Nvidia away from getting real traction. Until that point, I don’t think we’re going to see enough mindshare and developing power get behind Wayland. The gaming/performance market is using X. The MCE market are using X (and direct framebuffers). I’m not sure Wayland will ever have a real chance.

Answered By: Oli

There are lots of differences between X and Wayland. Probably the biggest one from the graphics side is that Wayland doesn’t do any drawing.

X has two drawing APIs. One of these is a part of the core X11 protocol, which is ancient, useless, and nobody uses. The other is the XRender extension which provides modern composite operations, among other things such as gradients. This is what Cairo, for example, uses. X also has font drawing APIs.

Wayland has no drawing APIs. A Wayland client gets a DRM buffer handle, which is basically a pointer to some graphics memory; Wayland doesn’t know or care how the client draws to that buffer. In X terms this means that all applications get direct rendering – drawing requests don’t need to go through the server.

The only rendering Wayland does is to copy the client’s buffers onto the screen.

In terms of benefits, Wayland is a lot less complex than X which should make it easier to maintain – although some of this simplicity comes from pushing the complexity (eg: how to actually draw onto that buffer, network transparency) to other layers of the stack. By making clients responsible for all of their rendering, Wayland makes it possible for clients to be smarter about things like double-buffering.

There are other benefits outside of graphics. It’s much easier to sandbox applications, for example.

Answered By: RAOF

All other posts highlight the benefits of Wayland, but it’s not all good only. The biggest advantage of X over Wayland is that X works over the network. X is network transparent, you can display the window, or with XDMCP a complete session, on a terminal while the actual program is running on another, usually more powerful machine.
With something like Wayland, the idea for network transparency is gone.
Maybe it’s not so much required these days with fast networks and other protocols like VNC and RDP, just thought I’d mention it for completeness.

Answered By: Christian Hujer

Two little things that anyone will notice pretty quickly in day-to-day work:

  • Wayland does away with the papercuts that were deemed too hard to fix in X11. A famous example: Using the function keys (speaker volume, display brightness etc.) while a menu is open or the lock screen is on.
  • Wayland is better at input devices. For one, there are many more options for configuring touchpads, including a persistent tap-to-click setting.
Answered By: Nico Schlömer
Categories: Answers Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.