problem on Core2 Duo P9300 model 23 cpu_family 6

If you have trouble with PHC you can ask and hope for help here.
Post Reply
sLoDkI
Posts: 3
Joined: Mon 9. Mar 2009, 23:56

problem on Core2 Duo P9300 model 23 cpu_family 6

Post by sLoDkI » Tue 10. Mar 2009, 00:30

Hi guys!

I have a problem with undervoltage the P9300 cpu. After running the script linux-phc-optimize.bash the VIDs I've got was: 1 1 1 1. FIDs were strange, but someone wrote on this forum - this is normal on newer cpus. My FIDs:

Code: Select all

cat /sys/devices/system/cpu/cpu0/cpufreq/phc_fids 
9 72 6 134 
Original VIDs:

Code: Select all

cat /sys/devices/system/cpu/cpu0/cpufreq/phc_default_controls 
9:42 72:34 6:23 134:15 
During the lowest VID searching process, script freezes (or kernel panics) on "restoring the previous settings" (or sth similar) after reached the lowest value (-1). Next run (after reboot machine) was increasing it (+2) - and finally got the "1 1 1 1".
When testing this configuration everything freezes after a while. I test it like this:

Code: Select all

# echo "9:1 72:1 6:1 134:1" > /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
Actually I'm testing all values by decreasing all of them by 2 and then normal work on my laptop. Sometimes I run sth burning up my cpu, and if all is ok - increase again the VIDs.
In some free time I will test it more.

Any ideas why those script doesn't test it properly? I ran burnMMX in background on one terminal, and script which executes another burnMMX on second term to burn both cores.
Maybe I should try use the minimal values and pick up them by 2 instead of cutting down from the default ones? ;-)

My CPU:

Code: Select all

#  cat /proc/cpuinfo 
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Duo CPU     P9300  @ 2.26GHz
stepping	: 6
cpu MHz		: 2268.000
cache size	: 6144 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm tpr_shadow vnmi flexpriority
bogomips	: 4524.68
clflush size	: 64
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Duo CPU     P9300  @ 2.26GHz
stepping	: 6
cpu MHz		: 2268.000
cache size	: 6144 KB
physical id	: 0
siblings	: 2
core id		: 1
cpu cores	: 2
apicid		: 1
initial apicid	: 1
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm tpr_shadow vnmi flexpriority
bogomips	: 4523.39
clflush size	: 64
power management:
I can help testing on this CPU.

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

Re: problem on Core2 Duo P9300 model 23 cpu_family 6

Post by the-fallen » Tue 10. Mar 2009, 08:03

Thanks for your offer to help.

I do not know this script (never heart about it) so I can not tell you whats wrong. Where did you get it?

How ever, you are right, the new P-Series CPU have some strange-looking VIDs.
Lately I bought a ew Laptop woth a P-CPU, too so I will investigate it a bit.

I think Intel build some new features in it or linux does not work properly with it. As I used "powertop" I saw that I got two C0 - States with different Frequencies (2.40 and 2.41). Maybe its something like the overclock - feature those new Core i7 CPUs have?!

sLoDkI
Posts: 3
Joined: Mon 9. Mar 2009, 23:56

Re: problem on Core2 Duo P9300 model 23 cpu_family 6

Post by sLoDkI » Tue 10. Mar 2009, 10:38

Yeap, My has strange frequencies too - I forgot paste them:

Code: Select all

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies 
2268000 2267000 1600000 800000 
But in cpufreq I'm using only: 800MHz, 1,6GHz and 2,27GHz.
I've noticed that after standby, or sometimes with normal work I have to reload acpi_cpufreq module to return frequency scaling to work. In other way it hasn't change frequency even if I change the governor manually (via /sys/...).

EDIT:
Those VIDs seems to work stable for me now:

Code: Select all

"9:26 72:22 6:13 134:3"
This gives voltages:
1116 mV, 1052 mV, 908 mV, and 748 mV.
On the intel site there is: VID voltage range: 1.050V-1.150V (http://processorfinder.intel.com/detail ... Spec=SLB63). How my voltages are connected with those from intel?

My laptop is Dell Latitude E4300.

One question: should I change phc_controls for each cpu? or only cpu0 as I used to do?
Last tests I was made with both core VID change and locking frequency on specified (which I want to test).

Regards,
Kuba
Last edited by sLoDkI on Tue 10. Mar 2009, 13:01, edited 1 time in total.

sLoDkI
Posts: 3
Joined: Mon 9. Mar 2009, 23:56

Re: problem on Core2 Duo P9300 model 23 cpu_family 6

Post by sLoDkI » Tue 10. Mar 2009, 11:17

the-fallen wrote:I do not know this script (never heart about it) so I can not tell you whats wrong. Where did you get it?
I thought that is from this forum :-)

Code: Select all

$ head linux-phc-optimize.bash 
#!/bin/bash

. functions.bash || {
 printf "ERROR: Could not load functions.bash\n"
 exit 1
}

# http://phc.athousandnights.de/

printf "\n I assume you have linux-phc correctly installed and working.
It's from arch AUR package.

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

Re: problem on Core2 Duo P9300 model 23 cpu_family 6

Post by the-fallen » Tue 10. Mar 2009, 22:21

Never seen such a script before. I worked on such a tool by myself but never completed it since I think its not very smart.


How ever. I tried to find out about the "strange" FIDs.

My CPU shows up 2 C0 - States which is somehow unlogically. But they are there. I noticed that I have two frequencies for those two C0-States (2.40 and 2.41 GHz) Googling around shows that any user of Penryn-Core CPUs have two frequencies with a 100MHz difference.

Still I do not know if this is caused by Linux or by the CPU.

Finding informations about that seems to be hard. All I found at intel by now does not say anything about two C0 states.

Maybe one of you will find out more.
Maybe one of you can check Windows-Tools (NHC, Rightmark CPU clock) and find out what they are showing?



Thanks for any help.

maentele
Posts: 3
Joined: Mon 23. Mar 2009, 20:29

Re: problem on Core2 Duo P9300 model 23 cpu_family 6

Post by maentele » Mon 23. Mar 2009, 20:42

Hi,
I have a similar if not even the same problem here.
My CPU in a new Dell Latitude E6400 notebook: Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz

the-fallen: I have also those strange frequencies:

Code: Select all

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
2401000 2400000 1600000 800000
And changing the VIDs with linuxphc seems also not to have any effect ... I also tried that script which sLoDkI mentioned and I also got down do VID 1 for each frequency.

The original table looks like this:

Code: Select all

cat /sys/devices/system/cpu/cpu0/cpufreq/phc_default_controls
73:39 9:31 6:23 134:17
I tried looking up the actual frequencies in WindowsXP, but I found no tool which could give me that information.
The NHC-Tool doesn't even support this CPU yet in their latest final release.

I'll help where I can in figuring that one out ;-)

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

Re: problem on Core2 Duo P9300 model 23 cpu_family 6

Post by the-fallen » Mon 23. Mar 2009, 21:22

Hey maentele,

currently I have no idea why those Penryn Cores behave like that.
I only can guess but this does not help anyone.

I do not know the script you are talking about and a VID of "1" is strange. I wouldn't trust that.

What I noticed is that with the last Kernel Versions of ubuntu 9.04 I got only three speed steps but therefore there is no step with 2.41GHz anymore (whats generally good) so I think it *might* be something caused within the Kernel.

But to be sure I would need an information source what is changed in the Kernel releases regarding ACPI and CPU related modules but I didn't find anything helpful yet (maybe somebody knows some sources).


How ever, if you could get a Live-CD of ubuntu 9.04 see if you got better Values here.


Please inform us about what you found out.

maentele
Posts: 3
Joined: Mon 23. Mar 2009, 20:29

Re: problem on Core2 Duo P9300 model 23 cpu_family 6

Post by maentele » Mon 23. Mar 2009, 21:35

Which kernel runs in Ubuntu 9.04?
I would assume that it is a 2.6.28. I also use this kernel (with Arch Linux). Perhaps the Ubuntu-guys added a patch to fix this issue.

I trust the script because I verified myself the VIDs - I "echoed" them directly in "phc_controls". There I could set VIDs with value "0" and my system behaved normally.
You can find the script here if you want to have a look at it, but I assume that it is working correctly:
http://ubuntuforums.org/showthread.php?t=786402

I'll try the Ubuntu live cd and give feedback soon ...

maentele
Posts: 3
Joined: Mon 23. Mar 2009, 20:29

Re: problem on Core2 Duo P9300 model 23 cpu_family 6

Post by maentele » Wed 25. Mar 2009, 00:40

Hey,
I just booted the lastet Ubuntu 9.04 alpha 6.
There I had the same strange frequencies as here on my arch-system.

I'm curious how the today released 2.6.29 kernel behaves ;-)

Pluies
Posts: 4
Joined: Sat 11. Apr 2009, 16:05

Re: problem on Core2 Duo P9300 model 23 cpu_family 6

Post by Pluies » Sat 11. Apr 2009, 21:59

Heyyy, I just stumbled across the exact same problem ^^

It seems that the script doesn't work well because you can't set VIDs as freely as it looks.

I'll just copy & paste what I wrote on the Ubuntu forums, it might be more helpful here :
My default VIDs are (in /sys/devices/system/cpu/cpu0/cpufreq/phc_default_vids ):

Code: Select all

pluies@pluies-laptop ~/Desktop $ cat /sys/devices/system/cpu/cpu0/cpufreq/phc_default_vids 
34 28 21 15 
My available frequencies are:

Code: Select all

pluies@pluies-laptop ~/Desktop $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies 
1600000 1400000 1200000 800000 
So, when I try to set a VID lower than 15... PHC will never reach it; and will stop at 15, which is the default lowest VID of my lowest frequency (in my case, 800Mhz). Let's call it "EXTRAMINVID".

My tests so far showed that you can't set a VID inferior to this value. For each frequency, every value between your default value for this frequency and EXTRAMINVID are possible though. :)


I just set all my voltages at 15 using PHCTools. Now, for every frequency, VID is always 15. Even at max frequency (1,6Ghz).

In your case, if your EXTRAMINVID is 17, you won't ever be able to set a VID lower than 17 to any frequency. Or, to be more precise, you will be able to set it, but your CPU will never reach it.

It implies that the script will test every VID value from your default value to EXTRAMINVID, actually changing them, then from EXTRAMINVID to zero, thinking it changes every time, while the actual VID sticks to EXTRAMINVID.


I found this problem using the msr mod and the most useful `read_msr.py` script (available on these forums).


Edit: shame on me, it's not news at all:
the-fallen wrote:You are not able to set a lower VID than the lowest default one on a Core2 CPU. Its somehow hardware-fixed.
(Here)

Post Reply