Monday, November 22, 2010

Wayland VS X - Some Perspectives

The Linux world has been very talkative for the last few weeks with the news that Ubuntu plans on switching from the classic X server to Wayland for it's graphics environment. For those who are still unclear as to what exactly Wayland is, here is a quote from their homepage:

"Wayland is a protocol for a compositor to talk to its clients as well as a C library implementation of that protocol. The compositor can be a standalone display server running on Linux kernel modesetting and evdev input devices, an X application, or a wayland client itself. The clients can be traditional applications, X servers (rootless or fullscreen) or other display servers."

For those still unclear as to what Wayland is supposed to be doing after reading the above quote - essentially Wayland helps a compositor, such as Compiz or KWin, work with applications running on a computer. It can run on top of an existing display server, such as X, or act as the display server itself (and run X inside of itself similar to how OSX does).

My first and foremost question to the change to Wayland is why? Well according to Mark the "why" is the following:

"we don’t believe X is setup to deliver the user experience we want, with super-smooth graphics and effects

To each their own. The wonderful thing about FOSS is choice - my question this: If desktops such as Enlightenment can achieve an elegant, fluid desktop while using X, why can't Unity? My next concern about using the Wayland project is if it is ever going to actually fully get rid of X. Mark states that they plan to keep backwards compatibility with all X applications. While backwards compatibility of this sort is something that is very necessary, I some how doubt this going to be accomplished with out keeping parts (if not all) of X around. If this is the case - what is the point of adding Wayland into your graphics layer in the first place?

The last part of Wayland that is a large cause for concern is lack of closed source video driver support. As a free software advocate I know FOSS drivers are ideal (and they are advancing rapidly) but as of yet they do not offer anywhere near the performance of their closed source counter parts. In fact as of today the only open source graphics drivers that support any form of decent 3D acceleration are for Intel chip sets. While I recommend taking anything you read on Phoronix with a grain of salt - their claim that nVidia has no plans to support Wayland in their closed source driver sounds about accurate. As for ATI? Their Linux driver support has historically been worse than nVidia - so I wouldn't hold my breath here either.

As with most things only time will tell if Ubuntu's (and Fedora's) transition to Wayland will be a success (or a death sentence) for the respective distros. In the mean time want to give Wayland a try? Well, currently it is barely functional and only works on a limited amount of hardware. That means, in addition to all the concerns above, a good deal of time, funding, and man power is going to have to be invested in Wayland just to make the project functional for a desktop operating system such as Ubuntu.

Personally, I think this announcement is premature and we won't have a functional "Wayland only" display server on a main stream distro for several years at least. What is your take in the situation? Do you think the change was necessary and how soon will it come?

~Jeff Hoogland

23 comments:

  1. Lots of things will be lost in transition. X protocol over TCP (think ssh -X for example) will probably be the most painful if not compatibility. More importantly, NVidia won't support it, and has already said so. While there is value in improving the desktop experience, this isn't the right approach. A better approach would to be to focus on things that are not performing well in the X server. Seriously though, as you said if Enlightenment can pull it off, it just shows that Canonical is lazy or doesn't understand how to build good software. I haven't looked at Unity, but seeing their other stuff, I don't really have to.

    Talking about Wayland is how Mark keeps Mark feeling important.

    ReplyDelete
  2. If you actually read the whole thing mark wrote up on his blog, theres more to it then just pretty graphics.

    I agree that we won't actually see any implementation of this any time soon, at least not as a default option, but as you say Linux is about choice, and you don't have to use Wayland even when it is default, so there is not much to worry about. I personally think its exciting.

    Just read the FAQ's for more info on wayland.
    http://wayland.freedesktop.org/faq.html

    ReplyDelete
  3. Nvidia is not even worth worrying about. They are not really supporting progress of X11.

    DRI2 and KMS that are over 5 years old core parts of the Current X11 direction Nvidia has basically no support for. Wayland to operate has no more requirements that providing upto date design drivers for X11. At some point x.org is going to stop support for DRI1 drivers so Nvidia drivers become useless then as well.

    ATI closed source drivers do have DRI2. Sorry Nvidia tech wise is dragging feet.

    ssh -X is completely useless for opengl based applications. Wayland is a lighter server design better targeted for vnc and rdp and other streaming protocol.

    Advantage of Wayland is that each application uses its own buffers for screen rendering. So suspending to disk of applications should be possible without major headaches.

    So yes you lose X11 remote nature. But what you gain from Wayland is better.

    Fedora and Ubuntu have to support Wayland as part of Meego mobile devices.

    Basically X11 support in wayland is already covered just run x.org inside wayland for the applications. Yes this could be thinned down. GTK and QT are both developing forms that can go direct to wayland.

    To be truthful 90 percent of graphical applications used on Linux use one or the other toolkits.

    Really I back the distributions all the way going forwards with wayland since out of date driver designs will not cut it much longer.

    ReplyDelete
  4. Let's be very honest here. Linux is always about going into the future and not about the past. Just look at any popular distro with big community behind it. Howmany updates get pushed out hourly vs Mac or m$? Look at unstable debian. Look at any non-lts ubuntu distro. Look at fedora in general. All these show Linux's non-stop relentless efforts to get ahead to the future.
    Just go to phronix and look at their testing of the last 26 Linux kernels! It's about moving forward, so what if wayland is bust. I gaurantee 10 Linux failures are far more productive than one m$ failure (vista).

    ReplyDelete
  5. at some point the linux and opensource desktop has to move beyond X - and the important first step is that which Ubuntu has taken - a statement of intent, to kickstart the discussion, and the effort.

    regarding the network transparency of X, it is "insufficient" for the future anyway - hence desktop virtualization protocols such as SPICE - and for sure Wayland will surely support a native VNC client - this being relatively trivial to implement

    while most applications are X ones, surely wayland need to host an X server "forever" for most desktop applications. Still, many applications will be be ported, obviously the "window manager" and "desktop widgets" - and probably browsers, VLC and what-not

    actually people often use very few desktop apps these days - and use web-based apps for most purposes

    if Java SE is ported to Wayland down the line, then that brings a whole host of desktop apps into line (not least the java IDEs which are important to java developers)

    whether there is a huge effort required to port OOo or not, i don't know, but i imagine so. Still, more people will be using Google Docs than OOo going forward i imagine

    A final point is that Opensource display drivers seem to have a critical mass, and i imagine these plus Wayland plus Wayland/X could all be playing nicely together in 2 to 3 years time

    ReplyDelete
  6. So your arguments are all that Linux should be more Windows like. I don't want VNC, I want to talk a native protocol over TCP. I suppose this means that Ubuntu isn't for me.

    There are a lot of ifs here none of you really have much of a clue about X but keep talking up Wayland like someone actually likes it other than yourselves.

    Every project thus far has failed to replace the X server, there have been many. The reason is that the X server actually does the job that it is designed to do, where everything else falls short.

    ReplyDelete
  7. Wayland may be moving forward in terms of speed, but it moves backward in terms of functionality.

    The future should be where you can move running applications from one device to another (Just the display portion), so you can (for example) move an editor from your desktop to your tablet, and give to a someone else to read. (Maybe a choice of moving the execution would also be nice in some instances)
    I must say I am frustrated for X not moving in this direction, but Wayland would be like going in the opposite direction

    I cannot see myself moving to a system where I have to use something like vnc with taskbar et al to access a single small GUI. It might support X programs initially, but the problem will come when software is developed NOT to use the network layer.

    I can understand the need for Meego, where the device is a handheld unit, although X runs just fine on my Maemo 5 N900 (Really nice to display the GUI on the phone of a program running on my media server desktop)
    For a server, desktop and even notebook I think spending the energy on optimising X and maybe dropping some obsolete functions would be better.

    ReplyDelete
  8. a lot of qq from the neophobs

    ReplyDelete
  9. "I cannot see myself moving to a system where I have to use something like vnc with taskbar et al to access a single small GUI"

    "vnc-like" means "pixel scraping" (as opposed to shoving render commands over a pipe, send pixel values), not necessarily a rooted server forwarding.

    Since Wayland is a compositor, remote windows could be done like this or by shoving the render commands over the pipe. Either works. Plus since Wayland is light enough, it could hold a bunch of apps and then singular running apps are forwarded over a pipe and you get tmux-like persistency (tmux is like screen, but of better design and what Wayland would enable is closer to it than screen).

    ReplyDelete
  10. "Since Wayland is a compositor, remote windows could be done like this or by shoving the render commands over the pipe."

    Congratulations, you re-invented X.

    What a waste of time.

    ReplyDelete
  11. Nobody is *using* X anymore anyway: All apps have been using toolkits like Qt and GTK for ages. Those do all the rendering inside the toolkit and basically push pixmaps to X for it to render, using hardly any X rendering functionality at all!

    So even when using X remotely the chances are high that it does "pixel scrapping" just like VNC and others do.

    Replacing X with Wayland should be very straight forward for most toolkit based applications. After all many of those apps already run on windows and/or Mac already, so I doubt that there will be many users that will need to use legacy X support once a distribution switches to wayland (or whatever alternative to X).

    Video drivers are an issue though: But they will be an issue for each X11 protocol update as well. Whenever some new functionality is introduced the proprietary drivers need to get updated (think KMS, etc.). I doubt that supporting wayland is so much more challenging than e.g. supporting any new X extension which would improve composition to levels possible in wayland.

    ReplyDelete
  12. Haters gonna Hate. Forward thinkers to the rescue.

    ReplyDelete
  13. Well, I think that it is an interesting move. Fedora is going to have Wayland in release 15 to get the testing and development pushed through. From my understanding, X has become very bloated over the 20+ years that it's been around. It is getting harder as time passes to maintain the structure, and add all the little hacks. Also the mentality of the X structure is stuck in the 80's. One way to fix X11, would be to clean up the code base as much as possible without breaking what they have. I am sure that it is possible to do as that is what is going on in the LibreOffice code.

    Though the thing that really caught my attention was the fact that several of the lead developers of X.org are actually supporting Wayland such as Adam Jackson.

    Src:
    http://lists.fedoraproject.org/pipermail/devel/2010-November/145273.html
    http://lists.fedoraproject.org/pipermail/devel/2010-November/145271.html

    I personally don't think that X will ever be completely replaced, but Linux is always evolving and pushing forward.

    ReplyDelete
  14. "That means, in addition to all the concerns above, a good deal of time, funding, and man power is going to have to be invested in Wayland just to make the project functional for a desktop operating system such as Ubuntu." Well, Shuttleworth has all three, as well as Red Hat for Fedora. I guess, as usual, only time will tell, yes? Meanwhile I`m lovin` my Enlightenment, (and Bodhi, hehe).

    ReplyDelete
  15. I always find it interesting the mentality of "Have to have the newest shiniest" simply because it is he newest and shiniest. Wayland has many critical and documented drawbacks. Some of them mentioned here.

    Could it be a replacement for X in time? yes. Is it even remotely ready to do so now? Not even close.

    ReplyDelete
  16. I think that long term it will be a success.

    ReplyDelete
  17. Well, I think it should be very welcome a new graphic stack in linux, since wherever I read about graphics drivers development for this platform it's all about suffering.
    I guess that having a driver for the X server and another for the framebuffer it's a pain.
    Seriously, I'm sorry for those guys wanting to run xclock over ssh/tcp (there are better alternatives, trust me, one of them it's to look at your wristwatch) but if we want to see the "Linux Desktop's year" I guess it needs ease of graphics driver development (or make it's best).
    Just think about the laptop GPU switching problem with X, good monitor detection when hotplugging.
    I guess we won't see the "Linux Desktop's Year" until X is used as a main display server. At least when I read articles about it each January and look at my opened xterm, all I get it's a "sad laugh".
    This is my grain of salt. Sorry about any mispelled word, I'm not a native english speaker.
    Thanks!

    ReplyDelete
  18. Errata: I wrote wrong in this phrase: 'I guess we won't see the "Linux Desktop's Year" until X is used as a main display server.', it should be 'I guess we won't see the "Linux Desktop's Year" WHILE X is used as a main display server'.
    Sorry, that is one of those silly mistakes you make when you are not a native english speaker :-/

    ReplyDelete
  19. Seems like wayland will have backdoors sometime soon or even right now, the better thing to do would be to improve xorg not make a new compositor that would most likely be unsupported by good graphics card drivers.

    ReplyDelete
  20. improve Xorg is not the solution, if this was the solution it would be done already, Xorg is done already and it won't improve, it's a big pile of mess, if Xorg could have been improved it would have been improved already, but nobody did that in 25 years of Xorg existence.

    we need something new, and that is Wayland, please think more openly instead of being close minded.

    ReplyDelete
  21. I think I'll just run one application server for X and one for Wayland. That way, it doesn't matter which display protocol is being used on the client, as long as it supports RDP.

    Also, if you have Wayland installed on your main machine, why not just run your X11 applications via VirtualBox (assuming it's ported)?

    ReplyDelete
  22. I have been around the block since the beginning of (microprocessor) time and have seen lots of things happen - not always for the good. I was one of the first to get my hands on X (at DEC) - what a big step forward it was relative to everything else out there...and it is STILL around...we learned a lot from X and we will learn a lot from wayland as well. In the least, think of wayland as a sandbox to try out new concepts without worrying about breaking some precious feature available now. I do agree with some of the comments above - especially around composting across several devices and device types seamlessly to support mobile. Without this functionality, wayland, and anything else for that matter, is already dead out of the chute.

    ReplyDelete