Strange Behavior - PowerTOP 2.0 Seg Fault
by cshanahan@comcast.net
Hello,
I was reading PowerTOP documentation and was curious whether it could help me better manage power on my HP EliteBook 6930p laptop. I am running PowerTOP v.2.0 on openSUSE 12.2 64-bit. After looking at some of my options from the Overview and Stats tabs, I elected to run 'powertop --calibrate' as the docs suggest. PowerTOP did not complete the calibration process; it exited with a seg fault. Now the hardware button for WiFi (small button along the top of the laptop near the screen) flashes constantly. I'm concerned that PowerTOP caused some sort of hardware problem and damaged my laptop.
Is there a way for me to check what PowerTOP did to my machine?
Is there a way for me to completely revert any changes made by PowerTOP?
uname -a
Linux 6930p.site 3.4.11-2.16-desktop #1 SMP PREEMPT Wed Sep 26 17:05:00 UTC 2012 (259fc87) x86_64 x86_64 x86_64 GNU/Linux
6930p:~ # powertop --calibrate
Starting PowerTOP power estimate calibration
Calibrating idle
Segmentation fault
Any help would be greatly appreciated.
--
Chris
9 years, 9 months
[PATCH] configure: rework libnl detection and fix libnl-2 case (v2)
by Sergey Senozhatsky
Rework libnl detection.
PKG_CHECK_MODULES macro appends FOO_CFLAGS and FOO_LIBS flags
Example:
LIBNL_CFLAGS = -I/usr/include/libnl3
LIBNL_LIBS = -lnl-genl-3 -lnl-3
while AC_SEARCH_LIBS only prepends -llibrary to LIBS, so AC_SEARCH_LIBS
is not helpful.
Use pkg-config PC file names to search for minimum package versions:
libnl 3.+ -- libnl-3.0.pc
libnl 2.+ -- libnl-2.0.pc
libnl 1.+ -- libnl-1.0.pc
Patch also changes $has_libnl_ver == 0 error message and suppresses
failed PKG_CHECK_MODULES output.
Austin pointed out that libnl-2.0 provide only libnl-2.0.pc pkg-config
file, while libnl-3 has at least 5 of them (for every `so').
This is why we check libnl-3.0.pc and libnl-genl-3.0.pc in libnl-3 case.
Many thanks to Austin Zhang for help.
v2: Namhyung Kim reported that libnl-1.0.pc on Ubuntu is named libnl-1.pc.
Reported-and-tested-by: Austin Zhang <zhang.austin(a)gmail.com>
Tested-by: Namhyung Kim <namhyung(a)gmail.com>
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>
---
configure.ac | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index b8c183f..02952b3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,15 +54,14 @@ PKG_CHECK_MODULES([PCIUTILS], [libpci],[has_libpci=1],[
has_libnl_ver=0
-PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0], [
- has_libnl_ver=3], [
- AC_SEARCH_LIBS([nl_socket_alloc], [nl-3 nl-genl-3], [
- has_libnl_ver=3], [
- AC_SEARCH_LIBS([nl_socket_alloc], [nl], [
- has_libnl_ver=2], [
- PKG_CHECK_MODULES([LIBNL], [libnl-1], [has_libnl_ver=1], [])])])])
+# libnl-2 provides only libnl-2.0.pc file, so we check for separate libnl-genl-3.0.pc
+# pkg-config file just for libnl-3.0 case.
+#
+PKG_CHECK_MODULES([LIBNL], [libnl-3.0 >= 3.0 libnl-genl-3.0 >= 3.0], [has_libnl_ver=3], [
+ PKG_CHECK_MODULES([LIBNL], [libnl-2.0 >= 2.0], [has_libnl_ver=2], [
+ PKG_CHECK_MODULES([LIBNL], [libnl-1], [has_libnl_ver=1], [has_libnl_ver=0])])])
if (test "$has_libnl_ver" -eq 0); then
- AC_MSG_ERROR(libnl is required but not found)
+ AC_MSG_ERROR(libnl and libnl-genl are required but were not found)
fi
if (test "$has_libnl_ver" -gt 1); then
AC_DEFINE([HAVE_LIBNL20], [1], [Define if you have libnl-2.0 or higher])
9 years, 9 months
[PATCH] Change library/pkg search condition for libnl2/3
by zhang.austin@gmail.com
From: Austin Zhang <zhang.austin(a)gmail.com>
So that we can configure in system with libnl2 or/and libnl3.
Without/With this patch, the './configure' result as:
--------------------------------------------------------------------------------
| ubuntu 11-10 || ubuntu 12.04
--------------------------------------------------------------------------------
| libnl-1 | libnl-2 | libnl-3 || libnl-1 | libnl-2 | libnl-3
--------------------------------------------------------------------------------
without this patch | Pass | Fail | Fail || Pass | Fail | Pass
with this patch | Pass | Pass | Pass || Pass | Pass | Pass
--------------------------------------------------------------------------------
Signed-off-by: Austin Zhang <zhang.austin(a)gmail.com>
---
configure.ac | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index b8c183f..ccc0ec5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,11 +54,11 @@ PKG_CHECK_MODULES([PCIUTILS], [libpci],[has_libpci=1],[
has_libnl_ver=0
-PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0], [
+PKG_CHECK_MODULES([LIBNL], [libnl-3.0], [
has_libnl_ver=3], [
AC_SEARCH_LIBS([nl_socket_alloc], [nl-3 nl-genl-3], [
has_libnl_ver=3], [
- AC_SEARCH_LIBS([nl_socket_alloc], [nl], [
+ PKG_CHECK_MODULES([LIBNL], [libnl-2.0], [
has_libnl_ver=2], [
PKG_CHECK_MODULES([LIBNL], [libnl-1], [has_libnl_ver=1], [])])])])
if (test "$has_libnl_ver" -eq 0); then
--
1.7.5.4
9 years, 9 months
[PATCH] configure: rework libnl detection and fix libnl-2 case
by Sergey Senozhatsky
Rework libnl detection.
PKG_CHECK_MODULES macro appends FOO_CFLAGS and FOO_LIBS flags
Example:
LIBNL_CFLAGS = -I/usr/include/libnl3
LIBNL_LIBS = -lnl-genl-3 -lnl-3
while AC_SEARCH_LIBS only prepends -llibrary to LIBS, so AC_SEARCH_LIBS
is not helpful.
Use pkg-config PC file names to search for minimum package versions:
libnl 3.+ -- libnl-3.0.pc
libnl 2.+ -- libnl-2.0.pc
libnl 1.+ -- libnl-1.0.pc
Patch also changes $has_libnl_ver == 0 error message and suppresses
failed PKG_CHECK_MODULES output.
Austin pointed out that libnl-2.0 provide only libnl-2.0.pc pkg-config
file, while libnl-3 has at least 5 of them (for every `so').
This is why we check libnl-3.0.pc and libnl-genl-3.0.pc in libnl-3 case.
Many thanks to Austin Zhang for help.
Reported-and-tested-by: Austin Zhang <zhang.austin(a)gmail.com>
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>
---
configure.ac | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index b8c183f..676ee54 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,15 +54,14 @@ PKG_CHECK_MODULES([PCIUTILS], [libpci],[has_libpci=1],[
has_libnl_ver=0
-PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0], [
- has_libnl_ver=3], [
- AC_SEARCH_LIBS([nl_socket_alloc], [nl-3 nl-genl-3], [
- has_libnl_ver=3], [
- AC_SEARCH_LIBS([nl_socket_alloc], [nl], [
- has_libnl_ver=2], [
- PKG_CHECK_MODULES([LIBNL], [libnl-1], [has_libnl_ver=1], [])])])])
+# libnl-2 provides only libnl-2.0.pc file, so we check for separate libnl-genl-3.0.pc
+# pkg-config file just for libnl-3.0 case.
+#
+PKG_CHECK_MODULES([LIBNL], [libnl-3.0 >= 3.0 libnl-genl-3.0 >= 3.0], [has_libnl_ver=3], [
+ PKG_CHECK_MODULES([LIBNL], [libnl-2.0 >= 2.0], [has_libnl_ver=2], [
+ PKG_CHECK_MODULES([LIBNL], [libnl-1.0], [has_libnl_ver=1], [has_libnl_ver=0])])])
if (test "$has_libnl_ver" -eq 0); then
- AC_MSG_ERROR(libnl is required but not found)
+ AC_MSG_ERROR(libnl and libnl-genl are required but were not found)
fi
if (test "$has_libnl_ver" -gt 1); then
AC_DEFINE([HAVE_LIBNL20], [1], [Define if you have libnl-2.0 or higher])
9 years, 9 months
Successful building using Clang
by Paul Menzel
Dear PowerTOP folks,
I do not know if anyone of you has tried it already, so I just share my
result.
Using Debian Sid/unstable with Clang 3.1-8 [1], PowerTOP built without
problems. Here is the log.
$ git describe
v2.1.1-33-g3c71131
$ CC=clang CXX=clang++ ./configure
$ make
make all-recursive
make[1]: Entering directory `~/src/powertop'
Making all in traceevent
make[2]: Entering directory `~/src/powertop/traceevent'
CC event-parse.lo
event-parse.c:5030:12: warning: comparison of unsigned enum expression < 0 is always false [-Wtautological-compare]
if (type < 0 || type >= PEVENT_FUNC_ARG_MAX_TYPES) {
~~~~ ^ ~
1 warning generated.
CC parse-filter.lo
parse-filter.c:392:17: warning: implicit conversion from enumeration type 'enum filter_exp_type' to different enumeration type
'enum filter_op_type' [-Wconversion]
arg->op.type = etype;
~ ^~~~~
parse-filter.c:405:17: warning: implicit conversion from enumeration type 'enum filter_exp_type' to different enumeration type
'enum filter_op_type' [-Wconversion]
arg->op.type = etype;
~ ^~~~~
parse-filter.c:1042:27: warning: implicit conversion from enumeration type 'enum filter_cmp_type' to different enumeration type
'enum filter_exp_type' [-Wconversion]
arg = create_arg_cmp(ctype);
~~~~~~~~~~~~~~ ^~~~~
3 warnings generated.
CC parse-utils.lo
CC trace-seq.lo
CCLD libtraceevnet.la
make[2]: Leaving directory `~/src/powertop/traceevent'
Making all in src
make[2]: Entering directory `~/src/powertop/src'
CC csstoh.o
CCLD csstoh
./csstoh "."/powertop.css css.h
make all-am
make[3]: Entering directory `~/src/powertop/src'
CXX parameters/powertop-persistent.o
CXX parameters/powertop-learn.o
CXX parameters/powertop-parameters.o
CXX powertop-display.o
CXX cpu/powertop-cpu_core.o
CXX cpu/powertop-cpudevice.o
CXX cpu/powertop-cpu.o
CXX cpu/powertop-cpu_linux.o
CXX cpu/powertop-abstract_cpu.o
CXX cpu/powertop-cpu_package.o
CXX cpu/powertop-intel_cpus.o
CXX powertop-devlist.o
CXX powertop-lib.o
CXX report/powertop-report.o
CXX process/powertop-process.o
CXX process/powertop-processdevice.o
CXX process/powertop-powerconsumer.o
CXX process/powertop-timer.o
CXX process/powertop-work.o
CXX process/powertop-do_process.o
process/do_process.cpp:190:13: warning: unused function 'dbg_printf_pevent_info' [-Wunused-function]
static void dbg_printf_pevent_info(struct event_format *event, struct pevent_record *rec)
^
1 warning generated.
CXX process/powertop-interrupt.o
CXX perf/powertop-perf.o
CXX perf/powertop-perf_bundle.o
CXX devices/powertop-i915-gpu.o
CXX devices/powertop-device.o
CXX devices/powertop-alsa.o
CXX devices/powertop-runtime_pm.o
CXX devices/powertop-thinkpad-fan.o
CXX devices/powertop-usb.o
CXX devices/powertop-ahci.o
CXX devices/powertop-thinkpad-light.o
CXX devices/powertop-rfkill.o
CXX devices/powertop-backlight.o
CXX devices/powertop-network.o
CXX tuning/powertop-bluetooth.o
tuning/bluetooth.cpp:179:3: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result]
system("/usr/sbin/hciconfig hci0 up &> /dev/null &");
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tuning/bluetooth.cpp:182:2: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result]
system("/usr/sbin/hciconfig hci0 down &> /dev/null");
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
CXX tuning/powertop-cpufreq.o
tuning/cpufreq.cpp:118:2: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result]
system("/sbin/modprobe cpufreq_ondemand > /dev/null 2>&1");
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
CXX tuning/powertop-tuning.o
CXX tuning/powertop-tuningusb.o
CXX tuning/powertop-ethernet.o
CXX tuning/powertop-tunable.o
CC tuning/powertop-iw.o
CXX tuning/powertop-wifi.o
CXX tuning/powertop-tuningsysfs.o
CXX tuning/powertop-runtime.o
CXX calibrate/powertop-calibrate.o
calibrate/calibrate.cpp:297:3: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result]
write(fd, buffer, 64*1024);
^~~~~ ~~~~~~~~~~~~~~~~~~~
calibrate/calibrate.cpp:408:2: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result]
system("DISPLAY=:0 /usr/bin/xset dpms force off");
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
calibrate/calibrate.cpp:410:2: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result]
system("DISPLAY=:0 /usr/bin/xset dpms force on");
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
calibrate/calibrate.cpp:416:2: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result]
system("DISPLAY=:0 /usr/bin/xset dpms force off");
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
calibrate/calibrate.cpp:418:2: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result]
system("DISPLAY=:0 /usr/bin/xset dpms force on");
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 warnings generated.
CXX measurement/powertop-measurement.o
CXX measurement/powertop-power_supply.o
CXX measurement/powertop-acpi.o
CXX measurement/powertop-sysfs.o
CXX measurement/powertop-extech.o
measurement/extech.cpp:290:2: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result]
write(fd, " ", 1);
^~~~~ ~~~~~~~~~~
1 warning generated.
CXX report/powertop-report-maker.o
CXX report/powertop-report-formatter-base.o
CXX report/powertop-report-formatter-csv.o
CXX report/powertop-report-formatter-html.o
CXX powertop-main.o
CXX cpu/powertop-intel_gpu.o
CXXLD powertop
make[3]: Leaving directory `~/src/powertop/src'
make[2]: Leaving directory `~/src/powertop/src'
Making all in po
make[2]: Entering directory `~/src/powertop/po'
make[2]: Leaving directory `~/src/powertop/po'
Making all in doc
make[2]: Entering directory `~/src/powertop/doc'
make[2]: Für das Ziel »all« ist nichts zu tun.
make[2]: Leaving directory `~/src/powertop/doc'
make[2]: Entering directory `~/src/powertop'
make[2]: Leaving directory `~/src/powertop'
make[1]: Leaving directory `~/src/powertop'
I did not do any other tests like comparing size and speed differences
of the generated code. Maybe somebody else has time to do that.
Thanks,
Paul
[1] http://packages.debian.org/changelogs/pool/main/c/clang/clang_3.1-8/chang...
9 years, 9 months
Consistent spelling of PowerTOP
by Paul Menzel
Dear PowerTOP folks,
the spelling in the README is PowerTOP. If this is the preferred
spelling – I’d like Powertop better – could this also be used in the
mailing list tag(?), which is currently [Powertop].
Thanks,
Paul
9 years, 9 months
[Announcement] PowerTOP Announcement
by Chris Ferron
Hello,
To day(November 1st 2012) marks string freeze for our next release
cycle. Starting now until November 15th, we will only be taking bug
fixes without string changes. The POT file has been updated to
Transfex.net, and I will be pulling translation sever-times over the
next 12 days. On November 12th I will pull translations for the last
time, and only merge Major bugs fixes moving forward.
There is one date change for this release cycle. The community meeting
was set for the November 22nd, but that actually falls on a US holiday.
So the community meeting will be moved back 1 day to November 21st.
Nov 1st (string freeze)
Nov 12th (stop taking all but critical patches)
Nov 15th (release v2.2)
Nov 22nd (community meeting about v2.3)
Community Meetings -
This meeting will be the first where members will contribute to what is
added to PowerTOP's TODO list, discuss what PowerTOP needs for the next
release. Feel free to post topics and start conversation threads prior
to the meeting. We will gather topic that come up.
Meeting Times -
Location Local time Time zone UTC offset
Los Angeles (U.S.A) 8:00:00 AM PST UTC-8
Moscow (Russia) 8:00:00 PM MSK UTC+4
London (UK) 4:00:00 PM GMT UTC
IRC# -
#PowerTOP on freenode.net
Cheers,
Chris
9 years, 9 months
[Powertop ]compiling issue and running issue
by Austin Zhang
Hi,
I am trying to compile powertop on my box: ubuntu 12.04, X86-64.
(1)compiling issue
Here, my system didn’t install libnl-1, but I installed libnl2 (under
/usr/lib) and libnl-3 (under /lib).
Then when ‘./configure’, I got:
checking for LIBNL... no
configure: error: Package requirements (libnl-1) were not met:
No package 'libnl-1' found
so seemed the below logic in configure.ac doesn’t work
……
has_libnl_ver=0
PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0], [
has_libnl_ver=3], [
AC_SEARCH_LIBS([nl_socket_alloc], [nl-3 nl-genl-3], [
has_libnl_ver=3], [
AC_SEARCH_LIBS([nl_socket_alloc], [nl], [
has_libnl_ver=2], [
PKG_CHECK_MODULES([LIBNL], [libnl-1],
[has_libnl_ver=1], [])])])])
……
Then I uninstalled libnl-3, only leave libnl2 there, but no change, the
has_libnl_ver still is 1;
So I did some hacks, to set has_libnl_ver=2 (so got HAVE_LIBNL20 defined),
and remark above logic, then after got Makefile, I manully add -lnl and
-lnl-genl into ./src/Makefile, then I got one powertop linked against my
libnl-2.
But obviously, it is not a good idea to do as this. So is anyone
encountering similar issue there if only have libnl2 or libnl-3, the
original configure.ac in fact doesn’t work?
(2)running issue
With above got powertop (linked against libnl2), after launched the
powertop, I cannot switch to other menus (Idle stats/Freq stats/Device
stats/Tunable), I can only stay at ‘overview’ menu, direction arrows only
move the screen a little left/right.
Is that one known issue?
Thanks.
9 years, 9 months