2009-06-15

Xorg, a stumbling stone?

Statement: Xorg is a stumbling stone in the advancement of desktop linux, discuss.

This may seem like a university essay, but there's a valid point hiding in there somewhere. Xorg is bigger, slower and more complicated than the graphical servers of other operating systems. One of the reasons is that it lives in user space and, thus, is not part of the kernel. This has massive advantages for stability, but does mean that getting flickerless boot is somewhat complicated ( Fedora have been trying for a while now and are getting close ). It also means that driver problems within Xorg are often harder to diagnose from the start. 

Here's a little example, i've just bought a Dell Optiplex G280 to use as a media center. It has a Radeon X300 graphics card, and while it works perfectly on my 19" monitor, it refuses to work on my TV, no matter what driver i have installed. There is no feedback, it locks up the entire system, and i can't find anything in the log files. Several different Linux distributions with several different kernels have exactly the same problem. What makes it really frustrating is that i get full graphical boot and have no problems getting to the point where X initialises. Dual screen even refuses to work. And this is not the first rough encounter i've had with X. In fact since i've used Linux ( ~12 years now ), i can remember always having to edit the X config file manually. This is one thing which has never worked properly, and the only config file that i have consistently had to mess around with for 12 years.

My question is why? Firstly, do we need X in it's current form. Yes it's really advanced and has some amazing functionality, but does the average desktop user need that. Would it not make sense to rewrite ( much like Apple did with OS X ), a smaller, faster graphical server which may be part of the kernel? Something dedicated to being primarily a desktop graphical server, and secondarily an advanced server. If linux is to be taken up in the public at large, we can't have people struggling to attach an external monitor, since that is becoming a far more common task. Also, surely taking it into the kernel would make sure its extremely well maintained? Correct me if i'm wrong, but there are far more active and willing kernel developers than there are X developers?

Surely something as old as the X server needs a code over haul anyway? I've heard that there are plans afoot, but i'm not convinced that its anything more than a big extension of some code from 1992. To me, everything about X seems old and archaic, from their code base to their website ( which is just lacking a spinning under construction gif and some marquee text ). I can't believe that something which has never had a complete overhaul for that long is really built to handle modern graphics cards, 3D rendering and all the new input methods like tablets and multitouch very well without some major hack work. And hack work is _NEVER_ a good thing. And seriously, for a graphical server, i do expect a little bling on the web page.

I'm not sure exactly how i would go about it, and maybe it hasn't really been done because it's not something many people know how to do. Yes, i've heard of Wayland, which is NOT meant to ever be an X replacement ( read the FAQ ), and Project Looking Glass, but my stance on Java is a big firm no. What i want to know, is why isn't there a bigger effort by either the Linux Foundation or some big company like Novell, Red Hat or Canonical to actually make a big difference?

And in truth, if Windows works on my media PC, then i'll have a Windows media center. Because sometimes, it's about what works, and not what's got the better theory behind it. And no, i still won't get a mac tv. ever.

3 comments:

  1. Why hasn't it been overhauled? probably because there's a lot more code to deal with then even the kernel, maybe because it's far more specific and requires some very specific knowledge, who knows...

    What I do know is this:

    On my current rig I can run a 3d game and run my TV card and play a movie and have a vmware server running an xp machine and a 3D desktop all going at the same time without issue, not evan a slow down.

    BUT this same rig running Windows XP or Vista cannot do 2 things at the same time without either stuttering, blanking the video overlays for movies while gaming or whatever else it cannot handle seamlessly.

    Ever since I fully switched to Linux and stopped playing my windows games I've been shown time and again just how good Linux XOrg and open-source are for computing.

    I enjoy the freedom given me by gnu/linux and I'm not about to ask the developers of xorg to throw the baby out with the bath water.

    ReplyDelete
  2. It's a pretty old article, but it still is valid:
    http://www.joelonsoftware.com/articles/fog0000000069.html

    Cheers,
    Johannes

    ReplyDelete
  3. I have often thought about the same thing. It should be possible to replace the core graphics rendering engine, and then provide (optional) libraries to provide compatibility with X applications.

    Unfortunately, the problem is bigger than this...

    There are two frameworks that give fully functional rendering capabilities, either QPainter (Qt) or cairo (Gnome), but the problem with universal adoption of a replacement for the graphics engine is the fact that graphical Linux users are divided into two popular Linux desktops, both of which following very different paths. This creates problems when adopting universal graphical standards.

    Both cairo (Gnome) and QPainter (Qt) can work without X. Both are capable of outputting to framebuffers, OpenGL, or other things.

    The problem is that with two different graphical desktops, each with their own APIs, one based in C++ and one in C, the inclusion of one always comes at the expense of the other, unless you want to include both.

    This reminds me of the HD DVD vs Blu-ray wars. They both worked. They both had supporters. Eventually, the Blu-ray camp won the battle. However, highdef DVDs never caught on until one finally won out.

    In a battle for development resources, Linux users may have the same decision before them. Unite around a single graphical platform or continue to suffer irrelevance. The only place Linux is getting significant market share is in the server space, where graphics aren't a factor.

    ReplyDelete