You are not logged in.
I am trying to setup the Music Player Daemon to play all of my audio (including DSD). I have installed mpd, mpc, and the ncmpcpp packages.
I've followed through this Arch Forum on MPD to setup the daemon https://wiki.archlinux.org/title/Music_Player_Daemon
When I run the mpd command, I get no output of an error. When I enable it to start with systemd, I get an error. Also, running ncmpcpp, I am informed that the connection is refused. Here is the systemctl status of mpd.service
× mpd.service - Music Player Daemon
Loaded: loaded (/usr/lib/systemd/system/mpd.service; enabled; preset: disabled)
Drop-In: /usr/lib/systemd/system/mpd.service.d
└─00-arch.conf
Active: failed (Result: exit-code) since Thu 2022-09-29 11:18:51 MDT; 8s ago
TriggeredBy: × mpd.socket
Docs: man:mpd(1)
man:mpd.conf(5)
Process: 32263 ExecStart=/usr/bin/mpd --systemd (code=exited, status=1/FAILURE)
Main PID: 32263 (code=exited, status=1/FAILURE)
CPU: 43ms
Sep 29 11:18:51 arhpt systemd[1]: Starting Music Player Daemon...
Sep 29 11:18:51 arhpt mpd[32263]: server_socket: bind to '0.0.0.0:6600' failed (continuing anyway, because binding to '[::]:6600' succeeded): Failed to bind socket: Address already in use
Sep 29 11:18:51 arhpt mpd[32263]: exception: Failed to access /var/lib/mpd/.local/share/mpd/playlists: No such file or directory
Sep 29 11:18:51 arhpt mpd[32263]: decoder: Decoder plugin 'wildmidi' is unavailable: configuration file does not exist: /etc/timidity/timidity.cfg
Sep 29 11:18:51 arhpt mpd[32263]: exception: Failed to access /var/lib/mpd/Music: No such file or directory
Sep 29 11:18:51 arhpt mpd[32263]: exception: Failed to open '/var/lib/mpd/.local/share/mpd/database': No such file or directory
Sep 29 11:18:51 arhpt mpd[32263]: exception: Failed to open database plugin; On parent directory of db file; Failed to access /var/lib/mpd/.local/share/mpd: No such file or directory
Sep 29 11:18:51 arhpt systemd[1]: mpd.service: Main process exited, code=exited, status=1/FAILURE
Sep 29 11:18:51 arhpt systemd[1]: mpd.service: Failed with result 'exit-code'.
Sep 29 11:18:51 arhpt systemd[1]: Failed to start Music Player Daemon.
/etc/services shows the following service bound to port 6600, which is what mpd uses.
mshvlm 6600/tcp
and
lsof -i TCP:6600
produces no output.
A basic search shows that mshvlm is Microsoft Hyper-V Live Migration. I also noticed that the journalctl output shows that the service is attempting to access the /var. My MPD config file states that this should be placed in ~/.local/share/mpd/
Here is my /etc/mpd.conf
# Location for database
db_file "~/.local/share/mpd/database"
# Logs to system journal
log_file "syslog"
# The music directory is by default the XDG directory, uncomment to amend and choose a different directory
music_directory "~/Music"
# Uncomment to enable the functionalities
playlist_directory "~/.local/share/mpd/playlists"
#pid_file "~/.local/share/mpd/pid"
state_file "~/.local/share/mpd/state"
sticker_file "~/.local/share/mpd/sticker.sql"
# Uncomment to refresh the database whenever files in the music_directory are changed
auto_update "yes"
auto_update_depth "0"
restore_paused "yes"
#port ""
audio_output {
type "alsa"
name "DSD Output"
}
I can set the port to something different, but I'm unsure why I need to, where it doesn't appear the port is in use. On a side note, I'm certain this broke obs-studio. Any help would be much appreciated! Thank you.
Last edited by Ahpt (2022-10-04 04:09:36)
Linux is like a child. You give your heart and soul to it, and watch it flourish.
Offline
For using mpd within your normal home dir you should be using the user, rather than the system wide service: https://wiki.archlinux.org/title/Music_ … th_systemd which is checked and invoked with
systemctl --user start/status/enable mpd
ran from and with your normal user's rights.
Last edited by V1del (2022-09-29 17:37:07)
Offline
I copied my config file from /etc/mpd.conf to ~/.config/mpd/mpd.conf
I also set the port to 6599 which is unused on my system, as port 6600 is already mapped to mshvlm.
when running the systemctl with the --user flag, I still receive an error.
× mpd.service - Music Player Daemon
Loaded: loaded (/usr/lib/systemd/user/mpd.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Thu 2022-09-29 18:35:57 MDT; 6s ago
Docs: man:mpd(1)
man:mpd.conf(5)
Process: 8215 ExecStart=/usr/bin/mpd --systemd (code=exited, status=1/FAILURE)
Main PID: 8215 (code=exited, status=1/FAILURE)
CPU: 33ms
Sep 29 18:35:57 arhpt systemd[955]: Starting Music Player Daemon...
Sep 29 18:35:57 arhpt mpd[8215]: server_socket: bind to '0.0.0.0:6599' failed (continuing anyway, because binding to '[::]:6599' succeeded): Failed to bind socket: Address already in use
Sep 29 18:35:57 arhpt mpd[8215]: decoder: Decoder plugin 'wildmidi' is unavailable: configuration file does not exist: /etc/timidity/timidity.cfg
Sep 29 18:35:57 arhpt mpd[8215]: exception: Failed to read from /home/ahpt/.local/share/mpd/database: Is a directory
Sep 29 18:35:57 arhpt mpd[8215]: exception: Failed to open database plugin; db file "/home/ahpt/.local/share/mpd/database" is not a regular file
Sep 29 18:35:57 arhpt systemd[955]: mpd.service: Main process exited, code=exited, status=1/FAILURE
Sep 29 18:35:57 arhpt systemd[955]: mpd.service: Failed with result 'exit-code'.
Sep 29 18:35:57 arhpt systemd[955]: Failed to start Music Player Daemon.
I've created the folder structure, as when I initially installed it, the conf files were for the system-wide configuration (I'm not sure how to really specify mpd to be user, other than manually moving the conf and setting the user parameter when doing systemctl.) A trip to: https://wiki.archlinux.org/title/Music_ … leshooting doesn't seem to provide any scenario on this.
Linux is like a child. You give your heart and soul to it, and watch it flourish.
Offline
I'd start here...
Sep 29 18:35:57 arhpt mpd[8215]: exception: Failed to read from /home/ahpt/.local/share/mpd/database: Is a directory
Sep 29 18:35:57 arhpt mpd[8215]: exception: Failed to open database plugin; db file "/home/ahpt/.local/share/mpd/database" is not a regular file
Last edited by dakota (2022-09-30 01:36:40)
"Before Enlightenment chop wood, carry water. After Enlightenment chop wood, carry water." -- Zen proverb
Offline
I accidentally copied over a previous output. I fixed that issue, but I am still receiving trouble actually connecting to mpd. I am showing that mpd is *active (running)* but, I still receive the server_socket error, and a decoder plugin issue.
● mpd.service - Music Player Daemon
Loaded: loaded (/usr/lib/systemd/user/mpd.service; enabled; preset: enabled)
Active: active (running) since Fri 2022-09-30 08:07:49 MDT; 4min 1s ago
Docs: man:mpd(1)
man:mpd.conf(5)
Main PID: 11138 (mpd)
Tasks: 3 (limit: 38383)
Memory: 8.8M
CPU: 34ms
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/mpd.service
└─11138 /usr/bin/mpd --systemd
Sep 30 08:07:49 arhpt systemd[1201]: Starting Music Player Daemon...
Sep 30 08:07:49 arhpt mpd[11138]: server_socket: bind to '0.0.0.0:6599' failed (continuing anyway, because binding to '[::]:6599' succeeded): Failed to bind socket: Address already in use
Sep 30 08:07:49 arhpt mpd[11138]: decoder: Decoder plugin 'wildmidi' is unavailable: configuration file does not exist: /etc/timidity/timidity.cfg
Sep 30 08:07:49 arhpt systemd[1201]: Started Music Player Daemon.
My only issue is then I must change the ncmpcpp and mpc config. I was able to make a config file and set the port for ncmpcpp, but there isn't much documentation I found on how I could update the port for mpc. https://www.musicpd.org/clients/mpc/
I keep going back to mshvlm. When I find the port, it is listed as taken.
cat /etc/services &| less
...
mshvlm 6600/tcp
...
But checking this port shows that nothing is running.
❯ lsof -i TCP:6600
~
Is there a way to remove this from the listed port number? I hate to change all my configs and run separate settings when nothing is running here anyways, but is listed as used. Thanks!
Linux is like a child. You give your heart and soul to it, and watch it flourish.
Offline
Remove the TCP from the lsof command, I doubt whatever is on there is explicitly exposes TCP. Do you have another console started MPD already running? Do you have both the system wide and the --user daemon enabled now (you'd want only the latter)?
Last edited by V1del (2022-09-30 14:55:18)
Offline
Post the otput of
ss -lenp | grep -E '(mpd|6600)'
The IPv6/IPv4 collison is "normal", https://wiki.archlinux.org/title/Music_ … efore_IPV4
Also
bind_to_address "/tmp/.mpd.socket"
and referencing the socket in your ncmpcpp config will allow ncmpcpp to add/play local files from your drive w/o having to add them to the database.
Online
❯ lsof -i :6600
~
I disabled the system wide daemon disabled and stopped, my --user daemon is the only active now. I was able to bind the bind_to_address to 127.0.0.1 and now I'm able to connect ncmpcpp and the songs import and play with no issues.
ss -lenp | grep -E '(mpd|6600)'
tcp LISTEN 0 5 127.0.0.1:6600 0.0.0.0:* users:(("mpd",pid=1313399,fd=9)) uid:1000 ino:44576516 sk:1022 cgroup:/user.slice/user-1000.slice/user@1000.service/app.slice/mpd.service <->
~
My only issue now is that I can't change the volume inside ncmpcpp, or even with mpc.
mpc volume 10
MPD error: Failed to set mixer for 'ALSA sound card'; no such mixer control: software
and also
mpc volume 10
MPD error: Failed to set mixer for 'ALSA sound card'; no such mixer control: PCM
mixer_control "software" was used to fix the same issue for this forum entry. https://bbs.archlinux.org/viewtopic.php?id=88570
I also checked the Troubleshooting section but I don't see this listed. Any more help on this would be appreciated!
Linux is like a child. You give your heart and soul to it, and watch it flourish.
Offline
audio_output { type "alsa" name "DSD Output" }
You explicitly selected alsa - do you use pulseaudio or pipewire?
mixer_control "software" was used
Please post an updated config file and the output of
amixer
aplay -L
pactl list
Online
Thanks seth! It was my config. As you stated, I had set alsa, but I use pulseaudio currently.
Updated my config to
audio_output {
type "pulse"
name "ALSA/PulseAudio"
}
Everything works as intended. Thank you for all of the help, and I will mark this as solved.
Linux is like a child. You give your heart and soul to it, and watch it flourish.
Offline