[systemd-devel] Having systemd shutdown when pressing the power button

Koen Kooi koen at dominion.thruhere.net
Thu Aug 28 01:50:51 PDT 2014


Hi,

I am working on a system (http://www.acmesystems.it/arietta) where I hooked up the button as a power key:

	https://github.com/koenkooi/linux/commit/c823e0b046efcfff61e21fa4c89d5d68090ef6de

Evtest shows it doing the right thing (issuing KEY_POWER) when being pressed, but systemd seems to totally ignore it. I've seen this behaviour in the past and noticed the DE (GNOME2, old but it works) would pick it up and present the dialog. Since this is a headless system I want systemd to handle it instead of the DE (which isn't installed).
Every doc or blog post I read says that systemd should already be handling it, but it isn't in my case. I suspect that systemd only handles ACPI powerkey events, but I haven't actually looked at the code.

Are more people experiencing this and does someone have a workaround or fix?

thanks,

Koen


More information about the systemd-devel mailing list