Jump to content
The Dark Mod Forums

(linux) launching TDM with pasuspender


shazzner

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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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.

  • Recent Status Updates

    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
    • Ansome

      Well then, it's been about a week since I released my first FM and I must say that I was very pleasantly surprised by its reception. I had expected half as much interest in my short little FM as I received and even less when it came to positive feedback, but I am glad that the aspects of my mission that I put the most heart into were often the most appreciated. It was also delightful to read plenty of honest criticism and helpful feedback, as I've already been given plenty of useful pointers on improving my brushwork, level design, and gameplay difficulty.
      I've gotten back into the groove of chipping away at my reading and game list, as well as the endless FM catalogue here, but I may very well try my hand at the 15th anniversary contest should it materialize. That is assuming my eyes are ready for a few more months of Dark Radiant's bright interface while burning the midnight oil, of course!
      · 4 replies
×
×
  • Create New...