ACPI questions about press power button
David DEMELIER
demelier.david at gmail.com
Tue Sep 7 05:07:34 UTC 2010
2010/9/5 dave jones <s.dave.jones at 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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at 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
More information about the freebsd-questions
mailing list