Jump to content
The Dark Mod Forums

(linux) launching TDM with pasuspender


Recommended Posts

I too do not recommend removing Pulseaudio. It is like trying to move a stack of plates by yanking out the one on the bottom. Many things such as the GNOME volume control and tuns of programs were compiled to use PA, so if you remove it, things will break.

 

But there is this PPA that has re-built packages that don't depend on Pulse called AudioHacks of it helps anyone.

--- War does not decide who is right, war decides who is left.

Link to post
Share on other sites
  • 3 weeks later...

Picking up where I left:

 

I got it working, no lagging on Ubuntu 10.10 via ALSA and without suspending pulse audio. It is like they say on id's doom on linux site: "A lot of Alsa installations have a misconfigured default device." There is a cvar called s_alsa_pcm with the default value default. Instead of default, which seems to be error prone, you can put the ALSA playback device of your choice there. Make sure s_driver is set to "best", s_numberofspeakers to "2" (for stereo).

 

Thanks for the tip! The sound delay was driving me nuts. Made it impossible to pick locks that don't have a visual indicator.

 

I ended up setting up mine as:

 

+set s_alsa_pcm surround51:CARD=DG,DEV=0

+set s_driver best

+set s_numberofspeakers 5

 

and it seems to work fine so far. I have a Creative Labs 5.1 surround system with an Asus Xonar DG[1] sound card (much better than onboard audio!)

 

Thanks,

Richard

 

[1] The Asus Xonar DG sound card has a new cmedia chip that requires a 2.6.38 or greater kernel! Of course there's also a minimum alsa version but if your distro has a newer kernel you should be running a new enough alsa version.

 

 

Link to post
Share on other sites
  • 1 month later...

I'm running 11 different versions of Linux, both 32 and 64 bit, all of which play Doom3 no problem - none of which have working sound with the darkMod. The problem ranges from no sound at all to a horrible sound lag. Killing pulse audio will not work, nor will playing with settings or altering config files. I'm just curious what the DarkMod does with the sound that could cause the fail.

Link to post
Share on other sites

Thanks for the tip! The sound delay was driving me nuts. Made it impossible to pick locks that don't have a visual indicator.

 

I ended up setting up mine as:

 

+set s_alsa_pcm surround51:CARD=DG,DEV=0

+set s_driver best

+set s_numberofspeakers 5

 

and it seems to work fine so far. I have a Creative Labs 5.1 surround system with an Asus Xonar DG[1] sound card (much better than onboard audio!)

 

Thanks,

Richard

 

[1] The Asus Xonar DG sound card has a new cmedia chip that requires a 2.6.38 or greater kernel! Of course there's also a minimum alsa version but if your distro has a newer kernel you should be running a new enough alsa version.

 

 

 

This worked for me too. Now with ALSA I have no audio delay whatsoever when before it was horrible. I still used numberofspeakers 6, even though I use headphones. Though mine was a different sound board, so mine ended up like:

s_alsa_pcm "surround51:CARD=halo,DEV=0"

s_driver alsa

s_numberofspeakers 6

 

Be sure to use the quotes around the sound device name when setting s_alsa_pcm "surround51:CARD=halo,DEV=0"

First do "aplay -L" in a linux terminal to see your card name

BUT! I had to set those parameters in-game since changing the dmargs.txt file did not make any difference. Is dmargs.txt only read when using the tdmlauncher? I imagine so since I was busy editing with DR and setting my sound after launching './doom3 +set fs_game darkmod'

Edited by PranQster

System: Mageia Linux Cauldron, aka Mageia 8

Link to post
Share on other sites

I'm running 11 different versions of Linux, both 32 and 64 bit, all of which play Doom3 no problem - none of which have working sound with the darkMod. The problem ranges from no sound at all to a horrible sound lag. Killing pulse audio will not work, nor will playing with settings or altering config files. I'm just curious what the DarkMod does with the sound that could cause the fail.

 

Are you launching TDM like this:

~/pathtodoom3/doom3 +set fs_game darkmod

Or like this:

~/.doom3/darkmod/tdmlauncher.linux

 

I'm not sure if that would make a difference, but see my previous post and set your sound settings the same way, but with your card name. If it doesn't do the trick after restarting the game or doing 's_nosound 0' followed by 's_restart 1', then try with the other launcher method.

I set my audio when I was running TDM for compiling maps, so I was using '~/pathtodoom3/doom3 +set fs_game darkmod' at the time. Sound works perfectly now. I had all but given up on ALSA before that.

Edited by PranQster

System: Mageia Linux Cauldron, aka Mageia 8

Link to post
Share on other sites

I'm using /home/brian/doom3/doom.x86 . Thanks for the reply. I'll try your suggestions after my set of shifts is over at work.

 

Also, before setting the card in TDM, try running Pulseaudio Volume Control, pavucontrol, and in the Configuration tab choose one of the 'Analog Surround 5.1 Output' options. Otherwise TDM may claim that the sound card is unavailable (as long as it doesn't say it doesn't exist, you're on the right track).

System: Mageia Linux Cauldron, aka Mageia 8

Link to post
Share on other sites
  • 1 year later...

I'm going to revive this old thread: sound and TDM. Oh dear, Pulseaudio, what a shame. Alas, I'm on Xubuntu, so I have to suck it up.

 

As described above, the best solution for me was to write +set s_alsa_pcm sysdefault:CARD=PCH into ~/.doom3/darkmod/dmargs.txt ... however, before going on to describe a remaining problem, let me point out an extra hint that may be helpful.

 

How on earth do you figure out *what* to set s_alsa_pcm to? Running aplay -L is a start, but out of 37 different devices it's not very clear which to chose. The answer is (still requires an irritating amount of trial and error) is to run

 

aplay -D $card /usr/share/sounds/alsa/Front_Center.wav

 

as $card varies over the available options. This could be scripted as for card in $(aplay -L |sed '/^ /d'); do aplay ...; done but that seems excessive.

 

Alas, sound is still not working perfectly: in the lock picking part of the training mission at the back of the room where there's a noisy generator that's supposed to be masking the sounds of the locks -- I can't hear it. All the other sounds work perfectly, I can hear my footsteps, pages turning, lock picking sounds, menu clicks when in the menu ... but the noisy generator is silent.

Link to post
Share on other sites

Oh no! Sound is *sooo* fragile. Switching to the menus and there's a 50-50 chance of losing sound altogether.

 

How can I tell that setting dmargs.txt is actually doing anything? There doesn't seem to be anything relevant in the log, which is instead flooded with messages of the form

 

WARNING:Couldn't load ...

 

where the ... is numerous images, guis and sounds.

 

Here are the messages from the last time sound suddenly vanished for me:

 

 

Changed location from 'snd_hub' to 'snd_stealth'.

The ambient 'snd_stealth' for location 'snd_stealth' is now playing.

missed 1 sound updates

snd_pcm_writei 4096 frames failed: Broken pipe

preparing audio device for output

snd_pcm_writei 4096 frames failed: Broken pipe

preparing audio device for output

snd_pcm_writei 4096 frames failed: Broken pipe

preparing audio device for output

 

Alas, the Wine version is loads more reliable :(

Link to post
Share on other sites

Alas, I'm on Xubuntu, so I have to suck it up.

 

No you don't. Just purge the bloody thing and stick to plain Alsa. Sure, you may not have individual application volume control, but it's still far less troublesome than pulseaudio will ever be.

Link to post
Share on other sites

Any knowledgeable team member may correct me, but: I think there's no point in using dmargs.txt anymore.

Ever since TDM 1.08 the mod brings its own executable, so you can pass arguments directly in the command line. Like this:

 

> ./thedarkmod.x86 +set s_alsa_pcm hw:whatever

 

When it works, quit the game and the setting will be written into Darkmod.cfg.

 

The intended behaviour of this workaround is bypassing PA, by plugging TDM directly into the sound hardware. So from the list aplay -L gives you, you can scratch any device that does not start with "hw:" -- those are virtual mixing devices (dmix, plughw etc.) and PA will hijack them.

 

Adressing "hw:" however will not always work. In those cases it should be sufficient to temporarily disable PA.

 

Those "broken pipe" error messages are likely the real culprit here. It looks (and sounds) to me like buffer underruns. PA is -- wisely so -- designed to increase buffer size on it's own end automatically. Unfortunately it repeats that with every "broken pipe" so latency adds up until we get the known increasing sound lag the longer we play.

 

Using alsa does not give lags, but you will hear little klicks and pops instead.

 

The bug that needs fixing is somewhere in doom's -- now TDM's -- code.

Link to post
Share on other sites

Any knowledgeable team member may correct me, but: I think there's no point in using dmargs.txt anymore.

 

Thanks very much, I think that explains why I wasn't getting reliable results before -- I suspect that setting dmargs.txt was actually doing nothing whatsoever! In my case I've set s_alsa_pcm to sysdefault:CARD=PCH, as doing my aplay -D $card $file test produces no sound at all on all the other devices (fishy...).

 

However ... I still lack the ambient generator sound in the back of the picklock training area, and in fact when I went back to verify running the Steam version under Wine, I seemed to be lacking a whole load of visuals as well. I was planning to switch to native TDM, but even the graphics look better under Wine, and the sound works. Ah well, just means I have to run up Steam to play it, which is irritating.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...