Various tweaks to improve battery life

Registered by Martin Pitt

The OEM team has a list of power management tweaks which improve battery life. Review what can be done by default (and how).

Blueprint information

Martin Pitt
Michael Frey
Needs approval
Martin Pitt
Series goal:
Accepted for lucid
Milestone target:
milestone icon lucid-alpha-2
Started by
Martin Pitt
Completed by
Martin Pitt

Related branches



Work items:
create new pm-utils-powersave-policy package: DONE
pm-utils-powersave-policy MIR/seed: DONE
enable SATA power link management in pm-utils-laptop-policy: DONE
raise dirty_writeback_centisecs on battery in pm-utils-laptop-policy: DONE
consult linux upstream about hda_intel codec power management: DONE
[crimsun] enable hda_intel codec power management by default if it is considered sane: DONE
ensure that ubuntuone daemon is not started unless enabled (huge power drain): DONE
[amitk] package new powertop (1.12?) and additional kernel patches: DONE
check desktop bits which keep waking up the disk: DONE
fix network-manager to not perpetually update gconf values with "last seen" times (it doesn't, that's "last connected"): DONE

Work items for (ubuntu-10.04-beta-2):
review hda_intel codec power management by beta-2, revert if too buggy (already reverted): DONE
ensure that fingerprint USB device is not powered on unless fprint/thinkfinger are installed: DROPPED

pitti, 2009-11-27: Michael, would you want to start drafting this, since you have the best insight in what needs to be done? After that I'm happy to update it with some platform-side considerations.

pitti, 2009-12-08: Cleaned up whiteboard by removing redundancy and reordering

pitti -- Are there actually any tweaks which are machine specific? For them, the power.d scripts can just check /sys/class/dmi/id/{product_name,board_vendor,...}

pitti, 2009-12-11: Created pm-utils-powersave-policy package with sata link power and dirty writeback scripts, uploaded to NEW.

pitti, 2010-03-29: Dropped disabling of fingerprint reader. It does not cause a measurable number of wakeups or power drain, and since it does not use a particular kernel driver it's not obvious how to disable it in userspace. See for powertop dump (on a tangent, it seems that the lucid kernel regressed severely in power consumption :-( )

= SATA power link management =
 * offered by powertop
 * toggled in sysfs attribute
 * some situations where it has a severe performance (throughput) impact (like 3 second delay when switching windows)
 * particularly painful for low-memory systems -> check for minimum RAM?
 * only enable on battery mode
 * laptop-mode-tools also provides an interface for managing this (but we won't install that by default any more)
 * needs to set /sys/class/scsi_host/hostN/link_power_management_policy to 1

= hda_intel codec power management =
 * Caused lots of bugs in karmic (crackling/popping), was tried already
 * upstream pulse/alsa are working on it
 * Currently enabled in lucid; works for one chipset, but not for some others, Daniel is currently working on this
 * See for regressinos reported earlier
 * Not enabled by default upstream yet; OpenSUSE enables it on battery, and Daniel Chen is currently implementing it for less common HDA chipsets

= /proc/sys/vm/dirty_writeback_centisecs =
 * powertop routinely recommends changing, and it's a setting that laptop-mode-tools adjusts by default

= nVidia PowerMizer =
 * have different levels of aggressiveness
 * need to check for stability problems
 * on Radeon - similar to PowerMizer, but not even remotely release-ready:
 * already enabled by default; quoting upstream:

   "The driver already enables PowerMizer by default, and will connect to
   acpid to try to determine the system power state to adjust the
   PowerMizer strategy accordingly. These PowerMizer policies are
   carefully chosen by the laptop manufacturers, and setting the various
   RegistryDwords options overrides them which could lead to poor
   performance, system instability, or in the worst case, overheating. I
   recommend not ever setting any options using RegistryDwords."

= ubuntuone =
 * inotifies a large tree
 * ensure that daemon is not started unless you enabled it

= unnecessary modules =
 * bluetooth enabled by default, few people use it
  * bluetooth keyboards: need a way to make sure it's turned on when needed, and we don't have a way today to check that it's needed unless it's already on
  * suggestion for fresh install: keep on in ubiquity, switch off by default if installation detects bluetooth input devices
   * not for lucid; depends on persistent bluetooth state (below)
 * 3g cards can't be disabled eparate from wifi easily
   - perhaps should be disabled unless selected, or in auto mode, could store last state like suggested for bluetooth?
   * then how do you enable it?
    - select it from the network manager applet, it shows up as a network selection
    - turn it on with rfkill - rfkill from commandline isn't a reasonable user experience (current problem)
    - cycle through with hot key - most users don't have a hotkey for this

= other =
 * fingerprint reader is always on -> disable by default and enable if thinkfinger/fprint is installed
 * pcmcia driver should be disabled?
 * check desktop bits which keep waking up the disk
  * one offender: network-manager keeping changing gconf values with "last seen" times

= desktop bits =
 * firefox keeps updating places.sqlite
 * wpa_supplicant/NetworkManager are very chatty through rsyslog to /var/log/daemon.log
  * /var/log/daemon.log is not written out synchronously by default, so this should not wake up the disk -vorlon
 * pulseaudio error messages

= related = (intels linux power saving site)


Work Items

Dependency tree

* Blueprints in grey have been implemented.