The Linux display saga

Rage Face

The title of this article may be slightly misleading. What I want to talk to you today is the looming battle between Mir and Wayland, and there’s no better time to do that than right now, a few days after the latest edition of the Ubuntu family has been released upon the world. Now, we did talk about Wayland before, but it was more of a technical discussion, closely following another one on Qt, and how it might make Linux big one day.

And then, just a few days back, we discussed what is wrong with Linux, and there’s gonna be a sequel to that one, I promise, because it is inconceivable that a whole fleet of operating systems should have just eight bad things associated with it. Does not compute. Inconceivable. Yes, I used the joke again. Now, Wayland and Mir.

Alien vs. Predator

Did you watch that movie? Well then, you were surely disappointed. It just couldn’t have been good, no matter how you liked the two originals. Usually, nothing glorious comes out of such concept, for one simple reason. Quality is linear. Hype is quadratic. So when you try to double the awesome, you just get two portions of awesome, and you’re left with a sour taste of missed expectations.

What am I trying to say here, you wonder. Well, sometime in the future, there might come a clash between Wayland and Mir, if it hasn’t happened already, and when it does, the audience will surely be left with a great sense of loss. That is something we surely want to avoid, and with this kind of ominous portend looming above the article, let’s proceed into the discussion.

Not quite

Unlike the movie, the Linux display server protocol story is a little different. It begins humbly in the 80s, when concepts of modularity, scalability and security were secondary to novelty and experimentation, and thus, the X Windows system was born, allowing people to see pixels dance on their slightly radioactive cast-glass monitors.

Fast forward thirty years, it is time for a change. In other words, the X does not scale well with the rest of the technology, and some feel that progress is hampered by legacy. Linux, never being a technological collective that takes much heed of backward compatibility and stability, is an excellent platform to test new and radical software, even when it touches the very core of the user-machine functionality.

As you imagine, the very announcement about the replacement, or let’s say, possible replacement for the X Windows caused fear and alarm among the users. Just as people started getting relatively decent support for their graphics cards, and some flavors of Linux made it possible to install drivers without bleeding at the sacrifice altar, there comes this new server protocol that threatens everything.

Actually, not one replacement, but two!

Wayland is one way of it doing. Way-land. Get it? One way. And Mir is the second one. Of course, no proper Linux core tool would be complete without at least three sub-versions and a handful of acronyms, because you also have XMir, a compatibility layer for X during the transition period, which we hope will be shorter than the IPv6 implementation, any day now, based on XWayland, which does the same for the second solution. This does not help you in any sense.

Wayland

What happened really is, the community decided to work on Wayland. Canonical was unhappy about this, for various reasons, and decided to create its own implementation, called Mir. And so the Linux world was split in twain.

Mir Space Station

In reality, the problem is much bigger. When you fragment a fundamental component of the operating system, you double the effort needed to maintain it properly for every fork or iteration. Which effectively means that, in order to support the two new server display protocols, not to mention the old one not going away any time soon, developers will now have to invest at least three time as much effort in getting things to work properly, as if they did not have enough diversity already.

Doomsday scenario

Let me explain why this is so bad. As you can imagine, no one really wants to be the underdog in this story, but the industry seems inclined toward supporting Wayland, and even rejecting Mir. That puts Canonical, and Ubuntu in a very tight spot, because it effectively blocks the adoption of their solution, which is essential to the success of this operating system, especially as Canonical moves forward in the mobile market. To make things worse, Kubuntu and Xubuntu also decided not to use Mir. They will stick with Wayland instead.

And so it begins, the great rift. If Ubuntu and Kubuntu start using different display server implementations, they will no longer just differ in the graphical desktop environment, they will become incompatible systems. Moreover, every single application developer will have to take this into account, if they want their stuff to run smoothly on both Mir and Wayland. Some might choose not to. For example, since KDE is a rather self-closed system, then it’s quite likely that KDE engineers might decide not to support Mir. That means Ubuntu users will not be able to run KDE software on their boxes, like for example Amarok or Kdenlive. And it gets worse.

Doomsday

Ubuntu, for better or worse, is one of the driving powers of the open-source innovation and Linux adoption in the home market. It is no small coincidence that Valve decided to finally go with Linux and chose Pangolin as their test bed. Moreover, there are rumors that the upcoming SteamOS will be based on Ubuntu. So now the matter of gaming might also be at stake. Will Steam support non-Mir protocols? Will all games be equally available on all Linux versions? In fact, what does it mean really? Can Ubuntu really be treated as Linux from this point on?

If you look at OSX, it’s BSD underneath, but that connection is long gone. The same might happen to Ubuntu. They just might go their own way, and a decade from now, it could be an extremely successful operating system with a great gaming support, but it will not have much in common with the rest of the Linux bunch.

So if Ubuntu gets ostracized, then other platforms might be in jeopardy. How will Linux Mint move forward from here? Will be see more fragmentation still? Will anyone else choose to adopt Mir rather than use Wayland? It’s a tough question, especially since possible future market share could heavily impact the people writing software. Money is a key factor here, and it could cause segmentation and intellectual starvation. In theory, the same way many companies refuse to compile their software for Linux, because the market is too small, or the potential profits are too meager, they might decide to just support Ubuntu or maybe not, and then, you will end up with an imbalanced ecosystem driven by ego and financial gains. Much like today, only squared.

Now, we head into the shops of graphics cards and drivers. What will Nvidia and ATI do now? How will they handle this problem? They will face the same dilemmas. Nvidia might partner with Steam, which sounds kind of logical, but then might not bode well for other Linux distributions. Or they just might work harder to support everyone. But still, when you ask someone, Linux, graphics, they could just say Nvidia, and the answer to that might limit you to a single Linux distribution. With a single desktop environment called Unity. No more Cinnamon, KDE or anything else. Take it or leave it.

How do we undo the drama?

All right. From speculative to practical. If you ask me, there must not be two display protocols. Because if you have two, why not seven. After all, we have a dozen desktop environments, let’s make each come with its own custom-made protocol that best suits its application stack. The kernel is also quite tricky, with different versions and signatures used in every other distro, however it’s more or less a single entity. And if this diversity somehow helped Linux bloom, at least from the technological perspective, the display battle will kill it.

All of the other layers did not slow down the evolution of the Linux application world. But now, finally, there’s one component that can break everything. If you cannot enjoy your software on every one distribution, without limitation, you might as well not use it. We have talked about this before, and this is exactly the reason why Linux has never it big yet. That plus hardware. Now we propose making it even more difficult to embrace the technology by creating this dividing line that none shall cross, and just at the critical time when Linux gaming is finally, finally taking root. Speaking of bad timing.

Rage Face

Rage Face, courtesy of alltheragefaces.com.

Technology-wise, there’s no reason why either Mir or Wayland cannot be the sole solution. After all, the X served us well for so long, any replacement can be tweaked well enough to do anything and everything we need. Therefore, the decision is purely political. Maybe there’s legalese involved, but it sure is not a matter of technology. That’s the easy part really. Perhaps Canonical wants more this and that, fine, hire a bunch of developers and they can sort it out. Or someone else might do it. The possibilities are endless in that sense, and it cannot be the bits and pieces of code that make the difference.

But is it possible to resolve this peacefully? Well, I sure hope so, otherwise we will end up with a serious problem that will erode Linux in the long term. Mark my semi-prophetic words, but it won’t end well with this kind of brotherly quarrel continuing.

Conclusion

Dedoimedo would suggest using one display server and making it rock, so that it is developed at the speed, quality and legal terms satisfactory to everyone. It can be done, and what’s needed is simple, pure human will to reconcile and do good. Everything else is secondary. I don’t want to sound mushy, we do not need a group hug right now. But if Linux can survive with a single authority for the kernel, and this works fabulously, the same principle ought to govern the display stack.

My hunch is, Wayland, and it has nothing to do with GPL, who leads the effort, who uses what. Simply because most distributions are leaning that way, and it’s a simpler matter of inertial consensus. Really, we will solve the technical bits quite easily. If only we can crack the human part. United we stand, divided we compile.

Cheers.

 

8 responses to “The Linux display saga”

  1. CheeseBurg says:

    I think you over exaggerate the impact Mir will have, seriously. Misinformation will only make this situation worse.

    No application developer other than those who developer compositors will need to worry about Mir or Wayland. Application developers on Linux will use GTK3 or Qt5 which both have Wayland and Mir backends. Due to the design of Wayland (and in turn Mir), no application has the ability to talk to Wayland (or Mir) directly like you could with X11. Talking straight to the X11 was bad design so it was eliminated in Wayland. So yes for Kwin, Mutter, Compiz, Muffin, and Gala, those developers will have to support both Mir and Wayland which will mean twice the work but the developers behind Kmail, FireFox, etc, will just have to change a compile option so probably 5% more work. The transition from X11 to Wayland will be more work than supporting Wayland and Mir at once for applications (at least at the moment).

    Also only 2 desktops support Wayland, gnome and KDE. Since Wayland only works for GTK3 and Qt5 (like Mir) only desktops who use those toolkits can even think about Wayland meaning lxde and xfce are automatically out since they both use GTK+ (aka GTK2). Also Gala, Muffin, and Compiz have not even started Wayland work yet so Elementary OS and the Cinnamon desktop won’t support Wayland either. These means, this battle is really between Gnome. KDE, and Canonical.

    Another thing: Mir, Wayland, and SurfaceFlinger (Android) all use EGL graphic drivers. That means that if Nvidia come out and say they only support Mir, Wayland can use them WITH NO CHANGES. As for Steam, Steam OS might use Ubuntu for now but they will use whatever keeps the safe in the long run so they will use whatever display server ends up on top once X11 is dead (and that has at least 5 more years of life in it if not more).

    The last thing I guess is that this is not the first display server war Linux has had. X11 wasn’t always king. Just like back then, whoever comes out on top will be the new standard. Wayland will most likely be the winner but honestly it won’t matter either way because that are not that different. Wayland vs. Mir gets overblown because no one really knows how much they share. 99% of Users and application developer won’t even know the difference. Martin (the Kwin guy) is part of the 1%.

  2. jon_downfromthetrees says:

    When the dust settles, I’ll use whatever I decide I like best.

    Otherwise, so much of this sounds like culture wars that don’t interest me.

    I hope, though, that developers won’t let culture wars sway them from using the better product. If Linux developers start to deliberately *not* support the better product, it will just drivers users away.

    • Ok so *if* it is just culture wars then fine. Problem is that allot of clever and driving people claim its not and that the problems goes beyond “personal tastes”.
      Also, “culture wars” is an extremely oversimplistic description of what essentially boils down to control of what your desktop will look like, what it will do and what it can do.

      There is a fantasy that there is an easily spotted objective truth thats common within all things techy. That there is this magical spot which, if we all could just stop arguing, everyone would see. But just like the technocratic ideology as a whole – claiming you’re objective or that there is one objective choice doesn’t mean there is. We are actually just at that point. Several people claim that the objective choice is Wayland and several others claim its Mir. Both can be right as the differences may be either social or too small to be able to easily spot – making any objectivistic fantasy false.

      And then comes the last punch in the crotch the idea of “let the best X win through competition” – this fallacy is the most awkward one as its based on myth and that it needs a level competitive field to function. The slightest shift, the slightest detail that would make the two competitors un-even would ruin the whole idea of “letting the world/market/hand-of-god decide”.

      Personally I kinda know with which experts my chips land (being even less than a layman means trying to figure out which experts seem more trustworthy based on the information you can grasp) but whatever it is – just pretending its fashion-fights or culture-wars won’t do anything to help you get the “better end product”

      • jon_downfromthetrees says:

        I’m not suggesting that the issue (I wouldn’t use “problems”) is one entirely of personal taste. One driver may well turn out, by some standard of measure, to be technically superior to another. That does not mean it will be the driver most suited to *my* needs. It may be. It might not be.

        I don’t accept the notion that this “essentially boils down to control” of my desktop. I don’t even see how that might work. It’s my hardware and I decide what’s on it.

        Arguing that someone is trying to control my desktop because they make design choices is absurd. If I don’t like the design choices a product makes, I am free to choose another product.

        No designer or developer has any obligation to produce software that anyone, anywhere, can morph into anything that pleases them. They make something and toss it out there. People use it or they do not use it. C’est la vie. That’s the risk inherent in any creative endeavour.

        Mir vs Wayland vs X, in a market environment, ought to result in more competitive products. (Competitive does not necessarily mean technically superior.)

        But, FOSS and Linux are not market environments. Indeed, much of that culture is adamantly anti-market and values consensus among the developer community more than the provision of multiple options for users. So, we have no guarantee that the presence of 3 drivers maintained by groups with differing aims will do *me* any good. Having three potential products to choose from ups my odds, though, over a field of two or just one.

  3. Kristoffer says:

    Actually, it is known that SteamOS will be based on Debian: http://www.techpowerup.com/191332/valve-announces-steam-os.html
    I am highly pleased with this, as Valve has decided against vendor lock-in. However, SteamOS does not have as good prospects as most people think. Aside from the superfluous streaming feature, it literally offers nothing that Linux and/or Windows can’t already do. SteamOS’ only hope is for Valve to release big upcoming games like Half-Life 3 and Portal 3 as exclusives, and stick to that, forcing people’s hands into dual-booting SteamOS at a minimum. The timed exclusive route will backfire as people will wait for the exclusive time limit to run out before installing these games on Windows, because they’re already conditioned to waiting for games to be ported to their favorite platform. Plus, timed exclusive or multi-plat will essentially admit that the titles can’t survive without Windows, and that would be a fatal admission.

    • Dedoimedo says:

      Thanks for the Debian comments, interesting.
      Second, having a complete OS let’s them decide what they want to do.
      So it’s a full stack, and should work well, just like Steam does in general.
      Dedoimedo

  4. Silakka says:

    This is just so Linux way, ignore protocol(s) which is by default expandable and *nix standard like X11 (or like SysV).
    Now as X11 is basically networked display which can be authorized to run from many hosts (even with kerberos) which means it’s “internet” ready.
    I never understood reason for develop something which is not extending X11 protocol or even can’t talk X11 protocol directly.

  5. Bleh says:

    Wow, how people opine on things they can’t even explain!

    Mir vs Wayland: who cares if you don’t understand what is going on, and why both these techs need development.

    Please don’t bring up X11! It is a tired old technology that only stands in the way of developing better rendering over networks. X11 is not efficient, just because it is capable.

Leave a Reply