Muller's World

Mike Muller's Homepage
NewsSoftwareMusicAbout Me

2006-01-25 DOOM3

Since I seemed to be between programming activities, I decided last night to take another swing at getting Doom 3 up and running on my laptop. I downloaded the latest and greatest ATI Fire GL drivers and started it up... and it died with a seg-fault. So (after refreshing myself on the situation with Google) for the next few hours I tried various combinations of LD_PRELOADing various libraries, shuffling files around, and running the binary under tools like valgrind and strace to try to figure out exactly what wasn't working.

I finally gave up around 9:00 this morning (no, I didn't stay up all night, I just went back to work on it first thing...). Since I had installed the new Fire GL drivers, I figured I'd take a look and see whether ATI had fixed the suspend/resume problem with the driver.

Now, those of you who run Linux on a laptop and use the Fire GL drivers probably know exactly what I'm talking about. For a long time, if you tried to suspend a laptop running an X-server with the fglrx drivers - well, it would appear to work fine. But when you tried to resume it you would end up resuming to video garbage and an inoperable system. Since I care greatly about the suspend/resume feature on my laptops, I decided early on to say "screw it" and just not run their shitty drivers for normal use. I run with the plain VESA driver for my X-server and when I want to play a game or watch a movie on it I start up a second fglrx X-server on display :1 in a different virtual console. This worked just fine for me for a long time.

But as it turns out, the latest driver (8.21.7) appears to fix the suspend/resume problem! (at least for me - so far. I've heard from a very knowledgeable source who's had serious stability problems with it) So I thought, "ok, this is pretty cool. Don't have doom3 but at least I can stop swapping the X-server for video-intensive apps." So I made the fglrx XFree86 config file the default, restarted xdm and logged into the new server. And then, just for the hell of it, I started doom3...

...and it worked.

It turns out that Doom 3 crashes on startup when my X-server has a display number other than 0. Now there's something that didn't come up on any of the message boards! This doesn't seem to be the only variable - I can now also run the game on display :1 if the audio device is in use (and therefore unavailable to the Doom 3 engine).

The game doesn't run particularly well for me. I get very low framerates, lots of times the audio and video frames are punctuated with long delays as the system struggles to keep up. This is at the lowest resolution and graphics quality, but with most of the rendering features (volumetric shadow, bump-mapping) turned on. I also get some weird polygons showing up every now and then. If I turn off the rendering features, performance improves but the polygons get much worse. But anyway, I want the rendering features because this game looks amazing and it would be a crime to spoil that.

So needless to say, I spent most of the afternoon immersed in Id's latest vision of hell. This is without a doubt the most atmospheric game I've ever played. I am constantly amazed by the amount of detail that has gone into it. If you run into a chair, the chair falls over (all of the physics are disturbingly realistic). There's sound everywhere (really scary sounds). When some of the characters talk to you, their faces are so realistic looking I forget that they're rendered.

I'm going to submit a bug-report on this - meanwhile I've added the section below so that anybody else who runs into the problem will hopefully end up here.

Doom 3 Linux ATI Display 1 Problem

Graphics Card: ATI Mobility Radeon (scanpci device id 0x5460)
Driver: Fire GL (fglrx), all versions I've tried
Problem: Doom 3 dies with a SIGSEGV when the X-server is running on display 1
Work-around: Run the X-server on display 0.

Partial console log:

   glprogs/arbVP_glasswarp.txt: File not found
   glprogs/arbFP_glasswarp.txt: File not found
   using ARB_vertex_buffer_object memory
   using ARB2 renderSystem
   signal caught: Segmentation fault
   si_code 1
   Trying to exit gracefully..
   Shutting down sound hardware
   ------ OSS Sound Shutdown ------
   close sound device