Linux Nvidia Driver GLX Failure

I’VE BOUGHT A copy of the game Sacred Gold in an edition that is ported to Linux. This would be very exiting… if it didn’t segfault every time I start it :-(

$ sacred
sacred 1.0.1, built for i386        
Segmentation Fault: I dont believe in dragons! oh...
This is a BUG, please report it to
Stack dump:                                                             
        /usr/lib/gtk-2.0/modules/ [0xb68299a6] 
        /usr/lib/gtk-2.0/modules/ [0xb6829a5d]
        /usr/local/games/sacred/lib/lib1/ [0xb7700443] 
        sacred [0x860422e]                                                                  
        sacred [0x8620770]                                                                  
        sacred [0x860839b]                                                                  
        sacred [0x809ab90]
        /lib/i686/cmov/ [0xb71557a5]
        sacred(gtk_widget_grab_focus+0x31) [0x8053849]

The game publisher Linux Game Publishing has provided a test tool that evaluates if your system should be able to execute the game…

# testtool
Testing installation... OK, installed at /usr/local/games/testtool
Base system Test
Testing architecture of system... 32 bits
Testing system CPU... 1242MHz
Testing CPU flags... MMX SSE SSE2 SSE3
Testing system memory... 2025MB
Graphics Test
Looking for OpenGL library
Accepting /usr/lib/
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  155 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  26
  Current serial number in output stream:  26

So It appeared that I had some trouble with the proprietary Nvidia driver. I ran glxinfo and indeed it gave an error.

$ glxinfo | grep -i error
Error: glXCreateContext failed

On the world wide web I found some hints about adding the following lines to xorg.conf.

Section "Files"
    ModulePath      "/usr/lib/xorg/modules/extensions"
    ModulePath      "/usr/lib/xorg/modules/drivers"   
    ModulePath      "/usr/lib/xorg/modules"           

That didn’t help. :-(

Grepping the logs however revealed some useful information

$grep -i glx /var/log/*
/var/log/Xorg.0.log:(II) "glx" will be loaded. This was enabled by default and also specified in the config file.
/var/log/Xorg.0.log:(II) LoadModule: "glx"
/var/log/Xorg.0.log:(II) Loading /usr/lib/xorg/modules/extensions//
/var/log/Xorg.0.log:(II) Module glx: vendor="X.Org Foundation"
/var/log/Xorg.0.log:(==) AIGLX enabled
/var/log/Xorg.0.log:(II) Loading extension GLX
/var/log/Xorg.0.log:(EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X
/var/log/Xorg.0.log:(EE) NVIDIA(0):     log file that the GLX module has been loaded in your X
/var/log/Xorg.0.log:(EE) NVIDIA(0):     server, and that the module is the NVIDIA GLX module.  If
/var/log/Xorg.0.log:(==) NVIDIA(0): Enabling 32-bit ARGB GLX visuals.

It was clear that the Nvidia driver failed to intitalize the GLX module, but before that, it can be seen that another GLX module was actually loaded Module glx: vendor="X.Org Foundation". This was a big hint.

Looking into earlier investigated directories I could see that I had two different versions of the glx library files installed?

/usr/lib/xorg/modules/extensions# ll
-rwxr-xr-x 1 root root 1269220 2009-07-25 13:10
-rw-r--r-- 1 root root  337008 2009-09-28 07:32

It seemed strange that I had two so differently sized versions of libglx laying around, and also that the Nvidia version appeared not to be the default file.
Searching for the libglx file revealed that only the fglrx-driver and the Nvidia drivers supplied that file.

$ apt-file search
fglrx-driver: /usr/lib/xorg/modules/extensions/
nvidia-glx: /usr/lib/xorg/modules/extensions/
nvidia-glx: /usr/lib/xorg/modules/extensions/
nvidia-glx-legacy-173xx: /usr/lib/xorg/modules/extensions/
nvidia-glx-legacy-173xx: /usr/lib/xorg/modules/extensions/
nvidia-glx-legacy-71xx: /usr/lib/xorg/modules/extensions/
nvidia-glx-legacy-71xx: /usr/lib/xorg/modules/extensions/
nvidia-glx-legacy-96xx: /usr/lib/xorg/modules/extensions/
nvidia-glx-legacy-96xx: /usr/lib/xorg/modules/extensions/
xserver-xorg-core: /usr/lib/xorg/modules/extensions/
xserver-xorg-core-dbg: /usr/lib/debug/usr/lib/xorg/modules/extensions/

Although the only glx package that was installed on the system was libgl1-mesa-glx.

$ aptitude apts glx
p   fglrx-glx
i A libgl1-mesa-glx

Looking at libgl1-mesa-glx showed that that package installed a OpenGL library file

$dpkg -L libgl1-mesa-glx

Strangely also here a Nvida version of the library existed in /usr/lib

-rwxr-xr-x 1 root root   667528 2009-07-25 13:10

This seemed like the Nvidia installer have had collisions with other already installed packages and had failed to resolve the situation properly. Unfortunately the installer had warned nothing about this situation. What I did then was to remove the existing libraries and make a symlink to the Nvidia libraries for libglx and libGL.

/usr/lib/xorg/modules/extensions# ll libglx*
lrwxrwxrwx 1 root root      19 2009-10-01 22:22 ->
-rwxr-xr-x 1 root root 1269220 2009-07-25 13:10
/usr/lib# ll libGL*
lrwxrwxrwx 1 root root       18 2009-09-13 13:40 ->
lrwxrwxrwx 1 root root       18 2009-10-01 22:52 ->
-rwxr-xr-x 1 root root   667528 2009-07-25 13:10

And then… glxinfo ran with no errors.

The log also changed for the better

$grep -i glx /var/log/*
/var/log/Xorg.0.log:(II) "glx" will be loaded. This was enabled by default and also specified in the config file.
/var/log/Xorg.0.log:(II) LoadModule: "glx"
/var/log/Xorg.0.log:(II) Loading /usr/lib/xorg/modules/extensions//
/var/log/Xorg.0.log:(II) Module glx: vendor="NVIDIA Corporation"
/var/log/Xorg.0.log:(II) NVIDIA GLX Module  173.14.20  Thu Jun 25 19:49:59 PDT 2009
/var/log/Xorg.0.log:(II) Loading extension GLX
/var/log/Xorg.0.log:(II) NVIDIA(0): Support for GLX with the Damage and Composite X extensions is
/var/log/Xorg.0.log:(==) NVIDIA(0): Enabling 32-bit ARGB GLX visuals.
/var/log/Xorg.0.log:(II) Loading extension NV-GLX
/var/log/Xorg.0.log:(II) Initializing extension GLX

Unfortunately Sacred still segfaults big time :-(

Interruption At Work Created A Mishap

INTERRUPTIONS AT WORK is a frequent occurrence but generally its not a big problem. This time however the unavoidable loss of focus on what you was doing before, gave an unpleasant surprise.

I was adding some new functionality and had just written the following:

switch (state) {
    case Step3:
        configuration.length = 10;

Next I added a line to specify the configuration data on index zero. With the intention of doing this for the remaining nine data indexes, I copy-pasted the first line and incremented the index.

switch (state) {
    case ConfigureTask:[0] =[1] = 
        configuration.length = 10;

But this was at the exact moment a colleague asked a question. To figure out the answer I had to browse around in the same file I was just editing. Not finding the complete answer there, the hunt led on to opening a bunch of other files. Eventually the situation evolved to a discussion using a white-board.

Now, even though the above code is incomplete, it compiles to perfectly valid code!. What the above code does is to initialize[0],[1] and configuration.length to 10. Naturally this behavior was never the desired behavior for that code…

Later, returning to my workstation, I had completely forgotten about the unfinished implementation I worked on before. In my mind it was already done and I proceeded on other things that would eventually allow me to run some basic tests for the new implementations. The nature of the code is to delegate a state dependent number of black-box data to a task. The receiving task is found by peeking into the first byte of the black-box data ([0]). Unfortunately ’10’ is a perfect match for the first task to be configured. So when unit-testing, at first everything seemed to be okay.

Later some strange behavior appeared, for which I could find no good reasons. Eventually I found the faulting situation in great dismay.

This kind of logic errors is the kind that can become extremely difficult to find, and I’ve learned my lesson: if leaving in the middle of writing some source code, be sure to quickly add some non-code that will not compile.

Blade Runner – Final Cut

BLADE RUNNER HAS been one of my favorite movies since the first time I saw it.

I’ve always hoped that I would get chance to see Blade Runner on the big cinematic screen, but hadn’t really believed that an old 1982 movie would get big screen time. But suddenly the chance came up, as BioCity in Århus arranged a special marathon, dedicating one show room for continuously playing Blade Runner – Final Cut at all time slots for almost an entire week. The sensation was enhanced by the fact that the movie was projected from a digital copy with a high resolution projector. What a fantastic picture quality! This was the first time I’ve seen a digital movie projected at the cinema – and what a debut experience with such a picture-beautiful movie as Blade Runner. This is how movies should be seen.

Definitely worth the almost 150 kilometer drive.

Rating: ★★★★★


NULL Is No Obstacle For Tiesto

IT MIGHT BE that Chuck Norris and RMS got some skills, but Tiesto – he performs even in those undefined places of NULL pointers.

Metaphysical respect.

2008 Formula 1 Season Started

THE 2008 F1 season finally started with the opening race in Australia. Given the new significant ruleset restrictions like mandatory gearbox reuse and no traction control, the progress of the first race was anybody guess.

With only six cars finishing, the race might not give the best grounds for comparing the strength of the teams. An “easy” win for Hamilton and fifth place for Kovalainen indicates that McLaren-Mercedes are very fast again this year, whilst Ferrari have serious endurability problems. BMW-Sauber was a close third team last year, and they seem to have progressed further. I am confident they will take a win this season. Renault disappoints in performance which resulted in bad qualifyings, but Alonso made the most of what was available. Christian Vettel in the Toro Rosso and Nico Rosberg in William-Toyota both preformed spectacularly. The biggest surprise was perhaps the competitiveness of Barrichello in the Honda. If they hadn’t made two stupid mistakes of pitting while the pits was closed, and Barrichello leaving pit on a red light, the resulting sixth place might as well have been a podium position.

A non-sport observation was the (much needed) updates in the realtime information graphics. FIA realtime information graphics has slowly been progressing the last couple of years and finally they realized that e.g. a vertical scrolling information bar is an effective and nonintrusive way of continuously giving position and time updates. Anyone thats seen Formula 1 on Speed TV would known, that the official FIA graphics compared to the Speed TV graphics was like comparing caveman drawings to Pixar renderings.

Warlords II, Flashback and Abuse Revisited

THE TITLE FOR this post could almost as well have been “Warlords II, Flashback, Abuse and How I Spent My Youth“. Well, perhaps not really; I did play a lot of other games too :-D. When I think of great games I played in my long “carrier” of PC days, those three games I’ve always categorized as games with exceptional gameplay and a spellbinding atmosphere. No matter how horrible the graphics may look today, these properties was what kept you playing hours upon hours.

Warlords II

When it comes to Warlords II, me and my friend Michael Rasmussen that lived a couple of houses down the street, used to battle in this game for an almost infinite amount of hours – and before that, we played Warlords I for almost as many hours. Actually when hearing the hours being clocked by people playing WoW it reminds me of myself playing Warlords. I guess its the same magic.

Warlords II is reincarnated in an free open source clone LordsAWar. This project builds on the C++ implementation of FreeLords ( FreeLords it self, seems to have spawned as a Java implementation instead). LordsAWar is a multi platform game and can also be fetched from the Debian repository.

LordAWar Ingame Shot


What Flashback have in gameplay and story it also had in graphics and jaw-dropping animation sequences.


Presented in a dystopian theme, it were almost something like a “Indiana Jones meets Blade Runner” feeling of the game.


Flashback is released for Amiga and DOS platforms, but some talented fans have written the game engine REminiscence as a multi platform replacement for the original game engine. Supplying the game data files, downloadable from Abandonia, and compiling REminiscence is that enough revisit Flashback ;-) on a Linux box. A later extended CD-ROM version of Flashback is also available on Abandonia. Old reviews can be read on the Amiga Magazine Rack.


Abuse is also abandonware and is available from Abandonia, but also exist in a free open source edition called Abuse-SDL. Like Flashback, Abuse is a dystopian game where one guy must escape from prison where all his cell mates has become monster due to experiments gone wrong.


Abuse is both a horizontal-scrolling and vertical-scrolling platform game. The controlling of the main character is somewhat unusual for a platform game, as the keyboard moves the character and the mouse controls the gun aiming. A review is available on the Amiga Magazine Rack.

Well… time for some more gaming. How needs sleep anyway?

TV Series. Late To Catch On, But Passionate On The Rerun.

SOMETIMES IT SEEMS that I often am the last person in the world to get exited of new television series. Granted that television is crammed with series and keeping up with just a fraction of the lot is an impossible mission. But once in a while a series pops up that just explode in popularity with everybody – everybody except me that is.

Right now I’m crazy about the (ReImagined) series Battlestar Galactica.

Battlestar Galactica

When I saw the first episode on TV I quickly rejected it and zapped on. After some preservation from a friend that is a passionate fan, I borrowed the series to give it another try. After all I just learned my lessen earlier this year when, after much resistance I agreed to watch the series Lost. That series I had rejected as being boring as hell, but on the second try, I was hooked. I consumed one DVD after another in almost spell bound fascination. No one, however told me that the series was only had three seasons completed, so now, like the rest of the world, I’m stuck on a cliffhanger – aarrgh. As for Battlestar Galactica, the history repeats it self. I am absolutely trilled about the series, and being a huge StarTrek fan, I can’t comprehend why I didn’t find interest in it the first time around?

Actually something similar went for Buffy The Vampire Slayer.

It just didn’t appeal to me the first time. Then I coincedentially saw a rerun of Buffy The Vampire Slayer and Angel one hangover’ed Sunday morning. Now I have both the Buffy The Vampire Slayer and the Angel Collectors box-sets

…along with the Buffy The Vampire Slayer coffeecup and T-shirt :-)

I wonder if 24 and Heroes will come back to haunt me later on. I watched the first episode of both series, but I just didn’t get interested first time around.

Dystopian Movies

I STUMBLED UPON an excellent Top 50 Dystopian Movies of All Time ranking list. Even though my personal views of technology and the future are definitely more utopian, I’ve always found these dystopian movies to be the most fascinating. Interestingly this list does in fact list include most of my favorite movies, even though I do not agree with the ranking order in which they are listed.

My personal top 10 dystopian movie hit list would go like this:

Learning GO

FOR A COUPLE of years now I’ve wanted to learn to play the game of Go, but I just haven’t managed to find the time. Go is a strategic game for which the saying is “easy to learn, hard [impossible] to master”.

There exists a brilliant live-cd called Hikarunix. The Hikarunix CD contains a huge set of the quality information on Go found on the internet. A great asset is also the collection of tutorials, trainers and databases over played Go games. In theory Hikarunix bundles all that is required to study, learn and play Go.

Hikarunix is definitely recommendable, but experience tells me, that if you really wanna learn a subject to depth, get a book written by experts in the field and benefit from their hard earned knowledge. Hence I have bought the book Lessons in the Fundamentals of Go.

Lessons in the Fundamentals of Go

The book comes highly recommended (e.g. from so I’m looking forward to reading it.

I am also very exited about playing on my Go board.

Go Board

This beautiful board is actually handmade by my mother. When wooden Go boards are generally price tagged in range of a Ariane space rocket, its nice to have a family that got talent :-)

The wood is a 48.3[cm] x 55,5[cm] leftover from a kitchen table and then drawing of the grid and cutting grooves for all the lines as well as coloring the lines and applying the sealer is handmade.

Copyright © All Rights Reserved · Green Hope Theme by Sivan & schiy · Proudly powered by WordPress