You are not logged in.
I'm having problems getting mpd to play nice with pulse-audio. Pulse is installed and works with vlc, mplayer, flash, etc. just fine. When I try to play through mpd the song in the gui simply shows a status of "paused" and the following gets written to the mpd.log.
Advice is appreciated.
# tail -f /var/log/mpd/mpd.log
Oct 08 11:12 : output: Failed to enable "pulse audio" [pulse]: pa_context_connect() has failed: Connection refused
Oct 08 11:12 : output: Failed to enable "pulse audio" [pulse]: pa_context_connect() has failed: Connection refused
Oct 08 11:12 : output: Failed to enable "pulse audio" [pulse]: pa_context_connect() has failed: Connection refused
Oct 08 11:12 : player_thread: problems opening audio device while playing "Not_So_Hard_Stuff/Disturbed-The Sickness-2000/01_Voices.flac"
Here is my mpd.conf
$ sed '/#/d' /etc/mpd.conf
music_directory "/media/data/all_genres"
playlist_directory "/var/lib/mpd/playlists"
db_file "/var/lib/mpd/mpd.db"
log_file "/var/log/mpd/mpd.log"
pid_file "/var/run/mpd/mpd.pid"
state_file "/var/lib/mpd/mpdstate"
user "mpd"
gapless_mp3_playback "yes"
zeroconf_enabled "yes"
zeroconf_name "Music Player"
input {
plugin "curl"
}
audio_output {
type "pulse"
name "pulse audio"
}
mixer_type "software"
audio_buffer_size "35000"
buffer_before_play "5%"
The pulseaudio wiki suggests that a 'pulse' group and 'pulse-access' and even 'pulse-rt' groups may be required? I have used mpd for a year now with no such groups on my system.
EDIT: solved in post #13
Last edited by graysky (2011-10-16 13:42:46)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Same problem here - for now. My config already worked without these groups...but also doesn't work with them.
May be there was an update of mpd or pulse in the last days?
Offline
Same problem here - for now. My config already worked without these groups...but also doesn't work with them.
May be there was an update of mpd or pulse in the last days?
with mpd-git all is fine...
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
mpd-git for me has the same behavior.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Recent PulseAudio requires a DBus session daemon, and recent DBus refuses to autolaunch without X.
Make sure either PulseAudio or DBus (so pulse can autospawn) is running when you start MPD.
Offline
@heftig - thanks for the info. I saw the dbus error and did just that - started it manually from X. I still get the same error.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Is pulseaudio really running when you start mpd? IIRC I had similar problems due to pulseaudio's idle timeout (daemon quits but can not autospawn because of no dbus). You could run pulseaudio with -vvv in a seperate screen to check if it stays up.
EDIT: Hmm, odd. Just checked my daemon.conf, and "exit-idle-time = -1" is commented. But I defintely had problems with the auto-quit.
Last edited by hokasch (2011-10-10 10:51:46)
Offline
@hokasch - yes, it is running
$ pg pulse
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
facade 1888 0.0 0.0 239152 6460 ? S<l 14:32 0:00 /usr/bin/pulseaudio --start
facade 1902 0.0 0.0 93668 2844 ? S 14:32 0:00 /usr/lib/pulse/gconf-helper
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Very odd. From within an xfce-session, if I start mpd then try to play a song, here is the output recorded to /var/log/errors.log:
Oct 10 17:10:53 localhost pulseaudio[5128]: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Oct 10 17:10:53 localhost pulseaudio[5125]: [pulseaudio] main.c: Daemon startup failed.
It doesn't matter if I start xfce from runmode 3 via "xinit" or from gdm.
$ cat ~/.xinitrc
#!/bin/sh
exec ck-launch-session startxfce4
#exec ck-launch-session gnome-session
#enlightenment-session
Last edited by graysky (2011-10-10 21:22:00)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I just did a fresh install of arch to a spare partition, added xfce4, pulseaudio and mpd. Same problem as described above so I opened this bug report.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I confirm this bug.
My mpd client (sonata) refuses to work under gnome 3.2 when mpd is configured with pulseaudio output. With alsa outpur all works fine.
Win XP -> Ubuntu -> Fedora -> Arch -> Arch -> Arch -> Ar...
Offline
I was struggling with this yesterday and I finally got it working by opening the X11 session to mpd: "xhost +local:mpd". Today even this doesn't seem to work
Offline
I too modified my /etc/mpd.conf to use alsa even though I don't have alsa-utils installed at all.
$ sed '/#/d' /etc/mpd.conf
music_directory "/media/data/all_genres"
playlist_directory "/var/lib/mpd/playlists"
db_file "/var/lib/mpd/mpd.db"
log_file "/var/log/mpd/mpd.log"
pid_file "/var/run/mpd/mpd.pid"
state_file "/var/lib/mpd/mpdstate"
user "mpd"
gapless_mp3_playback "yes"
zeroconf_enabled "yes"
zeroconf_name "Music Player"
input {
plugin "curl"
}
audio_output {
type "alsa"
name "My ALSA Device"
}
mixer_type "software"
audio_buffer_size "35000"
buffer_before_play "5%"
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I too modified my /etc/mpd.conf to use alsa even though I don't have alsa-utils installed at all.
$ sed '/#/d' /etc/mpd.conf music_directory "/media/data/all_genres" playlist_directory "/var/lib/mpd/playlists" db_file "/var/lib/mpd/mpd.db" log_file "/var/log/mpd/mpd.log" pid_file "/var/run/mpd/mpd.pid" state_file "/var/lib/mpd/mpdstate" user "mpd" gapless_mp3_playback "yes" zeroconf_enabled "yes" zeroconf_name "Music Player" input { plugin "curl" } audio_output { type "alsa" name "My ALSA Device" } mixer_type "software" audio_buffer_size "35000" buffer_before_play "5%"
Doesn't work for me I get this error when I try to play something with your configuration:
ALSA lib pulse.c:229:(pulse_connect) PulseAudio: Unable to connect: Connection refused
Oct 16 18:23 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "default": Connection refused
Offline
@og - sorry, I don't know what to say
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
why dont you guys run mpd as your own user? your music files normally belong to you anyway... and pulseaudio is a userprocess, so its destined to have issues otherwise...
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
why dont you guys run mpd as your own user? your music files normally belong to you anyway... and pulseaudio is a userprocess, so its destined to have issues otherwise...
At least I don't want to give unnecessary rights for processes, my main user's home directory is encrypted and some of us have multiple users..
Last edited by oilgame (2011-10-16 16:59:08)
Offline
Running as an mpd user is adventitious for several reasons: any user can interact with the player and playing continues when you log out of X.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Running as an mpd user is adventitious for several reasons: any user can interact with the player and playing continues when you log out of X.
the mpd process is not dependent on X at all, doesnt matter what user you start it with
and the first argument can be circumvented by using mpd access rights (see mpd.conf)
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
Running as an mpd user is adventitious for several reasons: any user can interact with the player and playing continues when you log out of X.
I honestly thought that this was the whole point of using mpd...
zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)
Offline