PowerSavingMode

Power Saving Mode

Status

Introduction

Battery usage should be minimized. (Power saving for all desktop computers would be save money and be ecological too.)

Rationale

When you travel by plane and so on, it is not usually possible to connect your laptop to a power source. Use of wireless or cdrom devices is not allowed. Yet these devices are activated by default and spend memory and energy, reducing the power of your battery. Applications should be discouraged from engaging in power-consuming activities when on battery power.

Use case

Juanje is taking a flight to a work meeting. He needs to finish a presentation and some code on his laptop before he arrives, but the flight will take longer than his laptop's battery will last. It should be possible to extend battery life by disabling wireless (which will probably not be provided and/or allowed by the airline anyway!) and by ensuring that background applications do not spin the disc up unnecessarily.

Implementation Plan

  • Applications that touch the disk should be identified - laptopmode can be made to log disk I/O by setting /proc/sys/vm/laptop_mode to 2. Once identified, the disk use should be examined. As an example, Postfix may have regular checks for spool processing - these should be less frequent when on battery.

    • cupsys logging should go to syslog rather than files
    • all syslog log files should be prefixed with '-' to make them buffered and not flushed immediately. Though in theory this /could/ lead to loss of some logging data, IMO in practice that will rarely occur, especially on a stable laptop with battery backed power.
  • A script to power down the wireless hardware exists. This should be callable from NetworkManager (see MacOS X's wireless enable/disable option).

    • I found that some, if not all, of the WIFI driver modules in the Linux kernel will power down the interface when the module is unloaded with 'modprobe -r'. If the module stack is set up right in "/etc/modprobe.d", that would be sufficient if the driver does not support a "/sys/**/power" interface, right?
  • Perhaps investigate the dynamic_hz patch? The more frequent timer tick in 2.6 kernels makes it harder for the processor to stay in power saving C states.

  • Some other drivers may result in excessive power usage even when unused. These should be identified and fixed.

Packages Affected

NetworkManager

Any package that makes unnecessary disk I/O when on battery

User Interface Requirements

NetworkManager needs a wireless enable/disable option

Outstanding Issues

UDU BOF Agenda

UDU Pre-Work

UbuntuDownUnder/BOFs/PowerSavingMode (last edited 2008-08-06 16:30:21 by localhost)