ReducedPowerUsage
Launchpad Entry: https://launchpad.net/distros/ubuntu/+spec/reduced-power-usage
Created: Date(2006-06-08T02:43:27Z) by CoreyBurger2
Contributors: CoreyBurger2
Packages affected:
Summary
Battery life is very dear to laptop users and thus we need to take a look at proactive ways to reduce power usage. This will involve profiling what is causing battery usage (screen, hdd hits, etc.) and working to reduce them.
Rationale
We want to increase usage of Ubuntu on laptops and help those existing users by making their experience better.
Use cases
- Jane is travelling on a plane from Cape Town to London and would like to be able to work on her document for as long as possible. With two batteries, she can almost make the entire flight, but not quite.
- Alan works in the field and can only charge his laptop from generator, which only runs at night. During the day he works off a car battery, charged at night from the generator. He would like to be able to last the whole day on a single car battery.
Scope
- Any package in the default install which can cause excessive battery usage, such as accessing the harddrive, etc.
Design
- Profile a current install of Ubuntu to figure out what is using the battery
- Tweak each program in turn to reduce power usage
- Analyse disk profiles to set appropriate hdparm settings
- PCMCIA deactivation
Implementation
Code
acpi scripts
/etc/acpi/ac.d/10-vm_settings.sh
# Tweak virtual memory for running on AC. echo 60 > /proc/sys/vm/swappiness echo 3000 > /proc/sys/vm/dirty_expire_centisecs echo 500 > /proc/sys/vm/dirty_writeback_centisecs echo 10 > /proc/sys/vm/dirty_background_ratio echo 40 > /proc/sys/vm/dirty_ratio
/etc/acpi/battery.d/10-vm_settings.sh
# Tweak virtual memory to conserve power when running on batteries. echo 10 > /proc/sys/vm/swappiness echo 0 > /proc/sys/vm/dirty_expire_centisecs echo 0 > /proc/sys/vm/dirty_writeback_centisecs echo 60 > /proc/sys/vm/dirty_background_ratio echo 95 > /proc/sys/vm/dirty_ratio
/etc/acpi/ac.d/20-wireless_power.sh
# Change the wireless power mode to AC. # This works for ipw3945, not sure about other chipsets # Make sure eth1 is your wireless. /sbin/iwpriv eth1 set_power 6
/etc/acpi/battery.d/20-wireless_power.sh
# Change the wireless power mode to Battery. /sbin/iwpriv eth1 set_power 7
video card low power mode
The following is a nasty hack for the fglrx driver. It sets the video card to low power mode on boot.
["BinaryDriverHowto/Fglrx_lowpower"]
The need for this hack points to the usefulness there would be of an acpi event generated upon user login/display activation. (perhaps this event already exists). The event could then trigger an acpi script which sets the video card to low power mode.
Data preservation and migration
None