You are not logged in.
I've been having this issue for a while and I'm not sure what's wrong.
My MPD is configured as per the wiki to run as the local user, and I have the following line in .profile
# MPD daemon start (if no other user instance exists)
[ ! -s ~/.config/mpd/pid ] && mpdWhen I restart, or shutdown and do a clean start of my system MPD doesn't start because the PID file is left behind from the previous process.
I've tried to simplify the process for testing
1) boot to console
2) start MPD manually
3) execute systemctl reboot
When the system comes back up the old PID file is still there, preventing MPD from autostarting.
Does anyone have any ideas on what might be keeping my system from shutting down the process cleanly?
Last edited by saturn_knight (2014-04-12 07:44:48)
Offline
Why don't you just start it with a service file and let systemd manage the process?
Offline
I agree. Systemd service is the way to go. Once you have a user instance of sytsemd up and running, the service file is quite trivial.
Offline
Why don't you just start it with a service file and let systemd manage the process?
Maybe because of this: https://bbs.archlinux.org/viewtopic.php?id=178793 (thread also includes the solution for a proper mpd service file)
Last edited by Rasi (2014-04-12 07:12:00)
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
Just forget about the pid-thing and write
mpdinstead of
[ ! -s ~/.config/mpd/pid ] && mpdin your $autostartfile. Sure, that's not the ideal way, but it just works, so I why should I care any further. ![]()
Offline
Thanks for the recommendations. I was tempted to just run MPD without checking for the PID first, but it was bothering me that it used to work and I don't know what changed. Also, the fact that if MPD isn't being shut down cleanly on shutdown what else might be getting shut down in an unclean state?
The thread Rasi pointed to shows the same problem I was experiencing, not sure why it didn't come up in my searches. Apparently there is an issue with MPD not responding to the shutdown signal properly in some situations. Ultimately, I went ahead and switched to the systemd user startup and it's now remembering my playlists and current state between reboots. I guess I was initially hesitant to use it because the wiki states that it's still unsupported upstream, plus I was afraid there might be a more serious underlying problem that might affect other things on my system.
Thanks again!
Offline
Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.
Offline