You are not logged in.
Running Debian testing and just noticed that MPD is no longer playing music, I think since it was upgraded to 0.20.13-1.
PulseAudio is working fine, other applications are able to play music/sounds.
MPD is running as my user, /etc/mpd.conf sets up the normal variables for playlists, DB, log file, pid file etc. Audio output is setup to be
audio_output {
type "pulse"
name "MPD"
}
When I try to play a track, I get the following output in the mpd.log
Dec 24 19:46 : exception: Failed to enable output "MPD" [pulse]
Dec 24 19:46 : exception: nested: pa_context_connect() has failed: Connection refused
Have tried restarting mpd, pulseaudio and the whole box. Searching on the web hasn't revealed anything recent relating to this issue.
Cheers
Enoch
Last edited by EnochRoot (2017-12-27 15:03:16)
Offline
Try
mv ~/.pulse{,.bak}
Then reboot.
If it works, merge your configurations back in with reference to /etc/pulse/{default,system}.pa
Source: https://bbs.archlinux.org/viewtopic.php … 7#p1183197
Offline
Thanks for that, but don't have a ~/.pulse directory, will read through the thread you referenced later, or more realistically tomorrow as about to go out.
Cheers
Enoch
Offline
I just installed mpd on busenlabs, after seeing your post, everything works, but with pulse I use the following code:
audio_output {
type "pulse"
name "pulse audio"
mixer_type "software" # Or "hardware"
## server "remote_server" # optional
## sink "remote_server_sink" # optional
}
#
Best regards
Offline
Is mpd configured to run as your regular user account or some other account?
If it's some other account, it could be that the user is not in the audio group (or similar). Sounds like pulse is rejecting mpd's connection. Could try checking pulse logs, even though I don't know where to find them, I'm sure it's documented somewhere.
Offline
Have had some time to do some further investigations. mpd is run under my user account, but it runs from systemd. In order to try and debug things further, I ran mpd from the command line, having stopped mpd and mpd.socket using systemctl.
What do you know, but mpd when run with the command below works perfectly.
mpd --stdout --no-daemon --verbose
Have seen some references to mpd not picking up one of the XDG environment variables when run from systemd, but those are from a few years ago. Am guessing something has changed recently in the way mpd is being started under systemd, so will dig into that a bit further.
Cheers
Enoch
Offline
Had seen other posts indicating that mpd might not find the running pulseaudio process if it didn't have XDG_RUNTIME_DIR set correctly, so added the line below to /etc/default/mpd which is picked up by systemd and that fixes the issue after a restart of mpd.
Not sure why it worked previously, but yay.
XDG_RUNTIME_DIR=/run/user/1000
Offline