Hacker News new | past | comments | ask | show | jobs | submit login
X11 Library Sees Lots of Fixes with LibX11 1.7 Release (phoronix.com)
267 points by rbanffy 2 days ago | hide | past | favorite | 63 comments

Pardon the newbie question, but could someone please recommend a good conference talk (or any video I suppose) that provides a good intro and overview of all these terms? I've been using Linux for a couple years now and keep coming across these terms X and Xorg and X11, and whilst I've read up on each I'm admittedly still struggling to understand how they all come together.

X11 (aka X, because older versions haven't been relevant in decades) is a protocol/architecture for GUIs. The X.Org Foundation is a group that maintains the Xorg server (the engine that actually draws graphics somewhere) as well as several X protocol client libraries (used by applications), other server implementations, and associated tools. libX11 is the primary client library.

https://magcius.github.io/xplain/article/x-basics.html is probably a good place to start, as is the official documentation (indexed at https://www.x.org/releases/current/doc/index.html , but the stuff at the top may not be what you want - you probably want to start with the protocol docs https://www.x.org/releases/current/doc/xproto/x11protocol.ht... or perhaps the libX11 docs https://www.x.org/releases/current/doc/libX11/libX11/libX11.... ).

Kieth Packard did a talk this year at Linux.conf.au about the history of X[1].

[1]: https://www.youtube.com/watch?v=cj02_UeUnGQ

I've met Keith on a few occasions. Really nice generous smart guy - but just software, but involved in hardware and things like amateur rockets, and working on things that help kids learn computer skills. I'm thinking though he must be one of those 3 hours sleep a night sort of people.

None taken :)

It's a great resource for sure. If you scroll down to the bit on software architecture - that's the part I'm wanting to understand better by picturing it. Again probably just a "newbie in the deep end" situation, I'm sure it'll all click eventually.

> probably just a "newbie in the deep end"

Honestly the entire system is staggeringly complicated because (if you're asking about the bits in the diagram there) it includes hardware input devices, user accounts, applications, GPU output, and the network (so basically the entire computer).

X11 is a protocol that clients (applications you run) use to communicate with a display server (it sends them input events and outputs things to the screen for them). Anyone can implement a display server that speaks the X11 protocol and clients can connect to it.

Xorg is one such server implementation. Unlike other server implementations, Xorg does all the heavy lifting to deal directly with a wide range of real world hardware devices (mouse, keyboard, GPU) which makes it quite complicated. Adding to that, it's also quite old and thus supports some rather outdated hardware.

Just to make things super confusing, X.Org (the project) provides additional X11 display servers such as XWayland and Xephyr. These alternative implementations are much simpler than Xorg because instead of directly interfacing with the hardware they nest inside some other windowing system.

The wayland website has a good overview for how wayland works (in contrast to X):


> X and Xorg and X11, and whilst I've read up on each I'm admittedly still struggling to understand how they all come together.

An "X server" is the program that owns your graphics card [0], your screen, your mouse and your keyboard. Everyone who wants to use them is an "X client" (e.g. a text editor), it communicates with the X server via a network connection (Unix socket or TCP/IP) and speaks a protocol called "X11". In order to speak to the X server, X clients use the standard library "libX11" so you don't have to reimplement the X11 protocol. For example, when an image viewer wants to show a picture, it opens the picture locally, then pushes the pixels to the X server by calling a function in libX11.

An analogy is "userspace vs kernel", kernel is the X server and provides many services for the userspace, an userspace program is the X client, it communicates with the kernel via syscalls to do things by speaking a protocol called the calling convention. All the syscalls are encapsulated inside the C/POSIX standard library, libc, so you don't have to replement the calling convention by putting parameters in the registers manually. For example, when a text editor wants to open a file, it asks the kernel for the file by calling a function in libc.

"X" is usually the catchall phrase for the software in general, but sometimes especially refers to the X server. "Xorg" is a particular brand of software implementation of X, which is maintained by the "X.Org Foundation" (other implementations include XFree86, XQuartz, etc). "X11", in a narrow sense, is the protocol that is spoken by all X servers and X clients, and can also refer to the broader architecture of X server in general. But since it's extremely unlikely to be updated to X12, so "X11" is also another way to say "X".

Again, analogy. "Unix-like" is the catchall phrase for the operating system in general, but sometimes especially refers to the kernel. "Linux" is a particular implementation of Unix-like operating system [1] (other implementations include FreeBSD or Solaris), which is maintained by the "Linux Foundation".

[0] We only consider 2D graphics without hardware acceleration. If OpenGL is involved, it's more complex.

[1] It's only a kernel so it's not entirely correct. But let's ignore it for the moment.

> pushes the pixels to the X server by calling a function in libX11.

That's how X is used today. The system was designed and implemented completely differently from today's use. The server had fonts and the client asked to get characters drawn. Or arcs. Sending pixels was a big exception for rare cases and it was far too inefficient for the machines of the 1980s and 1990s.

Nowadays the main usage is over a little corner case of the protocol and implementation. The bigger part of code is just collecting dust, bitrotting, a maintenance burden, probaby a vector for security attacks (though not very bad ones, because they typically require local access to the workstation computer). For this reason X is being replaced by Wayland for over 10 years. The speed of adoption seems to be "twice as fast as IPv6"... As IPv4 continues to do the work for the majority of Internet usage, X continues to do the work on the majority of Linux desktops.

> The speed of adoption seems to be "twice as fast as IPv6"...

I don't know. I received an IPv6 address at home since a few years ago and I've been using it and pulling a lot of traffic since then. On the other hand, it's extremely unlikely for me to ever switch to Wayland on my desktop in the foreseeable future because I need some niche and legacy features that are not supported by Wayland. Network transparency and VirtualGL is a big one, it allows me to run an unmodified X application in a 2D-only X server while outsourcing all the 3D graphics to a 3D X server on a separate machine.

> received an IPv6 address at home since a few years ago

Right, and the specs were more or less complete in the first half of the 1990s. So it took 20 years. And you are still a minority, global adoption is below 35% years later. Here in this country you can't really get fixed Internet connections for consumers supporting IPv6 at all. So I don't have it. (Although we have cheaper and better mobile broadband than nearly everywhere else and there the majority of the operators supports IPv6 by default. So when I want to play with IPv6 I just use mobile data.)

Wayland became somehow useable for those who really wanted a bit less than 10 years ago, Fedora bot not many others use it by default now.

That was my reference to twice the speed, 10 instead of 20 years. Of course it's a rough oversimplification, details are much more nuanced. My point was really lack of speed in both cases.

Edit: details added

> My point was really lack of speed in both case

I already saw your point initially, I remember browsing some IPv6 specs with a timestamp of 1999. My point was that at a personal level, I had every reason to use IPv6 and it was only a matter of whether it's provided, thus I started using it immediately after it was made available. However, speaking of the Wayland migration, I have personal reasons for staying on X and not to run Wayland in the foreseeable future, which is why I said my migration to Wayland is probably going to be slower, not faster, than my migration to IPv6.


X11 (and X windows) is a standard and a protocol. X is a short term for X11 and X Windows Xorg is a specific implementation of X11 protocol under the GNU open source project.

Pretty much every UNIX under the sun had some kind of X11 implementation, until proprietary UNIX workstations became a thing of the past.

Good to hear that rumors of X11's demise have been exaggerated.

This is the libx11 client library, not the Xorg server, which was the thing discussed in the deprecation posts.

To be even more explicit (or pedantic if you wish) - it's the bare metal xorg server that is 'deprecated' and not getting further development. The various nested xorg servers (xwayland, xephyr) are still very much alive.

Do be even even more pedantic, it is RedHat's involvement that is deprecated, anyone can grab the source and start fixing bugs if they arise :-P.

Like, you can be certain if i try to install Xorg on my PC at some point and i can't get my Window Maker desktop to work properly because of the X server i'll try to fix whatever issue there is.

I’m sorry but it’s not like a bug in cp or something. It is kind of a big and complicated source where you (pardon me if I’m wrong) can only modify things if you are familiar with the code base.

And since most of the actual people who were familiar with the code base left it (because they think it is not worth it, due to the architectural mismatch between Xorg’s model and current hardware), I doubt it would be trivial to fork/debug it.

I have downloaded and read the X server's codebase at the past because i was trying to figure out something (specifically how exactly keyboard input events are exposed). The code is very readable and i'm certain its complexity has been greatly exaggerated. A large part of it is driver/ddx code (that you can generally ignore) and i've worked with much bigger codebases even if we include the driver code.

And at the end of the day, it is code, not magic. Given enough time and dedication you can figure things out.

I think this statement is exaggerated.

Thanks to Keith and everyone else who contributed!

I miss working with Keith, he was a true professional, and always happy to show off what amazing new thing he had put together. I remember him proudly showing me x11 being sent from NT and including all audio, was quite amazing at the time.

really good to see that he still has the passion to continue after all these years!

He’s always a delight to watch speaking as well. Frequent attendee of linux.conf.au.

Thank you for maintaining. The beauty of oss is that this is possible.

And here the wayland people were telling us a few months back that X11 was dead and no longer updated!

I maintain the python bindings for the other way to interact with X, xcb. I remember when I wrote the binding from scratch six and a half years ago, I thought "why am I doing this? We're all going to be using wayland in a year". And yet I'm still maintaining it today, and there's no real sign that I'll stop in the next year, if not the next five. It'll happen some day...

Probably won't stop any time soon given the impasse nvidia and wayland seem to have reached

I'm sure Wayland will dominate eventually once they iron out the links, but for me X11 runs light and fast on all my outdated hardware, and that's all I really want

Even if wayland has completely taken over as the underlying server, there will always be the need for Xwayland just to be able to run old X11 based software. As much as I think that actively developed software should target wayland, I consider it of great importance that old software still can be run.

This is merely for the library and not the same as the server implementation. Wayland and wlroots receive much more frequent updates.

> Wayland and wlroots receive much more frequent updates.

Until they reach feature parity, you'd rather expect so.

the classic 'perl is dead' argument. things get feature rich and basically stable. Especially for dull libraries. CPAN has got an option for everything, new language X's package collection? Maybe, maybe not.

Nvidia doesn't seem to care :(

Why should they? ML or gaming on Linux doesn't give a shit about Wayland.

Because X has inherent design flaws. E.g. security related.

Almost every commonly deployed system does.

They've had feature parity forever. Every app ever released hasn't been updated yet, however.

Wayland's accessibility story is... Crap. In the name of security they killed most of the ways you'd expect to be able to pass on information to users who fall anywhere outside the norm.

For example, you can't fetch the mouse position, you can't fire mouse events, you can't get the window z-index. These are all pretty vital for accessibility.

Whilst there are efforts to get around this terrible-ness, you can expect most accessibility tools to segfault or misbehave.

There are ways to do all these things but they are compositor agnostic - which frankly makes sense. I don’t want a random app running on my desktop querying these informations in a hacky way, while the whole of this information is stored nicely in memory by the compositor. They just simply have to provide an API for that - and that’s the beauty of wayland - they let the compositor implement any number of custom apis and the app can query which ones are supported by the compositor and vice versa.

> There are ways to do all these things but they are compositor agnostic

Maybe. But GNOME have found it difficult [0] [1], and the most basic of mouse control required a truly massive patch to KDE [2]. Everyone else just shrugs and says to use XWayland. Meaning there is no consistency on how to make basic accessibility work.

It isn't clear to me why reporting the mouse's location belongs in the compositor. You may not be rendering to a screen at all.

The end result being... Accessibility under Wayland is crap. Accessibility under X11 mostly works.

[0] https://gitlab.gnome.org/GNOME/mutter/-/issues/9

[1] https://bugzilla.gnome.org/show_bug.cgi?id=709999

[2] https://phabricator.kde.org/D11468

Sounds like the beauty of a lump of rock - any sculpture you can imagine could potentially "just simply" be carved from it.

To replace X11, then, we would need something more than Wayland: a design (as a spec or as a concrete component) for how all these parts that were left out are supposed to work.

Well, yes. Wayland is a display protocol and it does its work splendidly. X11 does a lot more than display management, and those things should not be put into the display manager yet again as it is a mistake.

Maybe there should have been a unified api for things people have been wanting to do for 30 years instead of people figuring them out 12 years into development.

What degree of feature parity depends on the specific implementation. There are in fact a variety of things that don't in fact actually work or work only in a specific implementation adopted recently.

I'm presuming what you actually mean is that the specific features you use in insert environment on non Nvidia hardware work well enough.

I mean that everything you can do in X11 you can do in Wayland. That's feature completeness, right? The big issue seems to be that Wayland doesn't actually _do_ much. So everyone has to agree on how to handle copy/paste, screen sharing, etc. And sometimes Gnome and wlroots do things differently, and that causes problems. But it has nothing to do with the Wayland compositor not being feature complete.

If you are going to redefine feature parity X11 to mean feature parity with the much smaller core of features that you believe ought to be in wayland vs part of some external package like gnome/sway/kde it would seem that you can trivially argue yourself into deciding you have arrived no matter how impoverished the feature set you choose and how meaningless such a conclusion ultimately is.

Nobody wants to decide their interface based on a combination of gpu driver, apps, features are fully functional.

The actual question at hand is how many of the now more fragmented set of platform are feature complete and to what degree. Comparing apples to oranges is a waste of your time and my time.

Interesting to see lately how these relatively minor news from Phoronix gather significant numbers of votes here on HN.

For better or worse, Larabel does a great job of adding excitement to otherwise fairly humdrum activity. On the whole I think he's a major net benefit to free software, few people cover the goings on in random backwater mailing lists in such a public manner besides him and LWN, and AFAIK Larabel's audience is much less specialized, and his writing style can be considerably more vibrant.

I agree with your sentiment entirely, but have always lumped Larabel in with the fanboy blogs. He does a good job summarizing the boring mailinglists, but generally always does it in a semi-clickbait way. Jon Corbet is a legit journalist and kernel developer. They're definitely cut from a different cloth, but there is plenty of room for both of them.

Yeah, I do think he's doing us a favor, on balance. And I pay for a subscription.

Just surprised to see a news about a minor _library_ release see more upvotes than the "Linux on iPad" thing, for instance. With the whole love for Apple around these parts.

And I don't remember seeing anything from Phoronix in "popular" here even a couple of months ago. Perhaps it indicates some particular shift in interest?

I can tell you as a Linux user since before there was an iPad, I just don't care about that. At all.

Meanwhile, this sort of story (and the often technical discussion with people who know their shit) is precisely why I keep coming back to HN.

To be sure, there are a fair number of people who gained interest in Apple when they finally gave up on pre-OSX (I remember having to admin a Mac lab back in the day; long hours spent imaging machines and fighting the OS to make it as close as we could to multi-user), and many who just got fed up with Linux's learning curve at some point, switched, and never looked back.

But this article isn’t technical it’s 2 paragraphs summarizing a mailing list chain?

The HN discussion is technical.

The news must be viewed in light of the lack of development on the rest of X. In that light, it's definitely noteworthy.

[1] https://www.phoronix.com/scan.php?page=news_item&px=XServer-...

Xorg 1.21 is still unlikely to be released. Just minor backports to 1.20 (and there are ongoing developments there).

Phoronix headlines are often sensational click bait. I still read them occasionally, because Linux news are not covered that well by many other news sources.

This article makes no exception to the sensational headline rule: The "lots of" changes are less than 5 that could maybe be important for a larger user base.

It's still worth a news item because not many would have expected a new release at all. But "lots of" is certainly misleading for anybody who reads open source change logs and does not apply a Phoronix filter.

As said elsewhere according to HN submission guidelines this article is not a valid submission, the release mail would have been. But probably it would not have been upvoted and most of us would have missed it. Click bait works :)

Vibrant isn’t really the word I would use. “Lots of fixes” in the title is overly casual, and the first sentence of the article is completely incoherent:

> It's been seven years since the release of libX11 1.6.0 for this central X11 library while on Friday was replaced by the libX11 1.7 series.

Like GP, I’m always surprised to see a Phoronix regurgitation-with-errors do so well on HN.

Would you prefer the exact wording from the mailing list, "a bunch of bug fixes"?

Yes, the first sentence is confusing, but I still consider phoronix to be quite valuable. They always link to the original source, which is more than what many news sites do.

> Would you prefer the exact wording from the mailing list, "a bunch of bug fixes"?

The mailing list [1] contains much more than "a bunch of bug fixes," arguably more than what the Phoronix link provides.

>They always link to the original source, which is more than what many news sites do.

I don't find this to always be the case with Phoronix, as well as when referencing previous news they do a self link to their other posts rather than straight to the original source. Besides, is it not Hackernews guidelines [2] to "submit the original source?" How does Phoronix get away without being changed to the the right URL so often?

[1] https://lists.x.org/archives/xorg-announce/2020-November/003...

[2] https://news.ycombinator.com/newsguidelines.html

> Would you prefer the exact wording from the mailing list, "a bunch of bug fixes"?

I’d prefer a link to that mailing list and not a copy paste article.

There’s a reason why phoronix is banned on r/Linux and other FLOSS subreddits.

I never click the links. It’s always a 1-2 paragraph low effort article that would be better if we just actually linked to the mailing lists/git comment chain.

> There’s a reason why phoronix is banned on r/Linux and other FLOSS subreddits.

Is it though? I just went to r/Linux and did Cmd+F to search through the rules if they mentioned Phoronix, and I found this [1] on the page.

[1] https://old.reddit.com/r/linux/comments/jwgf5c/amd_radeon_rx...

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact