Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
3  
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 '13 at 11:30
    
Here is a great video explaining X and why people want to replace it: youtube.com/watch?v=cQoQE_HDG8g –  Jason Dec 19 '13 at 18:42

5 Answers 5

up vote 78 down vote accepted

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 have said they have no plans to support Wayland. Given supporting KMS/DRM/etc would be a major rewrite of their driver, something that would take years to get stable. If they're not even planning support, we (nvidia users) are probably at least five years away from using Wayland.

Either way, we're talking years (probably two to three IMO) before anything like this is ready for stable testing and even longer before you'd have to give up X (if Wayland was clearly better).

share|improve this answer
13  
+1 for the sheer bluntness of that Nvidia link. –  poolie Aug 15 '11 at 1:12
6  
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 '12 at 13:49
    
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 '12 at 16:21
1  
As of 2013 situation is clearer regarding network transparency: askubuntu.com/a/359870/203271 –  Diego Oct 28 '13 at 17:14

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 the clients can be smarter about things things like double-buffering.

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

share|improve this answer

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?

share|improve this answer
2  
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 '10 at 0:27
3  
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 '10 at 0:32
    
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. –  Jo-Erlend Schinstad Sep 28 '11 at 1:35
    
The RandR extension lets you change screen resolution without restarting the X server. –  Anonymous Oct 26 '11 at 21:15

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.

share|improve this answer

In addition to the above, the X Windowing Server was also not designed to be used like Ubuntu uses it. Like the name implies, it is mostly developed for server use, like remote desktop use or to link several thin clients to a single operating system.

Essentially, Wayland will drop the server support to make things faster. However, an X server can be run on top of Wayland for backward compatibility.

Edit Here is where I got the information: http://wayland.freedesktop.org/architecture.html

share|improve this answer
13  
Your first paragraph is plain wrong. The word server in “X server” is a technical term in operating system architecture; it means a program that listens to requests from other programs called clients. In popular use, the word server has a different meaning (a computer that mainly runs server programs). X servers typically run on desktop computers, not on server computers (which usually don't have a screen). –  Gilles Nov 5 '10 at 21:45
9  
I'm afraid armornick is right and you're both wrong. Read the Wikipedia articles on the X Windows System and Project Athena. X originated in 1984 as a way to connect graphical thin clients to DEC timesharing systems. I still use it occasionally that way to get to particular GUI windows on my Ubuntu box from my Mac; it's a lot more responsive than VNC for that. The fact that X can be used entirely within a single machine doesn't negate its historically network-oriented origin. –  Bob Murphy Nov 6 '10 at 0:57
    
Actually, I got this information from the Wayland website and OMG! Ubuntu! so I naturally presumed it was correct. –  armornick Nov 6 '10 at 8:41
3  
@Bob: But then the X server was run on clients and X client on server. As of server design - OpenGL was designed originally to run through network but it does not mean it perform worst then other API. –  Maciej Piechotka Dec 13 '10 at 20:30
3  
link your sources or you can't claim that your information is correct. –  Alvar Sep 27 '12 at 10:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.