imported>Dalto |
imported>Dalto |
Line 1: |
Line 1: |
| | __TOC__ |
|
| |
|
| Power Saving Techniques can be used on Laptops to maximize the battery life, minimize the heat produced, and conserve energy.
| |
|
| |
|
| = Power Saving using TLP =
| | Power Saving techniques can be used to minimize the heat produced and conserve energy. On laptops, this can be especially important as it can significantly extend battery life and excessive heat can be both uncomfortable and loud on portable devices. |
|
| |
|
| TLP can be used for automatic power management, as explained in the following quote from their website:
| |
|
| |
|
| <blockquote>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 fulfil your specific requirements.
| | =Power Management Software= |
| | [[File:battery.png|left|96px]] |
|
| |
|
| All TLP settings are stored in the config file /etc/default/tlp. As the default configuration already provides for optimized battery saving, in many cases there is no immediate need to change it.
| |
|
| |
|
| TLP is a pure command line tool with automated background tasks. It does not contain a GUI.</blockquote>
| | There are several options for managing power under Manjaro. In this article, we will introduce three of the more popular options. |
|
| |
|
| == How to Install TLP ==
| |
|
| |
|
| {{Note|TLP conflicts with laptop-mode-tools, so if laptop-mode-tools is installed it will be removed.}} | | {{note|In most cases running more than one power management tool at a time can cause conflicts so it is best practice to only use one of the below options}} |
|
| |
|
| TLP is available from the Manjaro repositories, can be installed by entering the following command into your terminal:
| | <br clear="all"/> |
|
| |
|
| sudo pacman -S tlp
| | ==TLP== |
|
| |
|
| ''iw'' and ''smartmontools'' are among the optional dependencies.
| | [http://linrunner.de/en/tlp/tlp.html TLP] is the most commonly used option for automatic power management. |
|
| |
|
| After installation, TLP then needs to be configured to be run automatically when you start up your computer. To do so, enter the following commands into your terminal:
| |
|
| |
|
| systemctl enable tlp
| | ===Installing TLP=== |
| systemctl enable tlp-sleep.service
| |
|
| |
|
| With these enabled TLP should automatically start every time you boot your computer.
| | TLP is available from the Manjaro repositories, can be installed with your favorite package manager or by using entering the following command into your terminal: |
|
| |
|
| === TLP Configuration ===
| | pamac install tlp |
|
| |
|
| See http://linrunner.de/en/tlp/docs/tlp-configuration.html
| | Now that it is installed, you need to start and enable the services. This can be accomplished with the commands: |
| | systemctl enable --now tlp |
| | systemctl enable --now tlp-sleep.service |
|
| |
|
| From the Arch wiki: [https://wiki.archlinux.org/index.php/TLP#Configuration TLP#Configuration]
| |
|
| |
|
| === Using with powertop === | | ===Configuring TLP=== |
| | [[File:Tlpui.png|left|400px]] |
|
| |
|
| See http://linrunner.de/en/tlp/docs/tlp-faq.html#powertop
| |
|
| |
|
| = An Alternative to TLP for Laptop Users =
| | TLP can manually configured by editing the file '''/etc/default/tlp''' as described in [http://linrunner.de/en/tlp/docs/tlp-configuration.html The Official Documentation]. |
|
| |
|
| {{warning|TLP and laptop-mode-tools conflict with each other, hence only ''one'' of them can be installed at a time.}}
| |
|
| |
|
| From the Arch Wiki:
| | A simpler way to configure TLP is via the GUI tool [https://github.com/d4nj1/TLPUI TLPUI] |
|
| |
|
| <blockquote>'Laptop Mode Tools is a laptop power saving package for Linux systems. It is the primary way to enable the Laptop Mode feature of the Linux kernel, which lets your hard drive spin down. In addition, it allows you to tweak a number of other power-related settings using a simple configuration file.'</blockquote>
| |
|
| |
|
| To install '''laptop-mode-tools''', enter the following command into your terminal: | | To install TLPUI install the package '''tlpui''' using your favorite package manager or with the command |
| | pamac install tlpui |
|
| |
|
| sudo pacman -S laptop-mode-tools
| | <br clear="all"/> |
|
| |
|
| Once installed, to enable ''laptop-mode-tools'' to start automatically every time you boot your computer, enter the following into your terminal:
| | ==Laptop Mode Tools== |
|
| |
|
| sudo systemctl enable laptop-mode.service
| | An Alternative to TLP for laptops is [https://github.com/rickysarraf/laptop-mode-tools Laptop Mode Tools(LMT)]. |
|
| |
|
| ''laptop-mode-tools'' automatically configures some settings for you in order to optimize your laptop's battery life.
| |
|
| |
|
| == Laptop-Mode-Tools Configuration == | | ===Installing LMT=== |
|
| |
|
| For configuration, the file to edit is '''/etc/laptop-mode/laptop-mode.conf''' (primary configuration file)
| | To install {{ic|laptop-mode-tools}}, enter the following command into your terminal: |
|
| |
|
| The individual kernel modules can be configured from the configuration files present in '''/etc/laptop-mode/conf.d/'''
| | pamac install laptop-mode-tools |
|
| |
|
| See the [https://wiki.archlinux.org/index.php/Laptop_Mode_Tools#Configuration Arch Wiki] for more details.
| | Once installed, to enable LMT to start automatically every time you boot your computer, enter the following into your terminal: |
|
| |
|
| = Minimizing Laptop/Desktop temperatures =
| | sudo systemctl enable --now laptop-mode.service |
|
| |
|
| == For Intel Machines ==
| | LMT automatically configures some settings for you in order to optimize your laptop's battery life. |
|
| |
|
| The Intel pstate driver automatically handles CPU frequency scaling according to system load.
| |
|
| |
|
| Note that the Intel Pstate works only with kernels >= 3.9, and kernel 3.11+ is recommended.
| | ===LMT Configuration=== |
|
| |
|
| Primary supported processor families are Intel Sandy Bridge (also known as ''2nd generation'' of i3/5/7 processors) and up.
| | For configuration, the file to edit is {{ic|/etc/laptop-mode/laptop-mode.conf}}} |
|
| |
|
| The Intel Thermal Daemon (thermald) can be installed to automatically manage the CPU temperature. | | The individual kernel modules can be configured from the configuration files present in {{ic|/etc/laptop-mode/conf.d/}} |
|
| |
|
| To install it, following command can be used:
| |
|
| |
|
| sudo pacman -S thermald
| | ==PowerTOP== |
|
| |
|
| After installing it needs to be configured to automatically start at boot in order to work:
| | PowerTop a diagnostic tool used to identify and report issues with power consumption and management. It can be used as a reporting tool, an automated power management tool or both. |
|
| |
|
| sudo systemctl enable thermald
| |
|
| |
|
| ==For AMD Machines== | | ===Installing PowerTop=== |
|
| |
|
| With Linux Kernel 3.11+, AMD introduced '''Dyanamic Power Management (DPM)''' for their ''free (open-source) GPU drivers'', which can lead to lower power consumption and better operating temperatures.
| | It can be installed as |
| | pamac install powertop |
|
| |
|
| To enable it, edit the {{ic|/etc/default/grub}} file:
| |
|
| |
|
| sudo gedit /etc/default/grub
| | ===Generating Reports=== |
|
| |
|
| and add/change the line:
| | You can generate a report using powertop with the command: |
| | | sudo powertop --html |
| ''GRUB_CMDLINE_LINUX=""'' to
| |
| ''GRUB_CMDLINE_LINUX="radeon.dpm=1"'' | |
|
| |
|
| Then regenerate the grub configuration file:
| | This will create the file {{ic|powertop.html}} in the current directory. You can open this file in any web browser. |
|
| |
|
| sudo grub-mkconfig -o /boot/grub/grub.cfg | | If you are using TLP for power management you may notice some differences in the recommendations between the tools. The article [http://linrunner.de/en/tlp/docs/tlp-faq.html#powertop Comparing TLP with PowerTop reporting] describes some of the reasons for these differences. |
|
| |
|
| = PowerTOP =
| |
|
| |
|
| PowerTop a diagnostic tool used to identify and report issues with power consumption and management. | | ===Automated Tuning with PowerTop=== |
| It can be used to check the power consumption.
| |
|
| |
|
| It can be installed as-
| | The command {{ic|sudo powertop --auto-tune"}} will allow PowerTop to automatically tune power management based on it's recommendations. |
|
| |
|
| sudo pacman -S powertop
| | From a practical perspective, the best way to use PowerTops auto-tuning is with a systemd service. |
|
| |
|
| To run PowerTop to analyze power consumption: | | To create, start and enable a systemd service for PowerTop you can use the commands: |
| | sudo sh -c "echo -e '[Unit]\nDescription=PowerTop\n\n[Service]\nType=oneshot\nRemainAfterExit=true\nExecStart=/usr/bin/powertop --auto-tune\n\n[Install]\nWantedBy=multi-user.target\n' > /etc/systemd/system/powertop.service" |
| | sudo systemctl enable --now powertop.service |
|
| |
|
| sudo powertop
| |
|
| |
|
| To save PowerTops output to a file,
| | =Temperature/Thermal Management= |
|
| |
|
| sudo powertop --html
| | ==ThermalD== |
| | [https://github.com/intel/thermal_daemon ThermalD], the Linux Thermal Daemon can be used to automatically handle CPU frequency scaling according to system load. |
|
| |
|
| For more details, see [http://wiki.manjaro.org/index.php?title=PowerTOP_to_Optimise_Laptop_Power_Consumption Powertop : Manjaro Wiki]
| | To install it, install {{ic|thermald}} in your favorite package manager or use the command: |
| | pamac install thermald |
|
| |
|
| =Support=
| | After installing it needs to be configured to automatically start at boot in order to work: |
| | | sudo systemctl enable --now thermald |
| Following is a link to this page's forum counterpart where you can post any related feedback: [http://forum.manjaro.org/index.php?topic=6867.0]
| |
|
| |
|
| Credit goes to LiberteCzech for posting about TLP, and to Arup for posting about Thermald, and to the Arch Wiki for their documentation, especially on Laptop-Mode-Tools
| |
|
| |
|
| =See Also= | | =See Also= |