[yocto] ACPI powerbtn
Jim Abernathy
jfabernathy at outlook.com
Wed Feb 4 12:17:34 PST 2015
Okay, I found a solution that works for core-image-base for NUC.
1. create /etc/acpi/events/powerbtn
event=button[ /]power
action=/etc/acpi/powerbtn.sh
2. create /etc/acpi/powerbtn.sh
#!/bin/sh
# /etc/acpi/powerbtn.sh
# Initiates a shutdown when the power putton has been
# pressed.
/sbin/shutdown -h now "Power button pressed"
3. reboot
From: jfabernathy at outlook.com
Date: Wed, 4 Feb 2015 07:36:27 -0500
To: ross.burton at intel.com
CC: yocto at yoctoproject.org
Subject: Re: [yocto] ACPI powerbtn
On Feb 3, 2015, at 4:34 PM, Burton, Ross <ross.burton at intel.com> wrote:
On 3 February 2015 at 21:30, Jim Abernathy <jfabernathy at outlook.com> wrote:
I need to add something that will 'shutdown -h now' when the power button is pressed. I would figure that ACPI is already included in the core-image-base of the NUC bsp.
Do I need to include a new file in /etc/acpi/events or do I need to include some package?
I'm literally signing off for the day but for what it's worth core-image-sato does that already on my NUC, so there must be something in that image that makes it work... maybe acpid or acpi-support isn't part of core-image-base?
Ross
I went back and built core-image-sato and the power button does nothing. I don’t see anything in the /etc/acpi/events directory. Same as core-image-base.
Jim A
--
_______________________________________________
yocto mailing list
yocto at yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20150204/30800c37/attachment.html>
More information about the yocto
mailing list