Page 1 of 1

How to set Power Button BBB?

PostPosted: 15 Mar 2018, 21:36
by matiasz8

I have been looking for information to modify the Power Button of my BeagleBone Black, but I can't find anything.

The manual says It's posible modify the behavior when you press It.

Thanks a lot!

Re: How to set Power Button BBB?

PostPosted: 14 Jan 2019, 14:19
by AllFunk30
It sounds like you are, at least, experiencing the *documented* behavior of the pwr button now. You need to hold it down for a few seconds until the pwr LED goes out, but if you keep holding it down after that, the card will reboot.

What is the *desired* behavior? Is it that you want to push the button momentarily, and that would cause a controlled shutdown? If so, I think you have three options:

1) Find the kernal module that processes non-maskable interrupts and work on that. I personally think this is a very aggressive move, and there are easier paths.

2) Add a small amount of additional hardware to support this function. You would a need hardware latch (activated by your own button) that would pull the pwr button line low, but release it when the pwr LED goes out. This could be accomplished perhaps simply by powering your latch from VDD_3V3AUX. Alas, there is a simpler path in #3...

3) It would not be hard to write a system service that would monitor a regular GPIO pin and do a 'shutdown -h' when that pin was pulled low. This has been discussed previously in the thread. You would need to write just a few lines of code in whatever language you are comfortable with. You could even script it with python. There are descriptions of how to kick off your app as a systemd service around (you do not need to look very hard). It is easy. You could have this done before bed-time.