You are not logged in.

#1 2011-03-05 05:48:31

jlindgren
Member
Registered: 2011-02-27
Posts: 260

"AC" or "ADP0" in /etc/acpi/handler.sh?

/etc/acpi/handler.sh has these lines which check for the AC adaptor being plugged/unplugged:

case "$1" in
...
    ac_adapter)
        case "$2" in
            AC)
                case "$4" in
                    00000000)
...

But on my laptop (Toshiba Satellite A305-S6916), any commands I put in this section didn't get run.  Some debugging showed that handler.sh was being invoked as follows when I plugged/unplugged the adaptor:

ac_adapter ADP0 00000000 00000000
ac_adapter ADP0 00000000 00000001

Sure enough, replacing "AC" with "ADP0" in handler.sh fixed the problem.  So maybe the handler.sh distributed with acpid should support both "AC" and "ADP0".

Offline

#2 2011-03-05 08:30:06

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: "AC" or "ADP0" in /etc/acpi/handler.sh?

Post a feature request in the bugtracker - the devs don't always read the forum.

Offline

#3 2011-03-05 08:42:19

jlindgren
Member
Registered: 2011-02-27
Posts: 260

Re: "AC" or "ADP0" in /etc/acpi/handler.sh?

Seems that someone else had a similar problem, which I didn't find before: https://bugs.archlinux.org/task/21767.  No indication that there are any plans to fix it, though.

Offline

#4 2011-03-05 20:42:34

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: "AC" or "ADP0" in /etc/acpi/handler.sh?

It may or may not be fixed, but clearly it's not a high priority. handler.sh as provided is a generic example, and I would think most users will change it to suit their particular requirements, as you did.

Offline

Board footer

Powered by FluxBB