Improve and optimize battery life on Linux

Goal

Maximum battery life on linux within reasonable and acceptable daily workloads
Case study: Thinkpad x240 with 9cells battery on ubuntu 16.04
    Before: from 100% to 5% - ~ 3.5hours
    After installing TLP: ~ 5hours

Solution

TLP brings you the benefits of advanced power management for Linux without the need to understand every technical detail. TLP comes with a default configuration already optimized for battery life, so you may just install and forget it. Nevertheless, TLP is highly customizable to fulfill your specific requirements.
Please note: TLP runs on every laptop brand. Setting the battery charge thresholds is available for IBM/Lenovo ThinkPads only.

Installation

1
# Add PPA
2
sudo add-apt-repository ppa:linrunner/tlp
3
sudo apt-get update
4
5
# Especially for thinkpad
6
sudo apt-get install tp-smapi-dkms acpi-call-dkms
7
8
# Install
9
sudo apt-get install tlp tlp-rdw
Copied!
Start: TLP will start automatically. To avoid having to restart the system, the first time you can start it manually by using the following command:
1
sudo tlp start
Copied!
Check: Use the tlp-stat terminal command to check if TLP is working properly
1
▶ sudo tlp-stat -s
2
[sudo] password for devops:
3
--- TLP 1.0 --------------------------------------------
4
5
+++ System Info
6
System = LENOVO ThinkPad X240 20AMS1WY00
7
BIOS = GIET75WW (2.25 )
8
Release = Ubuntu 16.04.2 LTS
9
Kernel = 4.10.0-27-generic #30~16.04.2-Ubuntu SMP Thu Jun 29 16:07:46 UTC 2017 x86_64
10
/proc/cmdline = BOOT_IMAGE=/boot/vmlinuz-4.10.0-27-generic.efi.signed root=UUID=34cadb32-d632-4d98-a4a8-a1c53753dc35 ro quiet splash vt.handoff=7
11
Init system = systemd v229
12
Boot mode = UEFI
13
14
+++ TLP Status
15
State = enabled
16
Last run = 10:41:53 PM, 3685 sec(s) ago
17
Mode = battery
18
Power source = battery
Copied!

Reference

Last modified 2yr ago