You are not logged in.
After a long time using straight Alsa I've been setting up Pulse because I want to send my laptop's audio to a networked device. So far I have audio output working (through my laptop) with everything except MPD. MPD won't output audio with Pulse enabled; songs stay in "paused" mode. I run MPD as my local user and have been trying to get this suggested systemd service to work, but it fails when I start it:
systemd[1]: Starting Music Player Daemon (running as 0112358)...
systemd[1]: Started Music Player Daemon (running as 0112358).
systemd[4098]: pam_unix(system-local-login:session): session opened for user 0112358 by (uid=0)
sudo[4095]: pam_unix(sudo:session): session closed for user root
mpd[4098]: Failed to bind to '[::]:6600': Failed to create socket: Address family not supported by protocol
systemd[4100]: pam_unix(system-local-login:session): session closed for user 0112358
systemd[1]: mpd-myuser.service: main process exited, code=exited, status=1/FAILURE
systemd[1]: Unit mpd-myuser.service entered failed state.
dbus-daemon[943]: dbus[943]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.55" (uid=1000 pid=4100 comm="(sd-p ") interface="org.freedesktop.login1.Manager" member="ReleaseS
dbus[943]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.55" (uid=1000 pid=4100 comm="(sd-p ") interface="org.freedesktop.login1.Manager" member="ReleaseSession" error name
systemd[4100]: pam_systemd(system-local-login:session): Failed to release session: Access denied
sudo[4114]: 0112358 : TTY=pts/3 ; PWD=/home/0112358 ; USER=root ; COMMAND=/usr/bin/journalctl
sudo[4114]: pam_unix(sudo:session): session opened for user root by (uid=0)This is my /etc/mpd.conf:
music_directory "/home/0112358/Music"
playlist_directory "/home/0112358/Music/Playlists"
db_file "/home/0112358/.mpd/mpd.db"
log_file "/home/0112358/.mpd/mpd.log"
pid_file "/home/0112358/.mpd/mpd.pid"
state_file "/home/0112358/.mpd/mpd.state"
user "0112358"
gapless_mp3_playback "yes"
input{
plugin "curl"
}
audio_output{
type "pulse"
name "My Pulse Output"
}/etc/asound.conf:
# Use PulseAudio by default
pcm.!default {
type pulse
fallback "sysdefault"
hint {
show on
description "Default ALSA Output (currently PulseAudio Sound Server)"
}
}
ctl.!default {
type pulse
fallback "sysdefault"
}/etc/pulse/default.pa:
.nofail
.fail
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore
load-module module-augment-properties
load-module module-switch-on-port-available
### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif
### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif
### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif
.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif
### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix
.ifexists module-gconf.so
.nofail
load-module module-gconf
.fail
.endif
### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore
### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams
### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink
### Honour intended role device property
load-module module-intended-roles
### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle
### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
.nofail
load-module module-console-kit
.fail
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif
### Enable positioned event sounds
load-module module-position-event-sounds
### Cork music/video streams when a phone stream is active
load-module module-role-cork
load-module module-filter-heuristics
load-module module-filter-apply
### Load DBus protocol
.ifexists module-dbus-protocol.so
load-module module-dbus-protocol
.endif
### Make some devices default
#set-default-sink output
#set-default-source inputCould anyone give me a hand please?
Last edited by 0112358 (2013-06-30 15:30:33)
Offline
You start mpd just by enabling it using systemctl? I remember solving this before but I've changed machines in the meantime and gone to use a user systemd session which is very different. If I remember correctly you need to pass some sort of environment variable in to the service file so that mpd/pulse both are using the same /var/*/* directory.
Or you could workaround it by outputting to tcp/ip to pulse (I wrote that section of the pulseaudio article on wiki.archlinux.org)
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Or you could workaround it by outputting to tcp/ip to pulse (I wrote that section of the pulseaudio article on wiki.archlinux.org)
You're suggesting running mpd as its own user? If I did that, and configured mpd to output to 127.0.0.1, etc, would Pulse then be able to redirect the audio to another networked machine (since that's my end goal here)? I don't want to end up having to put the other machine's IP directly in mpd.conf, since I won't always be running that way (since it's a laptop - sometimes I'll take it on the road and use headphones).
Offline
ngoonee wrote:Or you could workaround it by outputting to tcp/ip to pulse (I wrote that section of the pulseaudio article on wiki.archlinux.org)
You're suggesting running mpd as its own user? If I did that, and configured mpd to output to 127.0.0.1, etc, would Pulse then be able to redirect the audio to another networked machine (since that's my end goal here)? I don't want to end up having to put the other machine's IP directly in mpd.conf, since I won't always be running that way (since it's a laptop - sometimes I'll take it on the road and use headphones).
Pulse can do that, yes, its very flexible that way. Doesn't matter where the audio comes from, really. Though as a disclaimer, I haven't tried it myself yet.
Why not just set two outputs for mpd and toggle between them since it has native support? Doesn't sound like you really need pulseaudio.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
I actually just tried leaving mpd's configuration running as my local user (rather than mpd) but changing default.pa to enable networking and changing mpd.conf to output to 127.0.0.1, and this by itself seems to have gotten pulse working with mpd. Now mpd is controllable through pasystray, plays through my usb interface, and even plays simultaneously with other streams.
I'll mark this thread as solved and open another when I inevitably can't get networking working.
Thanks for the help.
Why not just set two outputs for mpd and toggle between them since it has native support? Doesn't sound like you really need pulseaudio.
I guess just because it's nice to only toggle one switch (pulse) rather than two (pulse + mpd) when I change locations.
Offline
ngoonee wrote:Why not just set two outputs for mpd and toggle between them since it has native support? Doesn't sound like you really need pulseaudio.
I guess just because it's nice to only toggle one switch (pulse) rather than two (pulse + mpd) when I change locations.
Also that way it wouldnt be in sync.
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