cpufreq folder is not in kernel...

If you have trouble with PHC you can ask and hope for help here.
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
dirtytofu
Posts: 7
Joined: Fri 16. Oct 2009, 19:18
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

cpufreq folder is not in kernel...

Post by dirtytofu » Fri 16. Oct 2009, 19:24

Hello.

I'm pretty new to Linux, but I wanted to try undervolting my laptop (Pentium M Dothan) like I have done in XP so I tried to use linux-PHC, but I'm having some issues.

I downloaded the kernel source, used menuconfig to modularlize the "ACPI Processor P-States driver" and the built the kernel successfully following the instructions from the 9.04 sticky.

Now when I boot from the "phc001" kernel, the cpufreq folder is missing from /sys/devices/system/cpu/cpu0/ folder.

Any help would be appreciated

the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: cpufreq folder is not in kernel...

Post by the-fallen » Sat 17. Oct 2009, 16:33

Seems that your system does not load acpi-cpufreq / phc-intel or speedstep-centrino.



The "cpufreq" folder is an input/output interface to the cpufreq scaling driver.
speedstep-centrino (deprecated) or acpi-cpufreq (and so phc-intel that is a just a renamed acpi-cpufreq) is creating this folder.

If it does not exist either the driver is not there or not loaded by the system or fails to load.


After building your kernel, do you build the phc-offtree package?
If so, normally the driver should load. Manually loading can be done by "sudo modprobe phc-intel".

By the way, it might be that PHC (newer versions that base on acpi-cpufreq) might not work for you (depends on the system/BIOS). But at least the folder should be there so this is not your problem here (for now).

dirtytofu
Posts: 7
Joined: Fri 16. Oct 2009, 19:18
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: cpufreq folder is not in kernel...

Post by dirtytofu » Sat 17. Oct 2009, 23:11

Ah thanks for the help.

I recompiled the offtree package (make prepare, make, sudo make install) and now I am able to load the phc-intel module.

However, when I boot, a message box pops up saying something like "your CPU is not scalable".

Is this what you were talking about how the latest PHC will not work with my computer? (Dell Inspiron 8600 1.6 Pentium M Dothan).

EDIT:

Ok so I think I got it working. I made the module load on boot and the CPU seems to be scaling correctly.

Now the problem is that I need to get the VIDs to load at the values I want on boot.

I created a script file (phc_init) and then:

Code: Select all

cp phc_init /etc/init.d
ln -s /etc/init.d/phc_init /etc/rc5.d/S50phc_init
ln -s /etc/init.d/phc_init /etc/rc5.d/K50phc_init
But the values do not seem to change.

Any tips on how to get the VIDs to load at the values I want on boot?

the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: cpufreq folder is not in kernel...

Post by the-fallen » Sun 18. Oct 2009, 08:50

I am glad you made it.


Before using a script, check if everything is working manually (just to make sure).

Have a look if the phc interface files exist:

Code: Select all

ls /sys/devices/system/cpu/cpu0/cpufreq/
There must be some files beginning with "phc_".

Then, try to read something from those files. E.g. your default values:

Code: Select all

cat /sys/devices/system/cpu/cpu0/cpufreq/phc_default_controls
If you get some data like "12:30 10:25 8:23 6:21" or something like that everything is fine. If you get a mesage about that a device is not found you have the problem I mentioned above.



Now that you now everything is working well you need to find out the lowest VIDs that are working on your system. Maybe you already know them by the data you seen on Windows XP, else you need to find them (procedures are already documented in this forum).

After you know your best VIDs you can make either your own script or use the existing phc_init.d script downloadable in this forum.

dirtytofu
Posts: 7
Joined: Fri 16. Oct 2009, 19:18
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: cpufreq folder is not in kernel...

Post by dirtytofu » Mon 19. Oct 2009, 02:40

Ok, so I downloaded the phc_init.d script and installed it using "./install.sh".

Now I know I have to set up the config file under "/etc/phcconfig" but I can't seem to find any template for writing the config file in the forums.

I try to deduce it by looking at the "phc_init" script but I have no experience in scripting language and I can't really tell what I need to do.

Any howto's on setting up the config file so I can apply my new FID:VID on boot?

the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: cpufreq folder is not in kernel...

Post by the-fallen » Mon 19. Oct 2009, 08:52

Yeah in the package you downloaded is an example config file.

You do not need to look at it, here is the config (we are user-friendly :) )

Code: Select all

#This is an example config file for PHC Init-Scripts
#Below are two example strings to set up FID:VID pairs for two CPUs/Cores
#If you use a linux-phc version that supports FID changing you can simply add or remove FIDs from your string.

#controls[0]="12:25 10:23 8:22 6:19"
#controls[1]="12:25 10:23 8:22 6:19"

#Shall the init script restore default values on onload? Yes=1, No=0
#unloadrestore=1
all those lines are commented out (with a #).
if you have a single-core CPU (the Pentium M is a single core) you only need to uncomment the line " controls[0]="12:25 10:23 8:22 6:19" "

These are example value pairs in the style of "FID:VID" beginning with the highest frequency down to the lowest.

Please do not try to use those values. You really need to find out your own (I am sure you know that). Your default values can be found on phc_default_controls. In order do reduce the coltage you need to set lower VIDs then.

You need to find out the Lowest possible VID for each FID if you do not know them already.

dirtytofu
Posts: 7
Joined: Fri 16. Oct 2009, 19:18
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: cpufreq folder is not in kernel...

Post by dirtytofu » Tue 20. Oct 2009, 20:19

Thanks a lot for your help!

I got the script working now and it seems to boot at the FID:VID control levels I want to.

Now I gotta test if this has made any improvement in my battery life.

the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: cpufreq folder is not in kernel...

Post by the-fallen » Thu 22. Oct 2009, 11:55

Cool. Tell us if you have the results and how much you save now :)

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable