Slashdot Mirror


Wayland, a New X Server For Linux

An anonymous reader writes "Phoronix has a new article out on Wayland: A New X Server For Linux. One of Red Hat's engineers has started writing a new X11 server around today's needs and to eliminate the cruft that has been in this critical piece of free software for more than a decade. This new server is called Wayland and it is designed with newer hardware features like kernel mode-setting and a kernel memory manager for graphics. Wayland is also dramatically simpler to target for in development. A compositing manager is embedded into the Wayland server and ensures 'every frame is perfect' according to the project's leader."

44 of 487 comments (clear)

  1. Thank you! by Anonymous Coward · · Score: 2, Insightful

    Thank you sweet Jesus! Finally somebody is doing something that should have been done looooong time ago!

    1. Re:Thank you! by Anonymous Coward · · Score: 5, Insightful

      Instead of taking the initiative and starting the project yourself, like this guy did.

    2. Re:Thank you! by amorsen · · Score: 5, Insightful

      Thank you sweet Jesus! Finally somebody is doing something that should have been done looooong time ago!

      People have been doing bits and pieces of it for a long time. Client-side font handling, client-side rendering in general, kernel mode setting... Without those things, this project would be a lot larger.

      This is quite typical of free software by the way: A lot of things are quietly replaced and enhanced without anyone noticing, and suddenly someone uses all the changed bits to create something radically new.

      --
      Finally! A year of moderation! Ready for 2019?
    3. Re:Thank you! by dougmc · · Score: 4, Insightful

      X is an application. *And* a server. On OS X as well. And under *nix, and even under Windows (when you add an X server to it.)

      X's architecture works pretty well for what it was written to do. It was written in a time when lots of people used wimpy X terminals and did their work on a shared beefy central server.

      VNC might be more of the architecture you're referring to?

    4. Re:Thank you! by grub · · Score: 5, Insightful


      I use X on 32 and 64 bit versions of both OpenBSD and Ubuntu Linux and can't recall it crashing on my anytime in the recent past. Certainly not "all the time" in my experience.

      --
      Trolling is a art,
    5. Re:Thank you! by msuarezalvarez · · Score: 3, Insightful

      What was the adoption rate of Y? Was it really done? Was it little more that a proof of concept?

      Well, don't let reason get in the way of a seemingly cool reference, though.

    6. Re:Thank you! by siride · · Score: 5, Insightful

      That's almost exactly how it already is right now. This whole thread is a bit strange to me since everyone's complaints about X are based mostly on their misunderstanding of how it actually works.

    7. Re:Thank you! by Reikk · · Score: 0, Insightful

      I'm glad to hear this and I hope it works out, but X11 is so ubiquitous I have a feeling Wayland will share the same fate as Berlin

    8. Re:Thank you! by x2A · · Score: 3, Insightful

      "just means it's something else that YOUR X server does. Others may not"

      And you took it the other way...

      Yes X doesn't have to use a hardware framebuffer, yes you can have X on various other virtual framebuffers, but that's going a step in the oposite direction of what people are talking about here. That would be keeping the X server/protocol and throwing out its ability to write to and manage the hardware. What people are talking about is throwing out the X serrver/protocol, and allowing stuff to write more directly to the screen, have more stuff in the kernel, and reduce the number of abstractions and context switches required between the app and the pixels landing on the screen.

      --
      The revolution will not be televised... but it will have a page on Wikipedia
    9. Re:Thank you! by makomk · · Score: 3, Insightful

      Window management is largely pushed to the clients, they draw their own decorations and move and resize themselves, typically implemented in a toolkit library. More of the core desktop could be pushed into wayland, for example, stock desktop components such as the panel or the desktop background.

      Wonderful. Microsoft Windows works that way, and it sucks - whenever an application locks up, it becomes impossible to move or resize its window (and in older versions of Windows without the appropriate hacks, impossible to minimise it either).

    10. Re:Thank you! by Anonymous Coward · · Score: 1, Insightful

      128mb with compiz and firefox2, i never had a crash with intel drivers! dont blame x when 90% of the time its the drivers!

    11. Re:Thank you! by Anonymous Coward · · Score: 1, Insightful

      Care to clarify what you mean?

      Doubtful. Most of the people who criticize X seem to have no idea how it works or what its actual problems and capabilities are. Every time there is a story about it here on Slashdot the comments run the same way. My guess is that people don't like X because it is old.

  2. Been done (and failed) like a million times? by Anonymous Coward · · Score: 1, Insightful

    Xorg/XCB anyone?

    Then there is that stuff from NeXT which is similar to OS X.

    Then there is that BeOS-like server.

    Framebuffer.

    I think there was some sort of OpenGL server a number of years ago.

    Uh, what else? None of these have replaced the X11 standard.

    1. Re:Been done (and failed) like a million times? by RedK · · Score: 4, Insightful

      Port GTK/QT to this server's API ? If this server doesn't support a version of the X11 standard, then it's not an X server. Since it is being called an X server, no recompilation should be necessary, unless you're using X extensions that are not supported.

      --
      "Not to mention all the idiots who use words like boxen."
      Anonymous Coward on Monday August 04, @06:49PM
  3. Re:Does this... by KasperMeerts · · Score: 5, Insightful

    Now only to convince nVidia to release their drivers for this new X. As long as these things don't happen, this probably won't take off.
    Man, we really need OSS drivers.

    --
    As long as there are slaughterhouses, there will be battlefields.
  4. Re:Its good to see Red Hat developers doing this by Anonymous Coward · · Score: 3, Insightful

    I'm pretty sure Xorg has (or had) the same goals as this Wayland project. Xorg was meant to add all the modern features not in XFree. In fact, the synopsis of Wayland reads just like the synopsis of Xorg. What the hell are they doing?

    The big question is: Will vendors port to it? (nVidia, ATI, Intel, etc)... and by that I mainly mean nVidia.

  5. Re:Does this... by jav1231 · · Score: 2, Insightful

    No. This means there another X server thrown into the mix. Superior? Probably. Will it matter? Not likely. It's simply another piece of code to be debated and which will stave off Linux on the Desktop another 5 years.

    The great thing about collaboration is that people can all contribute to a multitude of projects. The bad thing is that there's a multitude of projects.

  6. Re:Notes for the Uninformed by setagllib · · Score: 5, Insightful

    It's rarely discussed because it's extremely slow. Even on low resolutions it takes an absurd amount of CPU power and latency. On high resolutions it's like a slide show with an awkward guest speaker. There's a reason we have hardware acceleration even for 2D.

    --
    Sam ty sig.
  7. Y windows; drivers by bcrowell · · Score: 4, Insightful

    There's another project called Y Windows, which also aims to replace X with something that has less historical cruft.

    The real question in my mind is whether this kind of thing does anything to address the big problems users are really encountering. Of course, not every open source project has to make large numbers of users happier. But the author of Y Windows says, for example, "I've got tired with the state of desktop GNU/Linux. Most of the problems that I see with it can be traced back to the underlying window system, X. So I decided to write its successor... "

    For me as an end-user, the big issues are simply hassles with xorg not correctly recognizing LCD screens, so that it sets them to an inappropriate resolution, or the image appears offset. I have close to zero interest in gaming, so personally I just use the onboard video of my mobo, with only 2-d driver features, but the impression I get from people who do care about gaming (or fancy WMs) is that the big issue is drivers, not the internal structure of X.

    As far as programming, the structure of X also seems like kind of a non-issue. Sure, X's APIs are heinously ugly, but almost nobody uses them directly.

    The advantages listed by the article are things like a more manageable code base, a smaller memory footprint, and elimination of rendering artifacts. To me, none of those seem like major issues that I was all that worried about.

  8. Re:HELL yes. by dondelelcaro · · Score: 5, Insightful

    Project A is fine until someone has to get beyond your little layer, in which case it's .xinitrc hell.

    What in the world does the X11 rendering engine have to do with "useable for normal people" or the "xinitrc"?

    X11, and by extension, the X server, is a layer whose job is to put stuff on screen. That means dealing with the wibbly bits (mice, keyboards, displays, video cards, tablets, pedals, etc.) that cause the stuff on screen to be displayed or interact with the stuff on screen.

    But for twenty years now, there have been exactly two kinds of X development:

    Furthermore, it's not like people haven't been modifying how the bits in between your "Project A" and "Project B" work, either. See xrandr 1.2 and 1.3, for example, as well as the countless other projects working on this very part of X11.

    That's not to say there aren't problems with X11 and the various implementations of the X server, but it'd help to at least have studied what's actually going on before attacking the work of those who are actually doing the work.

    --
    http://www.donarmstrong.com
  9. Re:Does this... by fm6 · · Score: 1, Insightful

    And forgot that a better X server isn't going to make a lot of people switch to Linux.

  10. Re:Does this... by khellendros1984 · · Score: 5, Insightful

    I disagree. I think that a single distro gaining popularity will be instrumental for standardizing what is expected of Linux for introduction into a larger market...that is, to give hardware and software developers a system to work in that's more standardized.

    --
    It is pitch black. You are likely to be eaten by a grue.
  11. Yes, network transparency by jonaskoelker · · Score: 2, Insightful

    The project implements a new X server. Clients (i.e. your applications) link against the gnome library which links against ... which links against the X library, which talks to the X server via tcp.

    The X forwarding in ssh works like any other port forwarding: listen on the port, grab the data, send it through the ssh tunnel, dump it at the target port on the other side.

    That's the simple version. Add to ssh some special-casing for X, and add to xorg and xlib a speed hack that lets it use unix sockets or shared memory instead of tcp. Not consequential.

    Unless the server only implements the speedhacked ways of transferring data between clients and the server, you'll have X forwarding.

    Most clients are on the same machine as the server, so implementing shared memory first seems like a good move, but X forwarding is used so often that the outcry would be massive if network capability is saved for last.

    Besides, I'd guess that data is transferred in the same format independent of how it's transfered; so the work to do tcp instead of shared memory is minimal.

    Don't panic :)

  12. Re:Does this... by techno-vampire · · Score: 5, Insightful

    You do understand, don't you, that the reason the nVidia drivers aren't in the Ubuntu (or Fedora) repos are that they're not OSS? Ubuntu will quite happily download and install them if needed, but they'll also make sure you know they're third-party and not supported by Ubuntu. For Fedora, you need to add a third-party repo (livna) after which installing the drivers and keeping them current is simplicity itself. I don't know about other distros, but I'd presume it's similar for all of them, with the probable exception of Gentoo.

    --
    Good, inexpensive web hosting
  13. X11 - The X Windowing System by Anonymous Coward · · Score: 5, Insightful

    I hear a lot of (I bet) young people clamoring for X to die, and that would somehow improve Linux or Unix.

    X does not need and should not be allowed to die. Sadly X11 is probably one of the coolest pieces of misunderstood software on the planet. It is a bit dated and it does need a code cleanup/refactor, but because of proper design, that can happen without breaking the system.

    To those who have *no* understanding of X, they should try this:

    ssh -XC some_linux_machine
    eyes

    What happens is that the "display" is a network device. Windows terminal server and citrix, even today, can't easily separate application from display. X has had it for years. It isn't an afterthought requiring drivers to probe and figure out what got changed on the display surface and send a block over the network (like citrix and VNC), no the display is rendered over the network.

    X11, IMHO, is one of those hidden jewels in Unix that don't quite get. They focus on trying to make it like Windows or be a gaming platform, but UNIX is a "productivity" platform.

    Like I said, I'm all for refactoring, cleanup, cruft-removal, etc. to the codebase, but keep X11.

    1. Re:X11 - The X Windowing System by paulbd · · Score: 4, Insightful

      X11 does not blit the entire damn window across the network. Its a client/server architecture and what is passed across the network are requests by the client to ask the server to draw <something>, where <something> was envisaged as a mostly abstract entity. It is true that if you application does nothing but push images or video into a window, then there is little alternative to blitting across the network, but this is not what is happening in the majority of apps today. You seem to have about a similar level of (mis)understanding of what AJAX is doing, but I won't get into that here.

    2. Re:X11 - The X Windowing System by ion.simon.c · · Score: 1, Insightful

      Give me a break. Atoms stay around in memory forever, by design.

      I'm ignorant. Would you point me to the section in the docs that mentions this design requirement?

      There's no audio.

      Does OS X provide some sort of unified audio system?
      I know that you could play PCM files in Win 3.1, and Win 95 and up... so there was some sort of audio system involved there. But these days, you use generally use DirectAudio.
      However, I'm not sure that X11 needs to handle audio. Remember two things:
      1) X11 was first written in the very late eighties. Not too many folks were using systems with sound cards at the time.
      2) Modern Linux systems have ALSA for local audo. If they want networked audio, then they could use PulseAudio or aRTS. (or others.) Why add an audio spec to X11, when (most) everyone is already using something else?

      It has the overhead of packing/unpacking data into structs.

      Please go read the Win32 documentation for things like CreateFontIndirect and RegisterClassEx. Examine the function signatures closely.

      The list goes on and on. Seriously I could fill pages of just mentions of the problems, assuming you to know the details.

      Can you detail the problems? I'm genuinely curious here. Let's have a discussion. Hit me up at my slashdot username at gmail.

      So what does X get right? You can run a program over the network. That's it. Awesome... except that almost nobody does this, and VNC basically solves that problem.

      Actually, this *is* awesome. And, VNC does *not* solve that problem, not by a long shot. X11 is more efficient than even tightVNC.

      And, if both ends support OpenGL acceleration, you can forward an OGL app over the LAN with very little slowdown. (Factoid of the day: Did you know that OpenGL was designed to be forwarded over the network? It's true! : D )

    3. Re:X11 - The X Windowing System by Epillume · · Score: 2, Insightful

      HTML+AJAX is doing now what X11 should've been doing 20 years ago. I don't know enough about Citrix or WTS to know how thin their client is, but I'm betting it's a lot thinner than X11.

      That makes absolutely no sense. HTML/AJAX interfaces are anything but consistent. Every application has its own interface. X is used to display a complete GUI on top of a system with respect to its hardware and configuration while HTML/AJAX depend only on a compatible browser and a javascript engine. It doesn't make any sense to compare X11 to HTML and AJAX, they're different things.

    4. Re:X11 - The X Windowing System by serviscope_minor · · Score: 3, Insightful

      And X has probably given unix wankers the most wet dreams of any software project on the planet.

      Ah, insult the people. A sure sign of a strong technical argument.

      Give me a break. Atoms stay around in memory forever, by design.

      My god. The horror. My xserver has been running for a few weeks and:

      xlsatoms | wc -c

      gives 14746. That's a whole 14KILO bytes permenantly taken up by atoms. This includes the lavishly large number of atoms created by GTK and QT based programs. I have not one machine (including my Zaurus) where 14kB is a problem.

      There's no audio.

      Er, it's a graphics system.

      It has the overhead of packing/unpacking data into structs.

      Huh? Doesn't any API have this problem?

      You can use shared memory, but it's no panacea.

      It's also unnecessary and doesn't give much of a speed increase.

      Lots of complicated stuff like ICCCM

      ICCCM is complex and not that great. On the other hand, with the years of hindsight, large sections (some quite interesting) have dropped completely out of use and are essentially unimplemented. Commonly used sections like copy/paste work very well and are not complex.

      and Visuals and xauth. Ad hoc things like cut and paste via shared secrets.

      Copy/paste works very well and is elegant. I like the dual clipboard system, and the way that XDnD is/was a very small add on, using the same mechanism.

      Can't disconnect/reconnect the same client.

      That depends on the client.

      Lots of unused (even at the time) primitives like jaggy lines and circles designed for 1-bit displays.

      I don't consider myself old, but I've used X11 running on 1 bit displays. They were cheap and so some universities ahd them in significant quantities. I'm pretty sure it's not possible to draw a smooth line or circle on a 1 bit display, but if you know how, feel free to revolutionise display technology.

      The list goes on and on. Seriously I could fill pages of just mentions of the problems, assuming you to know the details.

      Your list is, so far rather uninformed. Have you ever programmed with XLib or examined the X protocol? Are you just regurgitating one of the more peculiar slashdot memes?

      --
      SJW n. One who posts facts.
    5. Re:X11 - The X Windowing System by Anonymous Coward · · Score: 1, Insightful

      > What X11 does is blit the entire damn window over the network. Fine on a local machine (= unlimited bandwidth)

      First assertion is demonstrably wrong, and the second is a strawman. X was designed to run on a LAN (specifically, a network with low latency)--of course it suffers when applied to an unsuitable medium. Does music sound as good when played on your mobile phone's built-in speaker?

      This is not a new complaint. Several approaches for dealing with high latency links have been tendered over the years (see NX for a recent example with a solid backing); if you are still having this problem, you simply haven't done your research.

      > Separating the application from the display is worse than useless. Separating the application from the UI is what should have happened

      Good thing X does the latter, then. That's right: X11 follows a fundamentally similar approach to the browser-based approach you seem to like so much. It speaks "X" instead of "HTML+AJAX", but the approach is the same. The application tells a remote display how to construct its interface. The difference is that X has a much broader set of options, which makes configuration more of a problem--especially on Windows boxes, which tend to eschew X as a matter of principle.

      What you probably meant is that X GUIs don't look "modern" enough. That has more to do with a lack of standardized X extensions than anything else. Tough. IME most of those extensions are eye-candy, and become tiresome very quickly in a production environment.

      > That's the entire reason that browser-based applications have taken off over the past decade

      Bullshit. Browser-based applications took off because everyone and their uncle had a Windows box with a browser on it, while relatively few people had an X server. Couple that with the "if HTML is good, let's use it for everything" mentality that pervades MBA-types these days, and the monstrosity that is the modern Web was inevitable.

      X's graphics model had no more to do with the rise of AJAX than Windows graphics model did.

      > because nobody in the X11 design sessions stopped to think that users might want the Print command to be in the same place and use the same keystroke in every application

      You mean like Windows, where GUI consistency is king? Much as I hate the deliberate violation of established GUI design metrics in an effort to appear "spiffy", the one-size-fits-none approach enforced by the browser is hardly better. How often do you get clean print-out from a web-site? Not often. Modern sites have too much clutter, and not enough control of the browser (though, ironically, still much more control than they should have).

      Again, not an X issue so much as a "programmers don't follow established GUI standards" issue.

      > I don't know enough about Citrix or WTS to know how thin their client is, but I'm betting it's a lot thinner than X11.

      You hold AJAX up as a paragon, and then complain that X is not a thin enough client? Wow. Just, wow.

  14. Syncing to vblank? by Trogre · · Score: 4, Insightful

    At the same time, I'm trying to fix some of the problems with composite that we still have in the X server; input redirection, window resizing, syncing to vblank, throttling of animations and atomic, consistent redrawing.

    That feature alone would make this rewrite worthwhile. This has been missing from our desktops for far too long.

    --
    "Nine times out of ten, starting a fire is not the best way to solve the problem." - my wife
  15. Re:Canonical by Enderandrew · · Score: 3, Insightful

    And yet for many users they must manually edit and configure xorg.conf to get anything to work, and sometimes they never get it to work.

    There are tons of API calls that haven't been used in years, but no one wants to cut cruft or deprecate.

    Xorg is painfully slow, and we're still working around ancient legacy code rather than designing for modern systems.

    As for all that auto-configuring, honestly you can credit Ubuntu with plenty of that. Try a major distro like Ubuntu or openSUSE and you'll see the installer configure most of the hardware. Now try Gentoo which doesn't autoconfigure X and see how X performs with your hardware.

    --
    http://blindscribblings.com - Tasty pop-culture in conceptual fashion.
  16. Re:Does this... by Tubal-Cain · · Score: 2, Insightful

    We have LSB for that.

  17. Re:this has stumped me for years by Goaway · · Score: 3, Insightful

    Why isn't there a thin graphics layer in Linux, like a framebuffer that supports acceleration?

    This is not the reason why it's not done in Linux, but modern graphics cards accelerate some pretty high-level functionality, so your "thin graphics layer" would not stay very thin for long.

  18. Re:Does this... by Anpheus · · Score: 3, Insightful

    Working well for you, I see.
    --
    </sarcasm>

  19. Re:There is alreeady a brainstorm... by auzy · · Score: 2, Insightful

    Yes, and you'd have to be an idiot to vote to make wayland the default X-server, when its not even ready to run Gnome. The project could fail by the time its done, or a better one might arise in that time. I strongly urge people NOT to vote for this! It would be a VERY silly move

  20. Let's face it by ClosedSource · · Score: 2, Insightful

    Networks really aren't fundamental to windowing environments. X was designed around the limitations of most Unix configurations of the time (a single server with clients running on fairly dumb terminals). When real workstations became available, network transparency became a nice feature that wasn't really needed in most cases. The question is whether the added complexity is justified by the importance of the feature.

  21. X11 is a really bad Single Point Of Failure by Anonymous Coward · · Score: 2, Insightful

    Sorry to burst your bubble, but your whole post is basically clueless.

    Yes, we know that X11 is networked, and that this functionality is "cool". But that doesn't mean that the design of X11 is good.

    In engineering terms, the X server is currently a massive single-point-of-failure. Despite all the "coolness" you want to give it, when the X server dies, it kills the many hundreds of client processes that are connected to it on a busy machine. That's a ton of work gone down the tubes just because someone way back coded the X server as a noddy star point without disconnectable links, and now we are still living with that legacy.

    The X server is a large program, and large programs always have latent bugs, and latent bugs cause programs to crash in corner cases. That is why X hangs or crashes occasionally when you do something out of the ordinary, or when you stress it too much. One process failing isn't generally too much of a disaster in other cases, but in the case of X it is always a disaster because of all the X clients it takes down, and the disaster is unrecoverable.

    So no, sorry, but X11 is not designed well no matter how "cool" its networking may be. It badly needs a rethink for key system reliability reasons. SPoFs like this are no way to design a professional graphics subsystem.

  22. Re:How ghetto are you anyway? by Anonymous Coward · · Score: 2, Insightful

    I don't buy things I don't need. What's your excuse for overcompensating?

  23. Re:Its good to see Red Hat developers doing this by beav007 · · Score: 3, Insightful

    Wait, what?

    You'll note that modern wheels do not have stone hubs. The wheel was not simply built on (or around). The person who decided that wood would be better scrapped the whole thing and started again. It's round, just like the stone wheel, but lighter, easier to work with, and apart from the idea, completely new.

    The modern wheel, while built on the same principles, is a completely new thing, compared to the stone wheel. Sure, you could build on the stone wheel, but you'd end up with a rubber tyre on 200kg of stone. Not a huge improvement.

    There is nothing wrong with reinventing the wheel every so often. It seems like a lot of work at the time, but sometimes the result is worth it.

  24. Re:Does this... by Anonymous Coward · · Score: 1, Insightful

    theres not much special you could do with that binary, even on gentoo ;) install nvidia-drivers and hope they work.

    Most part is indeed getting the X-server to recognize that properly.

  25. Re:Does this... by Anonymous Coward · · Score: 1, Insightful

    Because NVIDIA doesn't care about the five people using Linux on the desktop when they can sell cards to Apple and Microsoft users?

  26. Re:Network Transparency? by TheRaven64 · · Score: 3, Insightful

    NX does two things that really should be added in to the server. First, it caches pixmaps. X11 was designed for cheap servers which might be memory constrained. These days, you are likely to have a huge amount of RAM close to the display. Being able to store a pixmap on the server would eliminate a lot of round trips. You can actually do this with the XRender extension, but it needs better toolkit support.

    The second is that it is stateless. This is the biggest thing limiting the usefulness of network-transparent X. There is no way of disconnecting a X window hierarchy from one server and reconnecting it to another (or the same one, at a different time).

    --
    I am TheRaven on Soylent News
  27. Re:Finally? by TerranFury · · Score: 2, Insightful

    Plus, "ssh -X" (or -Y) just sends drawing commands over the link -- whereas VNC JPEG-compresses everything. Me, I like vector graphics, personally.