Skip to contentSkip to conversation

N00b Asks: Supporting Linux Power Management HOWTO?

DISCUSSION Leo L. Schwab 2 participants 2 messages Mar 12, 2005

lore
Share & tools
lore
#0 lore raw

I'm currently working on driver development for an embedded/handheld
system. We're currently using kernel 2.6.11 on an ARM-based platform, and I've already got a handful of drivers running (anyone need an I2C bus driver for a Freescale MX21?). Earlier this week, I was asked to begin work on power management -- shutting off unused devices, placing the system in suspend/standby/sleep, etc.

So I started Googling around for info on Linux power management and,
near as I can tell, there doesn't appear to be a cohesive approach to the issue. What I've managed to turn up so far is:

- APM
An older power management system, supplanted by ACPI. It seems to enjoy the most mature support in Linux, if for no other reason than it's been around so much longer. It lacks flexibility, however.
- ACPI
The current "standard" for power management. Support even on x86- platforms seems highly uneven, however, and the ACPI support code still seems to be undergoing major revisions. It also appears to be widely regarded as an unholy mess of a spec. I've also gleaned hints from LKML discussons that ACPI contains enough x86-specific material to make it a questionable choice on other platforms.
- DPM (Dynamic Power Management, http://dynamicpower.sf.net/ ) A proposal put forward by MontaVista and IBM, primarily for embedded systems (although an Intel Speedstep implementation is available). While the reference implementation is being kept current, it doesn't seem to have a lot of activity surrounding it, despite being two years old.

The functionality in each of these facilities seems to overlap
the others. DPM in particular seems to heavily overlap services provided by ACPI and exposed by 'cpufreq'. This suggests to me that one ends up redundantly implementing power support across three APIs, or that one is supposed to select a single API and stick with that. How one makes this selection is not at all clear.

Ideally, what I'd like is "the" approach that integrates most
cleanly into existing frameworks. That is, I'd like to be able to write the power management support into the drivers and platform-specific kernel files, then essentially drop a stock distro on top of it and have the largest number of scripts and tools Just Work. I would prefer, if possible, to write support for one interface rather than three (APM, ACPI, DPM) especially when two of them are still moving targets.

So, I guess what I'm asking for at the moment is:
- A brief overview of the current state and maturity of power management support in the 2.6.x kernel series,
- the currently available facilities for implementing and supporting power management,
- pointers to documents describing the facilities in detail and how to write driver and platform support for them.

I realize I well may be asking for too much -- the following LKML
thread suggests that Linux power management remains a problem under active discussion with fragmented solutions:

	http://groups-beta.google.com/group/fa.linux.kernel/browse_thread/thread/cab82562215fde4/4660291cd90cf2d2?q=power#4660291cd90cf2d2

	Nevertheless, any and all guidance would be greatly appreciated.

Please Cc: list responses to this address. My sincerest thanks in advance.

--

Leo L. Schwab -- Digital Spellweaver                   [email protected]  ..or..
 \_ -_   http://ewhac.best.vwh.net/                    [email protected]
O----^o  Recumbent Bikes: The Only Way To Fly.         (pronounced "EH-wack")
#1 lore raw

Hi Leo.

We're currently working on this. A lot of discussion has occurred in the last week or two on the PowerManagement mailing list, which you'll find on OSDL:

http://lists.osdl.org/mailman/listinfo/linux-pm

Perhaps you might like to join us and help in the hammering out :>

Regards,

Nigel

Signature · 6 lines
Nigel Cunningham
Software Engineer, Canberra, Australia
http://www.cyclades.com
Bus: +61 (2) 6291 9554; Hme: +61 (2) 6292 8028;  Mob: +61 (417) 100 574

Maintainer of Suspend2 Kernel Patches http://suspend2.net