Ticket #42 (closed defect: invalid)

Opened 2 years ago

Last modified 1 year ago

MPD will not connect *randomly* when trying to play over TCP

Reported by: avuton Assigned to: lennart
Priority: normal Milestone:
Component: daemon Severity: major
Keywords: Cc:

Description

Hello,

I have Pulseaudio working on box X, MPD working on box Y on mpd server 0. It works perfectly. Anytime I hit 'play' it just works. I tried putting the same exact configuration on my wifes' computer (She is on box Z, MPD playing on box Y, mpd server 1). Sometimes, it refuses to play. Try again 3 minutes later (nothing changed) it will play. There's not much telling from the logs, but what it does tell me I will paste to the best of my ability here:


tulip etc # grep -v ^# pulse/default.pa | grep -v '^ *$'
load-module module-alsa-sink sink_name=output
load-module module-hal-detect
add-autoload-source input module-native-protocol-tcp source_name=input
load-module module-native-protocol-tcp auth-anonymous=1
set-default-sink output
set-default-source input
tulip etc # grep -v ^# pulse/daemon.conf  | grep -v '^;.*$' | grep -v '^ *$'
high-priority = 1
log-target = syslog
resample-method = src-sinc-best-quality
system-instance = 0

Here is some observed sample output (From box Z):

Nov  7 17:42:39 tulip pulseaudio[11841]: socket-server.c: socket(PF_INET6): Address family not supported by protocol
Nov  7 17:42:39 tulip pulseaudio[11841]: module.c: Failed to load  module "module-alsa-sink" (argument: "device=hw:0 sink_name=alsa_output.pci_10de_6a_alsa_playback_0"): init
ialization failed.
Nov  7 17:42:39 tulip pulseaudio[11841]: module-alsa-sink.c: Error opening PCM device hw:0: Device or resource busy
Nov  7 17:42:39 tulip pulseaudio[11841]: alsa-util.c: device doesn't support 44100 Hz, changed to 48000 Hz.
Nov  7 17:42:25 tulip pulseaudio[11729]: socket-server.c: socket(PF_INET6): Address family not supported by protocol
Nov  7 17:42:25 tulip pulseaudio[11729]: module.c: Failed to load  module "module-alsa-sink" (argument: "device=hw:0 sink_name=alsa_output.pci_10de_6a_alsa_playback_0"): init
ialization failed.
Nov  7 17:42:25 tulip pulseaudio[11729]: module-alsa-sink.c: Error opening PCM device hw:0: Device or resource busy
Nov  7 17:42:25 tulip pulseaudio[11729]: alsa-util.c: device doesn't support 44100 Hz, changed to 48000 Hz.
Nov  7 08:19:04 tulip pulseaudio[5618]: module-alsa-source.c: snd_pcm_readi() failed: Streams pipe error
Nov  7 08:19:04 tulip pulseaudio[5618]: module-alsa-sink.c: snd_pcm_writei() failed: Streams pipe error
Nov  6 19:39:05 tulip pulseaudio[5618]: socket-server.c: socket(PF_INET6): Address family not supported by protocol
Nov  6 19:39:05 tulip pulseaudio[5618]: module.c: Failed to load  module "module-alsa-sink" (argument: "device=hw:0 sink_name=alsa_output.pci_10de_6a_alsa_playback_0"): initi
alization failed.
Nov  6 19:39:05 tulip pulseaudio[5618]: module-alsa-sink.c: Error opening PCM device hw:0: Device or resource busy
Nov  6 19:39:05 tulip pulseaudio[5618]: alsa-util.c: device doesn't support 44100 Hz, changed to 48000 Hz.
Nov  6 10:33:51 tulip pulseaudio[3290]: module-alsa-source.c: snd_pcm_readi() failed: Streams pipe error
Nov  6 10:33:51 tulip pulseaudio[3290]: module-alsa-sink.c: snd_pcm_writei() failed: Streams pipe error

Most of the time when the error occurs, after I press play in MPD (on box Y server 1) I get:

Nov 07 17:42 : problems opening audio device while playing "New Music/GERZ.ru_Enigma__2003__Sleep/Enigma - (2003) - Sleep/02 - Center Of The Sun (vocals by Poe).mp3"

Rarely, but sometimes I get:

Nov 07 17:42 : Cannot connect to server in PulseAudio output "Trish's Computer" (attempt 1): No such entity

Sometimes, If I don't have a few minutes to wait, I restart the services (pulseaudio on Box Z or sometimes mpd server 1 on box Y will make it work).

I have no idea why this is happening; and I'm not really sure where to start to try to find out more.

Also, about the

Nov  6 19:39:05 tulip pulseaudio[5618]: socket-server.c: socket(PF_INET6): Address family not supported by protocol

I'm not sure why I'm getting this error, I have IPv6 support compiled in on box Y, but not box Z, which is strictly IPv4. Nor do I have IPv6 support compiled on Box X and it works fine. I have diffed all configure files (pulse/ and mpd/) of boxes X and Z and they seem fine. I also do not get this IPv6 warning/error on box X.

If there's any information I can help with or any way I can turn on extra debugging please let me know. I really need to get this working for the wife :)

Box X: amd64/Linux-2.6.18.2/alsa-driver-1.0.13/Gentoo ~amd64/ media-sound/pulseaudio-0.9.5-r4 USE="X alsa hal -avahi -caps -jack -lirc -oss -tcpd"

Box Z: x86/Linux-2.6.18.1/alsa-driver-1.0.13/Gentoo ~x86/ media-sound/pulseaudio-0.9.5-r4 USE="X alsa hal -avahi -caps -jack -lirc -oss -tcpd"

Change History

11/08/06 13:49:46 changed by ossman

I don't really know what MPD is, but the errors you see are rather easily explained. You have something else hogging the sound card, and your sound card only supports one program at a time. So either make sure PulseAudio gets exclusive access to the device or use dmix as your default alsa device.

11/09/06 02:04:13 changed by avuton

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

Oh, OK, I guess this wasn't required on box X due to a better sound card :/ Now I understand. I'll resolve it as invalid and if it pops back up I'll refile. Thanks for the help.

11/11/06 00:48:18 changed by avuton

  • status changed from closed to reopened.
  • resolution deleted.

OK this was not the problem, I changed the /etc/pulse/default.pa to:

load-module module-alsa-sink device=dmix sink_name=output

and I still get:

Nov 10 15:42:29 tulip pulseaudio[12275]: socket-server.c: socket(PF_INET6): Address family not supported by protocol

Nov 10 15:42:29 tulip pulseaudio[12275]: module.c: Failed to load module "module-alsa-sink" (argument: "device=hw:0 sink_name=alsa_output.pci_10de_6a_alsa_playback_0"): initialization failed.

Nov 10 15:42:29 tulip pulseaudio[12275]: module-alsa-sink.c: Error opening PCM device hw:0: Device or resource busy

Nov 10 15:42:29 tulip pulseaudio[12275]: alsa-util.c: Unable to attach to mixer dmix: No such file or directory

Nov 10 15:42:29 tulip pulseaudio[12275]: alsa-util.c: device doesn't support 44100 Hz, changed to 48000 Hz.

Is this an ALSA issue? :(

11/11/06 01:05:52 changed by avuton

I guess I should also mention that she is (obviously) not running any other sound services, at least that we know of, and I haven't seen flash open. This usually happens right after resuming from suspend, though I think I've seen it at other times as well. Usually only takes a pulseaudio service restart to fix.

11/13/06 05:13:33 changed by avuton

Also, it's worth mentioning that MPD is Music Player Daemon. I'm running the latest from svn.

11/13/06 10:28:50 changed by ossman

If it only happens after suspend, then I suspect it is an alsa issue where the device locks up somehow.

As long as you're getting "Device or resource busy", then I'm afraid it isn't a problem in Pulse.

12/02/06 00:07:06 changed by avuton

  • status changed from reopened to closed.
  • resolution set to invalid.

:/ In that case I'll just shrug my shoulders and say that we should buy a new sound card.