Raspberry Pi

How to Install PowerTOP on Raspberry Pi

PowerTOP is an open-source utility that allows users to find the root cause of their system power consumption error. It helps you analyze what process consumes more power and how to fix it later. This tool can be installed on different Linux-based operating systems, including the Raspberry Pi, and is highly effective in diagnosing your system power consumption.

Follow this tutorial if you wish to install PowerTOP on a Raspberry Pi system.

Install PowerTOP on Raspberry Pi

Use the below-given steps to install PowerTOP on the Raspberry Pi:

Step 1: Install Dependencies

First, ensure you have PowerTOP’s dependencies installed on your system and if not, the following command will do the job for you.

$ sudo apt install libpci-dev libncurses5-dev dh-autoreconf libnl-3-dev libnl-genl-3-dev gettext libgettextpo-dev autopoint gettext libncursesw5-dev libtool-bin autoconf-archive pkg-config -y

Step 2: Clone PowerTOP’s Source File

Now, clone the PowerTOP source file through the following command:

$ git clone https://github.com/fenrus75/powertop.git

Step 3: Run the Script File

Navigate to PowerTOP source directory through the following command:

$ cd powertop

Then run the following script file to prepare the installation files for PowerTOP.

$ ./autogen.sh

Step 4: Build System Configuration File

Now run the following system configuration file on the Raspberry Pi system:

$ ./configure

Step 5: Build Files and Install PowerTOP

Then use the following command to build the files required to install PowerTOP on Raspberry Pi system:

$ make

Then finalizes the PowerTOP installation on Raspberry system through the following command:

$ sudo make install

Step 6: Confirm PowerTOP Installation

To ensure PowerTOP is installed, run the following version command:

$ powertop --version

Run and Use PowerTOP on Raspberry Pi

To run PowerTOP on Raspberry Pi, use the following command:

$ sudo powertop

The output shows you information on system power consumption. There are different tabs, such as Overview, Idle stats, Frequency stats, and Device stats. Pressing the TAB key once will navigate you toward the next tab. If you want to see the system’s Idle stats information, press the TAB button to see the CPU processor state.

The next tab will show you the wakeups frequency of the CPU.

Pressing the TAB again will display the device stats (only device information) on the terminal.

The final TAB shows you the suggestion to optimize the system’s performance.

You can autotune the settings through the below-given command:

$ sudo powertop -c

You can also use the following command to generate PowerTOP’s report in HTML format.

$ sudo powertop --html=report.html

You can open this file from the home directory in the browser or share it with others.

To exit the PowerTop, simply press the ESC key.

For further help, open the PowerTOP manual through the following command:

$ man powertop

Conclusion

PowerTOP is a highly effective program that helps diagnose several issues with your device’s power consumption. It can be installed on Raspberry Pi by cloning the source file from the GitHub website and running the script and configuration file later. After that, you must use the make and make install command to complete the PowerTOP installation on the Raspberry Pi system.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.