Some Linux games (in fact, most) are still using OSS, namely Enemy Territory or Quake III Arena for example. Even if your sound subsystem is well configured (either with real OSS or with ALSA’s OSS emulation), you may encounter a no sound problem under these games.

Sometimes there’s an error message associated:

...
/dev/dsp: Input/output error
Could not mmap /dev/dsp

Here’s how to fix this:

First, get the name of the executable of the program you’re trying to launch. For quake3 it’s quake3.x86 or quake3-smp.x86 if you have multiple CPU cores. Then, as root:

# echo "quake3.x86 0 0 direct" > /proc/asound/card0/pcm0p/oss

This should do it. Of course, replace quake3.x86 by the actual name of your game’s executable file. You may try to replace direct by disable if the first doesn’t work.

  • Side note 1: “card0” is right if you have only one sound card. If you have several cards, try also card1, card2, etc.
  • Side note 2: the sudo fanatics (like me) will notice that:
$ sudo echo "whatever" > /somewhere/where/only/root/has/access

… doesn’t work. This is because the redirection “>” is made by the currently running shell (under your user account). Only the command echo is done with root access, which is useless. You may use this instead:

$ echo "whatever" | sudo tee /somewhere/where/only/root/has/access
  • Side note 3: For Quake III Arena, you may want to try the open-source version of the engine. It works way better (for me, at least) than the ID version. They use SDL for the sound instead of OSS, and it’s really nicer. Google for ioquake3 if you’re interested. It’s packaged at freshrpms too.