Brief background information: I just installed Fedora 18 with Gnome 220.127.116.11 on my computer. It is connected to a Windows share (CIFS) containing music, which I play using Clementine. If I suspend the computer while Clementine is playing a song from the CIFS mount, upon resuming, it (Clementine) hangs. Eventually, if I try to restart/power off, the whole computer hangs. My workaround to this is to stop playback upon suspension.
My problem: I've created a script in
/usr/lib/systemd/system-sleep to stop playback (using MPRIS). The script successfully runs before suspend if I execute
However, it does not run if I click on Suspend from the User menu in Gnome3. Doing some legwork, I uncovered that Gnome3 relies on UPower, which itself, it seems, simply uses DBus to issue the "Suspend" command. I'm not savvy enough to follow the trail any further, but from what I can see, the script never gets executed.
My question: How can I make the Suspend menu item in Gnome3 use systemd to call my script?