Gentoo Wiki


This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc

Even though Doom3 supports ALSA output, usually the produced sound is "metallic" and "choppy". The "problem" is that Doom3 needs a very specific sound configuration. This page will guide you through the needed steps to get sound working well with Doom3 and ALSA.

Configuring ALSA

First, put this in /etc/asound.conf (don't worry if you don't have one, just create it)

File: /etc/asound.conf
pcm.d3dmixer {
   type dmix
   ipc_key 1989
   slave {
      pcm  {
         type hw
         card 0 
   	period_size 4500
   	periods 128
   bindings {
      0 0
      1 1 
pcm.doom3pcm { type asym playback.pcm { type softvol slave.pcm { type plug slave.pcm "d3dmixer" } control { name "Doom3 Volume" card 0 } } capture.pcm { type plug slave.pcm "dsnoop:0" } }

To make ALSA aware of the changes, type /etc/init.d/alsasound restart in a console as root.

Configuring Doom3

To make Doom3 use this config, put (meaning, replace the original values with)

File: ~/.doom3/base/DoomConfig.cfg
seta s_driver "best"
seta s_alsa_pcm "doom3pcm"

in your Doom3 config file (usually sits in ~/.doom3/base/DoomConfig.cfg)

Warning: Do not do this while Doom3 is running. It rewrites its configuration upon quitting and your changes will be lost.

Now, this may not fix it for you. Pay special attention to the period_size in d3dmixer. If your sound sounds metallic and you are getting "...short write..."s in the console output from doom3, increase the period_size. If your sound pauses from time to time, decrease it. It takes some guesswork to really nail it, but the plus side is that Doom3 will use dmix and will get mixed along with everything else.


Note: When you start alsamixer (or any other mixer, like KMix for instance), you should see a control named "Doom3 Volume". It should change only Doom3's volume, but it never worked here. YMMV.
Note: People on the gentoo-forums have reported that this also works for Quake4
Retrieved from ""

Last modified: Sun, 07 Sep 2008 03:16:00 +0000 Hits: 2,333