Date: Tue, 7 Sep 2010 07:07:33 +0200 From: David DEMELIER <demelier.david@gmail.com> To: dave jones <s.dave.jones@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: ACPI questions about press power button Message-ID: <AANLkTi=fNmv_m7iLLr8ij1fAOC_7RKVVxz-06iKkjKWS@mail.gmail.com> In-Reply-To: <AANLkTi=L9qLO%2BqX_ik63Q1mrTEMgzLLRDFKndc%2Bv-u=a@mail.gmail.com> References: <AANLkTi=L9qLO%2BqX_ik63Q1mrTEMgzLLRDFKndc%2Bv-u=a@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
2010/9/5 dave jones <s.dave.jones@gmail.com>:
> Hello,
>
> I'm running FreeBSD 8 on my desktop. I want to write a file or do something
> when I or someone presses power button. In devd.conf, I added the
> following lines
> for testing:
>
> notify 10 {
> match "system" "ACPI";
> match "subsystem" "Button";
> matcho "notify" "0x00"
> action "echo hello world";
> };
>
> But it doesn't work. Would anyone tell me how to do? Thanks.
>
> Regards,
> Dave.
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>
I think, you must first disable this setting because S5 is the default
behavior when pressing the power button, it calls /etc/rc.shutdown.
hw.acpi.power_button_state: S5
Disable it with sysctl hw.acpi.power_button_state=NONE and add this
line to /etc/sysctl.conf. And then maybe the power button will be
released for an other purpose?
Kind regards.
--
Demelier David
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=fNmv_m7iLLr8ij1fAOC_7RKVVxz-06iKkjKWS>
