Power button and /dev/input/event0 on 4.1.10-bone16

Dear all,
I tried to upgrade my kernel version (from 3.8 to 4.1.10-bone16) of my BBB.
It looks like with the new kernel, the /dev/input/event0 related to the power button is not created and I need it to monitor the power button status (I would like to avoid the i2get command).

I am not so sure if it is the same problem shown here:

https://groups.google.com/forum/embed/?place=forum/beagleboard&showsearch=true&showpopout=true&showtabs=true&hideforumtitle=true&parenturl=http%3A%2F%2Fbeagleboard.org%2FCommunity%2FForums#!searchin/beagleboard/power$20button|sort:date/beagleboard/Lr1NbU0fdGg/vPVJzqHjBwAJ

Can you help me to fix it?

Thanks
Alberto

It's the same patch... copy it over and rebuild..

Regards,

Dear Robert,
thanks for the answer. With the patch now the /dev/input/event0 is created.
Now, when the BBB is running and I push the Boot Button, it starts the shutdown procedure, while in the previous kernel version (3.18) it does not.
It could be nice for me to have the same behaviour of the previous kernel (I would like to have not a shutdown in case of accidental button pressure) → I would like to monitor the button status by checking event0 avoiding to have a shutdown when I push it.
Is there a patch to do that? Or could you show me where I should modifiy the kernel to do that?
Thanks a lot for your help.
Regards.
Alberto

iirc power button input event is routed to acpid. See the /etc/acpi for the actual shutdown script.

Thanks for the answer.
It seems there is not /etc/acpi. I guess it is done somewhere else.
Any ideas?

systemd:

https://github.com/systemd/systemd/blob/master/src/login/70-power-switch.rules#L13

Regards,

Great!!!
It works. Thans a lot for all your effort.
Regards.

Alberto

I think I’m missing something, and I wonder if Robert C. Nelson would chime in. I’m trying to EN-able (not disable) the power button to run a custom script when pressed. I’ve searched online and have found a lot of related questions but not an approach that I can get to work…

I’m running kernel pixelite 4.1.34-bone-rt-r24, inside of a distro based off of the wheezy console image of 2015-11-03.

The systemd rules seem to DISable the power button (I think), and they are present on my system. But commenting them out doesn’t seem to re-enable the functionality. Fwiw I have acpid installed and active, but it doesn’t seem to work.

Thanks in advance for any pointers you (or anyone else) could provide,
Dave