LKM shutdown


We developed an LKM for the Beaglebone Black running Debian which runs an ISR that responds to power loss on a GPIO pin. The proper way to shutdown the beaglebone in user space is “sudo shutdown -h now”. However, this does not work in linux kernel space. Our solution was to import

#include <linux/reboot.h>

and use


Is this the proper way to shutdown the Beaglebone in kernel space? Viewing the kern.log it seems to work but the status LEDs remain on.


It's actually an acpi call through the Real TIme Clock to properly
shut it down..

Ever since we moved to systemd, you can use:

sudo systemctl poweroff

Pre-Systemd era, we relied on the acpi package to be installed to
property shut things down..

so yeah, trace what "systemctl poweroff" does and then it'll work..


As always very helpful… Thank you Robert.