[plug] Standby and Power consumption

Craig Ringer craig at postnewspapers.com.au
Thu Jul 10 12:09:38 WST 2003


>>I'd love to see reliable power management in Linux, but it sure isn't 
>>there yet. At the moment, boot times matter to anybody who cares about 
>>their power bill or has environmental concerns about their power 
>>consumption.
> 
> The problem is one of drivers.

Rather a lot of the drivers, actually. Far too many are not PM-event 
aware or don't handle restores correctly.

> and most IDE
> hard drives have motor-stop facilities.

They do. Unfortunately, there's no nice in-kernel support for it, you 
need to spin them down using hdparm or some userspace daemon. Since the 
kernel doesn't say "spin this drive down" it doesn't stop synching the 
filesystems and doesn't change its swap policy. The drive is inevitably 
spun back up again quickly. What needs to happen is intelligent spindown 
- "I'm going into idle now, so I'll make sure I have everything I'm 
likely to need in memory and make a best effort to avoid accessing the 
disk until the user asks for something I simply don't have."

I can spin down my other two disks for long periods, but my boot drive 
only stays spun down for a few seconds.

> A small system could get
> down to 20W or less in "Monday-itis" mode depending on how slow the
> CPU is running, what you can shut off and be reasonably sure that
> it'll come back alive in reasonable time when you need it.

True, if you have a CPU you can step down and a way of telling high 
power consumption peripherals (video card etc) to go into low power 
mode. Noise is also an issue though - people want the computer to appear 
'off' ie no cooling fans active, etc.

This is what APM suspend and ACPI S3 are for anyway - "turn off but 
retain power to the memory so I can restore quickly."

S4 is needed for a lot of things though, especially when dual booting. 
It is quite possible to hibernate win2k to disk, then boot linux, go 
about your business, reboot, and restore win2k. If one could suspend 
linux to disk in the same way, it'd be a delight. So long as neither OS 
writes to each other's filesystems, all is well. I use this on my laptop 
a lot (admittedly, win2k tends to be hibernated for weeks or months at a 
time, but it comes up in about 15 seconds when I need it).

> Suspend-to-disk is a bit of a problem if you have many differnt
> devices plugged in. The restore process must re-instate the device
> states completely, when asked to wake up. Often, those states are
> difficult or impossible to determine.

True. Then again, win2k can do it - it's clearly possible, and possible 
to make work reliably across a wide range of hardware. It could be that 
big changes would be needed to the way the kernel initialises before 
restore-from-disk can work reliably in linux, though. From what I've 
heard I certainly get the impression that power management has been at 
"I don't care at all" priority since day one.

Craig Ringer




More information about the plug mailing list