Killing pulseaudio to run pSX
Ever since the upgrade to Jaunty (and possibly Intrepid, since I never used this program on Intrepid), the pSX emulator called pSX has not been working. Startup brings this error:
Code:
[src/linux/sound.cpp, line 215]: 'snd_pcm_hw_params_set_access(pcm_handle,hwparams,SND_PCM_ACCESS_MMAP_INTERLEAVED)' returned 'Invalid argument'
Segmentation fault
If I kill pulseaudio as suggested by many, when I start the program again (or any program with sound I think), pulseaudio opens back up so it gets the same error.
NOTE: THE FOLLOWING IS CONFUSING ME. pSX works under sudo even when pulseaudio is running sometimes, but sometimes it gives the same error as without sudo until I kill pulse:
Code:
However, if I kill pulseaudio then run sudo pSX, it works. I think this is because trying to open pulseaudio with sudo gives an error about how it's not intended to be run by root, so pSX can't reopen it. Regardless, I don't want to run it as sudo, for security and because then I have to use root's home directory.
Does anyone know how to keep pulseaudio from reopening when I run pSX, or make pSX work with pulseaudio?
One thing that may be useful: I play another game called N through Wine, which was freezing up every few seconds. Turned out that every time it played a sound, it was freezing (an entry popped up in the program paman of ALSA plug-in [wine-preloader] then quickly disappeared). If I kill pulseaudio then open N before doing anything else, it restarts pulseaudio, but the game works. Not sure if I could get a similar effect for pSX. As it is, so I don't have to do that, I have wine using the OSS instead of ALSA plugin.
Re: Killing pulseaudio to run pSX
Re: Killing pulseaudio to run pSX
Re: Killing pulseaudio to run pSX
Re: Killing pulseaudio to run pSX
Try running it with the padsp wrapper:
Re: Killing pulseaudio to run pSX
It returned the following:
Re: Killing pulseaudio to run pSX
Re: Killing pulseaudio to run pSX
it looks like pSX is having trouble with soundcard detection. here's how I managed to workaround this on Jaunty amd64. I did have to run pSX with sudo, but only once. here's the deal:
1. kill pulseaudio (sudo killall pulseaudio)
2. run pSX as root (sudo ./pSX)
3. find the "sound" tab in the configuration and switch the "device" setting from "default" to your soundcard (plughw:0,0 in my case). apply. close pSX.
4 open /root/.pSX/psx.ini in a text editor (gksudo gedit /root/.pSX/psx.ini). find the "device" string under [Sound] section (I have "b7d317a4" there).
5. paste this string into the relevant section in ~/.pSX/psx.ini, in place of all zeroes. save. if you don't have this file in your user directory, run pSX and cancel just after choosing language, on the bios selection screen. pSX should save settings then.
now pSX runs fine even after reboot.
Re: Killing pulseaudio to run pSX
Quote:
Originally Posted by
Grishka
it looks like pSX is having trouble with soundcard detection. here's how I managed to workaround this on Jaunty amd64. I did have to run pSX with sudo, but only once. here's the deal:
1. kill pulseaudio (sudo killall pulseaudio)
2. run pSX as root (sudo ./pSX)
3. find the "sound" tab in the configuration and switch the "device" setting from "default" to your soundcard (plughw:0,0 in my case). apply. close pSX.
4 open /root/.pSX/psx.ini in a text editor (gksudo gedit /root/.pSX/psx.ini). find the "device" string under [Sound] section (I have "b7d317a4" there).
5. paste this string into the relevant section in ~/.pSX/psx.ini, in place of all zeroes. save. if you don't have this file in your user directory, run pSX and cancel just after choosing language, on the bios selection screen. pSX should save settings then.
now pSX runs fine even after reboot.
Got to step two and it still crashes on me. It mentions PulseAudio, even though I killed it, so it seems to be restarting it anyways.
Code:
E: core-util.c: Home directory /home/anthony not ours.
E: core-util.c: Home directory /home/anthony not ours.
ALSA lib pulse.c:272:(pulse_connect) PulseAudio: Unable to connect: Connection refused
[src/linux/sound.cpp, line 582]: 'snd_pcm_open(&pcm_handle,dev->info->device_fname,SND_PCM_STREAM_PLAYBACK,0)' returned 'Connection refused'
pSX: pcm_params.c:2259: snd_pcm_hw_refine: Assertion `pcm && params' failed.
Aborted
Re: Killing pulseaudio to run pSX
Grishka, your solution worked for me, thanks!! :popcorn: