Soft poweroff via Power Button

This forum is for supported devices using an ARMv7 Texas Instruments (TI) SoC.

Soft poweroff via Power Button

Postby IlikePepsi » Mon Jul 27, 2015 10:07 am

I have two BBBs' both running with an ArchLinuxARM image flashed onto the eMMC chip. Both boards are updated and as far as I can remeber have the same packages installed. Now there is a difference in their behavior regarding the power button. One board does a soft poweroff when pushing the power button, the other does not.

I found this guide but even with acpid no poweroff is done by the board. Are there any other recommendations on how to perform a soft poweroff?

Or could this behavior even be a result of some kind of hardware issue? How could I track down a bug like that?

Thx in advance..

EDIT: I compared the two BBBs' again and saw that the one doing a soft poweroff still was on kernel 3.14. After the update to kernel 4.1 the soft poweroff functionality was gone. So how can I restore that behavior?
IlikePepsi
 
Posts: 8
Joined: Mon Jul 27, 2015 9:26 am

Re: Soft poweroff via Power Button

Postby planeteater » Wed Jul 29, 2015 12:40 pm

On a Zyxel NAS, I had to tag the corresponding input event device with an udev rule:
$this->bbcode_second_pass_code('', '
# cat /etc/udev/rules.d/90-power-button.rules
KERNEL=="event*", SUBSYSTEM=="input", ATTRS{phys}=="gpio-keys/input0", TAG+="power-switch"
')

After this, the power button works, and I can see this in the logs:
$this->bbcode_second_pass_code('', '
# journalctl -b -u systemd-logind | grep gpio_keys
Jul 24 11:44:15 nas systemd-logind[302]: Watching system buttons on /dev/input/event0 (gpio_keys)
')
And acpid was not needed.
planeteater
 
Posts: 26
Joined: Sat Dec 29, 2012 2:44 pm

Re: Soft poweroff via Power Button

Postby IlikePepsi » Wed Jul 29, 2015 2:45 pm

@planeteater: Thank you for that suggestion, using a udev rule seems to be a convenient way to monitor pin events. Unfortunately the power button is not tied directly to the CPU of the beaglebone black but to a Power Management IC (PMIC) on the board. This Controller is tied to the CPU via I2C and i guess some configuration has to be made that the PMIC forwards the power button event to the CPU.

Here is a link to the beaglebone schematics (Rev C). On page 2 the POWER_BUTTON is connected to signal PWR_BUT which ends up on the PMIC and one of the expansion headers.
IlikePepsi
 
Posts: 8
Joined: Mon Jul 27, 2015 9:26 am


Return to Texas Instruments (TI)

Who is online

Users browsing this forum: No registered users and 4 guests

cron