Re: [ACPI-sppt] acpi power event

Jack Coates <[email protected]>
Newsgroups gmane.linux.acpi.support
Organization Monkeynoodle.Org
Message-ID <[email protected]>
On Thu, 2003-06-12 at 13:50, Derek Broughton wrote:
> From: "Jack Coates" <[email protected]>
> 
> > On Thu, 2003-06-12 at 07:01, Derek Broughton wrote:
> > > From: "Jack Coates" <[email protected]>
> > >
> > > > 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?
> >
> > Sorry -- the problem is that ACPI ac_adapter events aren't triggering
> > the script.
> >
> > spicctrl adjusts screen brightness on my laptop. Idea is to decrease
> > brightness when using battery.
> >
> > I don't have an /etc/acpi/default.sh at all, and nothing in
> > /etc/acpi/events is calling it anymore... Here's a question though. How
> > are events matched? Do the file names in /etc/acpi/events matter at all?
> > Would a single match file make more sense than separate battery, button
> > & power files? That would make it easier to specify a fall-through
> > action (logger "handler for event foobar not defined").
> 
> Very strange, because the behaviour you're seeing is consistent with running the
> default.sh script.
> 
> afaict from the man page, you can't put more than one rule in a file, but ALL
> rules are tested for each event - so even if you were still running the default
> script, it should be running your AC script.  I hate to ask the stupid question,
> but did you restart or SIGHUP acpid?
> 

yeah, swsusp doesn't work well on my setup yet, so I reboot frequently.

> You might try stopping the daemon and use "acpid -d" (or -d -d -d ...) to see if
> it tells you anything helpful.
> 
> derek
> 

quite helpful actually, though it still isn't working :-)
[jack@chupacabra jack]$ sudo /usr/sbin/acpid -d
[Thu Jun 12 15:45:13 2003] starting up
[Thu Jun 12 15:45:13 2003] DBG: parsing conf file /etc/acpi/events/power
[Thu Jun 12 15:45:13 2003] DBG: parsing conf file
/etc/acpi/events/battery
[Thu Jun 12 15:45:13 2003] DBG: parsing conf file
/etc/acpi/events/button
[Thu Jun 12 15:45:13 2003] 3 rules loaded

Unplugged power

[Thu Jun 12 15:46:16 2003] received event "ac_adapter ACAD 00000080
00000000"
[Thu Jun 12 15:46:16 2003] DBG: 0 total rules matched
[Thu Jun 12 15:46:16 2003] completed event "ac_adapter ACAD 00000080
00000000"
[Thu Jun 12 15:46:16 2003] received event "processor CPU0 00000080
00000000"
[Thu Jun 12 15:46:16 2003] DBG: 0 total rules matched
[Thu Jun 12 15:46:16 2003] completed event "processor CPU0 00000080
00000000"

Plugged power back in

[Thu Jun 12 15:46:18 2003] received event "ac_adapter ACAD 00000080
00000001"
[Thu Jun 12 15:46:18 2003] DBG: 0 total rules matched
[Thu Jun 12 15:46:18 2003] completed event "ac_adapter ACAD 00000080
00000001"
[Thu Jun 12 15:46:18 2003] received event "processor CPU0 00000080
00000000"
[Thu Jun 12 15:46:18 2003] DBG: 0 total rules matched
[Thu Jun 12 15:46:18 2003] completed event "processor CPU0 00000080
00000000"


This is quite odd. I've tried a ton of variations on ac_adapter, and not
even event=* produces any change in the above output (yes, restarted
acpid after each change).

I'ven even copied my script into /etc/acpi/default.sh and it still
doesn't run...

-- 
Jack Coates
Monkeynoodle: A Scientific Venture...
http://www.monkeynoodle.org/resume.html



-------------------------------------------------------
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.