Wednesday, October 28, 2009

X11R7.5 released - but what is it?

Thanks to Alan Coopersmith's efforts, X11R7.5 was released a few days ago. Except - what does that mean?

This post is intends to shed some light onto the components of the X11R7.5 release and where the version number comes from.

X Window System

If you're running a desktop system other than Windows or OS X, you're most likely running some instance of the X Window System, also referred to as "X11" or simply "X". X consists of several components that all make up the "X Window System", yet some of them are more visible than others.

X Protocol

The core component of X is the X Protocol. This is what defines X, it is essentially the API.
The X Protocol consists of the core protocol, dating back to the 1980s and a number of protocol extensions, essentially additions to the core protocol. If you hear terms like X Input, XRandR, RENDER, etc., all of these are protocol extensions.

X Server and the drivers

The X Server is the process that talks to the hardware drivers and listens to requests from applications to draw things. It also handles input events and passes them on to the right application. Depending on your hardware, you have a number of drivers. These days many setups have evdev and synaptics for input, and intel, ATI or nvidia for graphics.

The X Server supports the core protocol and most protocol extensions, but different X servers may support different versions. Generally, the most recent X Server supports the latest version of the protocol.

Xlib and friends

Xlib (or libX11) is the library that allows applications to talk X Protocol to the server. It wraps the low-level protocol into a slightly higher-level API. These days, most applications that display a GUI use Xlib at some point - though Xlib is usually abstracted away by a saner toolkit such as GTK or Qt.

Xlib has been the single toolkit to talk X Protocol for ages, but in recent years XCB is gaining some traction (and in fact recent versions of Xlib use XCB at the lowest level).

X applications

A number of applications are traditionally part of the X Window System. One of the well known ones is xeyes, but other, crucial tools such as setxkbmap and xkbcomp are part of these applications as well.

Misc other stuff

There are a number of other packages that include fonts, misc utils, data packages etc. I'll skip the details, it's just important to know they're there.


Back a few years ago, all the above component were part of one repository. To build one of the components, you also had to build the others. To release one, you'd have to release the whole lot. Over time, the version numbers crept up to 6.9 for this so-called monolithic tree.

X11R6.9 (X11 Release 6.9) was the last monolithic release. Around 2005, the monolithic tree was split up into separate repositories for each component. This also reset the version numbers for most of the components - those that inherited the 6.9 version numbers (or even 7.0) were reset to 1.0.

Since then, the X11R7.x releases (referred to as "katamari") are quite like distributions. They cherry-pick a bunch of module versions known to work together and combine them into one set. The modules themselves move mostly independent of the katamaris and thus their version numbers may skip between katamaris. For example, X11R7.4 had the X Server 1.5, X11R7.5 has X Server 1.7.

This is where much confusion comes from. Many users don't know whether they're running 1.7, 7.5, 1.0 or 6.8. The intent of a katamari is simply to provide a set of modules that are sufficient to get a basic GUI running. That's why over time modules get added or removed from the katamari as well. A module that was part of X11R7.5 may not be part of X11R7.6 and of course the other way round (a full list of which versions are included is at the top of the X11R7.5 Changelog).

Which version actually matters?

Katamaris matter mostly for distributors. They represent a set of versions known working together and make for easy picking. A distribution is free to start out with a katamari and then update to newer modules as they are released. The katamari is merely a starting point, not more.

For this reason, it rarely matters to an individual user whether a module they're running is part of a katamari. For bug reporting, developers need to know the versions of the individual modules affected so they can narrow down which bug may be triggered.

To get the versions for the X Server and the drivers, look at the /var/log/Xorg.0.log. The first line states the version of the X server. Drivers are loaded dynamically, so you need to search for them in the log. For example, my log says:

X.Org X Server 1.7.0


(II) Module intel: vendor="X.Org Foundation"
compiled for, module version = 2.9.0
Module class: X.Org Video Driver
ABI class: X.Org Video Driver, version 6.0


(II) Module evdev: vendor="X.Org Foundation"
compiled for 1.7.0, module version = 2.3.0
Module class: X.Org XInput Driver
ABI class: X.Org XInput driver, version 7.0


(II) Loading /usr/lib/xorg/modules/input/
(II) Module synaptics: vendor="X.Org Foundation"
compiled for, module version = 1.1.99
Module class: X.Org XInput Driver
ABI class: X.Org XInput driver, version 7.0

So right now I'm running X Server 1.7.0, with evdev 2.3.0, intel 2.9.0 and synaptics 1.1.99. Whether these versions are part of a katamari doesn't matter.

X apps usually have some -version switch. For libraries, it's best to use the distribution's packaging system (e.g. rpm -q libX11) to get the version number.


Corey Burger said...

I really love what the team has done technologically, but if you need this many words to describe your version numbering, you have failed. Please make it easy for distributors and users and adopt a scheme similar to the GNOME one, where most of the modules share a common numbering scheme.

Peter Hutterer said...

Fedora 12 stands for a collection of software packages, not for a single package. X11R7.5 stands for a collection of software packages, not for a single package. We do have a single version number (X11R7.x), if that's what you're looking for. At the same time you have more flexibility if you want to update different modules independently.

thomas said...

I would like to translate and publish your post, since I found it very instructive ?

Corey Burger said...

Yes, Fedora (or Ubuntu, etc.) have a single version number that represent a number of upstream packages, but a distro is not really analogous to a project ala, GNOME or KDE. The latter develop most of their core software in a single location, rather than pulling in from many sources like a distro. This difference is why standardized numbering makes sense in the setting and not the Fedora one.

Peter Hutterer said...

feel free do to so.

Except - we don't update everything with every release, so unified version numbers simply don't make a lot of sense. Shipping the same package as version 1.0, 1.1 and 1.2 just because it's part of a is IMO equally confusing.

Either way, though I appreciate your feedback this is just a random blog and this post was merely to explain the numbers, not to justify them. Any number of comments here won't make the version numbering change, please take it to the xorg developers list if you really want it to change.

thomas said...

Here it is :!-Oui-mais...

Note that it will maybe be published on htt://, depending on the moderators :)

sam said...

Not sure what Corey thinks KDE versioning is like. As far as I can tell, X's model is similar.

For example, I'm using KDE 3.5.8 which includes Konsole 1.6.6, digiKam 0.9.2-final, etc. Individual components of KDE have different versions.

James Henstridge said...

I know katamari is a Japanese word, but did you adopt it directly or via the Katamari Damacy game series?

If so, which developer would you say fits the role of King of All Cosmos best?

skierpage said...

Excellent, you should Wikify this on as "The elements of an X11 release", and start linking to it from release announcements. I'd volunteer but I have no idea how MoinMoin works.

The weird thing with these X11R7.what releases is it seems "7.5" doesn't appear in any --version output or log file. I know I'm running X server 1.6.0 in Kubuntu, but I had no idea whether that's X11R7.4 or something else until I searched for x11 in packagekit and found a few package versions like "x11-xserver-utils - 7.4+1"

Congrats on X11R7.5 and your XI2 work. Wait, X11R7.5 has xinput-1.5 and libXi-1.3, no sign of version 2. The confusion continues ;-)

redwalnut said...

It sounds great, but to a simple Ubuntu jockey like me, leaves me swirling in a mist of uncertainty. Case in point:

7.5 installed to Karmic with this PPA...
...but no idea if I am really running the MPX dream of 1.7 or 1.7.1 or even 1.7.99 or 1.8. And little idea how to test out if MPX is active.

(BTW, some help on that would make my day).