cancel
Showing results for 
Search instead for 
Did you mean: 

Power button doesn't trigger shutdown

harm
Associate

Hi,

 

 

I have an STM32MP1 MPU based module running OpenSTLinux.

Whenever I press the power button, this gets recorded in journalctl:

root@STLinux:~# journalctl --unit systemd-logind --follow
-- Logs begin at Fri 2020-02-07 15:50:56 UTC. --
Jan 22 15:15:37 STLinux systemd-logind[919]: Session c1 logged out. Waiting for processes to exit.
Jan 22 15:15:38 STLinux systemd[1]: Stopping Login Service...
Jan 22 15:15:38 STLinux systemd-logind[919]: Removed session c1.
Jan 22 15:15:38 STLinux systemd[1]: systemd-logind.service: Succeeded.
Jan 22 15:15:38 STLinux systemd[1]: Stopped Login Service.
-- Reboot --
Jan 22 15:15:45 STLinux systemd[1]: Starting Login Service...
Jan 22 15:15:48 STLinux systemd-logind[921]: Watching system buttons on /dev/input/event0 (pmic_onkey)
Jan 22 15:15:48 STLinux systemd-logind[921]: New seat seat0.
Jan 22 15:15:48 STLinux systemd[1]: Started Login Service.
Jan 22 15:15:56 STLinux systemd-logind[921]: New session c1 of user root.
Jan 23 07:05:00 STLinux systemd-logind[921]: Power key pressed.
Jan 23 07:05:02 STLinux systemd-logind[921]: Power key pressed.
Jan 23 07:05:05 STLinux systemd-logind[921]: Power key pressed.
Jan 23 07:05:07 STLinux systemd-logind[921]: Power key pressed.

 

But nothing else happens.

How can I make my system shut down when I press the power button?

 

This is /etc/systemd/logind.conf:

# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See logind.conf(5) for details.

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=yes
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
HandlePowerKey=poweroff
HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchExternalPower=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192

 

Thanks.

1 REPLY 1
harm
Associate

I'm still stuck on this. If anyone needs more information, I'd be happy to provide this.