Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ALSA & Pulseaudio problem
PranQster Offline
Junior Member

Posts: 3
Threads: 1
Joined: Sep 2010
Reputation: 0
#1
Solved: 8 Years, 8 Months ago ALSA & Pulseaudio problem

I am running Mandriva 2010.1/2011.0 (cooker):
uname -a
Linux mjollnir 2.6.35.4-server-1mnb #1 SMP Sun Aug 29 00:34:32 BRT 2010 i686 i686 i386 GNU/Linux
When I run Launcher.bin, I get the following error:
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
ALSA lib pulse.c:229:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:229:(pulse_connect) PulseAudio: Unable to connect: Connection refused

AL lib: alsa.c:587: Could not open playback device 'default': Connection refused
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
Segmentation fault

If I run qjackctl, I can only run it in 'dummy' mode and then I still get this:
ALSA lib pulse.c:229:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:229:(pulse_connect) PulseAudio: Unable to connect: Connection refused

AL lib: alsa.c:587: Could not open playback device 'default': Connection refused
Segmentation fault

I have seen the Connection refused error with pulseaudio before when trying to open the various pulseaudio utilities, but my other games which use ALSA run fine with no errors.

I suppose I should state that I do have openal installed:
urpmi openal
Package openal-1.12.854-1mdv2010.1.i586 is already installed

urpmi alsa-plugins-pulseaudio
Package libalsa-plugins-pulseaudio-1.0.23-2mdv2010.1.i586 is already installed

Is there a way to force this game with a command to use OSS instead of ALSA?
I removed libalsa-plugins-pulseaudio, after reading about similar problems with pulseaudio in another forum.
Now the Connection Refused error is gone, but I now have:
ALSA lib dlmisc.c:236:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_pulse.so
ALSA lib dlmisc.c:236:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_pulse.so
AL lib: alsa.c:587: Could not open playback device 'default': No such device or address
Segmentation fault

Will keep working on this...
(This post was last modified: 09-06-2010, 12:16 AM by PranQster.)
09-05-2010, 11:25 PM
Find
Urkle Offline
FG - Associate

Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation: 21
#2
Solved: 8 Years, 8 Months ago RE: ALSA & Pulseaudio problem

On the 3rd tab of the launcher you can specify which device openal uses for audio. Simply select OSS or alsa or whatever else meets your fancy. What you are seeing is simply openal querying the devices on game startup. Basically we try the configured device, then the devices labeled as the default , and finally just have openal give us something that works.

Developing away on one of
Multiple Macs running 10.6, 10.7, 10.8, and 10.9.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
09-06-2010, 03:04 AM
Website Find
PranQster Offline
Junior Member

Posts: 3
Threads: 1
Joined: Sep 2010
Reputation: 0
#3
Solved: 8 Years, 8 Months ago RE: ALSA & Pulseaudio problem

I wish I could do that, but the launcher does not even load. I get that error and crash before any launcher window is created.
I looked for anything possibly created in ~/.frictionalgames but nothing is in there except subdirectories Amnesia/MainDemo/

Any way I could create a config file to force it to use oss before running the launcher?

Perhaps the segfault is not even related to the openal errors at all, so my problem might have nothing to do with audio?
09-06-2010, 04:28 AM
Find
GeeZ Offline
Junior Member

Posts: 1
Threads: 0
Joined: Sep 2010
Reputation: 0
#4
Solved: 8 Years, 8 Months ago RE: ALSA & Pulseaudio problem

I might have a solution for you (or at least a hint) :

I was able to switch from PulseAudio to Alsa by editing "~/.frictionalgames/Amnesia/MainDemo/main_settings.cfg" ;
on the last line you can change the number attributed to "Sound Device"
line 7 : "<Sound Device="0" Volume="1.000000" [...]"
It seams that :
- 5 is for pulseaudio
- 0 for default alsa

Now that I got my problem fixed, I was able to have a look in the Launcher's sound device selection menu, which is as of the following :
0 - default alsa
1 - alsa on ALC268 Analog (hw:0,0)
2 - alsa on Si3054 Modem (hw:0,6)
3 - OSS
4 - Portaudio
5 - PulseAudio
6 - Wave file writer
(NB: of course the numbers at the beginning of the lines are not indicated in the menu, I added them myself)
I guess that entry 1 and 2 are specific to my hardware (one for speakers and one for line out ???) and you might not have the same on your PC.

Changing the "Sound Device" parameter to the right number (3 on my PC) will do the trick. In my case (I had to get back to default Alsa), I put a "0" and it worked fine. However, if I try to force OSS on my computer, the game switches back to Alsa default, even if I select it using the GUI, so I can't tell you for sure if you'll make it work this way either.
09-08-2010, 12:35 PM
Find
PranQster Offline
Junior Member

Posts: 3
Threads: 1
Joined: Sep 2010
Reputation: 0
#5
Solved: 8 Years, 8 Months ago RE: ALSA & Pulseaudio problem

(09-08-2010, 12:35 PM)GeeZ Wrote: I might have a solution for you (or at least a hint) :

I was able to switch from PulseAudio to Alsa by editing "~/.frictionalgames/Amnesia/MainDemo/main_settings.cfg" ;
on the last line you can change the number attributed to "Sound Device"
line 7 : "<Sound Device="0" Volume="1.000000" [...]"
It seams that :
- 5 is for pulseaudio
- 0 for default alsa

Now that I got my problem fixed, I was able to have a look in the Launcher's sound device selection menu, which is as of the following :
0 - default alsa
1 - alsa on ALC268 Analog (hw:0,0)
2 - alsa on Si3054 Modem (hw:0,6)
3 - OSS
4 - Portaudio
5 - PulseAudio
6 - Wave file writer
(NB: of course the numbers at the beginning of the lines are not indicated in the menu, I added them myself)
I guess that entry 1 and 2 are specific to my hardware (one for speakers and one for line out ???) and you might not have the same on your PC.

Changing the "Sound Device" parameter to the right number (3 on my PC) will do the trick. In my case (I had to get back to default Alsa), I put a "0" and it worked fine. However, if I try to force OSS on my computer, the game switches back to Alsa default, even if I select it using the GUI, so I can't tell you for sure if you'll make it work this way either.

Ah, thanks. I'll give it a try right now.
Edit: hmmm... on second thought... Amnesia has not yet written anything to ~/.frictionalgames except for the Amnesia/MainDemo/ subdirectories. So I have no main_settings.cfg file to edit there.
I'll try copying the .cfg from the installed game directory and editing that. Damn, it does not exist there Sad
Any chance you can post the 'main_settings.cfg' contents so I can create my own in '~/.frictionalgames/Amnesia/MainDemo/'?

Edit: aha! I found a 'default_main_settings.cfg'... will try copying it and the other 'default' .cfg files into the home path and renaming them.
LOL. After all of that trouble it turns out that all I had to do was to run ./Amnesia.bin instead of ./Launcher.bin
It was just the launcher causing the issue. When launching the game directly, with nothing in the '~/.frictionalgames/' path at all, it started right up with audio and all.
Time to configure it and play Smile
[SOLVED]
Bypassing the launcher and running ./Amnesia.bin directly worked perfectly. I configured my settings and played for a while. Pulseaudio was used by default and caused no issues whatsoever... sounded really good.
(This post was last modified: 09-09-2010, 06:33 AM by PranQster.)
09-09-2010, 05:34 AM
Find
Urkle Offline
FG - Associate

Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation: 21
#6
Solved: 8 Years, 8 Months ago RE: ALSA & Pulseaudio problem

The # to use depends on your installation of openal. if you are using the openalsoft you should have an openalinfo binary that you can run.. OR look at the hpl.log/launcher.log if it was generated as it also lists the order.

Also, if the openal can't open a sound device then the game falls back to the default device (in your case Geez alsa). Recall that many current linux distributions are disabling OSS.

One option is to switch to the included openal by running the following in the game directory.
64bit
ln -sf all/libopenal.so.1 libs64

32bit
ln -sf all/libopenal.so.1 libs

Another option is to create an ~/.alsoftrc file and override the enabled audio devices.

drivers = alsa,oss

Developing away on one of
Multiple Macs running 10.6, 10.7, 10.8, and 10.9.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
09-09-2010, 03:36 PM
Website Find




Users browsing this thread: 1 Guest(s)