Linux - No sound with pulse on Arch Linux

SirCmpwnSirCmpwn Colorado Join Date: 2013-10-31 Member: 188891Members
edited October 2013 in Technical Support
Hi there! I'm using a fully updated install of Arch Linux to play NS2 via Steam. I'm using pulse for audio. When I launch NS2, I hear no sound, and the log file (with irrelevant things removed) shows:
Date: 10/31/2013
Time: 01:28:53 AM:
--------------------------------------------------------------
Build 259
Arch Linux x86_64
Steam initialized
Num displays: 2
OpenGL 4.3.0 NVIDIA 325.15 initialized (NVIDIA Corporation GeForce GTX 670/PCIe/SSE2)
GLSL version 4.30 NVIDIA via Cg compiler
ARB_texture_storage extension present
Error: eventSystem->init (Error initializing output device. )
Error: SoundSystem::Initialize - Failed to initialize FMOD event system
Sound disabled
Loading config://ConsoleBindings.json
Error: Couldn't load 'sound/NS2.fev'
Error: Couldn't load 'sound/NS2.fev/alien/infestation/build' (project didn't exist)
Error: CreateDSP:createDSPByType (This command failed because System::init or System::setDriver was not called. )
Error: CreateDSP:createDSPByType (This command failed because System::init or System::setDriver was not called. )
Error: CreateDSP:addDSP (An invalid object handle was used. )
Error: CreateDSP:addDSP (An invalid object handle was used. )
Error: SetDSPFloatParameter(getParameterInfo) (An invalid object handle was used. )
Error: SetDSPFloatParameter(getParameterInfo) (An invalid object handle was used. )
Error: SetDSPFloatParameter(getParameterInfo) (An invalid object handle was used. )
Error: SetDSPFloatParameter(getParameterInfo) (An invalid object handle was used. )
Error: CreateDSP:createDSPByType (This command failed because System::init or System::setDriver was not called. )
Error: CreateDSP:createDSPByType (This command failed because System::init or System::setDriver was not called. )
Error: CreateDSP:addDSP (An invalid object handle was used. )
Error: CreateDSP:addDSP (An invalid object handle was used. )
Error: SetDSPActive:setBypass() (An invalid object handle was used. )
Error: SetDSPFloatParameter(getParameterInfo) (An invalid object handle was used. )
Error: Couldn't load 'sound/NS2.fev'
Error: Couldn't load 'sound/NS2.fev/alien/infestation/build' (project didn't exist)

My sound card is an Asus Xonar DX, set up for 5.1 surround. Sound works great in other apps. Additionally, in the in-game settings, I am unable to select a sound device and I see no microphone output.

IYgkJHDrCQG9.png

Some extra details:

PulseAudio/libpulse 4.0-6
Nvidia GTX 670
i3 window manager
64-bit system

Comments

  • TurbineTurbine Join Date: 2012-09-13 Member: 159160Members
    edited October 2013
    Have you tried installing Alsa and using that instead?

    I'm going to be trying NS2 under Pulse and Alsa in a few hrs, I too am interested in knowing what's going wrong.

    [Edit]
    Have you tried manually selecting the correct output device?
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    the log lines:
    Error: eventSystem->init (Error initializing output device. )
    And
    Sound disabled

    Seem a lot like the game is unable to communicate with your sound card. Since sound is pretty important you are probably going to tweek your sound settings.

    you can also try running steam with:

    SDL_AUDIODRIVER=alsa steam
  • rkfgrkfg Russia Join Date: 2013-09-03 Member: 187744Members, Reinforced - Supporter, Reinforced - Silver, Reinforced - Gold, Reinforced - Diamond, Reinforced - Shadow
    I played NS2 with pulseaudio to stream the gameplay to twitch (it was a slideshow if you're interested, though I used just ffmpeg and not some OpenGL intercepting streamer). It worked 50/50, all the sound works but voice is echoed (doubled) and stutters a lot. I used
    SDL_AUDIODRIVER=pulse steam
    
    and it was ok.
  • IronHorseIronHorse Developer, QA Manager, Technical Support & contributor Join Date: 2010-05-08 Member: 71669Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Subnautica Playtester, Subnautica PT Lead, Pistachionauts
  • SirCmpwnSirCmpwn Colorado Join Date: 2013-10-31 Member: 188891Members
    I tried running with with SDL_AUDIODRIVER set to both alsa and pulse, neither worked. For what it's worth, I'm running pulse as an alsa device. I don't want to disable pulse entirely because my system sound as a whole is a lot crappier without pulse.
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    Well dang.

    I would also try pulseaudio and not just pulse

    I am not entirely sure how to proceed from here. My linux sound foo is not what it should be here.

    However, to aid you in your quest I can tell you that ns2 is using libsdl2, this means that you may have success with fixes for stuff like tf2.
  • rkfgrkfg Russia Join Date: 2013-09-03 Member: 187744Members, Reinforced - Supporter, Reinforced - Silver, Reinforced - Gold, Reinforced - Diamond, Reinforced - Shadow
    I don't fully understand what's your config like and what's "running pulse as an alsa device". I guess you did something with ~/.asoundrc so pulse has its own pcm device. Well, selecting the proper alsa output is quirky. For aplay/arec you can use -D switch but generally there's no such way for every app. Here's an example of hacking the config to make apps use the device you want: http://stackoverflow.com/questions/17105845/select-a-default-alsa-pcm-not-card-via-environment-variable

    Hope it helps. Didn't try it myself, I only used pulse in its default configuration so it was the default alsa device.
  • luieburgerluieburger Join Date: 2013-11-02 Member: 188939Members
    edited November 2013
    EDIT:

    Removed my long rant and now I have more valuable info to put here.

    I used the "ALSA/dmix without grabbing hardware device" instructions here: https://wiki.archlinux.org/index.php/PulseAudio#ALSA.2Fdmix_without_grabbing_hardware_device

    Now I'm able to run both Mangler and Natural Selection 2 with sound working. However, I cannot run them at the same time without ALSA and Pulse fighting over who gets to put sound out through the device.

    Really what needs to happen here is I need a way to make Natural Selection 2 work on pulseaudio. So far, I've been completely unsuccessful. Any hints?
  • rkfgrkfg Russia Join Date: 2013-09-03 Member: 187744Members, Reinforced - Supporter, Reinforced - Silver, Reinforced - Gold, Reinforced - Diamond, Reinforced - Shadow
    Anything in your log.txt about sound when NS2 doesn't play any?
  • luieburgerluieburger Join Date: 2013-11-02 Member: 188939Members
    edited November 2013
    rkfg wrote: »
    Anything in your log.txt about sound when NS2 doesn't play any?

    Yes it looks like I'm getting the same type of thing as the OP. "Sound disabled"
    Date: 11/02/13
    Time: 14:32:03:
    Build 259
    Arch Linux x86_64
    Steam initialized
    Num displays: 1
    OpenGL 4.3.0 NVIDIA 325.15 initialized (NVIDIA Corporation GeForce GTX 550 Ti/PCIe/SSE2)
    GLSL version 4.30 NVIDIA via Cg compiler
    ARB_texture_storage extension present
    Error: eventSystem->init (Error initializing output device. )
    Error: SoundSystem::Initialize - Failed to initialize FMOD event system
    Sound disabled
    Loading config://ConsoleBindings.json
    Error: Couldn't load 'sound/NS2.fev'
    Error: Couldn't load 'sound/NS2.fev/alien/infestation/build' (project didn't exist)
    Loading config://FavoriteServers.json
    Loading config://HistoryServers.json
    Error: CreateDSP:createDSPByType (This command failed because System::init or System::setDriver was not called. )
    Error: CreateDSP:createDSPByType (This command failed because System::init or System::setDriver was not called. )
    Error: CreateDSP:addDSP (An invalid object handle was used. )
    Error: CreateDSP:addDSP (An invalid object handle was used. )
    Error: SetDSPFloatParameter(getParameterInfo) (An invalid object handle was used. )
    Error: SetDSPFloatParameter(getParameterInfo) (An invalid object handle was used. )
    Error: SetDSPFloatParameter(getParameterInfo) (An invalid object handle was used. )
    Error: SetDSPFloatParameter(getParameterInfo) (An invalid object handle was used. )
    Error: CreateDSP:createDSPByType (This command failed because System::init or System::setDriver was not called. )
    Error: CreateDSP:createDSPByType (This command failed because System::init or System::setDriver was not called. )
    Error: CreateDSP:addDSP (An invalid object handle was used. )
    Error: CreateDSP:addDSP (An invalid object handle was used. )
    Error: SetDSPActive:setBypass() (An invalid object handle was used. )
    Error: SetDSPFloatParameter(getParameterInfo) (An invalid object handle was used. )
    Error: Couldn't load 'sound/NS2.fev'
    Error: Couldn't load 'sound/NS2.fev/alien/infestation/build' (project didn't exist)
    Cooked mesh with 4794 faces, 3566 vertices


    It's worth noting that, just like the OP, I have also tried running Steam with SDL_AUDIODRIVER set to both alsa and pulse.

    I'm also back to running under Gnome 3 with Pulse and ALSA installed, using the pulseaudio-alsa package that is a dependency of Gnome 3. I'm no longer using the dmix option. Either I'll get NS2 to work with Pulse, or I'll keep switching over to my Windows install to play the game.
  • spezifantaspezifanta Join Date: 2008-07-11 Member: 64602Members
    edited November 2013
    Same here.
    Running Arch and stopped having sound since a few days. TF2 or Dota 2 work perfectly. So I blamed NS2, at first. But there is more.
    ...
    Setting breakpad minidump AppID = 4920
    Steam_SetMinidumpSteamID:  Caching Steam ID:  765611979603xxxxx [API loaded no]
    ALSA lib confmisc.c:768:(parse_card) cannot find card '$CARD'
    ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_card_driver returned error: No such device
    ....
    ALSA lib conf.c:4687:(snd_config_expand) Unknown parameters CARD=Headset
    ALSA lib dlmisc.c:252:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib32/alsa-lib/libasound_module_pcm_pulse.so
    ...
    Build 259
    Arch Linux x86_64
    Steam initialized
    Num displays: 1
    OpenGL 4.3.0 NVIDIA 325.15 initialized (NVIDIA Corporation GeForce GTX 570/PCIe/SSE2)
    GLSL version 4.30 NVIDIA via Cg compiler
    ARB_texture_storage extension present
    Error: eventSystem->init (Error initializing output device. )
    Error: SoundSystem::Initialize - Failed to initialize FMOD event system
    Sound disabled
    ....
    

    Didn't do anything special other then running periodically updates (pacman -Syu).
  • spezifantaspezifanta Join Date: 2008-07-11 Member: 64602Members
    edited November 2013
    Sorry, double post.
  • rkfgrkfg Russia Join Date: 2013-09-03 Member: 187744Members, Reinforced - Supporter, Reinforced - Silver, Reinforced - Gold, Reinforced - Diamond, Reinforced - Shadow
    edited November 2013
    @spezifanta It seems that you misconfigured ALSA. Maybe set single quotes instead of double or something like that. Show your ~/.asoundrc please.
  • spezifantaspezifanta Join Date: 2008-07-11 Member: 64602Members
    $ ls ~/.asoundrc
    ls: cannot access /home/fanta/.asoundrc: No such file or directory
    

    As I said, sound worked before in NS2.
  • Forgotten_PathForgotten_Path North Carolina, United States Join Date: 2013-11-14 Member: 189368Members
    I had the same problem - no sound, setting SDL_AUDIODRIVER to pulse, alsa, or pulseaudio had no effect. Turns out I needed to install lib32-alsa-plugins.
  • luieburgerluieburger Join Date: 2013-11-02 Member: 188939Members
    Turns out I needed to install lib32-alsa-plugins.

    Hey! That worked for me too! Thanks!

  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    Good work guys, will make sure that gets added to the linux guide.


    ... Once i remember my login details again

  • mvamva Russia Join Date: 2014-02-15 Member: 194009Members
    edited February 2014
    Hi, guys!
    Unfortunately, I've the same problem of missing sound.
    Neither SDL_AUDIODRIVER=alsa/pulse/pulseaudio helps
    I also tried to put that into ~/.asoundrc:
    pcm.!default {
        type pulse
    }
    ctl.!default {
        type pulse
    }
    
    But it is no effect.

    I also (as authors above) noticed
    Error: eventSystem->init (Error initializing output device. )
    Error: SoundSystem::Initialize - Failed to initialize FMOD event system
    Sound disabled
    
    In steam log, but I also noticed that strange thing a bit earlier in the log:
    (see attach. Forum forbids me to post entire cut of the log)
    

    So, I bet, NS2 is totally doesn't want to work with pulseaudio...

    Is it any chance developers reading this thread and hear our pry to add PA support?
  • mvamva Russia Join Date: 2014-02-15 Member: 194009Members
    and, yes, I have alsa 32bit pugins installed...
Sign In or Register to comment.