PowerSavingTweaks

Power Saving Tweaks

There are some hardware specific power saving tweaks than cannot be fully applied by default as it causes problems on some hardware and we have yet to identify a suitable blacklist.

Enable Intel i915 RC6

NOTE: If you are running 12.04 LTS ("Precise"), this is already enabled by default.

The Intel i915 RC6 feature allows the Graphics Processing Unit (GPU) to enter a lower power state during GPU idle. The i915 RC6 feature applies to Intel Sandybridge and later processors. RC6 was switched between enabled and disabled earlier in the Ubuntu 12.04 Precise LTS development cycle, but eventually all problems were fixed and it is now enabled by default.

On Ubuntu 11.10 and earlier, you need to enable it manually: edit /etc/default/grub (you need superuser privilege to do this)

change:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" 

to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.i915_enable_rc6=1"

and run:

sudo update-grub

And reboot.

Aggressive Link Power Management (ALPM) is a mechanism where a SATA AHCI controller can put the SATA link that connects to the disk into a very low power mode during periods of zero I/O activity and into an active power state when work needs to be done. Tests show that this can save around 0.5-2 Watts of power on a typical system.

ALPM is now available in several SATA controllers that use the Advanced Host Controller Interface (AHCI). However, there is evidence that some controllers may go into a low power state incorrectly and this ends up causing data loss. Ubuntu has the ability to use ALPM but it it disabled by default since it can cause data loss on some machines. Since there is a chance that this can cause data loss do not enable it unless you have backups of your data and are willing to take the risk.

Enable ALPM:

echo SATA_ALPM_ENABLE=true | sudo tee /etc/pm/config.d/sata_alpm

We are trying to pin down hardware where this passes and fails, so please contribute to the ALPM testing page

Enable i915 Framebuffer Compression

Framebuffer compression reduces the memory bandwidth on screen refereshes and depending on the image in the framebuffer can reduce power consumption. LessWatts has reported this will save ~0.6 Watts where as testing on a Lenovo X220 Sandybridge has shown savings less than this, so your mileage may vary. This option again is not enabled by default as on some hardware framebuffer compression causes artifacts when repainting when using compositer. Some users report this breaks when using Unity 3D.

To enable, edit /etc/default/grub (you need superuser privilege to do this)

change:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" 

to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.i915_enable_fbc=1"

and run:

sudo update-grub

Enable i915 LVDS Downclocking

This kernel option will down-clock the LVDS refresh rate, and this in theory will save power. For systems that do not support LVDS down-clocking the screen can flicker. Also, power measurments on various i915 hardware have shown that this saving is marginal, typically ~0.1 Watt.

To enable, edit /etc/default/grub (you need superuser privilege to do this)

change:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" 

to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.lvds_downclock=1"

and run:

sudo update-grub

Disable Unused Bluetooth Devices

Although enabled by default, wireless devices such as Bluetooth may not be used on a day to day basis. If you do not require Bluetooth (for example you aren't using a Bluetooth headset or keyboard) you can safeless turn off BlueTooth and save ~1-2W. Left click on the Bluetooth icon on the top right of the desktop and select "Turn off Bluetooth".

DRM vblank off delay

Reducing the DRM vblank off delay reduces wakeup events and theoretically saves power. Our measurements on various machines has shown the saving is quite small. However, this cannot be enabled on all machines as it is required to workaround some buggy hardware. However, we believe it works on all Intel i915 devices.

To enable, edit /etc/default/grub (you need superuser privilege to do this)

change:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" 

to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash drm.vblankoffdelay=1"

and run:

sudo update-grub

PowerTop "Good" Power Savings

Use Intel's powertop to put the following devices into a "Good" power saving state:

  • Webcam
  • Audio
  • DRAM
  • Ethernet
  • Wifi
  • Bluetooth
  • SATA link
  • MMC/SD

Note that the recent changes to pm-utils in Ubuntu Precise 12.04 LTS now include these powertop recommendations when running on battery power.

Laptop Backlight

Modern laptop displays can still consume a lot of power. The relationship between brightness level and power consumed is non-linear and stepping up one brightness level in the highest settings consumes more power than stepping up one brightness level on the lowest settings. Thus the recommended practice, where possible, is to avoid using the full brightness setting. On a typical laptop dropping from full brightness to 2/3 brightness will save about 1 Watt.

Use Lighter Colours

Unbelievable as it may seem, laptop LCD displays actually have to work harder to display dark colours than light colours. A full black background may consume ~0.5% to 1% more power than a fully white background.

Reduce Wakeup Events

Wakeup events in applications cause an idle processor to come out of a sleep state and this consumes power. Some applications cause many wakeups, for example flash embedded in webpages. In these cases, either don't install flash if you don't need it, or close the tab in your browser when you don't require it anymore. Tools like Intel's PowerTop can help identify mishaving applications. See for more details on how to identify mishaving applications.

There are some tweaks that can save a few wakeups a second. For example, just disabling the gnome-terminal cursor flash will save wakeup events. To do so, use the following:

gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_blink_mode off

PCIe ASPM

PCI Express Active State Power Management is used to power manage PCI Express serial link devices when the links become less active. Ubuntu Precise 12.04 LTS now includes Matthew Garrett's PCIe ASPM fix after help from community to test this patch.

Supporting Data

The above set of power optimisation tweaks have been tested on a range of hardware and accurately measured using a precision Fluke digital multimeter. Tests were run multiple times to gather multiple data sets and to calculate the standard deviation to see if the data was reliable. Below are links to the test result summaries and these contains links to LibreOffice spreadsheets containing the data.

Kernel/PowerManagement/PowerSavingTweaks (last edited 2012-12-12 18:53:14 by foka)