The powertop
program shows the power usage, but only after about five minutes. Before that, it shows:
no ACPI power usage estimate available
That's one of the limitations of the powertop
program. What program is recommended for reliably monitoring the power usage? Is it possible to get a power usage history similar to the memory usage history in the System Monitor as well?
As you surmised in your comment the limitation is not with the software but with your battery not reporting correctly.
To clarify these software tools below will only measure power consumption on laptops when running on battery. For desktop or server machines the only current solution is an electronic watt-meter that plugs into the mains socket.
#Power Statistics
In Ubuntu Precise 12.04 there is a new power statistics history window. This can be accessed by clicking the battery item in the application indicator menu then selecting Latop Battery tab.
#Powertop
As mentioned by the OP this program provides information on per process/device power usage.
#Powerstat
Another alternative that measures process/device power usage is powerstat that was written for Ubuntu by Colin King. There is a detailed review of its features on hecticgeek.com.
It can be installed from the PPA:
ppa:colin-king/powermanagement
You can have a look at PowerAPI (on github), which gives the power consumption at the process level on Linux. According to some experiments, it is more accurate than Powertop.
Have a look at
s-tui
: https://amanusk.github.io/s-tui/. Runs in the terminal, shows you the parameters pertinent to the CPU.I found that only TLP was able to report power consumption in near-realtime (<3 s delay), while at least for my system Gnome Power Statistics (
gnome-power-statistics
) andupower
had a delay of 120 seconds before the values updated again.To see current power as reported by TLP, use this command:
Environment: ThinkPad X201 Tablet with Ubuntu 20.04. TLP together with the SMAPI kernel module (that TLP recommends) installed with
sudo apt install tlp tp-smapi-dkms
, then TLP enabled withsudo tlp start
. It may be that the SMAPI kernel module enables the more frequent updates, as it provides a different way to access and configure the battery.Intel has a cross-platform (MacOS, and Windows) app called 'Intel Power Gadget' which provides for logging of power consumption information, including cumulative power measurements, via a command line version and a GUI version.
Intel have a version of Power Gadget for Linux but it hasn't been updated for a while. There's also an external version that has been modified/updated more recently.