Problem running Duke Nukem 3D on Linux

duke-nukem-3dlinuxtechnical-issuesUbuntu

Recently, I tried to run DN3D, but I failed. I got these command line debugging script:

EDuke32 2.0.0devel r1864
Compiled Apr 11 2011 15:49:50
Using /home/oneat/ for game data
Using /home/oneat/.eduke32/ for game data
Initializing SDL system interface (compiled against SDL version 1.2.14, found version 1.2.14)
Initialization failed! (No available video device)
Non-interactive mode enabled
Searching for game data...
oneat@oneat-desktop:~$ eduke32
EDuke32 2.0.0devel r1864
Compiled Apr 11 2011 15:49:50
Using /home/oneat/ for game data
Using /home/oneat/.eduke32/ for game data
Initializing SDL system interface (compiled against SDL version 1.2.14, found version 1.2.14)
Initialization failed! (No available video device)
Non-interactive mode enabled
Searching for game data...
Using 'duke3d.grp' as main game data file.
Compiling: GAME.CON (151190 bytes)
Including: DEFS.CON (35992 bytes)
Including: USER.CON (45482 bytes)
GAME.CON: In actor `ORGANTIC':
GAME.CON:3967: warning: found `else' with no `if'.
GAME.CON: In state `pigshootenemystate':
GAME.CON:5890: warning: found `else' with no `if'.
Found 2 warning(s), 0 error(s).
Resizing code buffer to 16187*4 bytes
Script compiled in 45ms, 16179*4b, version 1.4+
1918/11264 labels, 321/2048 variables
125 quotes, 207 actors
Initialized 24,0M cache
Using .RTS file 'DUKE.RTS'
Initializing OSD...
0 joystick(s) found
Setting video mode 1024x768 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x768x32 windowed! Attempting safer mode...
Setting video mode 1024x768 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x768x32 windowed! Attempting safer mode...
Setting video mode 1024x768 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x768x32 windowed! Attempting safer mode...
Setting video mode 1024x768 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x768x32 windowed! Attempting safer mode...
Setting video mode 800x600 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 800x600x16 windowed! Attempting safer mode...
Setting video mode 800x600 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 800x600x16 windowed! Attempting safer mode...
Setting video mode 800x600 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 800x600x16 windowed! Attempting safer mode...
Setting video mode 640x480 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 640x480x8 windowed! Attempting safer mode...
Setting video mode 640x480 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 640x480x8 windowed! Attempting safer mode...
Setting video mode 640x480 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 640x480x8 windowed! Attempting safer mode...
Setting video mode 320x240 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 320x240x0 windowed! Attempting safer mode...
Setting video mode 320x240 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 320x240x0 windowed! Attempting safer mode...
Setting video mode 320x240 (8-bpp windowed)
Unable to set video mode!
Failure setting video mode 320x240x0 windowed! Attempting safer mode...
Unable to set failsafe video mode!

You know any solution for this? I've got old computer with SiS built-in graphics card

Best Answer

It looks like your video setup hasn't been configured for less-than-normal desktop resolutions. Modern implementations of X will do a fairly decent job of automatically determining the largest resolution that your monitor will do, and setting that, even without a config file. However, when another program wants to take over the root screen and set a new video mode, X gets lost. That's why I still configure an /etc/X11/xorg.conf file by hand, and put a line in there to define all the resolutions that I want, from my normal screen on down. Then it's a matter of putting your monitor timing information in there as well, with specific settings for your monitor. (Be careful and get the manufacturer's correct specs! If you get this wrong, you can damage your monitor.) With the resolution and the timing, X can set a clock mode on the lower resolutions automatically.

Relevant sections:

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       31.0 - 95.0
    VertRefresh     50.0 - 150.0
    Option         "DPMS"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    Modes      "1280x1024" "1152x864" "1024x768" "800x600" "640x480"
    EndSubSection
EndSection

All that having been said, you still may not have 3D acceleration. I'm not sure that SiS cards have a 3D driver. You can check this by running glxgears -info and seeing if you have output related to acceleration. If the gears run smoothly, you're probably good to go. If it doesn't run, or looks like a slideshow, you're not going to run in 3D mode. Do not despair! eDuke32 has a software renderer. It won't look as good, and it probably won't run as fast, but you can still play the game without 3D acceleration. Just configure the video settings appropriately, and you should be enjoying the game regardless.