2

I can't get the power button to gracefully shutdown the OS.

My kernel has no configuration options for acpi, and acpid gives me the following error:

root@seco-uq7-dl-256mbx4:~# /usr/sbin/acpid
RTNETLINK1 answers: No such file or directory
acpid: error talking to the kernel via netlink

So, my guess is that I have to use udev. If I use udevadm monitor, no events get raised when I press the power switch.

After digging through the kernel source code (Linux seco-uq7-dl-256mbx4 3.0.101 #1 SMP PREEMPT Thu Jun 2 10:49:45 PDT 2016 armv7l GNU/Linux) and the imx6 drivers, I finally found something that may help me.

1. I found the power button driver in the OS at /sys/bus/platform/drivers/imx_seco_pwrb.

2. Some more info that may be helpful.

root@seco-uq7-dl-256mbx4:~# cat /proc/ectrl/events/power_button/enable
disable
root@seco-uq7-dl-256mbx4:~# cat /proc/ectrl/events/power_button/en_flash
disable
root@seco-uq7-dl-256mbx4:~# ls /sys/bus/platform/drivers/imx_seco_pwrb/
bind    uevent  unbind

3. I found /proc/ectrl/events/event_state/power_button which stores the current state of the power button.

root@seco-uq7-dl-256mbx4:~# cat /proc/ectrl/events/event_state/power_button
active
root@seco-uq7-dl-256mbx4:~# cat /proc/ectrl/events/event_state/power_button
active
root@seco-uq7-dl-256mbx4:~# cat /proc/ectrl/events/event_state/power_button
active
root@seco-uq7-dl-256mbx4:~# cat /proc/ectrl/events/event_state/power_button
inactive
root@seco-uq7-dl-256mbx4:~# cat /proc/ectrl/events/event_state/power_button
inactive
root@seco-uq7-dl-256mbx4:~# cat /proc/ectrl/events/event_state/power_button
inactive

My embedded operating system is using sysvinit.

I effectively need the power button to perform a shutdown -h now. Any ideas why it isn't currently?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.