Checking up on your laptop’s battery usage is highly recommended to maintain long battery life and charging. While the battery icon in your taskbar might show the battery charging status, capacity, and predicted time of discharge, it will not give any information about battery usage and its lasting effect on battery’s life.
In this article, we will use the following utilities to get detailed battery information on Linux Mint 20.
TLP is a command-line battery optimization tool. To install TLP use the following command.
sudo apt install tlp
You can check battery information by running the following command.
sudo tlp-stat -b
Remember to run TLP commands with root or sudo privileges.
To view more information, Run the following command.
sudo tlp-stat -s
You can also explore other options of tlp-state command by running the “tlp-stat -h” or “man tlp-stat”.
ACPI is a command-line tool that fetches battery and thermal information from the file system such as /proc and /sys.
Run the following command to install the ACPI tool.
sudo apt-get install acpi
You can get summary information about the battery by running the following command.
To get more detailed battery information, run.
To query other specific options of acpi command, run the “acpi -h” or “man acpi”.
Sysfs File system
The files in the sysfs file system contain information about devices, filesystems, and other kernel modules.
You can see the battery information in the sysfs file system by running the following command.
upower is a command-line tool that contains information about power sources on the system.
First, you have to select the path your power source is using. To see different power sources and their paths, run.
For laptops, your battery source would have a path ending in pattern BAT0, BAT1, or BAT2. Next copy that path and run the following command to see battery information.
upower -i <your power source path>
Alternatively, you can make use of the BAT pattern and run the following command to get the same results.
upower -i `upower -e | grep 'BAT'`
Get all upower options by running “upower -h” or “man upower”.
Power statistics is a graphical user interface tool that comes installed in Linux Mint and provides a detailed analysis of our battery usage.
To run Power statistics, search for power statistics in your applications and click on the power statistics icon.
Go to the Laptop Battery in the sidebar. The window will display the battery details.
The history tab will show the battery analysis based on your battery history. You can see different analyses by changing the graph type.
The statistics tab will show the charge and discharge profile and accuracy of the current battery.
Pick your favorite method from the multiple methods shown in this article and check your battery health monthly to keep its charging cycle and usage optimized.
Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications including CCNA RS, SCP, and ACE. As an IT engineer and technical author, he writes for various websites.