User: Password:
|
|
Subscribe / Log in / New account

The Wayland Situation: Facts About X vs. Wayland (Phoronix)

The Wayland Situation: Facts About X vs. Wayland (Phoronix)

Posted Jun 9, 2013 0:17 UTC (Sun) by tialaramex (subscriber, #21167)
Parent article: The Wayland Situation: Facts About X vs. Wayland (Phoronix)

"the movement to XCB is a slow one"

Whereas doubtless Wayland's designers have already shipped a complete working system and expect to have most of us seamlessly switched over to Wayland within say 12-18 months. No?

If these are the best arguments for Wayland, Wayland is in deep trouble.


(Log in to post comments)

The Wayland Situation: Facts About X vs. Wayland (Phoronix)

Posted Jun 9, 2013 1:14 UTC (Sun) by Kit (guest, #55925) [Link]

This was more so a list of things about X that sucked, rather than X vs Wayland. Being Phoronix, though, you shouldn't expect the articles to be of the highest quality.

The Wayland Situation: Facts About X vs. Wayland (Phoronix)

Posted Jun 9, 2013 7:09 UTC (Sun) by Creideiki (subscriber, #38747) [Link]

Daniel Stone made the same points much more in-depth at linux.conf.au 2013: http://mirror.linux.org.au/linux.conf.au/2013/ogv/The_rea... or https://www.youtube.com/watch?v=RIctzAQOe44

The Wayland Situation: Facts About X vs. Wayland (Phoronix)

Posted Jun 10, 2013 14:55 UTC (Mon) by drag (subscriber, #31333) [Link]

I can pretty much guarantee to you that in this case the authors of that article know a hell of a lot more about X Windows the you will ever.

It's a good move for them to write the article. Phoronix and related readers on Reddit are a source of much fud and bafflement related to X11/Wayland.

The Wayland Situation: Facts About X vs. Wayland (Phoronix)

Posted Jun 10, 2013 3:51 UTC (Mon) by daniels (subscriber, #16193) [Link]

XCB has a lot of issues, such as being broken with various extensions (and some still not available, e.g. XI2), a deeply awkward API, and it took a long time to get proper interoperability with Xlib. All of these, plus having to essentially do a rewrite for not a huge amount of benefit (what with it being the same underlying window system and all), seriously hampered its adoption.

The Wayland Situation: Facts About X vs. Wayland (Phoronix)

Posted Jun 10, 2013 15:42 UTC (Mon) by k8to (subscriber, #15413) [Link]

Is it deeply more awkward as compared to xlib? Serious question from someone who doesn't have a clue.

The Wayland Situation: Facts About X vs. Wayland (Phoronix)

Posted Jun 12, 2013 11:27 UTC (Wed) by farnz (subscriber, #17727) [Link]

The difficulty with XCB (as compared with XLib) is that it exposes the request/response nature of X11 directly to the application.

For example, in XLib, if I want to find my parent window, I call XQueryTree(), which blocks me until the X server replies with all requested information.

To do the same with XCB, I need to use two of the window manipulation functions; I first call xcb_query_tree(), which returns a magic cookie. I then have to call xcb_query_tree_reply() to get at the result of my query tree operation.

This does give XCB two potential performance advantages when running over the network; the first is that I can often change my logic to send lots of requests, flush, then wait for the replies, which permits me to send larger network packets (as it sends all the requests in a minimum number of packets, rather than sending one packet for each request because XLib has blocked). The second is that I can hide latency; if I know that I'll need a reply in order to start processing the next iteration of a loop, I can send the request, do my processing for this iteration, then wait for the reply. For example, if I'm walking up the window tree and doing something at each level, I can code my loop as (pseudo-code):

analyse_parent_windows( connection, window, callback )
{
    parent_cookie = xcb_query_tree( connection, window );
    while( window != root_window )
    {
        reply = xcb_query_tree_reply( connection, parent_cookie, error );
        handle error;
        parent_cookie = xcb_query_tree( connection, reply.parent );
        callback( connection, reply.parent );
    }
}
This submits the request for the next parent while I'm still processing this window, and hopefully reduces the time I spend stalled waiting for X to reply. The equivalent done with XLib would have to wait after each query_tree operation for the X server to reply, resulting in lost time.

The Wayland Situation: Facts About X vs. Wayland (Phoronix)

Posted Jun 12, 2013 21:02 UTC (Wed) by k8to (subscriber, #15413) [Link]

So just the usual extra work associated with nonblocking I/O, basically?

The Wayland Situation: Facts About X vs. Wayland (Phoronix)

Posted Jun 14, 2013 16:21 UTC (Fri) by farnz (subscriber, #17727) [Link]

Pretty much that, plus some pain where XLib did multiple X roundtrips in one call (e.g. XQueryTree), and you now have to manage multiple request/reply pairs. There's also a small and shrinking area of pain where an extension is XLib-only, and you have to use XCB/XLib interop.

Additionally, the problems XCB fixes aren't visible if you do what most people do and use a local X server - they're only a pain if you want to use X over the network. So, for most developers, why port to XCB when you get easier, cleaner code with XLib?

The Wayland Situation: Facts About X vs. Wayland (Phoronix)

Posted Jun 14, 2013 16:52 UTC (Fri) by dark (guest, #8483) [Link]

We might need a library that makes using XCB easier :) And I don't mean one that tries to be a layer on top (that would be libX11 all over again), but a library that provides tools for managing multiple related xcb calls, helpers for useful patterns like prefetching, and tons of convenience functions for common operations.

Unfortunately I probably wouldn't work on such a library because I'm not involved with any X11 based code anymore.

The Wayland Situation: Facts About X vs. Wayland (Phoronix)

Posted Jun 15, 2013 1:32 UTC (Sat) by hummassa (subscriber, #307) [Link]

> We might need a library that makes using XCB easier

it's called Qt. :-D

The Wayland Situation: Facts About X vs. Wayland (Phoronix)

Posted Jun 12, 2013 10:31 UTC (Wed) by ovitters (subscriber, #27950) [Link]

Whereas doubtless Wayland's designers have already shipped a complete working system and expect to have most of us seamlessly switched over to Wayland within say 12-18 months. No?

Suggest reading development mailing lists. For Fedora: https://lists.fedoraproject.org/pipermail/devel/2013-March/180546.html.

So Fedora 19 has Wayland as alpha, 20 has it as beta, 21 as release.


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