Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 360009 - sys-power/phctool-0.5.2.2-r1 can't find throttling infos with kernel 2.6.38
Summary: sys-power/phctool-0.5.2.2-r1 can't find throttling infos with kernel 2.6.38
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal major with 1 vote (vote)
Assignee: Michael Weber (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-22 21:43 UTC by Fabio Veronese
Modified: 2011-11-10 09:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
library with fixed path collection (cpuinfo.py,6.76 KB, text/plain)
2011-03-22 21:45 UTC, Fabio Veronese
Details
Patch for sys-power/phctool-0.5.2.2-r1 (phctool_patch,919 bytes, patch)
2011-10-31 08:24 UTC, Fabio Veronese
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Veronese 2011-03-22 21:43:30 UTC
As happened for cpuinfos in bug Bug 352019 this time 2.6.38 kernels (and maybe laters) have no more "/proc/acpi/processor/.../throttling" folder.

Reproducible: Always

Steps to Reproduce:
1.Open the console
2.run "phctool"

Actual Results:  
No GUI:

Traceback (most recent call last):
  File "./phctool.py", line 468, in <module>
    app=appgui()
  File "./phctool.py", line 83, in __init__
    self.throttling=throttling.throttlecontrol(self.cpuinfo.data)
  File "inc/libs/throttling.py", line 16, in __init__
    self._cpus_have_interface()			##check which CPU has a trottling interface
  File "inc/libs/throttling.py", line 23, in _cpus_have_interface
    if os.path.exists('/proc/acpi/processor/'+self.cpus[cpu]['acpi']['acpiname']+'/throttling') & os.path.exists('/proc/acpi/processor/'+self.cpus[cpu]['acpi']['acpiname']+'/limit'):
KeyError: 'acpiname'


Expected Results:  
no output, just the proper window opening

In the suggested solution I fixed only the path, but some work on throttling interface (throttling.py) has to be done. I can't fix it myself because Core2Duo have no throttling. I have already posted a thread to PHC official forum, I'm waiting for some news.
Comment 1 Fabio Veronese 2011-03-22 21:45:41 UTC
Created attachment 266929 [details]
library with fixed path collection
Comment 2 Fabio Veronese 2011-03-22 21:46:30 UTC
Portage 2.1.9.42 (default/linux/amd64/10.0/desktop/gnome, gcc-4.4.5, glibc-2.11.3-r0, 2.6.38-gentoophobos x86_64)
=================================================================
System uname: Linux-2.6.38-gentoophobos-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9800_@_2.93GHz-with-gentoo-2.0.2
Timestamp of tree: Tue, 22 Mar 2011 20:45:01 +0000
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.6.6-r2, 3.1.3-r1
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.2
sys-apps/openrc:     9999
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.5
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo/ http://mirror.ovh.net/gentoo-distfiles/ http://mirror.netcologne.de/gentoo/"
LANG="it_IT"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="it en"
MAKEOPTS="-j3"
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="/dev/shm"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/x11"
SYNC="rsync://rsync.it.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 apic arch_perfmon berkdb bluetooth branding bts bzip2 cairo cdr clflush cli cmov consolekit constant_tsc cracklib crypt cups cx16 cx8 cxx dbus de dri ds_cpl dtes64 dts dvd dvdr eds emboss encode est evo exif fam fat fbcondecor fftw firefox flac flexpriority fortran fpu fxsr gallium gdbm gdu gif gnome gnome-keyring gnutls gpm gstreamer gtk ht iconv ida ipv6 jpeg lahf_lm lame laptop lcms ldap libnotify lm lm_sensors lock mad mca mce mikmod mmx mng modules monitor mozilla mp3 mp4 mpeg msr mtrr mudflap multilib nautilus ncurses networkmanager nls nptl nptlonly ntfs nx ogg opengl openmp pae pam pango pat pbe pcre pdcm pdf pebs perl pge png pni policykit ppds pppd pse pse36 python qt3support readline rep_good sdl sep session smx spell sqlite ss sse sse2 sse4_1 ssl ssse3 startup-notification svg syscall sysfs tcpd tiff tm tm2 tpr_shadow truetype tsc udev unicode usb usb-storage v4l v4l2 vme vmx vnmi vorbis wifi x264 xcb xfs xinerama xml xorg xsave xtpr xulrunner xv xvid 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="df interface irq load memory rrdtool swap syslog" 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="it en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel i965" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Sebastian Luther (few) 2011-10-30 12:54:23 UTC
(In reply to comment #1)
> Created attachment 266929 [details]
> library with fixed path collection

Could you please provide a patch (created with 'diff -u ...') instead of a full copy (or is it a complete rewrite?)?

Are there any news from upstream?
Comment 4 Fabio Veronese 2011-10-31 08:24:04 UTC
Created attachment 291337 [details, diff]
Patch for sys-power/phctool-0.5.2.2-r1

No news from developers forum... it looks like they are out of GUI developers. Anyway here comes the patch... sorry but I'm not so expert ^_^. If I'm patching a wrong version just let me know.

Cheers

PS: I confirm it works flawlessly (at least for me) till 3.0.3. not tested on newer kernels yet
Comment 5 Michael Weber (RETIRED) gentoo-dev 2011-11-10 09:54:57 UTC
+*phctool-0.5.2.2-r2 (10 Nov 2011)
+
+  10 Nov 2011; Michael Weber <xmw@gentoo.org> -phctool-0.5.2.2.ebuild,
+  +phctool-0.5.2.2-r2.ebuild, +files/phctool-0.5.2.2_gui_kernel_2.6.38.patch,
+  files/phctool-0.5.2.2_kernel_2.6.36.patch:
+  Added gui patch for 2.6.28 and newer kernels (thanks to Fabio Veronese for
+  the patch, bug 360009)
+