[linux-elitists] Simplest power management problem

Patrick Mochel mochel@digitalimplant.org
Wed Aug 23 08:17:55 PDT 2006



On Tue, 22 Aug 2006, Greg KH wrote:

> On Tue, Aug 22, 2006 at 04:52:41PM -0700, Don Marti wrote:
>> Question about power management: What if you don't
>> want to turn the device back on again?  Say you
>> have a motherboard with three different kinds of
>> storage connections and you only have one hooked up,
>> sound hardware you don't listen to because it's in
>> the server room, and USB and VGA you'll only use if
>> you're booted in single user mode for extreme live
>> nude recovery.  What devices can you turn off and
>> forget about?

Those devices should all be PCI devices, so they have the potential to 
support an "Off" state. If you do an 'lspci -vv' (as root!), you can see 
some cryptic output that relates the power state support of a particular 
device. PCI devices can support 4 states: D0 (on), D3 (off), D1, and D2. 
The latter two are rarely used and supported by very few drivers. If you 
put a device in D3, you will save some power.

But, there are caveats, and that's where things get nasty. The devices
mentioned are usually integrated onto either the Northbridge or 
Southbridge (MCH and ICH in Intel-ese). So, even though the functional 
device is in a low-power state, it's on the same package as 5 other 
devices, some of which must always be powered up. So, you might not save 
that much power in the end.

> Disable them in the bios, that's the best way to do this right now for
> Linux :(
>
> Who knows if it will really save you any power though, bioses aren't
> known for being reliable that way.

Reliable or inconsistent? If it hides a device from the OS, it's not 
required to put it in a low-power state, and it usually doesn't. Different 
BIOSes will vary, but each one is usually reliable in that it always does 
the same thing.

> If you are really brave, you can try to write a '0' to the 'power' file
> for the pci device in sysfs to turn the device off.  But you need to
> have the driver for the device loaded in order for this to work
> properly, and it doesn't always work quite right just yet...

Actually, you write a "2" to the file. "0" turns the device on. Why it is 
"2" is history in the archives, but we're stuck with it for now. However, 
it does work for at least some USB and PCI devices with drivers that 
support suspend/resume.

> Yeah, power management on Linux sucks,

Yup.

> go kick your friendly
> neighborhood Intel/AMD/chipset engineer to get them to help us out with
> the work that is needed to be done.  So far none seems to be emerging.

What do you want? Documentation or people to contribute patches?



 	Pat




More information about the linux-elitists mailing list