Suspend on power button in cinnamon screensaver
This problem bothered me for some time: I use power button on my home PC (not a laptop) as a suspend button. It worked well except for the case when I have screen saver active. My power button is ‘seen’ but ignored by everyone. I use Cinnamon environment.
I touched ACPI scripts, but instantly run away as fast as possible because it’s a huge shell mess.
After some struggles I found this patch. I don’t know why it’s not in my cinnamon yet, but it’s really easy to apply. And it worked. I patched /usr/share/cinnamon-screensaver/util/keybindings.py
(just added MK.SHUTDOWN
), restarted cinnamon-screensaver, and it works since.
As far as I understand this problem: cinnamon-screensaver
rejects power off requests. It does not takes in account that I mapped power button to suspend function and ignores it like it is still ‘power off’. I even don’t know if I need to report this thing as a bug or not…