What about my laptop battery? A simple command for Linux users.
I bought my laptop second-hand when I was travelling, and the battery is always a problem. It’s usually a few years old and therefore has less power than a new one. I always notice this when I’m travelling, so I always have a suitable powerbank with me.
That’s annoying, of course, so I wanted to find out exactly how my battery is doing. My laptop is running Linux. How do I check the current status of the power bank?
Linux: Read out battery values
The Linux command upower -e
lists the devices that are monitored by “upower”. UPower is a Linux system service that manages the Linux power supply devices.
The output looks something like this:
Here we will also find our battery. We can then use the following command:
upower -i /org/freedesktop/UPower/devices/battery_BAT0
display the status information of our battery. Adjust the device if necessary.
The command provides a wealth of information about the power supply. Of particular interest is the energy-full
parameter, which displays the current maximum capacity of the battery. The energy-full-design
parameter, on the other hand, indicates the capacity that the battery had when it was new. The value capacity
shows in per cent how much of the original design capacity is still available.
Conclusion
Around two thirds of the original battery capacity is still available. That’s not catastrophic, but it’s not ideal either. If the battery only lasts four hours instead of six when travelling, this is clearly noticeable, especially as the capacity will continue to decrease.
So the decision has been made: the battery will soon be replaced. Fortunately, the replacement of my model is uncomplicated.