As the title says, I'm trying to stop Clementine playback using DBus before entering suspend mode. Here is my service file right now:[Unit]Description=Stop Clementine playback before suspendRequires=dbus.serviceBefore=sleep.targetBefore=dbus.service[Service]User=joType=oneshotExecStart=-/bin/sh -c 'qdbus org.mpris.clementine /Player org.freedesktop.MediaPlayer.Stop'[Install]WantedBy=sleep.targetNow, this works, i.e. playback is stopped. However, systemd then proceeds to take a long time to actually enter suspend mode. Looking at the logs in journalctl, I see:Jun 05 23:43:53 localhost.localdomain systemd[1]: Starting Suspend...Jun 05 23:44:18 localhost.localdomain systemd-sleep[7052]: Error: org.freedesktop.DBus.Error.NoReplyJun 05 23:44:18 localhost.localdomain systemd-sleep[7052]: Did not receive a reply. Possible causes include: the remote application did not send a reply, the Jun 05 23:44:18 localhost.localdomain systemd-sleep[7052]: Suspending system...My first thought is that the DBus system, or maybe Clementine itself is suspended before it has time to reply, thus causing a hang. This is why I tried adding a dependency to the dbus service in my service file above. However, that does not do the trick.Any ideas?
how to stop Clementine playback on suspend using systemd
fedora;systemd;suspend