Newer kernel changes (2.6.36 to 3.0.0 and laters)

Discuss everything about PHCTool here. If you have any trouble with PHCTool please use the PHCTool Help forum.
Post Reply
User avatar
Docet
Posts: 44
Joined: Wed 23. Feb 2011, 18:30

Newer kernel changes (2.6.36 to 3.0.0 and laters)

Post by Docet » Sun 6. Mar 2011, 13:06

In newer kernels /proc/acpi/processor is DEPRECATED and moving to /sys/devices/system/cpu.

This causes bugs on cpu detection and makes GUI crash.

I found at list two bugs:

Code: Select all

Traceback (most recent call last):
File "./phctool.py", line 468, in <module>
app=appgui()
File "./phctool.py", line 81, in __init__
self.cpuinfo=cpuinfo.cpuinfo() ##functions to gather CPU informations
File "inc/libs/cpuinfo.py", line 12, in __init__
self._get_acpi_cpus() ##get ACPI-supported CPUs
File "inc/libs/cpuinfo.py", line 43, in _get_acpi_cpus
self.data[cpunr]['acpi']['exist']=False
UnboundLocalError: local variable 'cpunr' referenced before assignment


Which I completely solved and:

Code: Select all

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'


Which is related to throttling interface. I proper fixed the throttling path, but no idea on how to set the data as my CPU has no throttling.

Hope someone can help, fell free to replace older cpuinfo.py with this version.



Cheers

EDIT: 07/21/12

Fixed Bug with 4-8 cores
Attachments
cpuinfo.py.tar.gz
(2.19 KiB) Downloaded 511 times
Last edited by Docet on Sat 21. Jul 2012, 11:46, edited 4 times in total.

Bzzz
Posts: 6
Joined: Sat 5. Feb 2011, 09:34

Re: Newer kernel changes (2.6.36 and laters)

Post by Bzzz » Sun 10. Apr 2011, 15:12

Hi,

any chance on getting the GUI to work without throttling? I think my P8600 also doesn't support this, but at least the GUI on 2.6.35-25 showed up...I'm tired of using an old kernel just because phc doesn't work on the new one.

User avatar
Docet
Posts: 44
Joined: Wed 23. Feb 2011, 18:30

Re: Newer kernel changes (2.6.36 and laters)

Post by Docet » Sun 10. Apr 2011, 23:48

Follow this guide and I can say kernel *.38 is supported, without throttling.

http://linuxsolver.blogspot.com/2011/02 ... buntu.html

Cheers

Post Reply