You are not logged in.

#1 2017-02-10 09:36:26

axb993
Member
Registered: 2017-02-10
Posts: 2

[SOLVED] MPD: "Local Music Player Daemon" [pulse] failed to play

So I've been trying to get MPD working on and off for months now. Initially it worked fine (using Cantata), but after restarting no matter what I do I can't get it to play anything. It just skips ahead a bit and stops itself. Here's a recording: Cantata Recording. It is, however, still able to update and display its database, so I know it's working to a point.

Using

sudo /usr/bin/mpd --stdout --no-daemon --verbose

I can see three errors before trying to play anything, and the one in this post's title appears multiple times when I try to play anything. The first is

exception: bind to '0.0.0.0:6600' failed (continuing anyway, because binding to '[::]:6600' succeeded): Failed to bind socket: Address already in use

This one doesn't seem to matter as the problem persists if I add a custom bind_to_address to /etc/mpd.conf, although the message disappears.

The second,

exception: OutputThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted

seems more important, but searching for it just yeilds unrelated bug reports and foreign language sites, so I have no idea what it means or how to fix it hmm

The third is

xcb_connection_has_error() returned true

This error, unlike in this post, is not followed by anything (plus "solved but I don't know why" isn't too helpful). Again, I'm not sure what this means, but I'm guessing it's just saying something went wrong.

Once I try to play something, I get so many messages quake fills up instantly. An extract:

client: [3] command returned 0
client: [3] process command "replay_gain_status"
client: [3] command returned 0
client: [1] process command "idle"
client: [1] command returned 1
client: [3] process command "status"
exception: "Local Music Player Daemon" [pulse] failed to play: suspended
client: [3] command returned 0
client: [3] process command "replay_gain_status"
client: [3] command returned 0
client: [1] process command "idle"
client: [1] command returned 1
output: closed plugin=pulse name="Local Music Player Daemon"
client: [3] process command "status"
exception: Failed to open audio output
client: [3] command returned 0
client: [3] process command "replay_gain_status"
client: [3] command returned 0
client: [1] process command "idle"
client: [1] command returned 1
client: [3] process command "status"
client: [3] command returned 0
client: [3] process command "replay_gain_status"
client: [3] command returned 0
client: [1] process command "idle"
client: [1] command returned 1
client: [3] process command "pause "0""
output: opened plugin=pulse name="Local Music Player Daemon" audio_format=44100:16:2
client: [3] command returned 0
client: [3] process command "status"
client: [3] command returned 0
client: [3] process command "replay_gain_status"
client: [3] command returned 0
client: [1] process command "idle"
client: [1] command returned 1
exception: "Local Music Player Daemon" [pulse] failed to play: suspended
client: [3] process command "status"
output: closed plugin=pulse name="Local Music Player Daemon"
output: opened plugin=pulse name="Local Music Player Daemon" audio_format=44100:16:2
client: [3] command returned 0
client: [3] process command "replay_gain_status"
client: [3] command returned 0
client: [1] process command "idle"
client: [1] command returned 1
client: [3] process command "status"
client: [3] command returned 0
client: [3] process command "replay_gain_status"
client: [3] command returned 0
client: [1] process command "idle"
client: [1] command returned 1
client: [3] process command "status"
client: [3] command returned 0
exception: "Local Music Player Daemon" [pulse] failed to play: suspended

...with the highlight seeming to be:

exception: "Local Music Player Daemon" [pulse] failed to play: suspended

Searching for the error yeilds a couple similar errors, as well as my reddit post from 3 months ago about the issue.

I have reinstalled mpd (and switched to mpd-git), wiped everything that looks like a config file and started fresh so many times that at this point I'm not sure what exactly I've done to my current attempt. Nothing I've tried has worked, same thing every time.

My mpd.conf:

# See: /usr/share/doc/mpd/mpdconf.example

user "mpd"
pid_file "/run/mpd/mpd.pid"
db_file "/var/lib/mpd/mpd.db"
state_file "/var/lib/mpd/mpdstate"
playlist_directory "/var/lib/mpd/playlists"
music_directory "/media/HDD/Axb993/Music/Artists"
audio_output {
       type		"pulse"
       name		"Local Music Player Daemon"
       server		"127.0.0.1"
}
#bind_to_address "127.0.0.1"
#port "29170"

I usually start mpd with systemctl start mpd.service. systemctl status mpd.service yeilds nothing of interest, aside from the "bind to 0.0.0.0:6600" error.

I have absolutely no idea what to do. Any help would be greatly appreciated, and if you can't help, thank you for reading this anyway <3

Last edited by axb993 (2017-02-19 11:57:47)

Offline

#2 2017-02-15 16:46:36

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,429

Re: [SOLVED] MPD: "Local Music Player Daemon" [pulse] failed to play

If you are the only user of this system and hence the only one needing to run MPD, it will save you a lot of potential gotcha's and trouble if you start and use mpd as an user.service as opposed to a system wide daemon. https://wiki.archlinux.org/index.php/Mu … er_user.29 and https://wiki.archlinux.org/index.php/Mu … th_systemd read these two paragraphs carefully, if you don't know what an user service is, follow the link in the second paragraph to find out how you can manipulate them. If you still get stuck post all commands and adjustments to files you made.

Online

#3 2017-02-16 17:16:02

hifi25nl
Member
Registered: 2011-05-07
Posts: 262

Re: [SOLVED] MPD: "Local Music Player Daemon" [pulse] failed to play

I would check first with direct output to alsa (no pulse, without mixer and resample) and as user. Mpd can be launched as user also without using systemd user service. Substitute youruser in the example with the right one.
To be sure that mpd is really using your mpd.conf start it with:

mpd /etc/mpd.conf --no-daemon

in a terminal

--> Check if your device is "hw:0,0" with aplay -l


user  "youruser"
group "audio"

input {
plugin "curl"
}

audio_output {
	type		   "alsa"
	name		   "My ALSA Device"
	device		   "hw:0,0"	# optional
	auto_resample  "no"
	mixer_type     "disabled"
}

Offline

#4 2017-02-18 17:47:07

sjollo
Member
Registered: 2017-02-18
Posts: 1

Re: [SOLVED] MPD: "Local Music Player Daemon" [pulse] failed to play

I got recently into the same problem. I had random connection error without any clear explanation.
Setting up mpd as a local user service as suggested by V1del solved my problem.

Offline

#5 2017-02-19 11:56:33

axb993
Member
Registered: 2017-02-10
Posts: 2

Re: [SOLVED] MPD: "Local Music Player Daemon" [pulse] failed to play

Thank you so much V1del! Followed both sets of instructions, couldn't get a user service working wtih the new config file but sudo mpd ~/.config/mpd/mpd.conf worked fine, and after changing my ~/.config/mpd directories permissions to get rid of "fatal_error: Failed to set group 10: Operation not permitted" everything works as expected! I can't thank you enough for fixing this headache <3

Offline

Board footer

Powered by FluxBB