249

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?

5
  • 5
    As of December 2013 it looks like Unity based Ubuntu will use Mir display server instead of a Wayland based compositor starting from Ubuntu 14.10: link link Other Ubuntu variants will probably move to Wayland: link
    – Diego
    Dec 9, 2013 at 11:30
  • 6
    Here is a great video explaining X and why people want to replace it: youtube.com/watch?v=cQoQE_HDG8g
    – Jason
    Dec 19, 2013 at 18:42
  • 1
    Ubuntu 18 (Bionic) will now use xorg by default, but wayland is still an option on the login screen: blog.ubuntu.com/2018/01/26/…
    – Kris
    Aug 29, 2018 at 9:56
  • I would say X is better. I wouldn't go into technical stuff. But I'll just say I have dropping frames on youtube with Wayland if I resize the window or go/exit full-screen. With X, no issues. Even though the speed is the same. Also on Wayland mouse cursor feels looser than on X. X is still my no1
    – Luka
    Dec 6, 2018 at 18:49
  • This kind of question implies that wayland >is< better. Better is always relative compared to use case and reference frame. Better than what ? Better than Windows ? Better than XOrg ? Better for whom ? People who want to run games? People running software on a remote computer without needing RDP ? You didn't specify. Wayland is way worse than X11 (speaking as non-gamer here).
    – WitchCraft
    Feb 14, 2020 at 13:47

6 Answers 6

176

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.

10
  • 25
    The network transparency thing is way overblown for several reasons. 1. Pure X forwarding is only fast enough over a LAN. Over the internet raw X is unusable due to latency. To get decent performance you have to use third party protocols like NX or VNC. 2. Both NX and VNC are a massive pain to set up due to X's architecture. It should be easier with Wayland. 3. Few modern toolkits use X's drawing code. They just draw themselves to a bitmap and send that to X. This is exactly the same as Wayland and will have the same network characteristics.
    – Timmmm
    Dec 18, 2012 at 13:49
  • 5
    I agree with point 1 but over a good LAN, X-forwarding untouchable for quality or performance. Much better than either alternative in my experience.
    – Oli
    Dec 18, 2012 at 16:21
  • 1
    As of 2013 situation is clearer regarding network transparency: askubuntu.com/a/359870/203271
    – Diego
    Oct 28, 2013 at 17:14
  • 3
    @poolie: It seems they changed their minds. ;-)
    – Peque
    Mar 10, 2015 at 11:35
  • 2
    From BionicBeaver/ReleaseNotes: "X is the default display server. Wayland is provided as a Technical Preview and is expected to be the default display server in 20.04 LTS. To try it out, just choose Ubuntu on Wayland from the cog on the log in screen. X.org logs may now be found at ~/.local/share/xorg" [emphasis mine] Jan 19, 2019 at 0:18
71

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.

3
  • 4
    Sounds like Microsoft's DirectX like things?
    – Anwar
    Jun 5, 2016 at 16:34
  • 3
    I use the core X11 protocol drawing API, because it's faster than XRender. Feb 2, 2018 at 21:01
  • 6
    I also get Microsoft wibes by Wayland and systemd. And no, that is not a good thing. They break basic software development rules. In systemd just because it is easier for the developers of systemd. In wayland because they want faster games(?) and rendering, and throws out lots of good stuff with that.
    – Anders
    Mar 29, 2018 at 11:14
27

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.

2
  • This is exactly what I also consider the biggest advantage of the X over the proposed Wayland.
    – Kris Jace
    Jun 15, 2018 at 2:18
  • 3
    and screen sharing doesn't work any more in wayland in the major tools like: Zoom, Skype, Webex (though maybe it's solvable by them?)
    – Gavriel
    Apr 27, 2022 at 10:56
23

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?

4
  • 4
    KMS & GEM doesn't move the graphics drivers to the kernel, only some small parts are moved to the kernel (the bits that speak directly to the hardware and are required to be in the kernel such that different drivers can co-exist, e.g. writing to I/O ports and managing memory). KMS & GEM are already used by X today, at least for modern open source drivers (intel, radeon, nouveau). BTW: I seriously doubt moving the whole graphics driver to the kernel would be accepted by Linus... ;)
    – JanC
    Nov 6, 2010 at 0:27
  • 4
    Oh, and KMS was never needed to change the screen resolution (that has been possible ever since I used X more than 10 years ago), but it allows different drivers (e.g. the console framebuffer driver, the X drivers and now the Wayland drivers) to cooperate more easily. In the past it was not always obvious for each of them in what "state" the graphics hardware is at a certain point in time, and a lot of guessing or driver-dependent proprietary workarounds were used.
    – JanC
    Nov 6, 2010 at 0:32
  • 1
    It isn't entirely true that X forwarding will go away since X can still be used as a client on Wayland. wayland.freedesktop.org has an example of that. But X is a rather horrible way to do that sort of thing anyway. It's about time it gets replaced. In many cases, it seems that things like GTK with Broadway would be a better approach. Sep 28, 2011 at 1:35
  • 3
    The RandR extension lets you change screen resolution without restarting the X server.
    – Anonymous
    Oct 26, 2011 at 21:15
9

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.

7

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.
1
  • 2
    Wayland is worse if a program is locked for a reason. To have different wm are a good thing. I use network X11 on regular basis (each day). Some program has stoped working in Wayland (I uses Ubuntu 18.04)
    – Anders
    Mar 29, 2018 at 11:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .