The Linux PowerTOP tool -- please post patches to the mailing list instead of using github pull requests

Related tags



PowerTOP is a Linux* tool used to diagnose issues with power consumption and power management. In addition to being a diagnostic tool, PowerTOP also has an interactive mode you can use to experiment with various power management settings, for cases where the Linux distribution has not enabled those settings.

Build dependencies

PowerTOP is coded in C++. It was written for Linux-based operating systems. GNU* libc (glibc) and Linux pthreads are needed for PowerTOP to function properly. The GNU build system (autoconf, automake, make, libtool), as well as gettext, are required to build PowerTOP.

In addition, PowerTOP requires the following:

  • kernel version => 2.6.38
  • ncurses-devel (required)
  • libnl-devel (required)
  • pciutils-devel (is only required if you have PCI)
  • autoconf-archive (for building)

Example packages to install in Ubuntu*:

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

Building PowerTOP

The script needs to be run only once to generate configure. You need to re-run it only if the build system configuration files (e.g. are modified. The remaining steps are required whenever source files are modified.

To build PowerTOP from the cloned source, use the following commands:


Running PowerTOP

The following sections go over basic operation of PowerTOP. This includes kernel configuration options (or kernel patches) needed for full functionality. Run powertop --help to see all options.

Kernel parameters and (optional) patches

PowerTOP needs some kernel config options enabled to function properly. As of linux-3.3.0, these are (the list probably is incomplete):


Use these configs from linux-3.13.rc1:


The patches in the patches/ sub-directory are optional but enable full PowerTOP functionality.

Outputting a report

When PowerTOP is executed as root and without arguments, it runs in interactive mode. In this mode, PowerTOP most resembles top.

For generating reports, or for filing functional bug reports, there are two output modes: CSV and HTML. You can set sample times, the number of iterations, a workload over which to run PowerTOP, and whether to include debug-level output.

For an HTML report, execute PowerTOP with this option:

powertop --html=report.html

This creates a static report.html file, suitable for sharing.

For a CSV report, execute PowerTOP with this option:

powertop --csv=report.csv

This creates a static powertop.csv file, also suitable for sharing.

If you wish to file a functional bug report, generate and share a debug-mode HTML report and share it, using the following command:

powertop --debug --html=report.html

Important Note: As PowerTOP is intended for privileged (root) use, your reports-- especially when run with --debug-- will contain verbose system information. PowerTOP does not sanitize, scrub, or otherwise anonymize its reports. Be mindful of this when sharing reports.

Developers: If you make changes to the HTML reporting code, validate HTML output by using the W3C* Markup Validation Service and the W3C CSS Validation Service:

Calibrating and power numbers

PowerTOP, when running on battery, tracks power consumption and activity on the system. Once there are sufficient measurements, PowerTOP can start to report power estimates for various activities. You can help increase the accuracy of the estimation by running a calibration cycle at least once:

powertop --calibrate

Calibration entails cycling through various display brightness levels (including "off"), USB device activities, and other workloads.

Extech Power Analyzer / Datalogger support

Our analysis teams use the Extech* Power Analyzer/Datalogger (model number 380803). PowerTOP supports this device over the serial cable by passing the device node on the command line using this command:

powertop --extech=/dev/ttyUSB0

(where ttyUSB0 is the devicenode of the serial-to-usb adapter on our system)

Contributing to PowerTOP and getting support

There are numerous ways you and your friends can contribute to PowerTOP. See the document for more details. Elevator summary: "fork, and send PRs!".

We have a mailing list: [email protected]:

If you find bugs, you can file an issue-- see for further details:

Code from other open source projects

PowerTOP contains some code from other open source projects; we'd like to thank the authors of those projects for their work. Specifically, PowerTOP contains code from

Parse Event Library - Copyright 2009, 2010 Red Hat Inc  Steven Rostedt <[email protected]>
nl80211 userspace tool - Copyright 2007, 2008	Johannes Berg <[email protected]>

Copyright and License

Copyright (C) 2020  Intel Corporation

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

See COPYING file for a copy of the aforementioned (GPLv2) license.


/* SPDX-License-Identifier: GPL-2.0-only */


  • Start fixing memory leaks

    Start fixing memory leaks

    There are currently some memory leaks and this pull request fixes about half of it according to valgrind.

    opened by tomspur 7
  • Dropped unused variable

    Dropped unused variable "entry" detected by Coverity

    The following two issues which were introduced between 2.11 and 2.12 were fixed:

    • Fixed the issue when the closedir in the intel_cpus.cpp could be called with the NULL arg.
    • Dropped unused local variable "entry" in the devfreq.cpp.

    Signed-off-by: Jaroslav Škarvada [email protected]

    opened by yarda 6
  • Release 2.11 availability on

    Release 2.11 availability on

    Do you plan on adding release 2.11 to I can't built the tarball retrieved from because it misses the configure script and autoreconf does not work because it also misses the version-long file.

    opened by ffontaine 5
  • make - no such a file or directory.

    make - no such a file or directory.

    I'm trying to update my version following the commands listed into the README file but when I try to run ./make I receive an output - no such a file or directory. What do I do wrong? I have installed all the sample packages for Ubuntu, I'm using elementary OS Hera, based on Ubuntu 18.04

    opened by nnmlss 5

    The goal of this commit is to fix an error encountered when building 2.13 on Chromium OS.

    emerge-${board} powertop
      checking for libnl-3.0 >= 3.0 libnl-genl-3.0 >= 3.0... yes
      checking for library containing inet_aton... none required
       * pkg-config: ERROR: Do not call unprefixed tools directly.
       * pkg-config: ERROR: For board tools, use `tc-export PKG_CONFIG` (or ${CHOST}-pkg-config).
       * pkg-config: ERROR: For build-time-only tools, `tc-export BUILD_PKG_CONFIG` (or ${CBUILD}-pkg-config).
       * python3 /mnt/data/chromiumos/chromite/bin/cros_sdk --enter --chrome_root=chrome_root
       *   `-python3 /mnt/data/chromiumos/chromite/bin/cros_sdk --enter --chrome_root=chrome_root
       *       `-bash
       *           `-emerge -b /usr/lib/python-exec/python3.6/emerge --root-deps powertop
       *               `-sandbox /usr/lib/portage/python3.6/ configure
       *                   ` /usr/lib/portage/python3.6/ configure
       *                       ` /usr/lib/portage/python3.6/ configure
       *                           `-configure ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-cros-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/powertop-2.13 --htmldir=/usr/share/doc/powertop-2.13/html --with-sysroot=/build/volteer --libdir=/usr/lib64 --disable-nls
       *                               `-pkg-config /build/volteer/tmp/portage/sys-power/powertop-2.13/temp/build-toolchain-wrappers/pkg-config --exists bash-completion
       *                                   `-pstree -a -A -s -l 10567
       * ERROR: sys-power/powertop-2.13::portage-stable failed (configure phase):
       *   Bad pkg-config [--exists bash-completion] invocation

    The environment variable is populated for board specific tooling.

    declare -x PKG_CONFIG="/build/volteer/build/bin/pkg-config"
    opened by edwarddavidbaker 4
  • Indicate that the <tab> key is to use to navigate in the application

    Indicate that the key is to use to navigate in the application

    This makes is explicit how to leave or navigate in the program from the front page. It changes one string for the translators.


    opened by pypingou 4
  • Add service file

    Add service file

    On openSUSE we install this service file to /usr/lib/systemd/system/powertop.service.

    opened by jubalh 4
  • use pkg-config to detect proper ncurses flags.

    use pkg-config to detect proper ncurses flags.

    Full details at and

    In gentoo, tinfo is an optional part of ncurses and that causes an issue when pkg-config is not used to detect the proper flags to use ncurses support. Patch written by Jeroen Roovers.

    opened by ZeroChaos- 3
  • Fix powertop build with libc++.

    Fix powertop build with libc++.

    header is not automatically included with libc++. Add it explicitly to make powertop build with libc++.

    This fixes the following errors: devices/gpu_rapl_device.cpp:35:14: error: use of undeclared identifier 'time'; did you mean 'tie'? last_time = time(NULL); ^~~~ devices/gpu_rapl_device.cpp:45:14: error:use of undeclared identifier 'time'; did you mean 'tie'? last_time = time(NULL); ^~~~

    parameters/learn.cpp:161:10: error: use of undeclared identifier 'time'; did you mean 'tie'? start = time(NULL); ^~~~

    opened by m-gupta 3
  • Quite -> Quiet in message catalogs (with an additional rough fix for the Russian translation)

    Quite -> Quiet in message catalogs (with an additional rough fix for the Russian translation)

    ... Russian.)

    b8af9381618d0ce5508685f75391cf0b6172a946 began this work, but missed a string and its translations.

    opened by obra 3
  • Question about WakeUp tab

    Question about WakeUp tab

    I'd like to use powertop --auto-tune as a systemd service on startup, but it disables a selection in the WakeUp tab that I'd like to keep enabled.

    Is there anyway to permanently enable something in the WakeUp tab so that it doesn't get auto-tuned away?

    opened by hahuang65 0
  • powertop-2.14: compilation fails with 'undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'

    powertop-2.14: compilation fails with 'undefined reference to symbol '[email protected]@GLIBC_2.2.5'

    It's using pthread, but it doesn't build/link with -pthread by default. I think it should build out-of-the box without any special user LDFLAGS/CGLAGS.

    Build log snip on Fedora rawhide (f35):

    libtool: link: g++ -Wall -Wformat -Wshadow -fno-omit-frame-pointer -fstack-protector -I/usr/include/libnl3 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o powertop powertop-devlist.o powertop-display.o powertop-lib.o powertop-main.o calibrate/powertop-calibrate.o cpu/powertop-abstract_cpu.o cpu/powertop-cpu.o cpu/powertop-cpu_core.o cpu/powertop-cpu_linux.o cpu/powertop-cpu_package.o cpu/powertop-cpu_rapl_device.o cpu/powertop-cpudevice.o cpu/powertop-dram_rapl_device.o cpu/powertop-intel_cpus.o cpu/powertop-intel_gpu.o cpu/rapl/powertop-rapl_interface.o devices/powertop-ahci.o devices/powertop-alsa.o devices/powertop-backlight.o devices/powertop-devfreq.o devices/powertop-device.o devices/powertop-gpu_rapl_device.o devices/powertop-i915-gpu.o devices/powertop-network.o devices/powertop-rfkill.o devices/powertop-runtime_pm.o devices/powertop-thinkpad-fan.o devices/powertop-thinkpad-light.o devices/powertop-usb.o measurement/powertop-acpi.o measurement/powertop-extech.o measurement/powertop-measurement.o measurement/powertop-sysfs.o measurement/powertop-opal-sensors.o parameters/powertop-learn.o parameters/powertop-parameters.o parameters/powertop-persistent.o perf/powertop-perf.o perf/powertop-perf_bundle.o process/powertop-do_process.o process/powertop-interrupt.o process/powertop-powerconsumer.o process/powertop-process.o process/powertop-processdevice.o process/powertop-timer.o process/powertop-work.o report/powertop-report-data-html.o report/powertop-report-formatter-base.o report/powertop-report-formatter-csv.o report/powertop-report-formatter-html.o report/powertop-report-maker.o report/powertop-report.o tuning/powertop-bluetooth.o tuning/powertop-ethernet.o tuning/powertop-iw.o tuning/powertop-runtime.o tuning/powertop-tunable.o tuning/powertop-tuning.o tuning/powertop-tuningsysfs.o tuning/powertop-tuningusb.o tuning/powertop-tuningi2c.o tuning/powertop-wifi.o wakeup/powertop-wakeup.o wakeup/powertop-waketab.o wakeup/powertop-wakeup_ethernet.o wakeup/powertop-wakeup_usb.o  -lnl-genl-3 -lnl-3 -lncursesw -lncurses -ltinfo -lpci ../traceevent/.libs/libtraceevnet.a
    /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/11/ undefined reference to symbol '[email protected]@GLIBC_2.2.5'
    /usr/bin/ld: /usr/lib64/ error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status

    In the src/ it's using PTHREAD_CFLAGS and PTHREAD_LIBS, but it's probably missing corresponding autotools macro call (ax_pthread). I used the following patch in Fedora downstream and can PR if needed:

    --- a/
    +++ b/
    @@ -3,6 +3,7 @@
     AC_INIT([powertop], [2.14], [[email protected]], [], [])
    @@ -37,6 +38,7 @@ AC_PROG_CC
     # Checks for libraries.
    opened by yarda 0
  • Fix buffer overrun

    Fix buffer overrun

    If a content of /proc/[pid]/cmdline was longer than 4096, then buffer overrun occured. (Because cmdline_to_string required a double '\0' at the end of the string) Moreover, if a cmdline contained a zero length argument, cmdline_to_string ignored the rest of arguments.

    opened by kariya-mitsuru 0
  • Bogus (380 mW) value for power consumption

    Bogus (380 mW) value for power consumption

    I have a HP EliteBook 735 G6 laptop. It is AMD-based. On it, powertop reports completely bogus values for power consumption and battery time remaining. Something like:

    The battery reports a discharge rate of 368 mW
    The energy consumed was 7.38 J
    The estimated remaining time is 50 hours, 6 minutes

    At the same time, Cinnamon battery applet correctly reports that the battery is good only for 2 hours and 20 minutes.

    Presumably, this is because none of the methods that powertop can use for determining the battery discharge rate actually works:

    20:06:58.602628 openat(AT_FDCWD, "/sys/class/power_supply/BAT0/present", O_RDONLY) = 123
    20:06:58.602687 read(123, "1\n", 8191)  = 2
    20:06:58.603210 openat(AT_FDCWD, "/sys/class/power_supply/BAT0/status", O_RDONLY) = 123
    20:06:58.603286 read(123, "Discharging\n", 8191) = 12
    20:06:58.604335 openat(AT_FDCWD, "/sys/class/power_supply/BAT0/power_now", O_RDONLY) = -1 ENOENT (No such file or directory)
    20:06:58.604398 openat(AT_FDCWD, "/sys/class/power_supply/BAT0/energy_now", O_RDONLY) = -1 ENOENT (No such file or directory)
    20:06:58.604449 openat(AT_FDCWD, "/sys/class/power_supply/BAT0/voltage_now", O_RDONLY) = 123
    20:06:58.604500 read(123, "11140000\n", 8191) = 9
    20:06:58.604571 openat(AT_FDCWD, "/sys/class/power_supply/BAT0/current_now", O_RDONLY) = 123
    20:06:58.604620 read(123, 0x5630a5a7e730, 8191) = -1 ENODEV (No such device)

    The only usable attribute is charge_now, but, alas, powertop does not know how to use it.

    $ LANG=en_US.UTF-8 grep -rH .
    uevent:POWER_SUPPLY_SERIAL_NUMBER=13856 2020/04/22
    serial_number:13856 2020/04/22
    grep: current_now: No such device
    grep: power/autosuspend_delay_ms: Input/output error
    grep: hwmon2/power/autosuspend_delay_ms: Input/output error
    grep: hwmon2/curr1_input: No such device
    opened by patrakov 0
  • powertop2tuned new_profile_name --force failed

    powertop2tuned new_profile_name --force failed

    Environment information: powertop-2.13 tuned-2.10.0

    when i run powertop2tuned new_profile_name --force Excpected result: run success Actual result: failed and return 255

    opened by yangzz-97 0
  • Jittery input through dock

    Jittery input through dock

    Hardware: Dell Latitude E7270 I use an official Dell docking station (can't recall the exact name, But it's an Eport with USB3 support, without the serial ports)

    When I powerTOP is running, and I set the laptop in the dock, the Logitech Unify input devices get jittery the mouse does not move properly, and key strokes are often delayed.

    Powertop is run with powertop --auto-tune

    opened by rasmus91 0
  • running powertop drops all scaling_max_frequency to lowest on arm64 yoga c630 laptop

    running powertop drops all scaling_max_frequency to lowest on arm64 yoga c630 laptop

    Hello, On ubuntu 20.04 with powertop (from repo or newest git) when I run the program It sets my scaling_max_frequency to lowest possible frequency. My laptop has 4 slow cores at 1.7ghz and 4 fast cores at 2.9ghz. It seems mostly random on which cores it will make slow, usually (%65? of time) the slow cores get slowed, slightly less often the higher cores get slowed and sometimes both. I edited src/cpu/abstract_cpu.cpp and commented out lines 479 to 492 which are supposed to reapply correct max scaling freq after "wiggling" the cpu .Now the issue seems to have stopped. I can fix the cpu's by simply running; echo 2956800 > /sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq echo 1766400 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq

    If this is caused by the HMP multicore setup or something else Im not sure. If a fix could be mainlined even if a command line or compile time option would be great. Thank you

    opened by bm16ton 0
  • Unaligned column headers.

    Unaligned column headers.

    This is with PowerTOP v2.11 from Ubuntu, as I could not build from repo source.

    When using the curses interface, the column descriptions are not aligned with the columns that they describe. Resizing the xterm does not fix it.

    Screenshot from 2020-11-03 09-50-10

    opened by stolk 0
  • gettext version on Ubuntu.

    gettext version on Ubuntu.

    I have an up to date Ubuntu LTS, and used the apt command from the documentation.

    Why trying to build...

    $ sh 
    autoreconf: Entering directory `.'
    autoreconf: running: autopoint
    autopoint: *** The AM_GNU_GETTEXT_VERSION declaration in your
                   file requires the infrastructure from gettext-0.20.2 but this version
                   is older. Please upgrade to gettext-0.20.2 or newer.
    autopoint: *** Stop.
    autoreconf: autopoint failed with exit status: 1

    Is the version dictated by unnecessary high, or does Ubuntu LTS just lag too much?

    $ dpkg --list | grep libgettext
    ii  libgettextpo-dev:amd64                                amd64        process PO files - static libraries and headers
    ii  libgettextpo0:amd64                                   amd64        process PO files - shared library
    opened by stolk 2
  • Cannot turn off

    Cannot turn off "Bluetooth device" tuneable

    I'm using powertop, and it's a bit aggressive suspending my Bluetooth, so my mouse is suspended if I stop moving it for a few seconds.

    I'm trying to turn this off by running powertop, and then in the Tuneables tab I select Bluetooth device interface status and hit enter.

    This seems to attempt to run /usr/sbin/hciconfig hci0 up &> /dev/null &. However, hciconfig has been deprecated upstream and no longer ships with bluez (it's been absent for about 3 years now).

    Bluez seems to now include btmgmt, though I haven't been able to figure out how to turn off power saving with it.

    opened by WhyNotHugo 0
Personal CRM. Remember everything about your friends, family and business relationships.

Personal Relationship Manager Monica is a great open source personal relationship management system. Introduction Purpose Features Who is it for? What

Monica 12.9k Jun 6, 2021
Self-hosted VirusTotal / MetaDefender wannabe with API, demo UI and Scanners running in Docker.

MalwareMultiScan Self-hosted VirusTotal / OPSWAT MetaDefender wannabe API for scanning URLs and files by multiple antivirus solutions. IMPORTANT: vers

Volodymyr Smirnov 233 Jun 6, 2021
A black hole for Internet advertisements

Network-wide ad blocking via your own Linux hardware The Pi-hole® is a DNS sinkhole that protects your devices from unwanted content, without installi

Pi-hole 31.4k Jun 5, 2021
A free open source IT asset/license management system

Snipe-IT - Open Source Asset Management System This is a FOSS project for asset management in IT Operations. Knowing who has which laptop, when it was

snipe 5k Jun 3, 2021
TMSU lets you tags your files and then access them through a nifty virtual filesystem from any other application.

Overview TMSU is a tool for tagging your files. It provides a simple command-line utility for applying tags and a virtual filesystem to give you a tag

Paul Ruane 1.5k Jun 1, 2021
Graphical program used to map keyboard buttons and mouse controls to a gamepad. Useful for playing games with no gamepad support

antimicro ?? Important update ?? This repo is currently unmaintained. The code hasn't been updated for a while. But not all is lost, antimicro has a f

null 1.4k Jun 5, 2021
Multi-platform app that allows your devices to communicate

KDE Connect - desktop app KDE Connect is a multi-platform app that allows your devices to communicate (eg: your phone and your computer). (Some) Featu

KDE GitHub Mirror 1.1k Jun 7, 2021
Display and control your Android device

scrcpy (v1.17) Read in another language This application provides display and control of Android devices connected on USB (or over TCP/IP). It does no

Genymobile 49.4k Jun 4, 2021
Mirror of the PulseAudio sound server (for bug reports and pull requests go to the website!)


PulseAudio 285 Jun 5, 2021
Open source back-end server for web, mobile and IoT. The backend for busy developers. (self-hosted or hosted)

A scalable, multitenant backend for the cloud. Para is a scalable, multitenant backend server/framework for object persistence and retrieval. It helps

Erudika 395 May 26, 2021
Want a Movie or TV Show on Plex or Emby? Use Ombi!

Welcome Ombi is your friendly media request tool, automatically syncs with your media servers! Don't worry, it's grandma friendly, and more importantl

Ombi 2.5k Jun 6, 2021
AlertHub is a simple tool written with NodeJS to get alerted from new GitHub and GitLab repository events.

AlertHub _ _ _ _ /_\ | | ___ _ __| |_ /\ /\_ _| |__ //_\\| |/ _ \ '__| __|/ /_/ / | | | '_ \ / _ \ | __/ | |

Arda Kılıçdağı 96 Jun 3, 2021
🎧 Kaku is a highly integrated music player supports different online platform like YouTube, SoundCloud, Vimeo and more. Available on Mac, Windows and Linux.

Kaku Kaku is a highly integrated music player that supports different online platforms like YouTube, SoundCloud, Vimeo and more. Available on Windows,

Chia-Lung Chen 1k Jun 2, 2021
Mobile Shell

Mosh: the mobile shell Mosh is a remote terminal application that supports intermittent connectivity, allows roaming, and provides speculative local e

Mosh (mobile shell) 10k Jun 4, 2021