All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Abernathy <jfabernathy@outlook.com>
To: "Burton, Ross" <ross.burton@intel.com>
Cc: "yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: ACPI powerbtn
Date: Wed, 4 Feb 2015 15:17:34 -0500	[thread overview]
Message-ID: <BAY169-W1064765206DCA2D9A5302CCAE3A0@phx.gbl> (raw)
In-Reply-To: <BLU437-SMTP718143271D06CCD988046BAE3A0@phx.gbl>

[-- Attachment #1: Type: text/plain, Size: 1502 bytes --]

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@outlook.com
Date: Wed, 4 Feb 2015 07:36:27 -0500
To: ross.burton@intel.com
CC: yocto@yoctoproject.org
Subject: Re: [yocto] ACPI powerbtn


On Feb 3, 2015, at 4:34 PM, Burton, Ross <ross.burton@intel.com> wrote:
On 3 February 2015 at 21:30, Jim Abernathy <jfabernathy@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@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto 		 	   		  

[-- Attachment #2: Type: text/html, Size: 2437 bytes --]

      reply	other threads:[~2015-02-04 20:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03 21:30 ACPI powerbtn Jim Abernathy
2015-02-03 21:34 ` Burton, Ross
2015-02-04 12:36   ` James Abernathy
2015-02-04 20:17     ` Jim Abernathy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BAY169-W1064765206DCA2D9A5302CCAE3A0@phx.gbl \
    --to=jfabernathy@outlook.com \
    --cc=ross.burton@intel.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.