You are not logged in.
Hi,
I have a full systemd host (laptop, thinkpad x201), without acpid running and the following in /etc/systemd/logind.conf :
HandlePowerKey=always
When hitting the power key, the system goes to halt. What I'd like to do is to poweroff instead.
- If I call "systemctl start poweroff.target", it powers my computer off.
- In the source code of logind (in logind-button.c), I saw it's supposed to call poweroff.target:
core/special.h: #define SPECIAL_POWEROFF_TARGET "poweroff.target"
logind-button.c: r = bus_manager_shutdown_or_sleep_now_or_later(b->manager, SPECIAL_POWEROFF_TARGET, INHIBIT_SHUTDOWN, &error);So, what can I do to poweroff when hitting the power button ?
Note: I know about this and it's not helpful: https://bbs.archlinux.org/viewtopic.php?id=148212
Thanks,
Charles
Last edited by cgo (2012-09-18 20:09:16)
Offline
Hi,
If I set the log level to debug and output it to the console (in systemd.conf), then hitting the power button powers my computer off. Without it, the system is halted but the computer stays on.
Real strange... Maybe it's more a hardware-related problem.
Offline
Ok, I found the problem... It was just a configuration I had in i3 config (bindsym XF86PowerOff exec sudo /sbin/halt). i3 catches the key before logind most of the time.
I found it by enabling journal persistent storage.
Silly me.
Last edited by cgo (2012-09-18 20:11:49)
Offline