Ticket #180 (closed defect: invalid)

Opened 4 years ago

Last modified 4 years ago

Can't play audio on multiple X sessions

Reported by: beejayzed Owned by: lennart
Milestone: Component: module-hal-detect
Keywords: Cc:

Description

I'm using the fedora 8 setup of pulseaudio here. If I run xinit -- :1 to get a new X session, then run aplay /path/to/sound, it appears to not play. However, if I switch back to :0, I hear the sound playing. So it will only play if I go back to the original X session.

Change History

Changed 4 years ago by TheFang

I have this exact same bug.

I use this script to start a game in wine on a different x server, but the sounds plays on the first x server.

#!/bin/sh

GAME_PATH="CCP/EVE/bin/"
GAME_EXE="ExeFile.exe"

xauth add  :1 . `mcookie`

WINE_CMD="pulseaudio & cd $GAME_PATH ; wine $GAME_EXE"
xinit /bin/sh -c "$WINE_CMD" -- :1

Changed 4 years ago by TheFang

  • component changed from daemon to module-hal-detect

I've done some more research and it seems that PulseAudio tries to connect to a PulseAudio server on the current X server, but if that fails, it tries other options, and ends up with the PulseAudio server from the first X session (in this case, and that PulseAudio server only has a sink on the first X server)(from http://www.pulseaudio.org/wiki/FAQ, Question 18). So far for explaining why we get sound on the fist X server.

If I run 'pulseaudio -vvv' I get the following output:

I: main.c: Page size is 4096 bytes
I: main.c: Fresh high-resolution timers available! Bon appetit!
D: cli-command.c: Checking for existance of '/usr/lib64/pulse-0.9/modules//module-hal-detect.so': success
I: module-hal-detect.c: Trying capability alsa
D: module-hal-detect.c: Not loaded device /org/freedesktop/Hal/devices/computer_alsa_timer
D: module-hal-detect.c: Not loaded device /org/freedesktop/Hal/devices/computer_alsa_sequencer
D: module-hal-detect.c: Not loaded device /org/freedesktop/Hal/devices/pci_8086_27d8_alsa_playback_6
D: module-hal-detect.c: Not loaded device /org/freedesktop/Hal/devices/pci_8086_27d8_alsa_capture_6
D: module-hal-detect.c: Not loaded device /org/freedesktop/Hal/devices/pci_8086_27d8_alsa_playback_1
D: module-hal-detect.c: Loading module-alsa-sink with arguments 'device=hw:0 sink_name=alsa_output.pci_8086_27d8_alsa_playback_0'
ALSA lib pcm_hw.c:1207:(_snd_pcm_hw_open) Invalid value for card
E: module-alsa-sink.c: Error opening PCM device hw:0: Onjuist apparaat
E: module.c: Failed to load  module "module-alsa-sink" (argument: "device=hw:0 sink_name=alsa_output.pci_8086_27d8_alsa_playback_0"): initialization failed.
D: module-hal-detect.c: Not loaded device /org/freedesktop/Hal/devices/pci_8086_27d8_alsa_playback_0
D: module-hal-detect.c: Loading module-alsa-source with arguments 'device=hw:0 source_name=alsa_input.pci_8086_27d8_alsa_capture_0'

It seems that the detection of the sound devices is going wrong. Running it as sudo, I get the exact same output, so it's not a permission problem.

I'm at a loss as to why it won't detect the sound card correctly, is there some way to get more logging from module-hal-detect?

Changed 4 years ago by lennart

  • status changed from new to closed
  • resolution set to invalid

PA is not intended to be run as root.

HAL+ConsoleKit? by default make sure that only the active session on the seat can access the audio hardware. This is intended behaviour.

Closing as invalid.

Note: See TracTickets for help on using tickets.