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

353 views
Skip to first unread message

Alberto Potenza

unread,
Oct 27, 2015, 12:38:10 PM10/27/15
to BeagleBoard
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

Robert Nelson

unread,
Oct 27, 2015, 12:44:23 PM10/27/15
to Beagle Board
It's the same patch... copy it over and rebuild..

Regards,

--
Robert Nelson
https://rcn-ee.com/

Alberto Potenza

unread,
Nov 2, 2015, 4:25:56 AM11/2/15
to BeagleBoard
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

toni incog

unread,
Nov 2, 2015, 9:43:52 AM11/2/15
to BeagleBoard

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

Alberto Potenza

unread,
Nov 2, 2015, 12:00:43 PM11/2/15
to BeagleBoard
Thanks for the answer.
It seems there is not /etc/acpi. I guess it is done somewhere else.
Any ideas?

Robert Nelson

unread,
Nov 2, 2015, 12:04:15 PM11/2/15
to Beagle Board
On Mon, Nov 2, 2015 at 11:00 AM, Alberto Potenza
<alberto....@gmail.com> wrote:
> 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

Alberto Potenza

unread,
Nov 2, 2015, 12:26:16 PM11/2/15
to BeagleBoard
Great!!!
It works. Thans a lot for all your effort.
Regards.

Alberto

Super Twang

unread,
Dec 2, 2016, 2:21:18 AM12/2/16
to BeagleBoard
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
Reply all
Reply to author
Forward
0 new messages