When we manage or use Linux laptops, regardless of their distribution , there are a number of sensitive issues on which we must pay attention to have the best performance and one of these elements is undoubtedly the battery. As we use the equipment and its multiple programs and applications , the battery life cycles are gradually consumed and if we reach the limit of this we will have problems since it will be necessary to connect the equipment directly to the current for use which restricts its portability..
There are several useful tools that allow us to manage and control battery usage in Linux environments. By default, Linux desktop environments allow us to perform certain actions on the battery by clicking on the icon at the top or bottom:
We can see the current percentage of battery usage:
Let's see some of the practical utilities for this administration.
1. How to use battery Monitor in Ubuntu to buy battery usage
It is a program that has been designed basically to display notifications about charging, downloading and not charging the battery status in Linux environments. Battery Monitor is a utility tool that has been developed in Python3 and PyGtk3.
Step 1
For this case we will use Ubuntu and for its installation we will execute the following command to install the necessary dependencies:
sudo apt install build-essential python3 python3-gi libnotify-dev acpi
After this, we will run the following line to download the latest version:
cd Downloads wget https://github.com/maateen/battery-monitor/archive/master.zip
Step 2
We proceed to decompress the file and access the directory created:
unzip master.zip cd battery-monitor-master
Step 3
After this we proceed with the installation of the utility:
sudo make install
2. How to use battery Monitor in Ubuntu to buy battery usage from PPA repositories
Step 1
This utility can also be installed from the PPA repositories by executing the following:
sudo add-apt-repository ppa: maateen / battery-monitor -y sudo apt-get update sudo apt-get install battery-monitor -y
We can access the utility from the search engine:
Step 2
This application will automatically run in the background and when accessing pro first time we will see the following.
Step 3
There we can configure the percentages of the battery notifications according to their status.
Depending on this we will receive the respective notifications either full load, download or upload:
3. How to view GNOME power statistics on Linux
It is a utility integrated in the GNOME environment through which we can carry out the tasks of control and supervision of energy and other components.
Step 1
This is installed by default, but if not, we can install it by running the following:
sudo apt install gnome-power-manager
We will access it from the search engine:
Step 2
At the time of access we go to the Laptop battery section where we will see a complete summary of the current battery status:
Step 3
In the History or History tab, we can access statistics based on times (10 minutes, 2 days, 6 days, one week):
4. How to check battery usage on Linux with PowerTop
This utility is linked to the Top command in Linux and is ideal to know in detail what applications or services are making high energy consumption in the system.
Step 1
For its installation we will execute the following:
sudo apt install powertop
Step 2
To know which services use energy, we execute the following. There we find this information in detail.
sudo powertop
Step 3
We also have the possibility of exporting this result to HTML format for later opening in any browser, for this, just run the following line:
sudo powertop --html = report.html
Step 4
Then we will double click on the file created and this will be the result displayed:
We can see a general summary or go to each section for detailed information..
With these options we will have better control over the battery in Linux.