[ltp] When/where/what for low power consumption?

Felix E. Klee linux-thinkpad@linux-thinkpad.org
Wed, 16 Nov 2005 16:59:39 +0100


Macskasi Csaba wrote:
> I load the powersave governor per default on my R51. 500 mhz is enough 
> for  everything. imho.
> When I need power I switch to performance...

Why to "performance" and not to "on_demand"?  I find that "on_demand" 
works very well (i.e. freq is changed on the fly as needed), so there 
should be no need for "performance".  Nevertheless, when running on 
batteries, I'd prefer to have "powersave" the default since sometimes 
e.g. the web browser demands power, unneccessarily.  That's why I asked 
*where* and *when* people are turing on/off powersaving modes.  So far, 
noone has made a statement on this issue.  I'm looking for an elegant, 
easy to maintain solution, but AFAICS it should be rather simple:

* Prepare two scripts, one for setting the system into low power
   consumption mode, and one for setting the system into high power
   consumption mode

* On startup have the system check whether it's running on batteries and
   run the appropriate script.

* If there is an ACPI event indicating attachment/detachment to/from
   mains, run the appropriate script.

Now, some questions remain:

* What ACPI events indicate attachment/detachment to/from mains (I
   should be able to find that out myself)?

* How do I find out whether the system is running on batteries on
   startup (probably using "/proc/acpi/ac_adapter/AC/state")?

Am I missing something?

-- 
Felix E. Klee