Revision of Optimizing battery time from Thu, 01/17/2013 - 11:00

The revisions let you track differences between multiple versions of a post.

The following information can be used with a new Trisquel installation or while using your system to try and optimize battery time. This is mostly useful on laptops.

Tips & tricks

  • Suspend the system when not using it;
  • Disable every device that won't be used in the BIOS: Bluetooth, WiMAX, Wireless WAN (3G), touchpad (~2W total savings), and specially wake-on-lan which keeps the LAN port active (1W savings);
  • Check your power usage statistics with the gnome-power-statistics command
  • Set an automatic decrease of the luminosity after some time of inactivity;
  • Deactivate the Bluetooth/Wifi when not using it (for a long time). This can sometimes be achieved through a hardware switch;
  • Replacing a hard drive by a solid state one should improve battery life as it requires less power;
  • Disabling the sound card: this will save around 2W (up to 5% battery life):
    • Right-click on the speaker in the task bar and choose "Sound preferences"
    • In the "Hardware" tab, click on your sound card, then select the profile "Off"

Useful Packages

  • linux-libre (homepage): Upgrade your kernel to latest linux-libre. There are two PPAs making this available (based on a forum discussion about both):
    • Linux-Libre Package Team PPAs (PPA, test): specific for Ubuntu-based distributions;
    • a PPA maintained by jxself: targetting any Debian-based distro.
  • laptop-mode-tools (homepage) : Tools for Power Savings based on battery/AC status
    Laptop mode is automatically enabled after installing this package. Check the ArchLinux extensive documentation about this.
  • powertop (homepage) - tool to find out what is using power on a laptop
  • rovclock - utility to control frequency rates of your Radeon card
    Check the Thinkwiki rovclock documentation about this package

Blacklist kernel modules

Do you never or seldomly use things like bluetooth, sd card reader, joystick, parallel port? Disable the kernel modules by adding to /etc/modprobe.d/blacklist.conf
blacklist bluetooth
blacklist firewire_core
blacklist firewire_ohci
blacklist yenta_socket
blacklist joydev
blacklist sdhci true
blacklist sdhci_pci true
blacklist dm_crypt
blacklist tifm_7xx1
blacklist shpchp
blacklist lp
blacklist btrfs
blacklist parport2
And then run sudo update-initramfs -u and restart. You can find out what modules are loaded using the lsmod command. If you want a very terse info about a module, you can sudo modinfo modulename. These modules might get automatically loaded when actually needed or if not, you can sudo modprobe modulename to insert.

Remove excess VTs

Do you use virtual terminals 3-6? I don't so I got rid of them by removing /etc/init/tty3.conf ... /etc/init/tty6.conf and rebooted.

Runtime PM

When you run powertop you might notice many devices have runtime power management disabled. You can enable them all by echoing auto to them as super user, e.g. in a startup script. You can find a list of such devices with ls /sys/bus/{pci,i2c}/devices/*/power/control

PCIe ASPM

Some newer hardware and BIOSes support PCIe active state power management. You can check dmesg|grep -i aspm to see how your system is doing. You can try forcing it by adding to grub configuration, on the kernel line pcie_aspm=force and then running update-grub. Watch out for hangs.

Radeon power management

Find out what video card you have by lspci|grep VGA. If you have an AMD (ATI) radeon video card, read the driver manual page, man radeon. For example to enable Dynamic Clock Gating and Power Management, enter into /etc/X11/xorg.conf (does not exist by default):
Section "Device"
        Identifier     "Configured Video Device"
        Driver         "radeon"
        Option         "ClockGating" "true"
        Option         "DynamicPM" "true"
EndSection
save and reboot, now grep -i dyn /var/log/Xorg.0.log should produce

[ 17.806] (II) RADEON(0): Dynamic Clock Gating Enabled
[ 17.806] (II) RADEON(0): Dynamic Power Management Enabled

References and useful links

Revisions

01/12/2013 - 16:21
MagicFab
01/13/2013 - 16:43
mYself
01/15/2013 - 05:39
MagicFab
01/17/2013 - 10:50
lembas
08/13/2013 - 17:54
lloydsmart
10/26/2013 - 23:00
muhammed
11/11/2013 - 01:46
ssdclickofdeath
08/02/2014 - 01:53
GustavoCM
06/06/2018 - 12:57
GrevenGull