Giter Club home page Giter Club logo

yoga-c630-powertop's Introduction

Taken from ubuntu 2004 arm repos. The yoga c630 arm6 laptop does not survive the cpu wiggle max_Scaling_frequency reapply, so I didabled it. So far so good. Without this patch my cpu speeds would fall and stay at the lowest possible freqs. In order to build natively I had to uninstall autoconf-archive to get around "too many loops" error and I had to replace the pthread check in configure.ac with CXXFLAGS, I left the original as configure.ac-og if your build enviroment is better then mine and want to change it.

Build dependencies

PowerTOP uses C++, and expects g++ and libstdc++ to be functional along with a glibc/pthreadsi, autoconf, automake, and libtool in the development environment.

In addition to that, PowerTOP requires the following components:

pciutils-devel (is only required if you have PCI) ncurses-devel (required) libnl-devel (required) kernel version => 2.6.38

Example packages to install in Ubuntu

sudo apt-get install libpci-dev sudo apt-get install libnl-3-dev libnl-genl-3-dev sudo apt-get install gettext libgettextpo-dev sudo apt-get install autopoint sudo apt-get install gettext sudo apt-get install libncurses5-dev libncursesw5-dev sudo apt-get install libtool-bin sudo apt-get install dh-autoreconf

Building & Installing PowerTOP

To build and install PowerTOP type the following commands, ./autogen.sh ./configure ./make ./make install

The autogen script is required to run only once to generate the configure for the build. Rest of the steps are required to run everytime there is a change made to the PowerTop.

Note: For Android (running Intel Architecture ) there is a Android.mk that was provided by community members, and at this time is supported mostly by community members.

Build PowerTop for Android LollyPop

  1. Obtain pciutils and ncurses libraries. Skip this step if they are already in the tree.

    pciutils: Clone https://github.com/trevd/android_external_pciutils into external/pciutils

    ncurses: Clone https://github.com/cvpcs/android_external_libncurses into external/ncurses

  2. Run ./src/csstoh.sh src/powertop.css src/css.h to generate the css.h header file.

  3. Apply patches inside patches/Android

  4. PowerTop can be built with top level make, or by doing "mm".

    The resulting binary is under $ANDROID_PRODUCT_OUT/system/bin/powertop

Kernel Parameters:

PowerTOP needs some kernel config options enabled in order function properly. As of linux-3.3.0 these are (list probably incomplete):

CONFIG_NO_HZ CONFIG_HIGH_RES_TIMERS CONFIG_HPET_TIMER CONFIG_CPU_FREQ_GOV_ONDEMAND CONFIG_USB_SUSPEND CONFIG_SND_AC97_POWER_SAVE CONFIG_TIMER_STATS CONFIG_PERF_EVENTS CONFIG_PERF_COUNTERS CONFIG_TRACEPOINTS CONFIG_TRACING CONFIG_EVENT_POWER_TRACING_DEPRECATED CONFIG_X86_MSR ACPI_PROCFS_POWER CONFIG_DEBUG_FS

Use these configs from linux-3.13.rc1 CONFIG_POWERCAP CONFIG_INTEL_RAPL

The patches in the patches/ sub-directory are required for PowerTOP to function fully.

Outputting a report

When invoking PowerTOP without arguments, PowerTOP starts in interactive mode. However, for reporting bugs etc there is a special reporting modes:

For an HTML formatted report simply execute PowerTOP with the following,

powertop --html

which will create a "powertop.html" file which is static and can be sent to others to help diagnose power issues. Additionally has the feature of showing the tunables executions within the report as a reference.

Note for the developers: If you make changes on the report format please make sure that the output can be cleanly validated by the W3C Markup Validation Service and W3C CSS Validation Service:

For a CSV formatted report, simply execute PowerTOP with the following,

Powertop --csv

which will create a “powertop.csv” file which is static and can be used in reporting, diagnoses, and analytical data analysis.

Also you can set the number of iterations, and duration of test, in which case all reports will time stamp for you.

Calibrating & Power Numbers

PowerTOP will, when running on battery, track your power consumption as well as your activity on the system. Once there are sufficient such measurements, PowerTOP can start to report power estimates for various activities. You can help get this estimation more accurate by running a calibration cycle:

powertop --calibrate

at least once; this will cycle through various display brightness levels (including "off") as well as USB device activities and some other workloads.

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 Rosted [email protected] nl80211 userspace tool - Copyright 2007, 2008 Johannes Berg [email protected]

Extech Power Analyzer / Datalogger support

I use, and our analysis teams use, the Extech Power Analyzer/Datalogger (model number 380803) quite a lot, and PowerTOP supports using this device over the serial cable. Just pass the device node on the command line like this

powertop --extech=/dev/ttyUSB0

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

yoga-c630-powertop's People

Contributors

bm16ton avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.