Showing posts with label power. Show all posts
Showing posts with label power. Show all posts
Sunday, October 25, 2015
TLP 0.5 Released, Install It In Ubuntu [Tool That Helps Save Battery Power]
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
Saturday, October 24, 2015
How To Enable AMD Radeon Dynamic Power Management (DPM) In Ubuntu 13.10

The open source AMD Radeon driver got dynamic power management support with Linux Kernel 3.11. With this, the GPU and memory clocks adjust dynamically based on load, useful for saving power.
This feature is not enabled by default, at least in Ubuntu 13.10 (it will probably be enabled by default in Ubuntu 14.04) so here's how to enable it.
I don't have an AMD graphics card so I couldn't test this, but failsdownloads reader towpik, who sent us this tip, says that using this feature, "the laptop is very cool and quiet. Finally!". Also, according to Phoronix, Radeon DPM is "fantastic for power use [and] thermal performance".
Please note that this will only work for Radeon HD 2000 graphics cards and newer.
Please note that this will only work for Radeon HD 2000 graphics cards and newer.
Enable AMD Radeon DPM (Dynamic Power Management)
1. To enable DPM in Ubuntu 13.10, you need to open /etc/default/grub with a text editor (as root) - I'll use Gedit below:
gksu gedit /etc/default/grub
And in this file, search for the following line (it's on line 11 on my system): GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
After "splash" add a space and then add this:radeon.dpm=1
After making the changes, this is how this line should look:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.dpm=1"
2. Then save the file and run the following command to update the Grub:
sudo update-grub
3. And finally, reboot.
For Ubuntu 13.04 and older, you need a newer Kernel (since Linux Kernel 3.11 or newer is required) as well as an updated firmware. Since there are many things that can go wrong and I am not able to test this because I don't have an AMD graphics card, I won't post installation instructions for these here, but if you really want this, try these instructions.
Thanks to towpik for the tip, some info via Askubuntu
Labels:
amd,
graphics drivers,
laptop,
linux,
power,
tips n tricks,
Ubuntu
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.
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.
Tuesday, October 6, 2015
Prevent Your Laptop From Overheating With Thermald And Intel P-State [Updated]

Linux Thermal Daemon (thermald) is a tool developed by Intel's Open Source Technology Center which monitors and controls the CPU temperature, preventing it from overheating.
Thermald tries to prevent the CPU from overheating without a significant impact on performance by using some specific Intel functions available in the Linux Kernel. According to the Ubuntu wiki, thermald can control cooling using:
- active or passive cooling devices as presented in sysfs
- the Running Average Power Limit (RAPL) driver (Sandybridge upwards)
- the Intel P-state CPU frequency driver (Sandybridge upwards)
- the CPU freq driver
- the Intel PowerClamp driver
It's worth mentioning that thermald applies various cooling methods only when the temperature reaches a certain threshold, so you may not notice a difference while using it if your laptop doesn't usually get very hot.
I couldn't find any information on what processors are supported by thermald on its official page, but according to a Debian wiki entry, it's supported to support Intel Sandy Bridge and newer CPUs only. Also, according to a bug report, thermald is buggy / doesn't properly support Haswell.
By default, thermald runs in zero configuration mode so after installing it, you don't need to configura anything however, if your ACPI configuration is buggy or you just want to fine tune it by adding more sensors and cooling devices, you can edit the thermald XML configuration file, located under /etc/thermald/thermal-conf.xml For more information about this, see the thermal-conf.xml man page ("man thermal-conf.xml")
How to enable intel_pstate in Ubuntu 14.04 and newer
This is for Ubuntu 14.04 and newer only! Don't use it in older Ubuntu versions or you may encounter various issues (see below).
While it's not mandatory, thermald should work better if Intel P-state is enabled. Intel P-state is not enabled by default in Ubuntu 14.04, but you can enable it easily (from what I've read, it's enabled by default in Fedora, Arch Linux and OpenSUSE for instance).
intel_pstate is a new power scaling driver for modern Intel CPUs (it supports Intel SandyBridge+ processors). According to Arjan van de Ven from Intel (for more info, see the comments he posted HERE), ondemand shouldn't be used any more and instead, modern Intel processors should use Intel P-state.
In Ubuntu, pstate is disabled by default because it didn't work properly a while back. It looks like the issues that resulted in intel_pstate being disabled by default in Ubuntu were fixed, but pstate is still not enabled by default in Ubuntu 14.04.
Note that while I didn't encounter any issues on my laptop running Ubuntu 14.04 with intel_pstate enabled and from what I've read, it works for others as well, it might not work properly for you so use it at your own risk and only enable it if you know how to disable it in case something goes wrong!
1. To enable intel_pstate in Ubuntu 14.04 (only enable it if your laptop is using Sandy Bridge or Ivy Bridge CPUs), edit the /etc/default/grub configuration file with a text editor as root - I'll use Gedit below:
gksu gedit /etc/default/grub
And for "GRUB_CMDLINE_LINUX_DEFAULT=" (it's on line 11 on my system), add "intel_pstate=enable", like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_pstate=enable"
Make sure you've changed the /etc/default/grub file properly or else your system may fail to boot! Once you're done, save the file and update Grub:
sudo update-grub
2. Restart your system and to check if intel_pstate is enabled, run the following command:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver
The command above should return "intel_pstate".
To be able to use the "cpupower" commands below, you'll need to install "linux-tools-common" and "linux-tools-generic":
sudo apt-get install linux-tools-common linux-tools-generic
Another way of checking if Intel P-State is enabled is by using the following command:
cpupower frequency-info
And the output should be something like this:
analyzing CPU 0:
driver: intel_pstate
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 0.97 ms.
hardware limits: 800 MHz - 3.10 GHz
available cpufreq governors: performance, powersave
current policy: frequency should be within 800 MHz and 3.10 GHz.
The governor "performance" may decide which speed to use
within this range.
boost state support:
Supported: yes
Active: yes
25500 MHz max turbo 4 active cores
25500 MHz max turbo 3 active cores
25500 MHz max turbo 2 active cores
25500 MHz max turbo 1 active cores
If Intel Pstate is not enabled after following the steps above, it most probably means that your CPU doesn't support intel_pstate so you should disable it (simply remove "intel_pstate=enable" from /etc/default/grub and run "sudo update-grub").
3. With intel_pstate, there are only two cpufreq governors: performance and powersave (there's no "ondemand"). In my test, the "powersave" governor offered significantly better results so that's what I recommend. So try the powersave mode firstly and only if you're not satisfied with the results, switch to performance.
You can switch between the "performance" and "powersave" intel_pstate governors manually by using the following commands:
- use the "powersave" intel_pstate cpufreq governor:
sudo cpupower frequency-set -g powersave
- use the "performance" cpufreq intel_pstate governor:sudo cpupower frequency-set -g performance
You can see the currently active cpufreq governor by using the following command:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
4. If you want to make the "powersave" governor default in Ubuntu (using the commands above commands, the settings are lost after a reboot), firstly install cpufrequtils:
sudo apt-get install cpufrequtils
And then edit the /etc/init.d/cpufrequtils file and change GOVERNOR to "powersave" (GOVERNOR="powersave"). You can do this automatically by using the following command:
sudo sed -i 's/^GOVERNOR=.*/GOVERNOR="powersave"/' /etc/init.d/cpufrequtils
To revert this change and set the governor back to default (which is "ondemand" and that's not available for Intel P-State, but I'm adding this info in case you don't want to use Intel P-State any more), use the command below:
sudo sed -i 's/^GOVERNOR=.*/GOVERNOR="ondemand"/' /etc/init.d/cpufrequtils
It's also worth mentioning that TLP supports Intel P-State.
Install thermald
Thermald is available in the official Ubuntu 14.04 and 14.10 repositories. To install it, use the following command:
sudo apt-get install thermald
Thermald should then start automatically.Update: for Ubuntu 14.04, you can install the latest Thermald backported from Ubuntu 14.10 by using the failsdownloads Backports PPA. Or you can manually download the deb from HERE.
Thermald is not available for older Ubuntu versions but you can compile it from source.
Arch Linux users can install thermald via AUR.
For other Linux distributions, search for Thermald in your distro's repositories or compile it from source.
Arch Linux users can install thermald via AUR.
For other Linux distributions, search for Thermald in your distro's repositories or compile it from source.
More info / references:
- https://01.org/linux-thermal-daemon/documentation/introduction-thermal-daemon
- https://wiki.debian.org/thermald
- https://wiki.ubuntu.com/Kernel/PowerManagement/ThermalIssues
- https://github.com/01org/thermal_daemon
thanks to apater for the tip!
Advanced Power Management Tool `TLP` 0.6 Released, Install It In Ubuntu
TLP was updated to version 0.6 recently, receiving some fixes for Linux Kernel 3.15 and 3.16 along with systemd improvements and other changes.
Also, with this release, TLP is no longer disabled when laptop-mode-tools is detected and instead, a warning is displayed about possible conflicts.
Also, with this release, TLP is no longer disabled when laptop-mode-tools is detected and instead, a warning is displayed about possible conflicts.
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 however, you can manually change its settings by editing the TLP configuration file: /etc/default/tlp
Changes in TLP 0.6:
- set systemd service type to simple, allows tlp service to start asynchronously in the background;
- remove DISABLE_TPACPIBAT from configuration;
- remove DEVICES_TO_ENABLE_ON_RADIOSW from configuration because it's deprecated: works with Ubuntu 12.04/Kernel 3.2 only;
- enable RUNTIME_PM_ALL by default (controls runtime power management for PCI(e) bus devices);
- do not touch kernel settings if param is empty or commented: DISK_IDLE_SECS_ON, MAX_LOST_WORK_SECS_ON, SCHED_POWERSAVE_ON, NMI_WATCHDOG, SATA_LINKPWR_ON, PCIE_ASPM_ON, RADEON_DPM_STATE_ON, RADEON_POWER_PROFILE_ON, WIFI_PWR_ON, SOUND_POWER_SAVE_ON, RUNTIME_PM_ON;
- tlp-stat:
- consider changed sysfs paths for i915 enable_rc6/fbc as of kernel 3.15;
- consider changed sysfs paths for hwmon coretemp/sensors as of kernel 3.15/3.16;
- report speed of all fans, not just the first one;
- show warning for kernel sata errors (possibly) caused by SATA_LINKPWR_ON_BAT/AC=min/medium power;
- retrieve trace output from systemd journal if present;
- do not disable TLP when laptop-mode-tools is detected, just output a warning about possible conflicts;
- fix: Makefile - remove tlp-nop in uninstall-tlp target;
- fix: tlp-stat - don't suggest tp-smapi on non-ThinkPad hardware with thinkpad_acpi loaded;
- fix: tlp-stat - don't show /proc/acpi/ibm/fan on Lenovo non-ThinkPad models.
Install TLP in Ubuntu / Linux Mint
The latest TLP 0.6 is no longer disabled when laptop-mode-tools is detected and a warning is displayed instead however, it's best to remove laptop-mode-tools if installed, to avoid any possible conflicts. In Ubuntu / Debian / Linux Mint, remove laptop-mode-tools using the following command:
sudo apt-get purge laptop-mode-tools
Ubuntu / Linux Mint 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 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
Subscribe to:
Posts (Atom)