8. Trouble-shooting
Other trouble-shooting resources can be found at: The Linux Gamers FAQ, Jörgen's GLQuake Site, and the old version of this how-to.
Often, using an alternative game engine such as QuakeSpasm or Darkplaces will fix mouse and sound related problems.
8.1 Bash Won't Start the Program
"bash: ./glquake.glx: Permission denied"
- The binary may not have the executable bit set.
Type chmod +x glquake.glx to fix this.
- If the program is located on a windows partition, it is possible it has
been mounted with the noexec option.
Type (as root): mount -o remount,exec /mnt/windows
"bash: glquake.glx: command not found"
- Bash may not be including the current directory in it's path. Type: "export PATH=$PATH:."
8.2 Program Dies at Startup
This is not good, but some simple options to try are:
- - use -nosound to test if sound is the problem.
Sound issues are covered in detail below.
- - use -noudp if network is unconfigured.
- - use -nocdaudio if cdrom is absent.
- - use -height, -width and
-fullscreen command line options to select a screen
mode you know is properly configured.
e.g. glquake.glx -width 800 -height 600 -fullscreen -nosound
Files not lowercased or Data files missing.
Linux Quake requires (most) filenames to be in lowercase. If you get an error similar to "Error: W_LoadWadFile: couldn't load gfx.wad" it means the game can't find the data files, possibly because they are not all lowercase.
- Make sure you have the subdirectory "id1" (not "ID1")
containing the files "pak0.pak" and "pak1.pak".
- For a comprehensive lowercase utility, download this utility or visit http://filerenameutils.sourceforge.net.
Missing libraries: "error while loading shared libraries: libGL.so.1: cannot open shared object file"
A message like this means the program cannot run because it can't find a system file it needs. Perhaps:
- File is not installed - Just check with your package manager and install the correct package.
- Links aren't properly set-up. If you have (say) /usr/lib/libGL.so.1.2, but get the above message, you should be able to remedy this with ln -s /usr/lib/libGL.so.1.2 /usr/lib/libGL.so.1
Dynamic libraries (or DLLs as they are known to Windows users) can be quite complex. For more information try the ldd and ldconfig man pages.
"Memory overwrite in Sys_Printf"
- This error means you need to edit file sys_linux.c,
procedure Sys_Printf, and change text[1024] to
text[4096] and recompile.
Many versions of Quake have what appear to be two versions of this procedure, but one is always commented out. Obviously you'll need to change the value in the correct procedure.
Problems with GCC 4
- If you're experiencing core dumps and are using version 4.0 of the GNU compiler, see Compilation Issues below.
8.3 Program Dies Loading Level
- Many mods require extra memory. Use the -mem 64 option
to allocate 64 meg of memory for the heap.
- In some cases, this problem can be sound related. Try some of the tips
in the sound section.
- A few newer mods just won't work with standard GLQuake, and need an enhanced game engine. Darkplaces has the best large map support under Linux, but some are even too big for it, and are unsupported under Linux.
8.4 Game Runs Slowly
Most Quake games rely on OpenGL (libGL.so) for their graphical features. Setting up OpenGL is beyond the scope of this document. Very slow performance means you're probably using Mesa GL instead of proper hardware GL acceleration.
Performance gains can also be made by disabling fancy effects such as light bloom, and by slowing sound mixing with the console command "_snd_mixahead .4"
Minor game slowdown's with Nvidia hardware can also be attributed to the use of conflicting AGP drivers. For more info about this see Nvidia AGP Issues
8.5 Sound Problems
For more information see the drivers section.
An error such as: "/dev/dsp: Device or resource busy" indicates some program is already using your sound card, and you will have to halt this program to get Quake sound effects.
- From the Linux command line, type killall artsd
or pulseaudio -k to terminate either of these popular sound daemons.
- Alternatively, to run Quake through the KDE sound daemon, type artsdsp glquake.glx ...
"Quake engine games exit, and I see an error about mmap!"
- The
Linux Gamers FAQ
recommends "Your sound card/driver doesn't support this needed feature.
However, if you use KDE/arts you may be able to bypass this with the -m switch
to the artsdsp wrapper".
Make sure the artsd program is running by typing ps -A | grep artsd and checking that this command returns at least one non-empty line. Then type artsdsp -m glquake.glx.
- Try alternative sound drivers as outlined in the Sound Drivers section.
Sound stutters or is not very good.
- See the sound note in
Compilation Issues.
- Try using the -sndspeed or -sndbits option(s), or swapping sound drivers.
SDL provides a simple way of changing the sound driver using the
SDL_AUDIODRIVER environment variable. Run the game using a command line like:
SDL_AUDIODRIVER=xxx darkplaces-sdl
Valid values on linux are: dsp (uses OSS), alsa (uses
ALSA), esd (uses the ESD daemon), and maybe arts (uses
the aRTs daemon)
8.6 Compilation Issues
The dynamic nature of GNU/Linux means compiling old software is often hard work, and even small hurdles are impossible for people not experienced in C programming. Below are a few relevant issues.
GCC-4.x
- Warnings
GCC-4.x issues many more compilation warnings than 3.x. These are small errors that can generally be ignored, but when the compiler is given the "-Werror" flag, warnings will bring everything to a halt. To fix this you can safely remove the "-Werror" from the program's Makefile.
- Slurred Sound
Yet another sound issue. This common problem is fixed by altering snd_mix.c thus:
- snd_scaletable[i][j] = ((signed char)j) * i * 8; + snd_scaletable[i][j] = ((j < 128) ? j : j - 0xff) * i * 8;
- Optimizations
GCC-4.0 in particular had a problem with "-O" flags breaking some variable type-casting. If you are able to compile the program , but it segfaults, try disabling these optimizations by removing the "-O" options from any makefiles.
The GNU C compiler has recently had a major revision, and most modern distributions now include GCC-4.1. (To find out which version you are using, type gcc --version). The author generally uses GCC-3.2.2 , and people using GCC-4.x may find extra problems when compiling programs:
If you are having troubles compiling with GCC-4 which weren't there previously, it's possible to install GCC-3.x alongside 4.x. Most people will want to look for precompiled packages from their Linux distribution.
Once GCC-3.x is installed, the program must then be told to compile with this version rather than the default 4.x. Projects that come with configuration scripts will often have options for defining which compiler to use (type ./configure --help and look for hints), and other times you be able to use export CC=gcc32 or edit the Makefile and replace occurrences of "gcc" with "gcc32" (or "gcc-3.2.2", etc) manually.
64 Bit CPUs
Most of these legacy programs will probably not work as 64 bit binaries. QuakeSpasm is an exception.
It is still possible, however, to compile 32 bit binaries on a 64 bit operating system. To do so, edit Makefiles and add "-m32" to the load and compile flags (LDFLAGS, CFLAGS). This tells GCC to build and link a 32 bit program (if the 32 bit SDL and OpenGL libraries are also installed). You may also have to disable the use of x86 assembly.
If you are having trouble running 32 bit apps, try using the linux32 command. For example: linux32 tyr-glquake.
8.7 Other Issues
- Game is too dark
If changing the brightness setting in the options menu doesn't work, you can use the xgamma program to brighten the whole display.
- Type xgamma -gamma VALUE before running the game, where VALUE is a number larger than 1. When you've finished, use xgamma -gamma 1 to restore the brightness.
- Mouse look
"This game won't let me look around properly. %$!$@"
- Bring down the game console with the "~" key and enter +mlook.
- Mouse doesn't work properly
Try the following -
- Start the game in fullscreen mode by using the -fullscreen option.
- From the game console, type _windowed_mouse 1
- If still without success, try the
QuakeSpasm or
Darkplaces
SDL clients.
Typing export SDL_VIDEO_X11_DGAMOUSE=0 before starting
the game will disable hardware dga mouse.
- Start the game in fullscreen mode by using the -fullscreen option.
- Game saves fail / Options not remembered
If you are running Quake as a normal user and experiencing these problems it's probably due to having insufficient privileges to write to the game directories. Solutions include:
- Run the game as super user: Type su and enter root's
password before typing glquake.glx ... to start the game.
- Change the game file permissions. Unix operating systems have
strong security preventing unauthorized or accidental file changes.
The simplest way to overcome this in a single user environment is to become
super user and change ownership of the quake directory with (as root):
chown -R USERNAME /usr/local/games/quake. However it is
recommended users read the chmod and chown man
and info pages to better understand Unix file permissions.
- In full multi-user environments it is recommended using the Darkplaces, TyrQuake >= 0.56 or QuakeForge game engines, which correctly place per-user data in their home directory.
Quake uses a confusing method of saving and restoring game options, especially when playing add-ons, and game options sometimes have to be reinitialized even though file permissions are not an issue. In such cases, the author can offer no simple advice %-/.
- Run the game as super user: Type su and enter root's
password before typing glquake.glx ... to start the game.
- Crazy polygons
Some mission-packs/mods for Quake can cause existing player/monster models to be drawn with lines all over the place. To fix this, delete the directory "quake/id1/glquake". When you next run the game, it will remake this directory and everything should be fine.
- Lines on screen
A common problem with 3Dfx cards is a shower of flickering lines on the screen.
- From the game console, type gl_ztrick 0.
- White textures and other graphical anomalies
Some Quake engines use an OpenGL speed-up known as multitexturing. This normally works fine, but if you are experiencing glitches you can disable this feature with the -nomtex option.
Older video cards may occasionally draw single models in white. See the PlanetQuake command list for in-game GL variables to fine tune performance.
- Glibc Problems
Some Linux software come as a Loki Installer shell archive with a ".run" suffix. The following tip is from the Icculus Gamers Faq:
Q: I'm using {random loki_setup based installer}, and it's telling me the "installation doesn't support glibc-2.1" or something A: Just type the following before running setup.sh [or the installer]: export SETUP_LIBC=glibc-2.1.
8.8 Sound Drivers
There are two major Linux sound systems - Open Sound System and ALSA. If you are experiencing sound problems and the trouble-shooting section hasn't helped, you may consider changing the sound driver. This can be hard work, and is only for experienced users.
To ascertain which driver you are currently using, type lsmod to list currently loaded kernel modules. The ALSA sound modules have verbose names starting with "snd_", while the OSS modules have more terse names. For example, the ALSA Sound Blaster Live module is "snd_emu10k1", while the OSS module is "emu10k1". Since Linux kernel 2.6, ALSA has been the standard sound system, while 2.4 and earlier were more likely to come with OSS sound.
Information about ALSA can be found at the Alsa Homepage and Linux Journal's Guide to ALSA.
For those already with ALSA wishing to try the OSS modules, a kernel recompile is probably necessary.
Next Previous Contents