I'm trying to get my sound theme all working how I want it.
Reading the sound naming spec by freedesktop, it has an entry "suspend-start" and "suspend-end", which is supposed to fire when the machine is "about to suspend", and then when "the machine has returned from a suspended state" as well as the "system-ready" and "system-shutdown" entries. I've got most of the sounds working in the theme, except for these.
I am running arch Linux with
systemd controlling my power stuff. I'm also running gnome3.
I have another script at
/usr/lib/systemd/system-sleep/, which turns off and on my USB ports, when the system goes into suspend and hibernate mode and back on when the system thaws or resumes.
So I figured that I could just call
canberra in a similar fashion. I created another script just like the one for my USB for the sounds:
#!/bin/sh # File: /usr/lib/systemd/system-sleep/sound.sleep case $1/$2 in pre/*) # Play suspend-start exec canberra-gtk-play -i "suspend-start" ;; post/*) # Play suspend-resume exec canberra-gtk-play -i "suspend-resume" ;; esac
While I can see in the journal that it is run, it doesn't put out any sound. I'm not sure about why, but I have a feeling that the audio system has already gone down by the time this is called. (Don't quote me on that, I have nothing more than, "it doesn't work, but it should" to base it on.)
This isn't super important, but just something I would kind of like to figure out more for fun. If anyone has any suggestions or ways to actually get it working, that would be fantastic.
If you need anything more, just comment.
Extra System information:
- Arch linux
- GNOME Shell 3.12.2
- pulseaudio 5.0
- alsactl 1.0.28 (Basically, I also have alsa sound)