Red Hat Bugzilla – Bug 98521
make apm-script ACPI aware
Last modified: 2015-03-04 20:12:36 EST
Description of problem:
today, the /etc/sysconfig/apm-scripts/apmscript uses "apm" to find out the
state of the AC adaptor to be connected. This does not work on recent laptops
who only have ACPI support built in.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. take an ACPI only laptop
2. run "apm"
3. get error msg about "no apm support in kernel"
4. this will break the apmscript
no change of CPU Frequency
should change the CPU Frequency
please find attached patch for apmscript
Created attachment 92733 [details]
patch to make /etc/sysconfig/apm-scripts/apmscript ACPI aware
But, if you're using ACPI, you wont get APM events, you can't suspend with APM, etc.
The long term solution is to have a single differnt script that multiplexes
events received from both systems.
this is not entirely correct, as the ACPID will call a
script /etc/apm/apm_proxy by default, if that is replaced with a call
to /etc/sysconfig/apm-scripts/apmscript (which takes the same parameters btw),
it will very well do all actions as outlined in the patch.
Of course, we could add a second script for ACPI only, but at the end, they
will do the same (lock X, DMPS standby for the display, shutdown hard disks,
eject/reinsert PCMCIA, stop sound programs, etc.) so I think it is better to
have a single script as to maintain two.
Ugh, remove 'different' from my first comment, that's what I was trying to say.
I see no code in acpid that calls a proxy script, only in apmd.
Yeah, to be percise, acpid call various action scripts, based on its configuration. :) On their web page is a set of scripts, which call an apm proxy script by default... so, thatsvwhat I am referring to, sorry
Which webpage is that? Looking at the sourceforge acpid page, I don't see
anything like that.
I was on vacation, sorry for the late answer.
Here is the URL I got the scripts from. They are currently not (as you noticed)
included in the main acpid distribution, I was under the impression they where.
Anyway, I think applying the patch still makes sense, as it can be used as a
common ground for APM/ACPI related events.
Just my 2 cents :)
no longer needed