A problem with CPU throttling??

If you run into trouble with PHCTool you can ask for help here.
Bob
Posts: 17
Joined: Mon 14. Jul 2008, 14:07

A problem with CPU throttling??

Post by Bob » Mon 14. Jul 2008, 14:15

Hello!
I downloaded the latest version of PHCTool (0.5.2) and installed it.
But everytime I try to run "PHCTool.sh", I get the following error:

Code: Select all

Traceback (most recent call last):
>  File "./phctool.py", line 467, in <module>
>   app=appgui()
>  File "./phctool.py", line 101, in __init__
>   self.ShowCPUInfos()            ##display CPU informations
>  File "./phctool.py", line 175, in ShowCPUInfos
>   firststate = self.throttling.data[cpu]['states']['T0'];
> KeyError: 'T0'
I haven´t found any solution yet, but I can´t imagine that I could be the only one with this problem....
Is anyone here able to help me??

the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57

Re: A problem with CPU throttling??

Post by the-fallen » Mon 14. Jul 2008, 19:26

Hello Bob,


looks like PHCTool is unable to get throttling information. I'm sorry you run into this problem.
Could you please check if the following file exist:
/proc/acpi/processor/CPU0/throttling
And maybe you can give me the content of that file by typing (as root):
cat /proc/acpi/processor/CPU0/throttling

What Kernel and what CPU are you using?

Bob
Posts: 17
Joined: Mon 14. Jul 2008, 14:07

Re: A problem with CPU throttling??

Post by Bob » Mon 14. Jul 2008, 19:56

First: Thank you for the fast answer!!!
I´m using kernel 2.6.24.19 and my CPU is a Intel Core2Duo T8100 with 2.1GHz.

The file "throttling" exits for CPU0 and CPU1.
Typing "cat /proc/acpi/processor/CPU0/throttling" as root leads to the following:

Code: Select all

Could not determine current throttling state
Typing "cat/proc/acpi/processor/CPU1/throttling" as root gives the answer:

Code: Select all

state count:             8
active state:            T8
state available: T0 to T7
states:
    T0:                  100%
    T1:                  88%
    T2:                  75%
    T3:                  63%
    T4:                  50%
    T5:                  38%
    T6:                  25%
    T7:                  13%

the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57

Re: A problem with CPU throttling??

Post by the-fallen » Mon 14. Jul 2008, 21:21

Thats really weired.

You have one physical CPU and two Cores in it and one of it is not capable of setting a throttle state?!
Never seen something like that (I have a Core2, too)

okay now .. humm ... the only Idea to solve this quickly is to disable the Throttling control in PHCTool.

The better way would be to find out why your system behave like that.

Try to add this line between line 172 and 173 in phctool.py
self.throttling.data[cpu]['exist'] = False

so it looks like this:

Code: Select all

....
			##gernerate information about available throttling states##
			self.throttling.data[cpu]['exist'] = False
			if self.throttling.data[cpu]['exist']:
....
This is an ugly hack that should disable the further use of throttling but I haven't checked if it is working (need some sleep now :) ) but I hope this will work for you.
If not, just go on writing. We will solve this .. one way or another :)
Attachments
phc-k8_v0.4.1.tar.gz
phc-k8 out-of-tree module v0.4.1 for AMD processors
(19.77 KiB) Downloaded 399 times

Bob
Posts: 17
Joined: Mon 14. Jul 2008, 14:07

Re: A problem with CPU throttling??

Post by Bob » Tue 15. Jul 2008, 13:39

Hello!
I got bad news.... :cry:
I tried your ugly hack and started "phctool.sh" .....this was the answer:

Code: Select all

File "./phctool.py", line 173
    self.throttling.data[cpu]['exist'] = False
    ^
IndentationError: unexpected indent

the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57

Re: A problem with CPU throttling??

Post by the-fallen » Wed 16. Jul 2008, 07:02

Hey ,

thats not really a problem. See what it says: "Bad Indend".
Within Python it is absolutely important that lines are correctly indented.
That's how Python decides to what block a line belongs to.

Please make sure that you have indented the new line exactly like the one above and beneath.

Good luck. Should be working then :)

If not, just write again :)

Bob
Posts: 17
Joined: Mon 14. Jul 2008, 14:07

Re: A problem with CPU throttling??

Post by Bob » Wed 16. Jul 2008, 13:38

:lol: Thanks!! There was one space too much :lol:
The program is running, but I can´t change anything. Seems I have to get the LinuxPHC patch to work properly first......

Bob
Posts: 17
Joined: Mon 14. Jul 2008, 14:07

Re: A problem with CPU throttling??

Post by Bob » Sat 19. Jul 2008, 10:55

I know I´m causing inconvenience......
.....But I have another problem..... :oops:
Everything worked fine yesterday. All I did was changing the VID values and checking the boxes to restore throttling and voltages on load....
When I tried to start PHCTool this morning, I had to read this:

Code: Select all

 File "./phctool.py", line 468, in <module>
    app=appgui()
  File "./phctool.py", line 100, in __init__
    self.phcdata.RestoreValues()		##restore VIDs from last session
  File "inc/libs/generic.py", line 55, in RestoreValues
    self.parent.throttling.set_throttledata_array(throttles)
  File "inc/libs/throttling.py", line 77, in set_throttledata_array
    self.set_throttledata(cpu, array[cpu])
  File "inc/libs/throttling.py", line 69, in set_throttledata
    if int(value) >= 0 and int(value)< self.data[cpu]["state_count"]:
ValueError: invalid literal for int() with base 10: ''
I looked at the lines listed, but I wasn´t able to find what´s wrong......

the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57

Re: A problem with CPU throttling??

Post by the-fallen » Sat 19. Jul 2008, 11:38

Hey Bob :)

Looks like an aftermath of the ugly hack we have done to you because of your throttling problem.

You said you checked the box to auto-restore phc and throttling settings?
You need to disable the Throttling auto-restore since your throttling function is hacked out (you remember? :) ).
Try to uncheck it, or, if you can not start PHCTool now you can remote the setting manually:

in your home directory is a hidden file named " .phcstore.phc "
Edit the file (gedit ./.phcstore.phc)

It will look like this :

Code: Select all

R=VT
1: V=39 33 26 19 T=0
0: V=39 33 26 19 T=0
Remove the "T" from the first line (only the first line) and save the file. Try again.
Haven't checked it yet if it will work (no time now) but if it does not work I will investigate this afternoon for a solution.

Hope this helps :)

Bob
Posts: 17
Joined: Mon 14. Jul 2008, 14:07

Re: A problem with CPU throttling??

Post by Bob » Sat 19. Jul 2008, 12:34

Hehe! Worked!! I had to uncheck it via this hidden file.
Is it very important to have the throttling options enabled??
I´m asking this because I think my changed voltages have no effect......
I just scaled them four steps down.

Post Reply