User: Password:
|
Log in / New account

The way to Wayland: Preparing for life After X

November 17, 2010

This article was contributed by Joe 'Zonker' Brockmeier.

One sure way to stir up Linux users and developers is to propose replacing a tried-and-true technology with an up-and-coming technology. Especially replacing something as crucial as X, which is what Mark Shuttleworth suggested might happen on Ubuntu, with Wayland taking its place. The response to Shuttleworth's post, along comments and questions on development mailing lists since, show that Wayland is not well-understood in the larger Linux community. Moving to Wayland isn't as far-fetched as one might initially think.

So what is it? Wayland is not, as it was initially reported, a "new X Server" for Linux. Wayland is the name for the protocol and the MIT-licensed implementation of a compositor that can run as a standalone display server, or under X as a client. Most importantly, Wayland (when running on its own) removes a few layers of complexity.

As explained in the Wayland architecture document, X runs on top of the Linux kernel and, in conjunction with a compositor, it is in effect adding an extra layer between the kernel, hardware, and compositor. With X, windows and contents are sent to a separate buffer and then "composited" together into the frame buffer by Compiz, Kwin, or another compositing window manager. With Wayland, all of this will happen in one display manager.

Wayland works directly on top of the kernel, and lets the clients handle rendering directly without the intermediate layer. Wayland uses direct rendering through OpenGL, or OpenGL ES. X imposes additional layers, and that causes a performance hit. As Shuttleworth wrote when tapping Wayland as the future for Ubuntu and Unity, "we don't believe X is setup to deliver the user experience we want, with super-smooth graphics and effects."

The initial reactions and discussion about Wayland had more than a tinge of concern. Much of which based on fairly breezy reports about Wayland as a replacement for X for Ubuntu. As Andrew Haley points out on the Fedora devel list, there's no immediate cause for alarm:

It looked like a bunch of kiddies who had never used remote X applications had decided we didn't need to do that anymore, and it was more important to get kewl features like smooth scrolling and rotating 3D whatnots. It seems that isn't true, and we don't need to worry. The lunatics have not, in fact, taken over the asylum.

Yes, the asylum remains in competent hands. Wayland is not a new idea. Wayland started as a "secret" project by Kristian Høgsberg in 2008. Høgsberg's creation was outed by Phoronix, caused a brief wave of excitement in Linux circles, and then went back to largely being ignored by most of the Linux world.

But X folks have been thinking about Wayland, at least occasionally, for some time. Last year at the Linux Foundation Collaboration Summit, Keith Packard talked about turning "the graphics stack upside down" by moving device configuration out of X and into the kernel, which would pave the way for other systems like Wayland. Packard also hinted that a post-X era may be in the offing while at this year's Linux Plumbers Conference, and mentioned Wayland as a possible replacement — with X running as a client.

Why not simply extend X, yet again? It's been extended to add all sorts of features never envisioned when it was first developed. Wayland is an option "of pushing X out of the hotpath between clients and the hardware and making it a compatibility option," as described in the FAQ. X running as a client is a particularly important feature. As Adam Jackson points out on the Fedora devel mailing list, X applications only need be ported to behave as native Wayland clients. Otherwise they can run within Wayland within a nested X server "and you wouldn't ever know the difference." Note that Wayland can also run as an X client, which allows for development and testing during the transition.

It may be beneficial to look at Wayland as an opportunity rather than a potential problem. For example, while many games now run well on X, it is not particularly friendly for fullscreen 3D games. Høgsberg indicates that thought has already gone into the specific problems of fullscreen games and how to address problems like modesetting and handling the pointer.

Wayland is also poised to support GPU hotswapping, something that X does not currently support. As more hardware ships with more than one GPU, which is intended to help with power savings, users will want Linux to support switching between the GPUs.

But we're not there yet. The big problem, of course, is that Wayland is not ready for prime time — or even early morning between infomercials. Wayland may see an influx of interest thanks to the attention it's getting, but there's a long way between vision and reality at the moment.

As Packard mentioned during his LPC talk, input is another problem for an alternative display system. Key mapping, accessibility work (using the keyboard for mouse movement, for instance) and handling more complex input devices like touchpads, all need to be addressed.

Aside from a general lack of readiness for Wayland itself, Wayland also lacks drivers. Nvidia has already explicitly said it has no interest in Wayland, though Nouveau may be able to take up the slack there. Wayland can use the open source KMS drivers for ATI, Intel, and Nvidia — but what about the new crop of video hardware coming with ARM-based devices? Here we have a new set of video hardware without open source drivers or existing efforts to create them.

There's also the question of who's going to do the work to ready Wayland. The work on Wayland up until now — and in the foreseeable future — has been on Red Hat and Intel's payroll. Høgsberg was a Red Hat employee when he first started Wayland, and is now working for Intel. Canonical doesn't have any resources currently assigned to work on Wayland. Canonical's Ted Gould has set up an import of Wayland's git tree into Launchpad to make it easier to build packages. But Gould says he's unaware of anyone directly working on Wayland who is on Canonical's payroll:

Most of our effort there is ensuring that the new stuff we are building (Unity, uTouch, etc.) is compatible with a post-X11 future. It seems like momentum is definitely switching in that direction with even Keith implying it at Plumber's.

Personally, my biggest worry with Wayland is graphics drivers, and I think that was partially what Mark's blog post was trying to help with. Establish a direction at a high level to let other companies know where we're going. I hope it's successful, otherwise the switch (which seems inevitable at this point) will be very painful.

Users who are itching to get hands on bleeding-edge Wayland builds can look at the compile instructions, or add the "xorg crack pushers" PPAs for Ubuntu to install Wayland on Maverick (10.10) or Natty (11.04). Breakage is quite likely. Developers interested in pitching in are welcome to do so. Wayland is part of freedesktop.org, and the git repository is open.

But it will be some time before anyone needs to make the switch. With the renewed attention caused by Shuttleworth's post, Høgsberg has started working more actively on Wayland again. But while Høgsberg isn't quite going it solo, there's not a lot of commits from other developers yet. Shuttleworth indicated that it would be a year before Ubuntu could seriously consider switching to Wayland. Fedora will probably package Wayland for F15, but when it will be default is up in the air. Jackson says the "cabal" of Fedora graphics folks "don't even have a complete list of transition criteria yet, let alone a timeframe for switching the default." It would seem that replacing X has momentum, but we're a long way away from making a switch.


(Log in to post comments)

The way to Wayland: Preparing for life After X

Posted Nov 18, 2010 10:09 UTC (Thu) by rwmj (guest, #5474) [Link]

I really can't believe that people think it's a good idea to follow the OS X model of X11 apps being second-class citizens, and the first-class citizens not having network transparency.

The way to Wayland: Preparing for life After X

Posted Nov 18, 2010 13:47 UTC (Thu) by DiegoCG (subscriber, #9198) [Link]

First-class apps do have network transparency. It's called VNC/RDP/Spice. Unlike X11, those protocols are designed to do proper network transparency.

The way to Wayland: Preparing for life After X

Posted Nov 18, 2010 13:51 UTC (Thu) by rwmj (guest, #5474) [Link]

You want me to install and run an entire desktop system on my server so I can forward a single graphical app? And then only be able to view it in a huge window that takes up most of the screen? Isn't the new thing supposed to be better than the old thing ...

The way to Wayland: Preparing for life After X

Posted Nov 18, 2010 15:41 UTC (Thu) by foom (subscriber, #14868) [Link]

There's no reason why that has to be required. You could very well do VNC-style compressed-bitmap transmission of a single (or group of) windows.

For a real example, Windows RDP supports single app remoteing...and they sure don't use X11. It works damn well -- better than X11 forwarding.

http://technet.microsoft.com/en-us/library/cc753844(WS.10).aspx

The way to Wayland: Preparing for life After X

Posted Nov 18, 2010 16:38 UTC (Thu) by rwmj (guest, #5474) [Link]

Unfortunately this simplistic approach does not work.

Pixels are not the same shape on every display. Colours aren't balanced the same way.

The application really needs to talk to the display to find out these things, which is exactly how X works, and how the other technologies you mentioned do not. (I should also mention that actual rootless VNC/whatever that *I can use today* does not exist).

Rich.

The way to Wayland: Preparing for life After X

Posted Nov 18, 2010 17:42 UTC (Thu) by foom (subscriber, #14868) [Link]

Well, I dunno, perhaps RDP does get those wrong, I wouldn't ever have noticed. There's no reason it *has to* get it wrong, though -- the RDP client could quite feasibly send that data to the server so that when the application asks the server (that is: the RDP server, running on the same host as the app), it gets the right answer.

But RDP gets a lot of other things right, which Unix/X11 forwarding doesn't: sound devices, filesystem, and printers are all shared from the desktop client to the server.

Yes, sure, those are all "simple" additions on top of X11 (or perhaps beside it). Just like color calibration and pixel shape are to RDP.

The way to Wayland: Preparing for life After X

Posted Nov 18, 2010 23:52 UTC (Thu) by intgr (subscriber, #39733) [Link]

> But RDP gets a lot of other things right,
> which Unix/X11 forwarding doesn't

You forgot performance. I've tried using X11 forwarding over SSH on a 100Mbit LAN. Maybe I'm doing somethng wrong, but I always found the performance to be abysmal. They say it's GTK's fault, but what's the point of a feature if major toolkits can't find developers to work on properly supporting it? As it stands, I couldn't care less about X11's network transparency.

RDP, on the other hand, flies even over a regular DSL connection. That's more important than getting color profiles right.

The way to Wayland: Preparing for life After X

Posted Nov 21, 2010 17:36 UTC (Sun) by nix (subscriber, #2304) [Link]

You're definitely doing something wrong. I've run my whole desktop over ssh over a 100Mbit LAN in the past, and while it's not instantaneous it's very fast. The only thing that shows slowdowns is stuff like video playback which is limited by raw bandwidth.

X is really rather good over LANs. It's latency that kills it.

The way to Wayland: Preparing for life After X

Posted Nov 19, 2010 2:21 UTC (Fri) by dlang (✭ supporter ✭, #313) [Link]

filesystems and printers are already easily shared (and shared through a number of different mechanisms), why would your display protocol need to handle them?

sound is an issue in some cases.

The way to Wayland: Preparing for life After X

Posted Nov 23, 2010 5:06 UTC (Tue) by foom (subscriber, #14868) [Link]

> filesystems and printers are already easily shared (and shared through a number of different mechanisms), why would your display protocol need to handle them?

Filesystems (and printers) aren't otherwise *easily* shared from client to server, in a way such that the app running on the central server can access your client's filesystems and printers.

Of course you can turn on NFS on your client, set things up so that it's securely and encrypted, become root on the server, mount your client's file share...then undo all that again when you stop using the remote app. But that's anything but easy. MS Remote Desktop makes it *easy*. (I suspect that functionality is not actually part of the display protocol, but rather just using a tunnel through the same encrypted connection, but still it's very nice for the client to handle all of that)

The way to Wayland: Preparing for life After X

Posted Nov 18, 2010 11:20 UTC (Thu) by mti (subscriber, #5390) [Link]

I have some problem understanding exactly what is wrong with X. It has served me well for some 18 years and it seems to have been able to handle all kinds of new features and extensions.

Is there a big performance problem with having both an X server and a compositing manager?

The way to Wayland: Preparing for life After X

Posted Nov 18, 2010 13:49 UTC (Thu) by DiegoCG (subscriber, #9198) [Link]

Yes - in X.org the compositor lives in a different process and redrawing a window takes 3 context switches. In Wayland, the server is a compositor, so only 2 context switches are needed.

The way to Wayland: Preparing for life After X

Posted Nov 18, 2010 13:52 UTC (Thu) by rwmj (guest, #5474) [Link]

Oh well, saving a context switch! Now you put it like that, it almost seems worthwhile to completely install and run a *desktop* on all my servers.

The way to Wayland: Preparing for life After X

Posted Nov 19, 2010 4:28 UTC (Fri) by drag (subscriber, #31333) [Link]

WTF would you run a desktop on your servers?

If you want to keep running X then do so. There is nothing incompatible or wrong with using Wayland on your desktop and X apps on your server.

The way we do X now is kinda a throwback and nobody would do it this way if they had a chance to start over. It's like designing a operating system were your web browser is required to have the ability to fiddle with bits on your PCI buss. It's a network protocol and there is no good reason why your display software needs to drive your hardware.

Anyways who the hell runs any GUI anything from their servers? I have no less then 3 different computers of my own personal use that I have at a few places at over the internet and I don't use X on any of them.

For work I have to regularly deal with well over a thousand different Redhat boxes and I have yet to give a crap about any sort of remote GUI access... for any purpose at all.

I understand this is not unusual and I like X over SSH, but the way people are talking whenever this subject comes up they are acting like X11 over SSH is absolutely critical for Linux on the server and that having to use anything other then Xorg xserver sitting on their hardware to display it is completely unacceptable.

The way to Wayland: Preparing for life After X

Posted Nov 19, 2010 8:57 UTC (Fri) by rwmj (guest, #5474) [Link]

As I said above, once many apps lose network transparency we'll be left with a two-tier system, as on Mac OS X. So in fact I won't be able to keep on relying on X. Yes I also manage many servers, and I find it useful to run graphical programs remotely (view-viewer, eog, even firefox). Running an entire remote desktop is not an alternative.

The way to Wayland: Preparing for life After X

Posted Nov 19, 2010 14:15 UTC (Fri) by foom (subscriber, #14868) [Link]

And I still don't see why do you think you'll be left with a system like MacOSX (where there is no per-app remoting solution) instead of a system like Windows (where there is).

The way to Wayland: Preparing for life After X

Posted Nov 19, 2010 15:06 UTC (Fri) by quotemstr (subscriber, #45331) [Link]

Anyways who the hell runs any GUI anything from their servers? I have no less then 3 different computers of my own personal use that I have at a few places at over the internet and I don't use X on any of them.
Your personal incredulity is not a rationale for cutting a feature that many people do use, as amply demonstrated by other comments on these tiresome threads. You have one style; others have theirs.

The way to Wayland: Preparing for life After X

Posted Nov 22, 2010 15:42 UTC (Mon) by nye (guest, #51576) [Link]

>Now you put it like that, it almost seems worthwhile to completely install and run a *desktop* on all my servers.

This seems like such a complete non-sequitur. What are you talking about?

The way to Wayland: Preparing for life After X

Posted Nov 23, 2010 3:06 UTC (Tue) by dlang (✭ supporter ✭, #313) [Link]

everyone keeps talking about how VNC is the solution for network transparancy, but VNC requires that you have the entire desktop installed on the system you are accessing.

The way to Wayland: Preparing for life After X

Posted Nov 23, 2010 8:11 UTC (Tue) by paulj (subscriber, #341) [Link]

isn't that already the case with modern GNOME apps anyway? E.g. a lot of them depend on things like DBus session services - which isn't X11 aware (though it could be) AFAIK and thus it requires running a desktop on the remote system.

The way to Wayland: Preparing for life After X

Posted Nov 23, 2010 11:29 UTC (Tue) by nye (guest, #51576) [Link]

>everyone keeps talking about how VNC is the solution for network transparancy,

Not really. It's been mentioned, but mostly people have been talking about RDP and SPICE because VNC is unlikely to ever be a good protocol for transparent remote access.

>but VNC requires that you have the entire desktop installed on the system you are accessing.

This is so silly. We're talking about software that doesn't yet exist picking a protocol for network transparency; why would anyone assume that it would directly copy implementation details of existing software that's designed for a different purpose?

The way to Wayland: Preparing for life After X

Posted Nov 18, 2010 14:46 UTC (Thu) by mti (subscriber, #5390) [Link]

I have not looked at the Composite protocol in detail but I assume it would be possible for the composite manager to do some buffering and handle updates for several clients at the same time with a single context switch.

Or one could let the compositing manager run in the same thread as the X server.

Btw, how expensive is a context switch compared to the actual drawing?

Great stuff

Posted Nov 18, 2010 12:46 UTC (Thu) by Velmont (guest, #46433) [Link]

Great article. I'm really looking forward to the simplification of our display stack, and the improvements and innovations that surely will stem from it.

Also, I'm really looking forward to some performance improvements and a nice multitouch future.

Working on a computer all day long, I've become increasingly frustrated with its bad input system. Keyboard is very nice for writing code, but when working with big drawings/design/CSS and HTML (etc), it just doesn't cut it. I'd like to have a big screen and use my hands however I want. Do things quicker and not feel limited by the computer.

Great stuff

Posted Nov 19, 2010 15:14 UTC (Fri) by quotemstr (subscriber, #45331) [Link]

> Working on a computer all day long, I've become increasingly frustrated with its bad input system. Keyboard is very nice for writing code, but when working with big drawings/design/CSS and HTML (etc), it just doesn't cut it. I'd like to have a big screen and use my hands however I want. Do things quicker and not feel limited by the computer.

Sure. I want that too. But Wayland won't do a thing to give you these features. In fact, it'll set us all back quite a bit because we'll have to go through the "OOG THINK FIRE HOT" stage of graphics stack development all over again. If the Wayland people were serious about improving the desktop experience, they'd focus on toolkits and applications. They'd propose incremental improvements via X11 extensions as countless hard-working, serious, and professional people have done. Instead, Wayland proponents are wasting everyone's time by foisting an inferior solution to a solved problem on hapless users of major distributions.

The way to Wayland: Preparing for life After X

Posted Nov 18, 2010 14:13 UTC (Thu) by ortalo (subscriber, #4654) [Link]

A decade has passed, so maybe it's time to dig into the archives of http://www.ggi-project.org/ to resurrect the design ideas...
Oh, btw, KGI/GGI *never* was about putting X into the kernel. ;-)

The way to Wayland: Preparing for life After X

Posted Nov 18, 2010 14:26 UTC (Thu) by ortalo (subscriber, #4654) [Link]

Seriously. From what I remember of KGI as an unsuccessful attempt at improving the state of graphics on Linux/Unix, graphics hardware support was a seriously difficult issue:
- documentation was not available;
- these pieces of hardware were huge, with numerous and variable features (combined with the fact that the most advanced features were deliberately left non-documented).

Kernel fb support may not necessarily imply that the graphics hardware is documented enough to support advanced features (esp. wrt performance). OpenGL ES some 3D support, but doesn't it also implies a restricted set of advanced graphics operation?

Maybe I am underestimating KMS + OpenGL/ES. That's a really pretty good start certainly: but is it *enough* to provide the experience that people like Shuttleworth seems to expect?

If no, how are we going to convince manufacturers to provide better documentation of their hardware? (X as a project was doing a decent job at that - probably in part due to its maturity and overall success.)

We need to ensure that life after X will provide us with something really worth the effort to switching (not even counting the network transparency feature drop - which I would personnally linger for).

The way to Wayland: Preparing for life After X

Posted Nov 19, 2010 4:53 UTC (Fri) by drag (subscriber, #31333) [Link]

Think about it:

Are you going to be happy that Linux cannot use the processor in your computer and get the same level of performance as other OSes without proprietary drivers?

The things to remember is:

The GPU is now part of the computer architecture. It's not just about driving graphics acceleration anymore. It's increasingly used for a wider variety of workloads and GPUs are now being integrated into processors themselves. Both AMD and Intel now are releasing processors that include GPUs on die. The idea that Linux cannot support the processors being shipped natively and requires proprietary drivers to get acceptable performance is, hopefully, unacceptable for most people.

So GPU drivers are still needed. Newer solutions like Gallium3D are needed. Were the drivers can support multiple APIs effectively. This is different from X model were you have to have a DDX driver for 2D and 3D DRI driver for 3D. This is really quite a broken design, especially since modern hardware no longer has any 2D acceleration except through emulation support and that is going away eventually, too.

> Maybe I am underestimating KMS + OpenGL/ES. That's a really pretty good start certainly: but is it *enough* to provide the experience that people like Shuttleworth seems to expect?

That is just what is needed to drive Wayland itself. Minimal requirements.

With this approach the display manager is just another application and is not very special in terms of what it requires to operate. Other applications can use different APIs for acceleration. Wayland is just a application that collects their output and puts it into a single image that is displayed on the screen.

> If no, how are we going to convince manufacturers to provide better documentation of their hardware? (X as a project was doing a decent job at that - probably in part due to its maturity and overall success.)

Intel is supplying open source drivers. That's right about 70-80% of the desktop market right there. If all we gave a crap about was providing support for the majority of potential users they could stop right there.

AMD/ATI are not providing their own open source drivers and are also giving out documentation. And Nvidia is being asshats as usual about being open, but the open source driver is progressing at a good pace regardless.

For the desktop and server market that covers 99% of all situations. Via is still lurking in the wings, but that's about it.

For embedded systems it is much more difficult. But the Wayland model offers significant advantages for them in terms of efficiency and memory footprint over X.

Think about why Android does not use X.

> We need to ensure that life after X will provide us with something really worth the effort to switching (not even counting the network transparency feature drop- which I would personnally linger for).

X and Wayland are not mutually exclusive.

Remember X is a network protocol and the X server just displays the output from X clients. Would you like it if your web browser had to control the hardware directly to render Web pages?

Anyways. X is not very good when compared to more modern protocols like ICA or Spice.

Nobody can do anything like:
http://www.gotomypc.com/remote_access/remote_access

With X Windows. It's just impossible. It's far too inefficient.

Look at the name at the bottom of the page. Notice that: Citrix?

They make a huge amount of money providing support for thin clients and remote applications for corporations all over the planet. Do you know why they can make so much money?

Partially because X sucks so badly. There are ways to deal with remote applications that are probably better.

With SPICE they can get performance better with Linux-KVM then ICA through the use of virtualization and special 'virtual' hardware. So they are going at a level much lower then X, VNC, RDP, or ICA runs at and they are getting better results.

http://www.youtube.com/watch?v=nRliEV7GnF0
http://www.youtube.com/watch?v=uvfkj8V6ylM

I don't know how that can be applied to Wayland, but certainly something can be figured out. They made ICA and RDP work for Windows after all! Anything is possible!

The way to Wayland: Preparing for life After X

Posted Nov 19, 2010 9:08 UTC (Fri) by ortalo (subscriber, #4654) [Link]

If we can really cover 99% of users concerns with Wayland and KMS+OpenGL/ES, I agree the evolution is required.
It's just that I am a little doubtfull about that 99%. I would feel better with a double check of hardware feature vs. register-level documentation for all important targets(even for so-called well-documented or well-supported chipsets like Intel). Code availability is important, but documentation is too IMHO.

Concerning VNC/RDP/ICA etc. Well, from my own experience (I have been working for +5 years in an organization that made a general switch to Citrix 10 years ago), Citrix success is not only tied to the display client efficiency.
It is primarily the administration infrastructure for Citrix servers and the (supposedly good) idea of "thin clients" (ie. no administration overhead on client PCs) that seems to be the key issue for IT managers selecting such architectures. (In some sense, it is also a sort of reversing the movement towards distributed computing of the nineties to go back to centralized computing.)
The display client efficiency was a requirement, but from what I have observed, it was not alone the key feature for selecting that solution.

The way to Wayland: Preparing for life After X

Posted Nov 19, 2010 10:44 UTC (Fri) by job (guest, #670) [Link]

I expect SPICE to perform well over low latency, high bandwidth links. I'm not sure it's a good idea for high latency, low bandwidth links such as WANs, but I've not actually looked at it so please take this as idle speculation.

The way to Wayland: Preparing for life After X

Posted Nov 20, 2010 18:02 UTC (Sat) by mfedyk (guest, #55303) [Link]

will these same spice demo work over a dsl connection? please come back when it does.

also lets stop talking about x twiddling bits on the hardware. with KMS that's not happening anymore and wayland won't work without KMS anyway.

I think we are going to regret our wayland future.

The way to Wayland: Preparing for life After X

Posted Nov 18, 2010 20:17 UTC (Thu) by alonz (subscriber, #815) [Link]

Would it be considered extremely rude to confess a lack of surprise at Canonical's lack of contributions to a technology it claims to be “The next major transition for Unity”?

The way to Wayland: Preparing for life After X

Posted Nov 18, 2010 21:17 UTC (Thu) by jeremiah (subscriber, #1221) [Link]

no it would not.

The way to Wayland: Preparing for life After X

Posted Nov 19, 2010 10:50 UTC (Fri) by job (guest, #670) [Link]

Applications connecting to display servers is an architecturally sound idea. Different displays have different physical properties such as color depth etc. which must be taken care of at run time. I hope this idea is not lost along the way. My concern is that since the modern GUI toolkits such as Gtk and Qt has already made key concepts such as X resources and X-in-X proxies pretty much unusable, a lot of people might never have used it and won't miss it.

The way to Wayland: Preparing for life After X

Posted Nov 19, 2010 14:29 UTC (Fri) by rvfh (subscriber, #31018) [Link]

> Aside from a general lack of readiness for Wayland itself, Wayland also lacks drivers.

Would it not be possible for Wayland to be designed to use X drivers? This way we would not break compatibility with older/newer hardware?

The way to Wayland: Preparing for life After X

Posted Nov 19, 2010 23:43 UTC (Fri) by JohnLenz (subscriber, #42089) [Link]

Wayland doesn't use any drivers directly. Instead it relies on OpenGL and EGL, but needs the ability to run OpenGL and EGL directly on the hardware. This is now possible with all the open source drivers using gallium. I have tried wayland and it works well if you use the open source drivers. Even llvmpipe works ok.

The problem is closed source drivers. If the closed source drivers would be modified to not require X but run directly on the hardware, then wayland would work for them too with no changes to wayland needed. But no one can see the code so no one knows.

The way to Wayland: Preparing for life After X

Posted Nov 19, 2010 15:01 UTC (Fri) by quotemstr (subscriber, #45331) [Link]

> Wayland is also poised to support GPU hotswapping

For Christ's sake, you Jacobins complain that "nobody" uses network transparency, then you go on to tout *GPU HOTSWAPPING*? That's brazen and maddening. It smacks of other motivations.

I can't believe you people aim to utterly castrate the Linux desktop for... this. You still can't explain exactly what it is about X11 that you find so distasteful. You can't demonstrate what aspects of its architecture cause local performance issues or come up with benchmarks to support your dubious assertions about network transparency harming performance. X11 could support every feature you mention; every previous challenge has been successfully met with an X11 extension. Your particular case is no different.

It seems as if you're entirely motivated by a simplistic rejection of the old in favor of the new ---- no matter what the relative merits of the two. Wayland has nothing to do with improving the state of the desktop and everything to do with a bunch of cretins burning down the great old edifice of Unix out ignorance and fear. It's as if you think X11 is some evil demon that need to be driven out. It'd be ridiculous if distributors weren't listening, but they seem to be full of adherents to this asinine, reactionary religion.

The way to Wayland: Preparing for life After X

Posted Nov 19, 2010 15:56 UTC (Fri) by glisse (subscriber, #44837) [Link]

Feel free to do patch for Xorg to show how great you can make it (i would especially curious about hot switching between GPU, about tear less, about really accelerating X applications when all app do client side rendering as gtk and qt are doing so for some good reasons ...) If you start looking, you will see that there is some kind of dead end in X...

Truth is current Xorg community want X to be out of the picture and wayland seems like the perfect solutions.

The way to Wayland: Preparing for life After X

Posted Nov 20, 2010 19:49 UTC (Sat) by quotemstr (subscriber, #45331) [Link]

Not tearing doesn't require ditching X. All you have to do is have the compositor synchronize with the display: you can do that with triple bufering, or by putting the compositor in the X server.

What part of that requires ditching the X protocol and architecture?

The way to Wayland: Preparing for life After X

Posted Nov 20, 2010 20:29 UTC (Sat) by glisse (subscriber, #44837) [Link]

Tearing can be solve not too badly with compositor but without compositor please feel free to show me how to do it (it means thinks 10 times before even remotely believe you have one solution).

So now with a compositor here is what happens :
app->toolkit->render window(gtk/qt/cairo ...)->upload to X as a pixmap (memcpy new buffer allocation + others overhead)->compositor use it has a texture->screen

Wayland:
app->toolkit->render window(gtk/qt/cairo...)->give buffer id(ie send an int)->compositor use it as texture->screen

Suddenly you removed all the X protocol, all the memcpy non sense, all the painfull path to try to make it right in the DDX. And now life is beautifull. I am not even mentioning app half rendered and others rendering non sense of X.

X is painfull to accelerate and even more to get it right, i have been writing X driver for few years now and what i can tell you is that i prefer writing a GL driver than an X driver.

But please if you feel X is the right way come join us and wrote driver to truely use GPU with X.

Bottom line is if all X people says that they want wayland then it just means it's what you will get in your distribution sooner or later unless new people step up and shows all the X people how X was supposed to be done.

The way to Wayland: Preparing for life After X

Posted Nov 20, 2010 20:45 UTC (Sat) by quotemstr (subscriber, #45331) [Link]

Tearing can be solve not too badly with compositor
So you concede that tearing can be fixed within the X protocol.
please feel free to show me how to do it
You can do it with a novel technique called double buffering. I mean, it was only invented in the 1980s: you may not have heard of it yet.
app->toolkit->render window(gtk/qt/cairo ...)->upload to X as a pixmap (memcpy new buffer allocation + others overhead)->compositor use it has a texture->screen
Cairo and other toolkits can render directly using XRENDER or OpenGL. The XRENDER and OpenGL operations are sent symbolically to the X server, which then hands them off directly to the GPU. There's no client-side pixmap and memcpy involved. You're either disingenuous or ignorant.
X is painfull to accelerate and even more to get it righ
Boo hoo, programming is hard! Let's burn the place down instead.
wrote driver to truely use GPU with X
What specific operations that are not accelerated today would be accelerated under your proposed architecture?
i prefer writing a GL driver than an X driver
Your statement is nonsense. What's the difference? When writing an X driver, you don't have to care about it being for X per se. A graphics driver deals with the same primitives in any environment: mode setting and acceleration. That's why nVidia can use the same codebase for its drivers on all platforms.
if all X people says that they want wayland
If that's the case, then the X people have lost their minds.

The way to Wayland: Preparing for life After X

Posted Nov 20, 2010 23:55 UTC (Sat) by glisse (subscriber, #44837) [Link]

Double buffering, i surely never heard of it ... Likely because i am an ignorant :) But i don't want to be more disingenuous with you, was fun talking with you, can't wait seeing you on Xorg devel you have a lot of things to teach us.

The way to Wayland: Preparing for life After X

Posted Nov 22, 2010 0:32 UTC (Mon) by bronson (subscriber, #4806) [Link]

quotemstr, you sound like you're saying "It's just a software problem! That's easy!!"

Have you contributed any code to X? If you actually do have real-world experience with this codebase, then I am definitely interested in what you have to say. But if your point is that someone else can fix everything, I can only conclude that your shrill opinion carries very little water at all.

The way to Wayland: Preparing for life After X

Posted Nov 20, 2010 18:48 UTC (Sat) by mfedyk (guest, #55303) [Link]

+ 10^256

thank you, I couldn't have said it better. hopefully people will come to their senses

The way to Wayland: Preparing for life After X

Posted Nov 23, 2010 1:33 UTC (Tue) by nlucas (subscriber, #33793) [Link]

I don't understand why all this fuss about something that can be completely transparent to the user.

If the implementation is done right no one will notice. The network transparency will remain as good or better than before, so why all this hostility?

Sure, it can be another Pulse Audio or KDE 4 breakage, but that seems just to be the preferred "Linux way" of improving things. On the other hand there are real gains on dropping X as the hardware controller and have it be just the X protocol controller he is good at.

The way to Wayland: Preparing for life After X

Posted Nov 23, 2010 3:08 UTC (Tue) by dlang (✭ supporter ✭, #313) [Link]

because the people creating the new version are claiming that nobody needs the network transparency, so they are pushing to have all apps convert to a new system that would have them be incompatible with X11, thus eliminating the network transparency for those who need it.

The way to Wayland: Preparing for life After X

Posted Nov 23, 2010 11:32 UTC (Tue) by nye (guest, #51576) [Link]

>because the people creating the new version are claiming that nobody needs the network transparency

Is there any actual evidence of this?

The way to Wayland: Preparing for life After X

Posted Nov 25, 2010 9:22 UTC (Thu) by renox (subscriber, #23785) [Link]

>I don't understand why all this fuss about something that can be completely transparent to the user.
>If the implementation is done right no one will notice. The network transparency will remain as good or better than before, so why all this hostility?

Probably because implementation are never "done right" at least at the beginning, so there will be some pain at the beginning.
And some like me thinks that improving the toolkits would give much more bang (improved user experience) for the buck (development effort and transition pain).

Plus Wayland developers say "we focus on the local case, but it's easy to add network transparency", which implies that they don't really care about network transparency and pretty much ensure that it'll stay a 'second class citizen' for a long time because other things such as input event handling are really, really difficult to do well..


Copyright © 2010, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds