Tlp linux ��� ���

Увеличиваем время работы от батареи с помощью TLP.

Есть множество различных твиков, которые увеличивают продолжительность работы от батареи, но многие из них зависят от оборудования, дистрибутива линукс. Часто твики уже устарели или слишком сложны для применения обычным пользователем.

TLP — это продвинутая, консольная утилита для управления питанием, которая автоматически применяет нужные настройки для конкретного аппаратного оборудования и знает про разные дистрибутивы линукс и их возможности.

TLP применяет следующие настройки в зависимости от источника питания (батарея или от сети):

  • режим ноутбука и таймауты грязных буферов (dirty buffer).
  • частота процессора, включая «turbo boost» / «turbo core».
  • планировщик с малым потреблением энергии для многоядерных процессоров или с hyper-threading.
  • расширенное управление питанием жёстких дисков и продолжительностью вращения шпинделя.
  • агрессивное управление питанием SATA (ALPM).
  • управление питанием PCI Express (PCIe ASPM).
  • управление питанием PCI(e) устройств в режиме реального времени.
  • управление питанием Radeon KMS, но не fglrx.
  • Wi-Fi режимы экономии питания.
  • выключение питания оптических приводов.

Дополнительные функции TLP:

  • планировщики ввода-вывода I/O на каждый диск отдельно.
  • автоматическая приостановка работы USB (autosuspend) с поддержкой чёрных списков устройств.
  • режимы сохранения питания аудио устройств — hda_intel, ac97.
  • включение и отключение интегрированных wifi, bluetooth или wwan устройств при старте или выключении системы.
  • восстановление радио устройств при старте системы.
  • мастер для радио устройств и переключение состояния устройства от событий сети или в доке или не в доке оно.
  • отключение пробуждения от сети Wake On LAN.
  • восстановление WWAN после suspend, hibernate.
  • пороги зарядки батареи для IBM/Lenovo ThinkPads.
  • калибровка батареи для ThinkPads.

TLP применяет настройки автоматически при запуске и каждый раз при смене источника питания. Грубо говоря, стоит только установить TLP и многое будет работать искаропки. Однако есть настройки, которые нужно в ручную указать для использования, такие как включение или отключение устройств WiFi, Bluetooth или Wwan (3G или UMTS).

Установка TLP.

До установки знайте следующее:

  • Если вы использовали какие-либо твики и прописали их вызов в /etc/rc.local, то нужно их убрать.
  • нужно удалить laptop-mode-tools ( sudo apt-get remove laptop-mode-tools ).

Установка TLP в Ubuntu.

sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp tlp-rdw

TLP будет стартовать сам, но впервый раз не лишним будет запустить его, если влом перезагружаться.
sudo /etc/init.d/tlp restart

Следующие пакеты опциональны:

  • smartmontools — для просмотра S.M.A.R.T.
  • ethtool — для отключения Wake On LAN.

Поставьте их sudo apt-get install smartmontools ethtool если есть желание.

Для ThinkPad ноутбуков может потребоваться:

  • tp-smapi-dkms — пороги зарядки батареи ThinkPad.
  • acpi-call-tools — пороги зарядки батареи на платформе Sandy Bridge или новее (X220/T420, X230/T430, etc.).

Если у вас ThinkPad или Интел платформа Sandy Bridge, то поставьте нужное sudo apt-get install tp-smapi-dkms acpi-call-tools

FAQ по TLP.

Настройки находятся в файле /etc/default/tlp

1. Если в Kubuntu (KDE) есть явные проблемы в управлении питания при смене источника, то в System Settings -> Power Management -> Edit Profile.

Профиль «Powersave» (для батареи): отметить.
Профиль «Performance» (от сети): снять галку.

Читайте также:  Процессоры amd оценка windows

2. На ядрах 3.x система кажется медленной.
Обходной путь — SATA_LINKPWR_ON_BAT=medium_power

3. При изменении частоты процессора проблемы.
Пробуйте удалить ondemand sudo update-rc.d -f ondemand remove

4. Если на ядрах 3.х ноутбук не может уснуть.
Пробуйте BAY_POWEROFF_ON_BAT=0

5. Если жёсткий диск слишком часто хлопает головками при парковке, то успокойте его DISK_APM_LEVEL_ON_BAT=128

6. У меня твердотельный Crucial M4 SSD и от батареи всё тупит.
Для Crucial отключите APM
DISK_APM_LEVEL_ON_AC=»255 255″
DISK_APM_LEVEL_ON_BAT=»255 255″

7. При любых проблемах со звуком во время смены источника питания пробуйте SOUND_POWER_SAVE=0

Источник

Tlp linux ��� ���

TLP is a feature-rich command line utility for Linux, saving laptop battery power without the need to delve deeper into technical details. TLP’s default settings are already optimized for battery life and implement Powertop’s recommendations out of the box. So you may just install and forget it. Nevertheless TLP is highly customizable to fulfil your specific requirements.

Contents

Installation

Install the tlp package. Installing the optional dependencies may help provide additional power saving.

Radio Device Wizard (tlp-rdw)

When using the Radio Device Wizard ( tlp-rdw ), it is required to use NetworkManager and enabling NetworkManager-dispatcher.service .

One should also mask the service systemd-rfkill.service and socket systemd-rfkill.socket to avoid conflicts and assure proper operation of TLP’s radio device switching options.

See TLP settings for details.

ThinkPads only

For advanced battery functions, i.e. charge thresholds and recalibration, install the following package(s):

  • tp_smapi – tp-smapi is needed for battery charge thresholds, recalibration and specific status output of tlp-stat
  • acpi_call – acpi-call is needed for battery charge thresholds and recalibration on Sandy Bridge and newer models (X220/T420, X230/T430 et al.). Use acpi_call-dkms if not running kernels from official repositories.

Controlling the charge thresholds using D-Bus without root privileges is possible using threshy AUR and its example Qt user interface threshy-gui AUR .

Front end

tlpui-git AUR is a GTK user interface for TLP written in Python.

Configuration

The configuration file is located at /etc/tlp.conf and provides a largely optimized power saving by default. For a full explanation of options see: TLP settings.

USB autosuspend

When starting TLP with the default configuration, some USB devices such as audio DACs will be powered down when running on battery due to TLP’s autosuspend feature. Some devices such as keyboards and scanners are blacklisted from autosuspend by default.

You may simply want to disable USB autosuspend entirely with the following setting:

Or blacklist specific devices from being auto-suspended. See the TLP documentation on USB devices for details.

Force battery (BAT) configuration

When no power supply can be detected, the setting for AC will be used on devices like desktops and embedded hardware.

You may want to force the battery (BAT) settings when using TLP on these devices to enable more power saving:

Bumblebee with NVIDIA driver

If you are running Bumblebee with NVIDIA driver, you need to disable power management for the GPU in TLP in order to make Bumblebee control the power of the GPU.

Depending on the driver(s) that you are using, blacklist one or more of them, preventing TLP from managing their power state:

PCI(e) runtime power management on AC

Enabling runtime power management for PCI(e) bus devices while on AC may improve power saving on some laptops. This is enabled by default on battery, but not on AC. To enable on AC, set:

Command line

TLP provides several command line tools. See TLP commands.

Читайте также:  Lenovo yoga tab2 with windows

Debugging

You can display information about the currently used Mode(AC/BAT) and applied configurations:

If your bluetooth headphones suddenly stop working and you see this error from dmesg, it may be caused by TLP suspending your device. Add device ID to USB_BLACKLIST in /etc/tlp.conf :

Get the device ID for your bluetooth device from lsusb -v . Restart TLP and the bluetooth service.

Источник

Ubuntu¶

Officially supported Ubuntu releases

Corresponding Linux Mint releases but not LMDE – refer to Debian instead

Package Repository¶

Add the TLP-PPA to your package sources with the commands:

TLP and ThinkPad-related packages below are available via the official Ubuntu repository. Nevertheless it is recommended to use the PPA to stay with the latest TLP version.

Package Installation¶

Install the following packages

tlp (PPA or universe) – Power saving

tlp-rdw (PPA or universe) – optional – Radio Device Wizard

either with your favorite package manager or the command:

Conflict with power-profiles-daemon

power-profiles-daemon (contained in GNOME 40 and newer) might be contained in the default install of your distribution.

Symptom: power-profiles-daemon.service prevents TLP from making power saving settings at system startup. A check with

generates the following output in the conflict case:

Beginning with version 1.4 tlp start and tlp-stat -s will also detect the conflict:

Solution: disable power-profiles-daemon with

Ubuntu 21.04 with GNOME Desktop installs power-profiles-daemon.service by default (Bug #1934944)

Version 1.4 packages from the PPA are already masking power-profiles-daemon.service

ThinkPads only¶

If your ThinkPad model was released in 2013 or later and you only want to use charge thresholds with at least kernel 4.19, you do not need to proceed any further here. However, if you want the recalibration feature or your model and/or kernel is older, read on.

Depending on your model and kernel version external kernel module(s) are required to provide battery charge thresholds and recalibration.

The output of tlp-stat -b (version 1.2.2 or higher recommended) will guide you which package to install:

acpi-call-dkms (universe) – optional – External kernel module providing battery recalibration for newer ThinkPads (X220/T420 i.e. 2013 and later)

tp-smapi-dkms (PPA or universe) – optional – External kernel module providing battery charge thresholds, recalibration and specific tlp-stat -b output for older ThinkPads

Install the appropriate package either with your favorite package manager or the command

Replace acpi-call-dkms with tp-smapi-dkms where suitable (special case: X220/T420 generation makes use of both).

For systems with Secure Boot enabled, please refer to DKMS Secure Boot

© Copyright 2021, linrunner. Licensed under the CC BY-NC-SA. Last updated on Oct 05, 2021.

Источник

TLP – Quickly Increase and Optimize Linux Laptop Battery Life

TLP is a free open source, feature-rich and command line tool for advanced power management, which helps to optimize battery life in laptops powered by Linux. It runs on every laptop brand, and ships in with a default configuration already tunned to effectively and reliably maintain battery life, so you can simply install and use it.

It performs power saving by allowing you to configure how devices such as CPU, disk, USBs, PCIs, radio devices should utilize power when your laptop is running on battery.

TLP Features:

  • It is highly configurable through various power saving parameters.
  • It uses automated background tasks.
  • Uses kernel laptop mode and dirty buffer timeouts.
  • Supports processor frequency scaling including “turbo boost” and “turbo core”.
  • Has a power aware process scheduler for multi-core/hyper-threading.
  • Provides for runtime power management for PCI(e) bus devices.
  • PCI Express active state power management (PCIe ASPM).
  • Supports radeon graphics power management (KMS and DPM).
  • Has a I/O scheduler (per disk).
  • Offers USB autosuspend with blacklist.
  • Supports Wifi power saving mode.
  • Also offers Audio power saving mode.
  • Offers hard disk advanced power management level and spin down timeout (per disk).
  • Also supports SATA aggressive link power management (ALPM) and so much more.
Читайте также:  Windows longhorn shutdown sounds

How to Install TLP Battery Management Tool in Linux

TLP package can be easily installed on Ubuntu as well as corresponding Linux Mint using TLP-PPA repository as shown.

On Debian 10.0Buster” and 9.0Stretch” add the following line to your /etc/apt/sources.list file.

and then update the system package cache and install it.

On Fedora, Arch Linux and OpenSuse, execute the following command as per your distribution.

How to Use TLP to Optimize Battery Life in Linux

Once you have installed TLP, its configuration file is /etc/default/tlp and you will have the following commands to use:

  • tlp – apply laptop power saving settings
  • tlp-stat – displays all power saving settings
  • tlp-pcilist – displays PCI(e) device data
  • tlp-usblist – for viewing USB devices data

It should start automatically as a service, you can check if it is running under SystemD using systemctl command.

After the service starts running, you have to restart the system to actually start using it. But you can prevent this by manually applying the current laptop power saving settings with root privileges using the sudo command, like so.

Afterwards, confirm that it is running using the following command, which actually shows system information and TLP status.

Show System and TLP Information

Important: As we mentioned before, it uses automated background tasks but you will not see any TLP background process or daemon in ps command output.

To view current TLP configuration, run the following command with -c option.

Show TLP Configuration

To display all power settings run the following command.

Show Power Saving Settings

To display Linux battery information, run the following command with -b switch.

Show Linux Battery Information

To display Temperatures and Fan Speed of system, run the following command with -t switch.

Show CPU Temperature and Fan Speed

To display Processor Data, run the following command with -p switch.

Show Processor Data

To display any Warnings, run the following command with -w switch.

Note: If your are using ThinkPad, there are certain specific packages you need to install for your distribution, that you can check from the TLP homepage. You will also find more information and a number of other usage commands there.

TLP is a useful tool for all laptops powered by Linux operating systems. Give us your thought about it via the comment form below, and you can let us know of any other similar tools you have come across as well.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

We are thankful for your never ending support.

Источник

Оцените статью