You are not logged in.

#1 2016-02-19 04:40:54

musdem
Member
Registered: 2013-09-17
Posts: 19

mpd will not connect to pulseaudio [SOLVED]

Whenever I try to get mpd to use pulseaudio it will not connect, however I can get it to connect to alsa though when I do so no other audio on the machine can play.

This is the error I get from journalctl when I try to start the mpd daemon with pulse audio:

Feb 18 23:25:35 Zack-LT-LNX-ARCH libsmbclient[1413]: client: [0] closed
Feb 18 23:25:23 Zack-LT-LNX-ARCH libsmbclient[1413]: client: [0] opened from 127.0.0.1:52058
Feb 18 23:25:22 Zack-LT-LNX-ARCH libsmbclient[1413]: avahi: Service 'Music Player' successfully established.
Feb 18 23:25:21 Zack-LT-LNX-ARCH libsmbclient[1413]: pulse_output: Failed to enable "pulse audio" [pulse]: pa_context_connect() has failed: Connection refused
Feb 18 23:25:21 Zack-LT-LNX-ARCH polkitd[529]: Unregistered Authentication Agent for unix-process:1406:164914 (system bus name :1.28, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.utf8) (disconnected from bus)
Feb 18 23:25:21 Zack-LT-LNX-ARCH sudo[1405]: pam_unix(sudo:session): session closed for user root
Feb 18 23:25:21 Zack-LT-LNX-ARCH systemd[1]: Started Music Player Daemon.

This is the audio_output config for alsa:

audio_output {
    type "alsa"
    name "PulseAudio"
    mixer_type "software"
    format "44100:16:2"
}

This is the audio_output config for pulseaudio:

audio_output {
    type "pulse"
    name "pulse audio"
    mixer_type "software"
    format "44100:16:2"
}

Last edited by musdem (2016-02-21 05:48:40)

Offline

#2 2016-02-19 05:51:50

smirky
Member
From: Bulgaria
Registered: 2013-02-23
Posts: 277
Website

Re: mpd will not connect to pulseaudio [SOLVED]

audio_output {
	type		"pulse"
	name		"internal"
	server		"127.0.0.1"
}

This is what I use and it works fine for me.
If it doesn't work out for you, then you need to reconfigure pulse.


Personal spot  ::  https://www.smirky.net/  ::  Try not to get lost!

Offline

#3 2016-02-20 09:55:01

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: mpd will not connect to pulseaudio [SOLVED]

mpd needs to either run as the same user as the pulse server or you need to a) enable anonymous network connections in pulse (with paprefs) and b) define the server in mpd.conf (as smirky said)


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

#4 2016-02-21 05:47:52

musdem
Member
Registered: 2013-09-17
Posts: 19

Re: mpd will not connect to pulseaudio [SOLVED]

Yes I actually scraped running it from systemd and just added it to my i3 config so it would run from my user. Thank you!

Offline

Board footer

Powered by FluxBB