Installation Guide

If you have trouble with PHC you can ask and hope for help here.
the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57

Re: Installation Guide

Post by the-fallen » Fri 25. Jul 2008, 07:17

Hmmh that's strange.

You are sure there is nothing went wrong during compiling?
Have you build your kernel yourself first, and the module later? Or is it the distribution standard kernel?
Maybe some library's had been updated between your kernel compilation and the compilation of your module?

I don't really have an idea but thats one of the things I can imagine as the reason.

neverdie
Posts: 3
Joined: Fri 25. Jul 2008, 02:53

Re: Installation Guide

Post by neverdie » Fri 25. Jul 2008, 17:19

I use Ubuntu 8.04.
I downloaded kernel 2.6.26 and used the config file of my generic kernel (the one that comes with my distro: 2.6.24-16)
It seems that you have to patch the kernel and then compile it. This way I had an extra option to my kernel about CPU Frequency Scaling and default CPUfreq governor.

Anyway, I couldn't load the module either way, so i found a pre-compiled one. I copy it to
/lib/modules/2.6.26/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko
and everything worked.

But I have another question now. :?

In Windows, I use
FID 6x with VID 1.1V and
FID 12x with VID 1.2 V I think

but in phc_controls i get:
"12:42 10:35 8:27 6:19"
my question is, what are these vid values and how can i get 1.1 or 1.2 Volts?

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

Re: Installation Guide

Post by the-fallen » Fri 25. Jul 2008, 21:32

Hey,

did I understood it right? You downloaded 2.6.26 from kernel.org and compiled the module and tried to use it with the Ubuntu Stock 2.6.26? You should try kernel-source from synaptics if you want to create a kernel for the stock one.

Your next question: The values you got from the PHC Interfaces are some kind of "multiplicators" for the voltage. Like those known from the frequency.

The file phc_vids contains only the voltage multiplicators. The file phc_controls contains the VIDS associated with their FIDs if the style FID:VID.
If you want to write to the phc_control file you only need to replace the VIDs (file behind the doublepoint).


Depending on the CPU you use you can use one of the following formulas to calculate the VID from a known voltage (in millivolts):

Core / Core2
VID=(Vcc-712.5) / 12.5
Example: (1100-712.5) / 12.5 = 31
So 31 is the matching VID

Centrino(Pentium M)
VID = (Vcc - 700) / 16
Example: (1100 - 700) / 16 = 25
So 25 is the matching VID

neverdie
Posts: 3
Joined: Fri 25. Jul 2008, 02:53

Re: Installation Guide

Post by neverdie » Fri 25. Jul 2008, 22:53

No. what I did is to compile the 2.6.26 kernel with the Ubuntu Stock .config file.
Anyway, it doesn't matter because, after all this, I just used a precompiled module.

Thanx for the VID info.

One last question though:
my phc_controls file says:
12:42 10:35 8:27 6:19

That means I have 4 different 'states' for my cpu, each one with different fid and vid.
can i change this so I can only have 2 states? like "12:31 6:19"?

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

Re: Installation Guide

Post by the-fallen » Sat 26. Jul 2008, 18:33

No you can not reduce the amount of speed steps. If you do not write enough values PHC will just replace the first ones until there are no more values from the sysfs-file. You should better write as much values as you read. To reduce the amount of steps used try another Governor.

song1980
Posts: 3
Joined: Wed 30. Jul 2008, 17:41

Re: Installation Guide

Post by song1980 » Wed 30. Jul 2008, 18:00

Hello, Admin
I followed the installation guide, and it looks like nothing went wrong, but I can't find any file in /sys/devices/system/cpu/cpu0/cpufreq/ beginning with "phc_". My laptop is Acer 5502wxmi, CPU is Intel Pentium M processor 740 :cry:

By the way, when insert the patched module:#/ insmod <path like above>/acpi-cpufreq.ko, i got this error:

Code: Select all

/usr/src/linux-source-2.6.24# insmod arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko
insmod: error inserting 'arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko': -1 Device or resource busy
but I fixed this problem by another way that you mentioned above:

Code: Select all

1. become root
sudo -s

2. change to this path
cd /lib/modules/<your kernel version>/kernel/arch/x86/kernel/cpu/cpufreq/

3. There you'll find the original module. Just rename it:
mv ./acpi-cpufreq.ko ./acpi-cpufreq.ko-original

4. then copy the patched one:
# cp /path/to/patched/module/acpi-cpufreq.ko ./

then reboot.
It seems this is the only error I encountered during installation, Any suggestion?

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

Re: Installation Guide

Post by the-fallen » Thu 31. Jul 2008, 07:22

Yes, I think acpi-cpufreq is not getting loaded on your system.

Try:
lsmod | grep cpufreq
and
lsmod | grep centrino

If you get any output with the first command acpi-cpufreq is loaded and the problem is somewhere else.

If you get output with the second command your system is loading speedstep-centrino instead of acpi-cpufreq.

If so, try to unload speedstep-centrino and load acpi-cpufreq then.

song1980
Posts: 3
Joined: Wed 30. Jul 2008, 17:41

Re: Installation Guide

Post by song1980 » Fri 1. Aug 2008, 15:16

the-fallen wrote:Yes, I think acpi-cpufreq is not getting loaded on your system.

Try:
lsmod | grep cpufreq
and
lsmod | grep centrino

If you get any output with the first command acpi-cpufreq is loaded and the problem is somewhere else.

If you get output with the second command your system is loading speedstep-centrino instead of acpi-cpufreq.

If so, try to unload speedstep-centrino and load acpi-cpufreq then.
Both output something:

Code: Select all

lsmod | grep cpufreq
cpufreq_stats           7104  0 
cpufreq_conservative     8712  0 
cpufreq_ondemand        9740  1 
freq_table              5536  3 speedstep_centrino,cpufreq_stats,cpufreq_ondemand
cpufreq_userspace       5284  0 
cpufreq_powersave       2688  0 

Code: Select all

 lsmod | grep centrino
speedstep_centrino      9152  0 
freq_table              5536  3 speedstep_centrino,cpufreq_stats,cpufreq_ondemand

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

Re: Installation Guide

Post by the-fallen » Fri 1. Aug 2008, 18:15

Sorry, that was my fault.

Sure the first command also gives output (should be lsmod | greo acpi-cpufreq ). But as you can read there is no module named acpi-cpufreq but one named speedstep-centrino. So your system is loading speedstep-centrino.

Try to unload it and load the acpi-cpufreq module to try if it works.

song1980
Posts: 3
Joined: Wed 30. Jul 2008, 17:41

Re: Installation Guide

Post by song1980 » Sat 2. Aug 2008, 00:54

Hi,the-fallen, sorry to bother you again and again, so far I unload the speedstep_centrino module and load the acpi-cpufreq module, and I find some files beginning with phc_, but I can't read any value from phc_controls :oops:

Code: Select all

 cat phc_controls
cat: phc_controls: no such device

Post Reply