Raspbian: MPD freezes very often

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
peter_b
Chatterbox
Posts: 370
Joined: Tue Nov 12, 2013 2:05 am

Raspbian: MPD freezes very often

Post by peter_b »

[PROBLEM]
On Raspbian Stretch on a RPi (model B), I've installed MPD and pulseaudio (as network sink).
Everything I wanted works, except for it being highly unreliable:
MPD freezes/hangs very often. Especially when interacting with playback from a client (seeking, pause/playback, next/previous song, etc).

[SOLUTION]
Haven't found one yet.

However, I've somewhat narrowed it down to an "audio-output issue":
When MPD freezes, killing the pulseaudio-process it spawned (using "kill -9"), MPD continues its duties.

I'd switch to native ALSA (instead of "pulse" output), but that configuration shows the same audio freeze.
Yet, I'm still suspecting pulseaudio running at all - with the TCP network sink enabled - to be related.

Here's a "ps aux | grep mpd" when mpd is running:
pi 460 1.4 2.1 103988 9360 ? Sl Dez25 2:08 /usr/bin/pulseaudio --start --log-target=syslog --system=false
mpd 26286 6.3 2.4 366264 10880 ? Sl 01:43 0:31 /usr/bin/pulseaudio --start --log-target=syslog
I've now killed the pulseaudio process owned by "pi" user, and switch mpd.conf back to ALSA.
Seems to work more stable. Sometimes audio stops for a second, giving the following error message:
alsa_output: Underrun on ALSA device "default"
Possible duplicate of "Raspbian: Pulseaudio hangs with MPD as client"
Giving up for now.

Links:
Post Reply