How To Improve Laptop Battery Life And Usage In Linux Using TLP

本文介绍了TLP,一个用于Linux的高级电源管理工具,它能自动优化电源设置,无需深入理解技术细节。适用于几乎所有笔记本,TLP不替换现有系统管理,而是在启动和电源源变化时应用其设置。它提供了针对不同电源状态的内核笔记本模式、频率调整、电源意识进程调度等特性,并支持多种发行版。安装和配置指南包括如何在Ubuntu/Mint上安装,以及特定于IBM Thinkpad的额外步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

TLP is an advanced power management tool for Linux that gives the settings and tweaks to enhance your existing power management automatically without the need to know every technical details. It is purely a command-line tool and doesn’t have a GUI. It should work on almost all laptops.

TLP does not replace the existing power management of your Linux installation, but it enhances the existing it. TLP applies its settings upon system startup and on every change of the power source. TLP packages are available almost for all distributions such as Arch Linux, Debian, RH Fedora, Gentoo, OpenSUSE and Ubuntu.

Features -

Settings depending on the power source:

  • Kernel laptop mode and dirty buffer timeouts
  • Processor frequency scaling including “turbo boost”/”turbo core”
  • Power aware process scheduler for multi-core/hyper-threading
  • Hard disk advanced power management level and spin down timeout (per disk)
  • SATA aggressive link power management (ALPM)
  • PCI Express active state power management (PCIe ASPM) – Linux 2.6.35 and above
  • Runtime power management for PCI(e) bus devices – Linux 2.6.35 and above
  • Radeon KMS power management – Linux 2.6.35 and above, not fglrx
  • Wi-fi power saving mode – depending on kernel/driver
  • Power off optical drive in drive bay (on battery)

Additional functions:

  • I/O scheduler (per disk)
  • USB auto-suspend with blacklist
  • Audio power saving mode – hda_intel, ac97
  • Enable or disable integrated wi-fi, bluetooth or wwan devices upon system startup and shutdown
  • Restore radio device state on system startup (from previous shutdown).
  • Radio device wizard: switch radios upon network connect/disconnect and dock/undock
  • Disable Wake On LAN
  • WWAN state is restored after suspend/hibernate
  • Untervolting of Intel processors – requires kernel with PHC-Patch
  • Battery charge thresholds – ThinkPads only
  • Recalibrate battery – ThinkPads only

 

Install TLP on Ubuntu/Linux Mint

Before installing TLP, make sure that you have removed the user specific power save settings and scripts (for example in /etc/rc.local), otherwise expect unpredictable results and also remove laptop-mode-tools:

sk@sk:~$ sudo apt-get remove laptop-mode-tools

Add the following TLP PPA:

sk@sk:~$ sudo add-apt-repository ppa:linrunner/tlp

Update the software sources list:

sk@sk:~$ sudo apt-get update

Now install TLP:

sk@sk:~$ sudo apt-get install tlp tlp-rdw smartmontools ethtool

If you are using IBM Thinkpad, run the following command:

sk@sk:~$ sudo apt-get install tlp tlp-rdw smartmontools ethtool tp-smapi-dkms acpi-call-tools

Start TLP

Start TLP Service for the first time only. You don’t need to start it on every reboot, it will start automatically:

sk@sk:~$ sudo tlp start

Test TLP Status

Enter the following command to see the detailed output of TLP:

sk@sk:~$ sudo tlp stat

You will see a output something like below:

--- TLP 0.3.9 --------------------------------------------

+++ Configured Settings: /etc/default/tlp
TLP_ENABLE=1
DISK_IDLE_SECS_ON_AC=0
DISK_IDLE_SECS_ON_BAT=2
MAX_LOST_WORK_SECS_ON_AC=15
MAX_LOST_WORK_SECS_ON_BAT=60
SCHED_POWERSAVE_ON_AC=0
SCHED_POWERSAVE_ON_BAT=1
NMI_WATCHDOG=0
DISK_DEVICES="sda sdb"
DISK_APM_LEVEL_ON_AC="254 254"
DISK_APM_LEVEL_ON_BAT="128 128"
SATA_LINKPWR_ON_AC=max_performance
SATA_LINKPWR_ON_BAT=min_power
PCIE_ASPM_ON_AC=performance
PCIE_ASPM_ON_BAT=powersave
RADEON_POWER_PROFILE_ON_AC=high
RADEON_POWER_PROFILE_ON_BAT=low
WIFI_PWR_ON_AC=1
WIFI_PWR_ON_BAT=5
WOL_DISABLE=Y
SOUND_POWER_SAVE=1
SOUND_POWER_SAVE_CONTROLLER=Y
BAY_POWEROFF_ON_BAT=0
BAY_DEVICE="sr0"
RUNTIME_PM_ON_AC=on
RUNTIME_PM_ON_BAT=auto
RUNTIME_PM_ALL=0
USB_AUTOSUSPEND=1
RESTORE_DEVICE_STATE_ON_STARTUP=0

+++ System Info
System         = Hewlett-Packard F.02 HP 550
BIOS           = 68MVU Ver. F.02
Release        = Ubuntu 13.04
Kernel         = 3.8.0-26-generic x86_64
/proc/cmdline  = BOOT_IMAGE=/vmlinuz-3.8.0-26-generic root=/dev/mapper/lubuntu--vg-root ro quiet splash vt.handoff=7

+++ System Status
TLP power save = enabled
power source   = ac
[...]

For other distribution installation instructions, refer the official website.

原帖地址:http://www.unixmen.com/how-to-improve-laptop-battery-life-and-usage-in-linux-using-tlp/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值