Showing posts with label battery. Show all posts
Showing posts with label battery. Show all posts

Sunday, October 25, 2015

TLP 0.5 Released, Install It In Ubuntu [Tool That Helps Save Battery Power]

Ubuntu laptop

TLP, a tool that applies various settings and tweaks that help your laptop save battery power, was updated to version 0.5 which includes better support for some ThinkPad models as well as some new features and bug fixes.

Changes in the latest TLP 0.5:
  • tpacpi-bat: auto detection of all ThinkPad models (v2.1);
  • tlp-stat: include newer models in tpacpi-bat suggestions;
  • tlp-rdw: support newer docks;
  • Handle special case where BAT1 = main battery (Thinkpad Edge/L/S series);
  • Fix: sound power save depending on power source ac/bat;
  • Fix: don't touch devices in RUNTIME_PM_BLACKLIST or excluded by RUNTIME_PM_ALL=0;
  • Fix: do not write sata link power when not configured;
  • Fix RESTORE_DEVICE_STATE_ON_STARTUP;
  • Restore bay power state upon resume only when on bat power and the setting is active;
  • Use nmcli before rfkill to change radio state; re-enable wifi on shutdown when not explicitly configured (Ubuntu 14.04).


Install TLP in Ubuntu / Linux Mint


Before installing TLP, make sure "laptop-mode-tools" is not installed (it conflicts with TLP):
sudo apt-get remove laptop-mode-tools

Ubuntu / Linux Mint users can install TLP by using its official PPA. Add the PPA and install it by using the following commands:
sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp tlp-rdw

TLP will start automatically on startup but to avoid having to restart the system, the first time you can start it manually, by using the following command:
sudo tlp start

There are also some optional packages you can install - for more on that as well as more information about TLP, see: Improve Power Usage / Battery Life In Linux With TLP.

For how to install TLP in Fedora, Debian, Arch Linux or Gentoo, see the TLP installation page.

To check out the source code, report bugs, etc., see the TLP GitHub page.

image via
Read more »

Monday, October 19, 2015

Laptop Mode Tools 1.65 Released With Intel PState Support, Other Changes [PPA]

Laptop Mode Tools is a package that should extend your laptop's battery life by enabling the Laptop Mode Linux kernel feature along with other power-related tweaks.

The latest Laptop Mode Tools 1.65, released yesterday, includes important changes and bug fixes such as support for Intel PState driver and a more robust Runtime Power Management Framework that deprecates the usb-autosuspend module. That means that there should be less issues with USB devices such as mice / keyboards not working properly with LMT (if such issues still occur, you'll need to blacklist the device id or disable the runtime-pm and usb-autosuspend modules using the Laptop Mode Tools GUI).

Changes in Laptop Mode Tools 1.65:
  • fixed grep error on missing $device/uevent;
  • ethernet: replaced sysfs/enabled by 'ip link down';
  • wireless-iwl-power: sysfs attr enbable -> enabled;
  • wireless-iwl-power: added iwlwifi support;
  • Runtime Power Management Framework is more robust now. Deprecates module usb-autosuspend;
  • fixed multiple hibernate issue;
  • when resuming, LMT now runs in force initialization mode;
  • added module for Intel PState driver;
  • GUI: implemented suspend/hibernate interface.

Laptop Mode Tools GUI

I'm sure you'll say that the Laptop Mode Tools GUI is pretty ugly. And it is (let's hope it'll get better in a future release), but LMT didn't have a GUI until version 1.64 and users had to edit configuration files which made it a lot more complicated to use, so now it's at least easier to use. The GUI uses tooltips which explain what each option does.

Also, you're probably aware of TLP and you're wondering which one's better. Well, they both try to achieve the same thing and the results depend on many factors so I suggest you give both Laptop Mode Tools and TLP a try (not in the same time though, they conflict!) and see which one works better for you.


Install Laptop Mode Tools 1.65 in Ubuntu / Linux Mint


Laptop Mode Tools 1.65 is available in the failsdownloads Unstable / Backports PPA (because I can only test it in Ubuntu 14.04) for Ubuntu 14.10, 14.04, 13.10 and 12.04 / Linux Mint 17, 16 and 13 and derivatives, backported from Debian. Add the PPA and install the latest Laptop Mode Tools using the following commands:
sudo add-apt-repository ppa:failsdownloadsteam/unstable
sudo apt-get update
sudo apt-get install laptop-mode-tools
If you don't want to add the PPA, you can download Laptop Mode Tools deb files from HERE.

Once installed, it's probably best to restart your laptop.

The Laptop Mode Tools GUI needs to run as root so under Unity/GNOME, launch it using gksu (use kdesudo under KDE, etc.):
gksu /usr/sbin/lmt-config-gui
Note that after enabling/disabling some modules via the Laptop Mode Tools GUI, you'll have to restart your system.

The Laptop Mode Tools Ubuntu / Debian package comes with a menu entry (desktop file) but it doesn't work unless you edit it and add gksu, kdesudo, or equivalent tool you use.

For other Linux distributions, see the Laptop Mode Tools downloads page.

Report any bugs you may find @ GitHub.
Read more »

Tuesday, October 13, 2015

Power Management Tool `TLP` 0.8 Released

Ubuntu Laptop

TLP 0.8 was released recently, bringing various ThinkPad improvements, systemd "predictable network interface names" support along with other changes and bug fixes.

For those not familiar with TLP, this is an advanced power management tool that applies various settings and tweaks to help your laptop save battery power. The app tries to do everything automatically, depending on your Linux distribution and hardware (it runs in the background and doesn't come with a GUI) however, you can manually change its settings by editing the TLP configuration file: /etc/default/tlp

A complete list of TLP features can be found HERE.

Changes in TLP 0.8:
  • General:
    • TLP_DEFAULT_MODE: change default operation mode to AC when no power supply can be detected (concerns some desktop and embedded hardware only)
  • Radio Devices:
    • Resume: restore bluetooth state
  • Radio Device Wizard (tlp-rdw):
    • Support ThinkPad OneLink Dock Basic/Pro for dock/undock events
    • Detect systemd "predictable network interface names" for WWAN
  • ThinkPad Battery:
    • tpacpi-bat: new upstream version 2.2: get ASL path from /sys/class/power_supply/*/device/path; avoids unnecessary "AE_NOT_FOUND" kernel messages
    • tlp-stat:
      • Show "No batteries detected."
      • Explain battery status "Unknown" as "threshold effective"
      • Show battery cell group voltages (verbose mode, tp-smapi only)
      • Show acpi-call suggestion for ThinkPad *40, *50, X1 models
  • USB:
    • Remove USB_DRIVER_BLACKLIST
  • tlp-stat:
    • Show warnings for ata errors by default
  • Bugfixes
    • tlp-stat: detect kernel config with PM_RUNTIME=N
    • tlp recalibrate: fix exitcode check
    • USB autosuspend: write power/control if actually changing only
    • Ignore missing files in /proc/sys/fs/xfs

According to the changelog, the "USB_DRIVER_BLACKLIST" feature was removed because it caused issues with AC/BAT switching (the CPU governor didn't change when going from AC to battery or the other way around) and USB hotplugging (required for udevd v221 and higher) - issue HERE.


Install TLP in Ubuntu or Linux Mint


To add the official TLP PPA and install the tool in Ubuntu or Linux Mint, use the following commands:
sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp tlp-rdw

TLP will automatically start upon system startup, but to avoid having to restart the system to get it running for the first time, you can start it (required only the first time) using the following command:
sudo tlp start

For more information about TLP, optional ThinkPad only packages you may whish yo install, etc., see our initial article about TLP and the TLP website.

For Debian, Fedora, Arch Linux, Gentoo or openSUSE installation instructions, see THIS page.

Report any bugs you may find @ GitHub.
Read more »

Tuesday, October 6, 2015

Advanced Power Management Tool `TLP` Sees New Release


TLP 0.7 was released recently, bringing an option which allows setting the minimum and maximum Intel P-state performance, better ThinkPad support and various other changes and bug fixes.

For those not familiar with TLP, this is an advanced power management tool that applies various settings and tweaks to help your laptop save battery power. The app tries to do everything automatically, depending on your Linux distribution and hardware (it runs in the background and doesn't come with a GUI) however, you can manually change its settings by editing the TLP configuration file: /etc/default/tlp

The most important new feature in this TLP release is the addition of an option which allows defining the minimum and maximum P-state performance for Intel Core processors (values are stated as a percentage of the total available processor performance), intended to limit the power dissipation of the CPU (feature implemented by Pali Rohár). According to Thomas Koch, the TLP developer, this should be more effective than limiting frequencies.

This feature requires an Intel SandyBridge or newer CPU with "intel_pstate" scaling driver enabled.

To use this, in the TLP configuration file (/etc/default/tlp), uncomment the following lines (remove the "#"):
#CPU_MIN_PERF_ON_AC=0
#CPU_MAX_PERF_ON_AC=100
#CPU_MIN_PERF_ON_BAT=0
#CPU_MAX_PERF_ON_BAT=30
... and experiment with different values to see which suits your needs best. After making changes to the TLP configuration file, restart TLP by running "sudo tlp start".


Other changes in the latest TLP 0.7 include:
  • USB:
    • USB_DRIVER_BLACKLIST: exclude devices assigned to the listed drivers from USB autosuspend; default: usbhid;
    • USB_BLACKLIST_WWAN: match internal driver list instead of USB vendor ids;
    • USB_WHITELIST: include devices into USB autosuspend even if already excluded by the driver or WWAN blacklists;
  • radio devices: DEVICES_TO_ENABLE_ON_AC/DISABLE_ON_BAT/DISABLE_ON_BAT_NOT_IN_USE: enable/disable radio devices upon change of power source (excluding connected devices) (feature implemented by Pali Rohár);
  • ThinkPad Battery:
    • provide proper return codes for all battery functions;
    • setcharge allowed on battery power;
    • do not activate new thresholds with force_discharge anymore (tp-smapi);
    • tpacpi-bat: support for ThinkPad E325 charge thresholds;
  • tlp-stat:
    • new options: -d|--disk, -e|--pcie, -p|--processor, -s|--system, -u|--usb;
    • show driver and connection state for all enabled radio devices;
    • show driver name in Runtime PM PCI(e) device list;
    • show type and state of docks and device bays;
    • show type of init system;
    • check if TLP's systemd services are enabled;
  • RUNTIME_PM_DRIVER_BLACKLIST: exclude PCI(e) devices assigned to drivers;
  • support Dell Latitude docks (feature implemented by Pali Rohár);
  • added support for NM 0.9.10;
  • set performance versus energy savings policy (performance, normal, powersave - requires kernel modules msr and x86_energy_perf_policy from linux-tools);
  • fixed dock/undock event processing for ThinkPad Adv Mini Dock and Ultrabase;
  • use a more robust USB device event processing.


Install TLP in Ubuntu / Linux Mint


To avoid any conflicts with laptop-mode-tools, a tool similar to TLP, it's recommended to remove it before installing TLP. In Ubuntu / Debian / Linux Mint, remove laptop-mode-tools using the following command:
sudo apt-get purge laptop-mode-tools

Ubuntu (14.10, 14.04 and 12.04) / Linux Mint (17.1, 17 and 13) users can install TLP by using its official PPA. Add the PPA and install the latest TLP by using the following commands:
sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp
TLP will start automatically but to avoid having to restart the system, the first time you can start it manually, by using the following command:
sudo tlp start
There are also some optional packages you can install - for more on that as well as more information about TLP, see: Improve Power Usage / Battery Life In Linux With TLP. Also see the TLP FAQ.

For how to install TLP in Fedora, Debian, Arch Linux or Gentoo, see the TLP installation page.

To download the source code, report bugs, etc., see the TLP GitHub page.


Thanks to Thomas for the tip! image via Canonical blog
Read more »

Install Laptop Mode Tools 1.64 With Configuration GUI In Ubuntu

Laptop Mode Tools is a package that allows you to extend the battery life of your laptop by enabling the Laptop Mode Linux kernel feature along with other power-related tweaks.

This was a command line only tool until version 1.64, which introduces a GUI that lets you toggle individual power saving modules. The new GUI configuration tool isn't exactly pretty as you can see in the screenshot below, but it's definitely an useful addition because it no longer requires users to work with various configuration files.

laptop mode tools gui

The GUI is written in PyQT and the options are generated at runtime, based on the list of available power saving modules.

Because Laptop Mode Tools 1.64 is only available in the Ubuntu 14.04 repositories, I've backported it for older Ubuntu versions so you can easily install it via a PPA.


Install Laptop Mode Tools in Ubuntu


Before proceeding with the installation, please note that you must remove TLP if installed before installing Laptop Mode Tools. If you install both, there will be conflicts.

I guess you're wondering which one's better, TLP of Laptop Mode Tools - well, they both try to achieve the same thing and the results are pretty close, but you can give both a try (not in the same time though!) and see which one works better for you.

The latest Laptop Mode Tools is available in the failsdownloads Backports PPA. You can add the PPA and install it in Ubuntu or Linux Mint by using the following commands:
sudo add-apt-repository ppa:failsdownloadsteam/unstable
sudo apt-get update
sudo apt-get install laptop-mode-tools
If you don't want to add the PPA, you can manually download the deb from HERE.

To launch the Laptop Mode Tools GUI (the menu entry doesn't work properly), use the following command:
gksu lmt-config-gui

For more information, see the Laptop Mode Tools FAQ page.
Read more »