I installed sys-power/powertop-1.97 and it seems to be some kind of a bad joke. Since pictures are worth a thousand words, I'll attach two "screenshots" of 1.13 and 1.97 that will hopefully speak for themselves. Reproducible: Always Actual Results: Have an app displaying meaningless numbers. Expected Results: Have an useful app displaying power usage stats. Portage 2.2.0_alpha26 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.2, glibc-2.13-r2, 2.6.37-pf5 x86_64) ================================================================= System uname: Linux-2.6.37-pf5-x86_64-Pentium-R-_Dual-Core_CPU_T4300_@_2.10GHz-with-gentoo-2.0.1 Timestamp of tree: Mon, 14 Mar 2011 12:30:01 +0000 distcc 3.1 x86_64-pc-linux-gnu [disabled] app-shells/bash: 4.2_p7 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.1-r1, 3.1.3-r1 dev-util/cmake: 2.8.4 sys-apps/baselayout: 2.0.1-r1 sys-apps/openrc: 0.7.0 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.68 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.21 sys-devel/gcc: 4.5.2 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82 virtual/os-headers: 2.6.36.1 (sys-kernel/linux-headers) Repositories: gentoo dupa Installed sets: ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=core2 -pipe -g" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -march=core2 -pipe -g" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--keep-going" FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://gentoo.mirror.pw.edu.pl/ http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://mirror.netcologne.de/gentoo/" LANG="pl_PL.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="pl" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/moje" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X Xaw3d a52 aac aalib acl acpi alsa amd64 amr amrnb amrwb async audiofile automount bash-completion berkdb bfq bineditor bluetooth branding bzip2 cairo cdaudio cdda cddb cdio cdparanoia cdr cli consolekit cracklib crypt css cups curl cxx dbus devhelp dirac disk-partition divx djvu dri dts dvd dvdr editor emboss emovix enca encode exchange exif faac faad fam fat ffmpeg fftw firefox firefox3 flac fontconfig fortran gd gdbm gdu geoip gif glitz gmedia gphoto2 gpm gtk hddtemp htmlhandbook iconv id3 id3tag imagemagick inotify ipod jack jpeg kde kde4 kdehiddenvisibility kipi kpathsea kqemu ladspa lame laptop lcms libcaca libnotify libsamplerate llvm lm_sensors mad mikmod mjpeg mmap mmx mmxext mng modules mp3 mp3tunes mp4 mpeg mplayer mtp mudflap multilib musicbrainz ncurses nls nptl nptlonly nsplugin ntfs ogg openal opencore-amr opencore-amrnb opencore-amrwb opengl openmp pam pango pch pcre pdf perl plasma png policykit ppds pppd private-headers python qt-copy qt3 qt3support qt4 rar readline realmedia roe sasl scanner schroedinger sdl secure-delete sensord session sndfile solver soundtouch sourceview spell sse sse2 ssl ssse3 startup-notification svg swat symlink sysfs syslog tcpd theora threads tiff truetype udev unicode upnp usb vamp vcd vorbis webkit wicd wmf wmp wxwidgets wxwindows x264 xcb xcomposite xine xml xorg xscreensaver xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" COLLECTD_PLUGINS="battery sensors rrdtool" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="x86_64 i386" QEMU_USER_TARGETS="x86_64 i386" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 265823 [details] good old powertop-1.13
Created attachment 265825 [details] broken powertop-1.97
Official website lists latest version 1.13: http://www.lesswatts.org/projects/powertop/ working download: http://www.lesswatts.org/projects/powertop/download/powertop-1.13.tar.gz non existing: http://www.lesswatts.org/projects/powertop/download/powertop-1.97.tar.gz weird.
interesting... http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-power/powertop/ChangeLog?view=markup
http://freshmeat.net/projects/powertop shows a picture of v1.8 - as expected. v1.97 looks strange for me like Piotrs attached screenshot.
ah sorry 1.8 = 1.08, not like 1.80. So I don't know how >1.13 has to look like.
http://lists.lesswatts.org/pipermail/discuss/2011-January/000509.html http://www.kernel.org/pub/linux/status/powertop/powertop-1.97.tar.bz2 Seems to work on Fedora and Ubuntu.
It appears to call modprobe twice: + for CPU_FREQ_STAT (cpufreq_stats module, "CPU frequency translation statistics"), and + for msr (X86_MSR, "/dev/cpu/*/msr - Model-specific register support") As well as that, it tries to mount debugfs (CONFIG_DEBUG_FS should be set in the kernel config). With both the modules in the kernel and with debugfs not compiled in, it segfaults. What are your experiences? Does your kernel match these requirements?
The ebuild needs adjustments for what in kernel needs to be enabled, but given the fact the nifty einfo lines that are now in were irelevant for quite while now and i was not into figuring what all needs to be enabled i kindly left to the users to figure out, thats why we call it testing. The stuff is not broken, suprisingly it works quite well on my laptop, despite the fact it is beta release which developers ask to be tested. Might be good idea to use this bug as tracking for all the required modules and then just removing that useless einfo and putting proper stuff to pkg_pretend phase for kernel checks.
I have all of the mentioned kernel modules installed. powertop-1.97 still doesn't give any useful info. It gives me a list of devices with 100% or 0% "usage", whatever that means. Some of the devices have "usage" measured in "pkts/s" which doesn't tell me anything. The best (or worst, depending on your mood) part is the first line: Summary: -nan wakeups/second, -nan GPU ops/second and -nan VFS ops/sec It *is* broken.
Certainly. I have already committed some work in -r1 which makes it respect CC, CXX and CFLAGS - it previously failed to do so for lack of a configure script to set CC and CXX, and it injected some unwanted CFLAGS of its own which I sedded out. I'll fix the trivial NLS stuff too as there are currently no translations but it does have a file erroneously called nl.po, which would be the translation for the Dutch locale - it fails to install anything but does make the nl locale directory, which is useless without actual files in it. But that's for -r2, which should also have more information on the required kernel config settings.
Looks like it also needs: net-wireless/bluez x11-apps/xset judging by the system() calls.
I have added some missing RDEPEND and DEPEND entries now, too. As __warn_unused_result will show with modern compilers, the system() entries return values aren't checked yet, which probably was the cause of some segfaults I saw on a system without net-wireless/bluez (for /usr/sbin/hciconfig).
I enabled CONFIG_ENABLE_DEFAULT_TRACERS and it seems to fix all the stats except VFS ops/sec. Still working on that one. This is on vanilla 2.6.37.2 fyi.
I've enabled default tracers in the kernel and there was a slight improvement: http://pastebin.com/zwAmemgU NaNs were replaced by 0,0s (go figure) and the usage column became, let's say, more varied. I still have no idea what these numbers mean. Is it showing me this "usage" thing in the units of seconds per seconds? "Events/s" column is displaying only 0s.
Created attachment 265965 [details] powertop --html output Here is my --html output, which gives a better picture of what's working and what's not. C-states & P-states numbers still look a bit goofy and disk IOPS is still all zeroes.
A few things I've come across from the powertop ML-- The patch included at powertop-1.97/patches/linux-2.6.37-vfs-dirty-inode.patch should enable VFS ops/sec output. Also, fyi, it appears to still apply cleanly to this morning's 2.6.38 release. I now get: Summary: 904.5 wakeups/second, 27.9 GPU ops/second and 27.0 VFS ops/sec --- GPU ops/sec is only available for intel GPUs so far. Maybe that was already known, maybe not... radeon support is supposed to be coming soon. --- TODO file from current git has this under "needed before 2.0": * we're somehow broken on 64 bit. again. The powertop bin built from git doesn't seem any more broken than 1.97 to me, I can't tell exactly what is supposed to be broken. But probably worth nothing that upstream says it's broken.
(In reply to comment #12) > Looks like it also needs: > net-wireless/bluez > x11-apps/xset > > judging by the system() calls. Yes - I have '-bluetooth' in my /etc/make.conf and this brand new powertop-1.97-r1 pulled bluez and some other bluetooth-related packages.
In reply to comment 13, made by Jeroen on 2011-03-14 21:58:25 UTC: > I have added some missing RDEPEND and DEPEND entries now, too. As > __warn_unused_result will show with modern compilers, the system() entries > return values aren't checked yet, which probably was the cause of some > segfaults I saw on a system without net-wireless/bluez (for > /usr/sbin/hciconfig). You are talking about powertop-1.97/tuning/bluetooth.cpp, lines 177 and 180. I can’t see any reason why the program should segfault if /usr/sbin/hciconfig is not available. There must be another reason; perhaps you can try to reproduce the problem and create a stack trace. If the system function fails with an error, the exit code is ignored, but that does not change anything. In reply to comment 18 made by Paweł on 2011-03-19 17:07:25 UTC: > (In reply to comment #12) >> Looks like it also needs: >> net-wireless/bluez >> x11-apps/xset >> >> judging by the system() calls. > > Yes - I have '-bluetooth' in my /etc/make.conf and this brand new > powertop-1.97-r1 pulled bluez and some other bluetooth-related packages. Please see bug 359641 comment 2. Thanks.
In the ChangeLog for Linux Kernel 2.6.37-rc9 one can find this: > commit a3a4a5acd3bd2f6f1e102e1f1b9d2e2bb320a7fd > Author: Arjan van de Ven <arjan@linux.intel.com> > Date: Thu May 5 23:55:18 2011 -0400 > > Regression: partial revert "tracing: Remove lock_depth from event entry" > > This partially reverts commit e6e1e2593592a8f6f6380496655d8c6f67431266. > > That commit changed the structure layout of the trace structure, which > in turn broke PowerTOP (1.9x generation) quite badly. > > I appreciate not wanting to expose the variable in question, and > PowerTOP was not using it, so I've replaced the variable with just a > padding field - that way if in the future a new field is needed it can > just use this padding field. > > Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> > Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (taken from: http://www.kernel.org/pub/linux/kernel/v2.6/testing/ChangeLog-2.6.39-rc7) I didn't bother to read the diff or commit e6e1e2593592a8f6f6380496655d8c6f67431266 or to test it (don't have powertop installed right now) but it might help
Please look at patch for 2.0 ebuild https://bugs.gentoo.org/show_bug.cgi?id=414803#c2
*** Bug 419431 has been marked as a duplicate of this bug. ***
I'm marking this a duplicate because there are two near identical rather active bugs. I'll be resolving this in bug #414803 shortly here. Thanks to all for the good discussion, is was most helpful in resolving this issue. *** This bug has been marked as a duplicate of bug 414803 ***