This is a cache of https://discuss.96boards.org/t/unmapping-power-button-in-debian/6689. It is a snapshot of the page at 2024-09-19T10:06:48.388+0000.
Unmapping Power Button in <strong>debian</strong> - DragonBoard410c - 96Boards Forum

Unmapping Power Button in debian

In the process of migrating from a custom Linux distro (built with Bitbake) to using the default Linaro debian release.

On our old distro, we have been using the /dev/input/event0 endpoint to get events from the power button, and, for a reason I can’t figure out, the power button wasn’t setup to reset/power the device.

What is the cause of the mapping of the power button to reset the OS for debian? And, how can I unmap this relationship?

The Power button is connected to a pin of the board pmic (pm8916). The device tree, describing the hardware assigns this pin to the KEY_POWER Linux code:

The KEY_POWER value is then generated via the input event interface.

The user space init process (systemd) listens for events on /dev/event interface and causes the shutdown/reboot on KEY_POWER event detection:

So you can either remove the KEY_POWER linux-code from the device tree node or inhibit the systemd power-off action by setting HandlePowerKey=ignore in /etc/systemd/logind.conf.

thank you so much!
Greatly appreciate the quick response!