Re: [ACPI-sppt] acpi power event

Derek Broughton <[email protected]>
Newsgroups gmane.linux.acpi.support
Organization Pointer Stop Consulting
Message-ID <[email protected]>
From: "Jack Coates" <[email protected]>

> /etc/acpi/events/power :
> # change screen brightness and CPU speed
> event=ac_adapter.*
> action=/etc/acpi/actions/powerchange
>
>
> /etc/acpi/actions/powerchange
> #!/bin/sh
> status=`sed "s/state: *//" /proc/acpi/ac_adapter/ACAD/state`
> case $status in
>         "on-line"       )       /usr/bin/spicctrl -b 255
>                                 exit 0
>                                 ;;
>         "off-line"      )       /usr/bin/spicctrl -b 100
>                                 exit 0
>                                 ;;
>         esac
> echo "Something bad happened!"
> exit 1
>
> The power button > halt-dialog thing works nicely. If I run
> /etc/acpi/actions/powerchange manually, it works properly. But it
> doesn't catch the event on a regular basis. Is there a typo in
> /etc/acpi/events/power that I'm just not seeing?
>
I'm not sure I understand your problem.  What's spicctrl do?  Are you saying
that if you unplug power, instead of running powerchange it runs default.sh
(which would probably produce messages like that)?  If so, you must be defining
some other event that invokes default.sh before this one that invokes
powerchange (it certainly looks as though this rule should invoke powerchange).

derek



-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.