PDA

View Full Version : HowTo: Undervolt your notebook CPU for longer battery life


Pages : [1] 2

Ares Drake
May 8th, 2008, 03:50 AM
Edit: This Post is outdated! The underlying principles still apply, but newer Ubuntu versions requiere a slightly different approach.

Ubuntu 10.04 LTS
A newer guide for Ubuntu 10.04 LTS Lucid Lynx can be found at: http://openmindedbrain.info/09/05/2010/undervolting-in-ubuntu-10-04-lucid-lts/
Recent versions
An even more recent guide for the most recent Versions of Ubuntu is linked here: http://linuxsolver.blogspot.com/2011/02/undervolting-cpu-in-ubuntu.html. It offers a graphical utility to set the voltages for you, but only covers installation. Afterwards, you still have to find and test your individual voltages. Therefor you can use this method (http://linuxsolver.blogspot.com/2011/10/how-to-set-cpu-voltage.html) from the same author or the method in this post. Whitchever method you choose, be sure to read the short chapter on safety below. Especially important are points 3 and 4 and these still aply to all current and future methods.




This howto is based on own experiences and this german wiki page (http://wiki.ubuntuusers.de/Prozessorspannung_absenken), so thx to them.

It is tested for intel Core2Duo and CoreDuo cpus. I have no clue if it works for AMD as well. Some answers I received suggest that it currently doesn't work with AMD cpus however.

From wikipedia: (http://en.wikipedia.org/wiki/Undervolting) Undervolting is the practice of reducing the supply voltage of a computer's CPU. There are many reasons to perform this sort of modification, but a common one is to reduce power consumption and thus heat generation in laptop computers. Lower heat generation provided by undervolting and underclocking is also helpful in making computers quieter.

Performance will not suffer as the energy you will save was just wasted (as heat) before.


Safety:
Undervolting notebook processors is not uncommon. My older notebook (Toshiba S1) even came with a Windows utility that did automatic undervolting preinstalled. So the "undervolted" processor is nothing dangerous.

The way to get there might be, if no care is taken.
What might happen:
1) The voltage controls stability and temperature. The higher the voltage the higher the temp, but without enough voltage the cpu wont be stable and your PC will lock up. In fact with the following procedure we are trying to find the minimum stable voltage to get the cpu as cool as possible. The energy saved will increase battery life as well.

2) So if you were to INCREASE the voltage, you would rise the temperature. This might damage the cpu in case it got too hot - obvious one. (Though all Intel (probably AMD as well) mobile chips are equiped with safety cut off mechanisms afaik) However with the optimizer scipt it automatically REDUCES the voltage so harm to your hardware is very unlikely.

3) To find the named "minimum" voltage, the optimizer scipt needs to test if the cpu runs stable at every voltage setting. So in case it gets too low, your notebook will lock up. Then afterwards the script knows what is too low and will stay safely above.
That sth gets damaged by locking up is rather unlikely - overclocking my desktop machine in younger years I experienced it at least a hundred times and never fried anything.

4) While locking up however your linux and all open applications crash as well. Wich might result in data loss. Be prepared to see the fsck utility at next boot up checking for data integrity. And let it run! ;) Furthermore, don't open any files while running the optimizer script and, before doing this optimization, unmount as many partitions as possible to reduce the risk. (unmounted partitions cannot be corrupted during the lockup)

Once the scipt finishes (you need to run it several times, once for every freqency your cpu is capable of), no more lock-ups are to be expected as the script now knows the individual critical voltage for your cpu and will stay savely above.

With all these precautions I think it is rather save to undervolt.


Still there? Then let's get on to it! Step by step:

1. This howto depends on the kernel module acpi-cpufreq to control your cpu. To find out if you're using it try
lsmod | grep acpi_cpufreq
You should see sth. like this:
acpi_cpufreq 14892 2
freq_table 5536 3 acpi_cpufreq,cpufreq_stats,cpufreq_ondemand
processor 36872 4 acpi_cpufreq,thermal
In case you don't see anything, you don't use acpi-cpufreq, but maybe the speedstep.centrino module. Then this howto is not for you unfortunately. speedstep.centrino is in theory supported as well, but I have no experience with it. If someone knows how to do it with speedstep.centrino please tell me and I will add it here.

2. You need to get a modified version of your acpi_cpufreq module, one with PHC support (http://phc.athousandnights.de/) build in. PHC (http://phc.athousandnights.de/) means processor hardware control and is the magic that makes it going. There are several ways to get this module.

a) You can download a patch on their website (http://phc.athousandnights.de/) and compile it yourself. If you have never compiled anything, this is not for you as there are easier ways (see b) ). However as I hardly find the time to post updates here I will give a mini-howto for compilation here in case a kernel update breakes compatibility with old modules. You need to compile yourself in case you are running 64 bit as well as the precompiled modules I offer below are 32bit only.
Mini-Howto for compilation

sudo apt-get install build-essential linux-source
extract the tar from /usr/src to /home/"your-username"/"kernelversion"
download latest patch (http://phc.athousandnights.de/) to /home/"your-username"/"kernelversion"
copy /boot/config-$(uname -r).config to /home/"your-username"/"kernelversion"

cd /home/"your-username"/"kernelversion"
patch -p1 < linux-phc*.patch
make oldconfig
make prepare
make scripts
make M=./arch/x86/kernel/cpu/cpufreq
The finished module should be in /home/"your-username"/"kernelversion"/arch/x86/kernel/cpu/cpufreq
Proceed as if you had downloaded this module with copying it to the right place (see 2. c) ). After all is done you can savely remove the folder /home/"your-username"/"kernelversion" and uninstall linux-source to save harddisk space.


b) Download a precompiled module. It has to match your kernel.

1) First backup your old module.
sudo cp /lib/modules/`uname -r`/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko /lib/modules/`uname -r`/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko.old
(basically copies it to a new name)

2) There are right now versions for kernel 2.6.24-16-generic, 2.6.24-17-generic, 2.6.24-18-generic and 2.6.24-19-generic. To find out what kernel you have open a terminal and type:
uname -r
So once you know, download the right kernel module for 2.6.24-16-generic (www.s3pp.de/misc/16/acpi-cpufreq.ko) or 2.6.24-17-generic (www.s3pp.de/misc/17/acpi-cpufreq.ko) or 2.6.24-18-generic (www.s3pp.de/misc/18/acpi-cpufreq.ko) or 2.6.24-19-generic (www.s3pp.de/misc/19/acpi-cpufreq.ko).

c) Then copy the downloaded file to the right place:
sudo cp acpi-cpufreq.ko /lib/modules/$(uname -r)/kernel/arch/x86/kernel/cpu/cpufreq You have to redo the entire Step 2 every time you update your kernel, so you might want to save your downloaded module file, as it might work again after a kernel upgrade, i.e. the version -16 worked with -14 and -15 as well, but not with -17.

3. Reboot. If the module is installed correctly,
cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
should give you sth like this:
12:38 10:30 8:24 6:18
The value before the : stands for the frequency, the later for the voltage.

4. Okay, now we need to find the lowest save voltages. We will use this optimizer script (http://www.s3pp.de/misc/linux-phc-optimize.bash).
Download it (you will need this file (http://www.s3pp.de/misc/functions.bash) as well), then right-click the files, open the permissions tab, and and down at the bottom check the box that says "allow executing the file....." Then run it from the terminal with sudo ./linux-phc-optimize.bash It needs cpuburn installed, so you might want to install it in advance with synaptic. What this scipt does is: It stresses your cpu while lowering the cpu voltage step by step unil your system crashes. Then the script knows what is too low and will stay safely above. The script needs to run once for every frequency step your cpu is capable of, usually around 4-6 times. It will tell you, just run it so often until it tells you finished.
IMPORTANT:
This script will crash your system. Several times. This is normal and intended. No harm to your hardware is to be expected. However in case you have open files and / or mounted filesystems data loss or corruption might occur. So be advised to unmount as many partitions as possible and open as few files as necessary while doing this. After a reset the fsck utility will check your partitions for data corruption so be strongly advised to let that check run!

Second, the script stresses only one cpu core. In case you have a dual core, open a terminal and type "burnMMX" to run a second thread to stress the second core while doing this.

When you're finished with the script, you will have a text file with the new and optimized frequency : voltage pairs.

5. To use these optimized values, you will need to echo them to /sys/devices/system/cpu/cpu0/cpufreq/phc_controls. An easy way to do it automatically every reboot is to add a line like this:
echo "12:21 10:1 8:1 6:1" > /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
to your /etc/rc.local file. Of course you have to replace the values with your own. Any second core should automatically use the same voltages.

6. Check if it works:
cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
should now give you the new values (after a reboot) compared to before, see above.

w4ngsta07
May 10th, 2008, 10:29 PM
Hi,

Thanks for posting this how-to. I am a complete beginner in linux and know absolutely nothing, so its refreshing that someone has posted a tutorial thats easy to understand even for people like me(believe me, Ive been trying to get linux PHC to work for days).

So I have a problem, when I use your command on Step 5, the terminal says "bash: echo: write error: Invalid argument".

I tried using this command, "echo "20:18 20:18 20:18 20:18 12:11" > /sys/devices/system/cpu/cpu0/cpufreq/phc_controls" to replace my default(?) voltages, which were "11:47 10:39 8:29 6:18 136:11" on Step 3.

I am running a Lenovo T61 with a Core 2 Duo T7300 (2 GHZ) on Ubuntu 8.04 64-bit.

Thanks alot for your responses, this is a very great and helpful community!

EDIT: I dont know why there are 5 of these settings for mine and you only have 4. I searched around and found a formula for the VID: Vcc = 712.5 + VID*12.5 Is this the right formula for the VID? I wanted to run my laptop at a constant 2 GHZ with .9375 volts.

w4ngsta07
May 11th, 2008, 06:13 AM
Well ok, this is probably easy to answer. I cant run the linux-phc optimizer script. I downloaded it to my desktop. double clicking it does nothing, just runs the text editor, and terminal says 'command not found'

Harpoon
May 11th, 2008, 09:41 PM
w4ngsta07:

you need to make a script executable before you can run it.

The easiest way is right-click the file, open the permissions tab, and and down at the bottom check the box that says "allow executing the file....."

That should do it.

Ares Drake
May 13th, 2008, 04:38 AM
So I have a problem, when I use your command on Step 5, the terminal says "bash: echo: write error: Invalid argument".

I tried using this command, "echo "20:18 20:18 20:18 20:18 12:11" > /sys/devices/system/cpu/cpu0/cpufreq/phc_controls" to replace my default(?) voltages, which were "11:47 10:39 8:29 6:18 136:11" on Step 3.

You might try:
sudo -s -> password,
then run your echo command again.

But to be honest, I don't think it is an access problem to that file so it probably won't help. I think it is rather a problem with your value pairs.

I don't know if it is possible to use PHC to keep your cpu constant at 2ghz. I for myself kept the first value for the frequency step and just changed the voltage for it after the :

Try doing the same, you then can still lock your cpu frequency with other methods to 2ghz, i.e. there is a terminal command (wich I can't remember, but I read it in this forum) to change the access permissions of the panel cpu freq applet to let you control your cpu speed manually from there.

Ares Drake
May 13th, 2008, 04:44 AM
Thanks for your hint, I added it to the howto.

w4ngsta07:

you need to make a script executable before you can run it.

The easiest way is right-click the file, open the permissions tab, and and down at the bottom check the box that says "allow executing the file....."

That should do it.

hruskin
May 13th, 2008, 09:42 AM
When I run phc optimize script, I get
./linux-phc-optimize.bash: line 3: functions.bash: No such file or directory
ERROR: Could not load functions.bash


Where can I find functions.bash?
Thanks

Ares Drake
May 13th, 2008, 09:49 AM
[/CODE]
Where can I find functions.bash?
Thanks

Sorry, I just forgot that file. I updated the howto, but without reading through all that again, here is the link (http://www.s3pp.de/misc/functions.bash) You need to make it executable as well.

Daelyn
May 14th, 2008, 07:27 PM
Would you undervolting guys with multi core systems please have a look at:
http://ubuntuforums.org/showthread.php?p=4960606
and provide some thoughts?

w4ngsta07
May 15th, 2008, 10:09 PM
Is it possible for you to also make a HOW-TO for compiling the linux phc in case our kernels get updated?

M4rotku
May 15th, 2008, 10:33 PM
Will undervolting affect the performance of the laptopz/ It seems to me that if it is using less power, it will be less powerful.

Also, I was wondering if my battery might not be fully enabled. I have an extra battery pack and in Vista I was able to get 10 hours, with Ubuntu, I get about 4.5 hours and I am assuming that Vista uses more power than Ubuntu.

Ares Drake
May 16th, 2008, 02:59 AM
Will undervolting affect the performance of the laptopz/ It seems to me that if it is using less power, it will be less powerful.

Performance will be the same. The power you saved was just wasted before, did nothing good.


Also, I was wondering if my battery might not be fully enabled. I have an extra battery pack and in Vista I was able to get 10 hours, with Ubuntu, I get about 4.5 hours and I am assuming that Vista uses more power than Ubuntu.

Is the second battery shown, i.e. in the tray icon or in /proc/acpi/battery?

Win might be a little better in powersaving, but still the difference you post is huge!

Is it possible for you to also make a HOW-TO for compiling the linux phc in case our kernels get updated?

It is not that simple to do and I can't really make a generic how-to for that as I don't know if extra workarounds will be needed. Second, for the new kernel there might be the need of a new patch form the PHC guys.
In the link I gave right at the top there is a german how-to for .16.

In case of a kernel change just try your old .17 module again. If that doesn't work give me a PM and I'll look into it and make a new module.

Charlie708
May 19th, 2008, 10:46 PM
Is the VID read from the script or from the chip? I have a T8300 in my T61, and the script bugged out on me, because even when both cores were fully loaded, the script reached 0 on the highest clock level without a crash.

Also, there are two problems (typos) with the guide. One is when you point to the original acpi-cpufreq.ko, you have two kernel/ directories. The second one is when you talk about loading the second core; the command burnmmx does nothing, but burnMMX works. Other than that, extremely helpful :guitar:

sdennie
May 19th, 2008, 11:12 PM
Can you provide some hard numbers on what the power savings is like before and after on your machine. Something like cleanly booting the machine, logging in, unplugging the AC power, waiting for a few minutes and then running powertop like this (don't touch the machine for 5 minutes after this):


sudo powertop -d -t 300


Having the average watts used during a 5 minute powertop run on an idle system would be an interesting baseline. I'm interested in trying this out but only if there is a noticeable drop in power usage.

M4rotku
May 21st, 2008, 04:36 PM
I was in step 2.b.1 and I recieved the following error when i entered the command.

command:
sudo cp /lib/modules/`uname -r`/kernel/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko /lib/modules/`uname -r`/kernel/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko.old


Error:
cp: cannot stat `/lib/modules/2.6.24-16-generic/kernel/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko': No such file or directory


If this file doesn't exist, then can I still undervolt? And how would I go about doing so if able.

Ares Drake
May 22nd, 2008, 07:52 AM
I was in step 2.b.1 and I recieved the following error when i entered the command.

command:
sudo cp /lib/modules/`uname -r`/kernel/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko /lib/modules/`uname -r`/kernel/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko.old


Error:
cp: cannot stat `/lib/modules/2.6.24-16-generic/kernel/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko': No such file or directory


If this file doesn't exist, then can I still undervolt? And how would I go about doing so if able.

Seems as if you're not using acpi-cpufreq. Then you can't use this how-to. What did step 1 give you?

lsmod | grep acpi_cpufreq

stred
May 23rd, 2008, 10:41 AM
hi all

my system uses the speedstep.centrino module.. is there a way to force it to use the acpi freq module?

i have a pentium-m 740 (1.73mhz)

thnks

krlhc8
May 23rd, 2008, 02:34 PM
Thanks for the help with my cpu--it works like a charm and doesn't overheat anymore! Would you know anything about undervolting the graphics card? It gets fairly hot, too.

At any rate, thanks for the incredible help.

aldeby
May 23rd, 2008, 06:11 PM
I was in step 2.b.1 and I recieved the following error when i entered the command.

command:
sudo cp /lib/modules/`uname -r`/kernel/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko /lib/modules/`uname -r`/kernel/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko.old


Error:
cp: cannot stat `/lib/modules/2.6.24-16-generic/kernel/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko': No such file or directory


If this file doesn't exist, then can I still undervolt? And how would I go about doing so if able.

There is a typo in the command on first post tutorial: kernel/ is there twice, whereas the path has only one folder named kernel above arch/!

BTW Thanks a lot for this really interesting tutorial!

Ares Drake
May 23rd, 2008, 07:10 PM
There is a typo in the command on first post tutorial: kernel/ is there twice, whereas the path has only one folder named kernel above arch/!

BTW Thanks a lot for this really interesting tutorial!

Thanks for pointing out, I corrected the how-to.

Ares Drake
May 23rd, 2008, 07:16 PM
I was in step 2.b.1 and I recieved the following error when i entered the command.

command:
sudo cp /lib/modules/`uname -r`/kernel/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko /lib/modules/`uname -r`/kernel/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko.old


Error:
cp: cannot stat `/lib/modules/2.6.24-16-generic/kernel/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko': No such file or directory


If this file doesn't exist, then can I still undervolt? And how would I go about doing so if able.

I am sorry, I just had a typo in the howto. The path to the module is now corrected, so you might try again :)

Ares Drake
May 23rd, 2008, 07:35 PM
hi all

my system uses the speedstep.centrino module.. is there a way to force it to use the acpi freq module?

i have a pentium-m 740 (1.73mhz)

thnks

You can try to blacklist the speedstep.centrino module and make the acpi_cpufreq the default to load at boot. However it might be that your notebook has a broken acpi implementation, in which case acpi-cpufreq won't work. So you need to try.

Maybe it is possible to rmmod speedstep.centrino and to insmod acpi_cpufreq to try it without permanent changes.
In case that works you need to can automate it.

stred
May 24th, 2008, 05:12 AM
You can try to blacklist the speedstep.centrino module and make the acpi_cpufreq the default to load at boot. However it might be that your notebook has a broken acpi implementation, in which case acpi-cpufreq won't work. So you need to try.

Maybe it is possible to rmmod speedstep.centrino and to insmod acpi_cpufreq to try it without permanent changes.
In case that works you need to can automate it.

you are correct, simple blacklisting and adding acpi-cpufreq to etc/modules worked like a charm.. also the script did very nice job..

voltages before-after:
"41 32 25 18"-> "14 7 3 1"

that's huge difference.. especially in full load i am 10-15 deggres down(difficult to tell cause the fan rans now at different speeds)

thank you very much sir.

aldeby
May 24th, 2008, 06:33 AM
that's huge difference.. especially in full load i am 10-15 deggres down(difficult to tell cause the fan rans now at different speeds)


That's not that difficult to tell, just install sensors-applet and you'll have your CPU temperature displayed on your desktop!

sudo apt-get install sensors-applet
rightclick on a GNOME panel and select "+ Add to panel"

stred
May 24th, 2008, 07:04 AM
That's not that difficult to tell, just install sensors-applet and you'll have your CPU temperature displayed on your desktop!

sudo apt-get install sensors-applet
rightclick on a GNOME panel and select "+ Add to panel"


thnks for your answer but i have allready done that..

i didnt explain well my thoughts before..

what i meant is that before in full load i had 62 degrees and fan at 60% approximately

now in full load i am in 52 degrees but fan is at 30-35% so it's difficult to estimate the gains in lower heat produced cause of the different fan speeds.

the major difference is in noise.. now even in full load the system is allmost silent..

eldragon
May 24th, 2008, 09:22 AM
ive got an everex stepnote SA2053T notebook.

ive decided to give this a go, it comes with an intel CPU T2080 dual core thingy.

ran the script, and it didnt hang the computer at all.

so i ended with these settings.



$ cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
13:2 10:1 8:1 6:1 1:1 1:1 1:1 1:1 2:1 2:1


is this ok? or is somehow the cpu ignoring the new values?
my script said something like this:

Default VIDs: 40 32 27 21 134 134 134 134 134 134
Current VIDs: 2 1 1 21 134 134 134 134 134 134

which seems to set a higher VID for lower freqs? something doesnt add up...

when test started cpu jumped to a new high of 66C, and fan at full speed. it did start scaling down to 55C till it reached a VID of 0.

then the script exited, and (there seems to be a bug), files it created ended up empty.
i deleted the files, ran the script again, and killed the process (allowed it to generate valid files), then edited the file with the tweaks, and gave the first value a 0 (my working value). then the script ran all tests no problems.


the thing is.....how do i know if its working? cpu fan turns on at 60degrees and shuts down at 49degrees, so its just the same everytime. gonna test battery life, but i dont expect this to work, gonna post after..


EDIT: battery life is the same. dead at 1hr, the battery led on the notebook starts blinking. so i guess the notebook isnt undervolting. or am i missing something out?

stred
May 26th, 2008, 02:34 PM
I have downloaded the precompiled module for kerner 2.26.24-17-generic but it doesnt load...

when i try insmod it sais:
insmod: error inserting 'acpi-cpufreq.ko': -1 Invalid module format

krlhc8
May 27th, 2008, 03:33 AM
2.6.24-17-generic kernel acpi_cpufreq file (32-bit x86 processor compiled version):

Try this attached acpi_cpufreq file for all those who have the upgraded 2.6.27-generic kernel installed. I'm afraid the one that's originally posted does not work for most people.

Anyways, thanks for the help. I went from an idle 24 watts with 2 hours of battery life to 12.8 watts with 4 hours of battery life! (I used Intel's powertop application fyi)

sdennie
May 27th, 2008, 05:39 AM
Anyways, thanks for the help. I went from an idle 24 watts with 2 hours of battery life to 12.8 watts with 4 hours of battery life!

Are you sure this is correct? I can't for the life of me find the link (it must have been somewhere on lesswatts.org but, I can never find the useful stuff I've previously found on it (I really think they hide it from me after I've seen it)) but, for example, on my processor, I believe it uses like 13W in the C0 state and like 3.2W in the C3 state. I don't see how it would be possible to cause an average of 11W decrease in power unless all the C states were running at the normal C3 wattage (which seems impossible because that wattage is essentially the equivalent of "the CPU is turned off").

I still want to try this but, I'd love to see some scientific evidence that this is actually really useful for power savings. I'm a power savings fanatic but, I don't like to try potentially dangerous things without understand the risk/benefit.

Edit:
I asked a similar question in http://ubuntuforums.org/showpost.php?p=4999040&postcount=14. If someone could do that and provide hard numbers I'd be greatly pleased. ;)

pressureman
May 27th, 2008, 06:54 AM
I'm afraid the one that's originally posted does not work for most people.


acpi-cpufreq.ko: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped


It probably mainly works for those people running 64 bit kernels ;-)

eldragon
May 27th, 2008, 08:03 AM
2.6.27-generic kernel acpi_cpufreq file (another compiled version):

Try this attached acpi_cpufreq file for all those who have the upgraded 2.6.27-generic kernel installed. I'm afraid the one that's originally posted does not work for most people.

Anyways, thanks for the help. I went from an idle 24 watts with 2 hours of battery life to 12.8 watts with 4 hours of battery life!

dont you mean 2.6.24.17?

im trying right now with this file and the newer kernel, but i dont think there will be any difference....

how did you measure power consumption?

krlhc8
May 27th, 2008, 12:27 PM
woops, sorry: 2.6.24-17-generic (twas a long night!). I used Intel's powertop application to find the power consumption. Did the file work for you?

krlhc8
May 27th, 2008, 12:38 PM
acpi-cpufreq.ko: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped


It probably mainly works for those people running 64 bit kernels ;-)
Good point :D

eldragon
May 27th, 2008, 03:46 PM
woops, sorry: 2.6.24-17-generic (twas a long night!). I used Intel's powertop application to find the power consumption. Did the file work for you?

it did work, but it running the script goes all the way to zero. and leaves me (after tweaking the results a bit to let it finnish) with something like:
2 1 1 1 1 1 1 1 for all freqs. (computer never freezes).

i guess my notebook isnt giving a rat's *** about what undervoltage i give to it.

anyone experiencing this? know of a fix for it? i really long for the above 1hour battery life too :D

stred
May 27th, 2008, 04:40 PM
2.6.24-17-generic kernel acpi_cpufreq file (32-bit x86 processor compiled version):

Try this attached acpi_cpufreq file for all those who have the upgraded 2.6.27-generic kernel installed. I'm afraid the one that's originally posted does not work for most people.

Anyways, thanks for the help. I went from an idle 24 watts with 2 hours of battery life to 12.8 watts with 4 hours of battery life! (I used Intel's powertop application fyi)



thnks for the module, it worked..instant magic

Sebastral
May 29th, 2008, 12:41 AM
This is so awesome!! I fixed up a gutsy 2.6.22-14-generic kernel by following this other guide (https://www.dedigentoo.org/trac/linux-phc/wiki/phc_howto_ubuntu_001), and for finding the voltages I used the optimizer script. It gave me the shits, cause after every lock up I got an 'error 16 - inconsistent file system' and I had to run reiserfsck --check to fix it, but I got the results;

Default VIDs: 15 14 13 11 10 7
Current VIDs: 7 5 3 1 1 1

I actually changed it to 7 5 3 1 0 0 initially but then I realized I didn't really know what I was doing. But because the script adds 2 to the lowest VID tested I'm wondering if a VID of -1 is possible? and what about 0? The other guide says 'remember: you can not set lower VIDs than the lowest default VID'. is that true?

I haven't done a full battery unload yet btw, but the remaining time remains stable while remaining percentage goes down.. I guess it needs calibration..

edit; mm, just got a lockup doing nothing special so I now put in 12:7 11:6 10:5 9:4 8:3 6:1 which makes more sense anyway :)

pambos
May 30th, 2008, 07:47 PM
Hey guys...
Running the script goes all the way to zero, then tries -1 and the PC crashes. It gave me a message "Recovering CPU", and I waited for a couple of minutes, but it did not recover. Is there anything wrong ? Shouldn't it have stopped before 0 ?

Thanks in advance!

pambos
May 31st, 2008, 03:33 AM
Bump

eldragon
May 31st, 2008, 06:38 PM
Bump

ive got the same problem, but computer never froze.

my take is acpi_freq isnt working as advertised with some hardware configurations. (it isnt undervolting at all).

skinnie
June 1st, 2008, 07:05 PM
Hi,first of all thanks for this how to.In windows I have undervolted my T7300 to 0.937v@2.0GHz,and had that undervolt in my last 7.10 installation.
Now I am running a fresh install of kubuntu 64bit,and when I make the

cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
it says file or folder inexistant (translation of portuguese).
Any thoughts?
Undervolt again would be perfect :guitar:

K.Mandla
June 1st, 2008, 07:46 PM
Very nice howto. I've moved it into Tutorials and Tips. :)

Arthur Archnix
June 2nd, 2008, 07:47 AM
I got to the step where you run the script, and it wasn't clear if the script itself started burnMMX or not, so I opened up a new tab and typed "burnMMX". It's not clear to me that it's working or doing anything, it kinda just sits there.

Anyway, then I ran the script and it counted all the way down to zero, but failed to crash my system. It just stopped and said something about "that's not a valid VID to try". I tried to rerun the script but it gave me and error saying
Load VIDs from 'phc_tweaked_vids'
> ERROR: Wrong VID count!
I've deleted those and am rerunning the script. Everything else appears to be working, and all the steps up to this point have worked great. Any ideas what's going wrong?

eldragon
June 2nd, 2008, 08:41 AM
Hi,first of all thanks for this how to.In windows I have undervolted my T7300 to 0.937v@2.0GHz,and had that undervolt in my last 7.10 installation.
Now I am running a fresh install of kubuntu 64bit,and when I make the


it says file or folder inexistant (translation of portuguese).
Any thoughts?
Undervolt again would be perfect :guitar:

hmmm, first of all, youve got to install the 64bit version of the kernel module, which i dont know if its available :(

Ares Drake
June 2nd, 2008, 09:53 AM
I got to the step where you run the script, and it wasn't clear if the script itself started burnMMX or not, so I opened up a new tab and typed "burnMMX". It's not clear to me that it's working or doing anything, it kinda just sits there.

One thread of burnMMX is started automatically. You can verify this with "top" in a terminal or the gnome system monitor. In case you have a dualcore just start a second thread of burnMMX as described in the howto.

Anyway, then I ran the script and it counted all the way down to zero, but failed to crash my system. It just stopped and said something about "that's not a valid VID to try". I tried to rerun the script but it gave me and error saying

I've deleted those and am rerunning the script. Everything else appears to be working, and all the steps up to this point have worked great. Any ideas what's going wrong?

The voltage are calculated with a formula that looks like voltage = a+bx, where a is a base level of voltage witch is increased in x steps with a step size of b.
The script returning zero means x=0, so you don't need to increase the base voltage for your cpu. So everything should be fine, the script will write 1 instead of zero to its result file and you can use that. In my example I get zeros as well.

Sebastral
June 2nd, 2008, 11:16 AM
The other guide says 'remember: you can not set lower VIDs than the lowest default VID'. is that true?
I know. it would be horrible news, cause if true it explains why some people don't get battery time improvements.. but is it? or how can I find out? I don't seem to have battery improvements doing office work and the cpu running on lowest speed while the VID went from 7 to 1..

Arthur Archnix
June 2nd, 2008, 12:03 PM
The script returning zero means x=0, so you don't need to increase the base voltage for your cpu. So everything should be fine, the script will write 1 instead of zero to its result file and you can use that. In my example I get zeros as well.

I don't think I made myself clear. The script doesn't do anything. It steps down to zero, stops and says run it again, and then fails to run claiming there is not a valid VID count. It's almost like the script has to fail in order to work, but because it can't make my system crash it returns errors. Almost like saying, check for crash=1, error, crash=0, exiting. This is just a guess. In any event, I can't get it to generate anything because I can only run it once.

Should I do a hard power off just before it finishes the very last test of VID=0? Maybe that will work?

Also, it wasn't clear from the comments. Is the acpi module you've supplied for a x86 or x86-64 system? Someone else attached a file, but what was that for? 32 or 64?

Thanks for the answer regarding the burnMMX.

EDIT: Do I need to run the script while on battery power?

Ares Drake
June 2nd, 2008, 01:29 PM
I don't think I made myself clear. The script doesn't do anything. It steps down to zero, stops and says run it again, and then fails to run claiming there is not a valid VID count. It's almost like the script has to fail in order to work, but because it can't make my system crash it returns errors. Almost like saying, check for crash=1, error, crash=0, exiting. This is just a guess. In any event, I can't get it to generate anything because I can only run it once.

Should I do a hard power off just before it finishes the very last test of VID=0? Maybe that will work?

I'll try to explain again. The cpu voltage is a calculated value. It is calculated voltage=base voltage + number of steps (=VID) * stepsize

For Pentium M cpus the base voltage is 700.0 mV and stepsize is 16mV, for Core(2)Duos it is 712.5 mV and stepsize 12.5mV.

The optmize script lowers the number of steps step by step to see if your cpu is stable with a lower step and thus lower voltage. In your case it reaches zero, that means your cpu is stable with just the base voltage. So it doesn't lock up. It reaches zero even for the highest frequency and as the lower frequencies would need even less voltage and you cannot go below base voltage, the script doesn't need to run for the lower frequencies. As 0 for VID may not work you can just use 1. So you are 1 step above base voltage, that would mean for example for a core2duo 712.5mV+1*12.5mV=725mV.
Your values are then for example 12:1 10:1 8:1 6:1. (The values before the colon are for the frequency and from my machine, you have to use yours).

That you can go down to base voltage either means that you are lucky and got a nice cpu or that your acpi is broken and the instruction to lower the voltage gets ignored. Are you positive that the phc-modified acpi-cpufreq is installed correctly? Then maybe your acpi table is broken, I am unfortunately no expert on acpi.

Also, it wasn't clear from the comments. Is the acpi module you've supplied for a x86 or x86-64 system? Someone else attached a file, but what was that for? 32 or 64?

Both modules are for 32bit.

Arthur Archnix
June 2nd, 2008, 01:43 PM
Ok, I think I understand now. Thanks for the patient replies. I used your settings applied at boot in rc.local (my values were the same, so I could just use those directly), and after a reboot I show the following:
arthur@archnix:~$ cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
12:1 10:1 8:1 6:1
So, it appears that the settings have been applied properly, I suppose if it crashes on my I just reboot in single user mode and increase the multiplier. So, if I edit a video and the system crashes, I can change 12:1 10:1 etc... to 12:2 10:2.. and so on.

Thanks again,

eldragon
June 2nd, 2008, 04:12 PM
I'll try to explain again. The cpu voltage is a calculated value. It is calculated voltage=base voltage + number of steps (=VID) * stepsize

For Pentium M cpus the base voltage is 700.0 mV and stepsize is 16mV, for Core(2)Duos it is 712.5 mV and stepsize 12.5mV.

The optmize script lowers the number of steps step by step to see if your cpu is stable with a lower step and thus lower voltage. In your case it reaches zero, that means your cpu is stable with just the base voltage. So it doesn't lock up. It reaches zero even for the highest frequency and as the lower frequencies would need even less voltage and you cannot go below base voltage, the script doesn't need to run for the lower frequencies. As 0 for VID may not work you can just use 1. So you are 1 step above base voltage, that would mean for example for a core2duo 712.5mV+1*12.5mV=725mV.
Your values are then for example 12:1 10:1 8:1 6:1. (The values before the colon are for the frequency and from my machine, you have to use yours).

That you can go down to base voltage either means that you are lucky and got a nice cpu or that your acpi is broken and the instruction to lower the voltage gets ignored. Are you positive that the phc-modified acpi-cpufreq is installed correctly? Then maybe your acpi table is broken, I am unfortunately no expert on acpi.



Both modules are for 32bit.

well, thats where i was heading, ive got the module installed correctly (if i get phc_control file it should be fine, right?), yet, i dont see any difference with all voltages on 1, or the default (Which is something like 40). i guess my acpi is not compatible enough...which is too bad, battery life is next to useless :( . Under windows, it took twice the time to drain it completely.

this is no show stopper for me, but its annoying none the less. and it might definately be a show stopper for others.

Arthur Archnix
June 3rd, 2008, 02:45 PM
Anyone else having trouble resuming from suspend after using this cpufreq module? If I copy the old one back it resumes fine. With this one however, the fan spins up to full and the video never gets restored.

Can someone confirm?

sullust
June 3rd, 2008, 04:34 PM
hi all,

I installed this patch and got my new values. I edited the rc.local file, and put the new voltage pairs in. But now, after i reboot, the system starts up but my screen goes black right before xserver starts and prompts me for a login.

I think it may be caused by the speedstep-centrino module I see, but I am not sure how to blacklist it. Has anyone else seem this?

How do I blacklist the centrino module?

sullust
June 4th, 2008, 09:50 AM
Apparently it wasn't the speedstep-centrino module. The optimize script just set my values too low.

I ran into the same issue as Arthur, in that the first time I ran the optimize script, the steps counted all the way down to zero, then lock when the script exited.

I reset the script and executed it until the end. The results:
Before: 12:44 10:36 8:28 6:19
After: 12:46 10:1 8:1 6:1

When I tried to run on these settings, my laptop display would just turn off right before it booted into xserver and the fan would go into overdrive. Eventually, I was able to test certain settings by running the following script (I have a dual core cpu):


dp@dp-acer:~$ sudo -i
[sudo] password for dp:
root@dp-acer:~# cd /sys/devices/system/cpu/
root@dp-acer:/sys/devices/system/cpu#
root@dp-acer:/sys/devices/system/cpu# for PHC_VID in ./cpu*/cpufreq/phc_vids; do echo "35 25 5 1" > $PHC_VID; done


...and just keep lowering the numbers until my laptop froze.

This seems to be a fairly incomplete solution though, because apparently my numbers can be lower once xserver is running, but need to be higher to start it, otherwise I get the black screen again.

Also, my laptop doesn't seem to be running that much cooler. It ran from 65C-70C before, and now seems to be 63C-68C. So not much difference. Maybe I just need to see if I can get the numbers lower. Windoze runs pretty cool and quiet though, and that's aggravating!

M4rotku
June 4th, 2008, 10:26 PM
I have the 2.6.24-18-generic kernel, is there any way to undervolt that using the same meathod? wouldn't I just need to use a different patch? I really need to undervolt due to how much I use this laptop.

Much thanks,
M4rotku

jocko
June 5th, 2008, 04:13 AM
I have the 2.6.24-18-generic kernel, is there any way to undervolt that using the same meathod? wouldn't I just need to use a different patch? I really need to undervolt due to how much I use this laptop.

Much thanks,
M4rotku

I managed to get it working by patching the kernel source and recompiling the acpi-cpufreq module. I found this old howto (https://www.dedigentoo.org/trac/linux-phc/wiki/phc_howto_ubuntu_001), which got me started.

Here's a quick howto, updated to work on hardy (just copy-paste the commands to a terminal):

1. Open up a terminal and install subversion, the kernel source and build-essential:
sudo apt-get install subversion linux-source build-essential2. Get the linux-PHC patch:
mkdir ~/linux-PHC
cd linux-PHC
svn co http://phcpatches.googlecode.com/svn/trunk/acpi-cpufreq phcpatches/cpufreq3. Apply the patch to the kernel and build the module:
sudo bash
cd /usr/src
tar -xjf linux-source-2.6.24.tar.bz2
cd linux-source-2.6.24/
cp ~/linux-PHC/phcpatches/cpufreq/patches/linux-phc-kernel-vanilla-2.6.24-rc1.patch .
patch -p1 < linux-phc-kernel-vanilla-2.6.24-rc1.patch
cp /boot/config-$(uname -r) .config
make oldconfig
make prepare
make scripts
make M=./arch/x86/kernel/cpu/cpufreq4. Replace your old module:
cp /lib/modules/$(uname -r)/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko /lib/modules/$(uname -r)/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko.old
cp arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko /lib/modules/$(uname -r)/kernel/arch/x86/kernel/cpu/cpufreq
depmod Reboot.

I hope I didn't miss anything...

skinnie
June 5th, 2008, 04:22 AM
I managed to get it working by patching the kernel source and recompiling the acpi-cpufreq module. I found this old howto (https://www.dedigentoo.org/trac/linux-phc/wiki/phc_howto_ubuntu_001), which got me started.

Here's a quick howto, updated to work on hardy (just copy-paste the commands to a terminal):

1. Open up a terminal and install subversion, the kernel source and build-essential:
sudo apt-get install subversion linux-source build-essential2. Get the linux-PHC patch:
mkdir ~/linux-PHC
cd linux-PHC
svn co http://phcpatches.googlecode.com/svn/trunk/acpi-cpufreq phcpatches/cpufreq3. Apply the patch to the kernel and build the module:
sudo bash
cd /usr/src
tar -xjf linux-source-2.6.24
cd linux-source-2.6.24/
cp ~/linux-PHC/phcpatches/cpufreq/patches/linux-phc-kernel-vanilla-2.6.24-rc1.patch .
patch -p1 < linux-phc-kernel-vanilla-2.6.24-rc1.patch
cp /boot/config-$(uname -r) .config
make oldconfig
make prepare
make scripts
make M=./arch/x86/kernel/cpu/cpufreq4. Replace your old module:
rmmod acpi-cpufreq
cp /lib/modules/$(uname -r)/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko /lib/modules/$(uname -r)/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko.old
cp arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko /lib/modules/$(uname -r)/kernel/arch/x86/kernel/cpu/cpufreq
depmod
modprobe acpi-cpufreqI hope I didn't miss anything...

Can I try it in 64bit version of ubuntu or it won't work?

jocko
June 5th, 2008, 05:07 AM
Can I try it in 64bit version of ubuntu or it won't work?

I did it in 64 bit, so yes, try it. I haven't tried in 32 bit, but I guess it works with the same instructions...

Edit:tried and it worked..only thing is when doing Quote:
rmmod acpi-cpufreq
it says it is in use.
As I knew +- the values for my voltages,I did
sudo nano /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
and edited...

If the module is in use, just skip the "rmmod" and "modprobe" commands in step 4 and reboot instead.
Remember that if you have a dual core cpu, you need to change both cores.
So edit both /sys/devices/system/cpu/cpu0/cpufreq/phc_controls and /sys/devices/system/cpu/cpu1/cpufreq/phc_controls

skinnie
June 5th, 2008, 05:13 AM
I did it in 64 bit, so yes, try it. I haven't tried in 32 bit, but I guess it works with the same instructions...
How do I setup the vids manually and make them applied every reboot?

jocko
June 5th, 2008, 05:19 AM
How do I setup the vids manually and make them applied every reboot?
See step 5 in post #1 (http://ubuntuforums.org/showpost.php?p=4908896&postcount=1) in this thread.

skinnie
June 5th, 2008, 05:26 AM
See step 5 in post #1 (http://ubuntuforums.org/showpost.php?p=4908896&postcount=1) in this thread.

Sorry I didn't notice.
I did
sudo bash
echo "11:32 10:16 8:10 6:9 136:11" > /sys/devices/system/cpu/cpu0/cpufreq/phc_controls

rebooted....
then
cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
and obtain the default values
11:47 10:38 8:28 6:18 136:11

any clue?

I did it in 64 bit, so yes, try it. I haven't tried in 32 bit, but I guess it works with the same instructions...



If the module is in use, just skip the "rmmod" and "modprobe" commands in step 4 and reboot instead.
Remember that if you have a dual core cpu, you need to change both cores.
So edit both /sys/devices/system/cpu/cpu0/cpufreq/phc_controls and /sys/devices/system/cpu/cpu1/cpufreq/phc_controls
That's what I did...I verified that once you change the values in cpu0,it will change to the same in cpu1

jocko
June 5th, 2008, 09:03 AM
Sorry I didn't notice.
I did


rebooted....
then

and obtain the default values


any clue?


That's what I did...I verified that once you change the values in cpu0,it will change to the same in cpu1

Read step 5 again. It tells you to add the line to your /etc/rc.local file, to have it apply during boot.
And I need to change it for both cpu0 and cpu1, otherwise core 1 will run at the default voltage while core 0 runs at lower voltage.

skinnie
June 5th, 2008, 09:22 AM
Read step 5 again. It tells you to add the line to your /etc/rc.local file, to have it apply during boot.
And I need to change it for both cpu0 and cpu1, otherwise core 1 will run at the default voltage while core 0 runs at lower voltage.

Thank you very much,I wasn't understanding quite well the thing.
Undervolting sucessful :guitar:
Ubuntu 8.04 64bit kernel 2.6.24-18-generic

sullust
June 5th, 2008, 04:37 PM
This is so awesome!! I fixed up a gutsy 2.6.22-14-generic kernel by following this other guide (https://www.dedigentoo.org/trac/linux-phc/wiki/phc_howto_ubuntu_001), and for finding the voltages I used the optimizer script.

Has anyone run the 'msrinfo' utility after making these changes? According to the guide mentioned by Sebastral (which I later verified as true) lowering the voltage below the minimum doesn't have any effect. (msrinfo tool is explained in quoted guide, with a link to dl it.)

Example:
My original settings were 12:44 10:36 8:28 6:19. After tweaking my settings are 34 23 1 1.

However, running msrinfo tells me a different story:

| CPU 0 | CPU 1 |
+-------+-------+-------+-------+
| FID | VID | FID | VID |
--------+-------+-------+-------+-------+
Min | 6 | 19 | 6 | 19 |
Max | 12 | 44 | 12 | 44 |
--------+-------+-------+-------+-------+
Target | 6 | 1 | 6 | 1 |
Current | 6 | 19 | 6 | 19 |
--------+-------+-------+-------+-------+

So basically, even though I am attempting to lower my base voltage, it's not going any lower than the original setting. The 12:44 -> 12:34 setting does limit the upper end though, so during heavy cpu loads it should run a bit cooler than normal.

Has anyone else run this tool to see the results? Since my laptop fan runs on high at my base voltage, I haven't really seen any net inprovement. I am wondering if the people that have seen their core temps go down originally started with a minimum setting higher than their minimum voltage, or if different versions of the patch allow forcing the minimum voltage lower.

krlhc8
June 5th, 2008, 04:52 PM
How do you get msrinfo?

RadiusXE
June 5th, 2008, 06:18 PM
Hi...
I' ve got some problem' s

1.I compile my own module (I have 64b core)
tar -xjf linux-source-2.6.24
err... a change the command to tar -xjf linux-source-2.6.24.tar.bz2
all ok

2. script runs to zero, then write some info and notebook freezes
what can I do? NTB Fujitsu Siemens Esprimo mobile D9500, C2D T7300@2GHz, Ubuntu 8.04 LTS 64b

Please help, fan is **** I need undervolting or something to regulate fan (or all together)

:confused:

M4rotku
June 5th, 2008, 11:15 PM
Jocko,

When I entered the command

root@joey-laptop:/usr/src# tar -xjf linux-source-2.6.24


I recieve the following errors:

tar: linux-source-2.6.24: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors


and then I "ls" to see what files were there and this is what i got:

root@joey-laptop:/usr/src# ls
linux-headers-2.6.24-18 linux-source-2.6.24.tar.bz2
linux-headers-2.6.24-18-generic rpm


so the file "linux-source-2.6.24" was not there, there was only a .tar version of such file.

How do I do this with the tar'ed file?

sullust
June 6th, 2008, 01:30 AM
How do you get msrinfo?

From the guide I linked to above:
There is a tool named msrinfo that shows up information about current FIDs and VIDs and those you set (they can be different for example if you set a VID below the lowest one).

Download the tool here ( https://www.dedigentoo.org/bdz/linux-phc/ ) and compile it. You may need to copy the msr.h (same source like msrinfo) to "/usr/include/asm/".

jocko
June 6th, 2008, 05:40 AM
Jocko,

When I entered the command

root@joey-laptop:/usr/src# tar -xjf linux-source-2.6.24
I recieve the following errors:

tar: linux-source-2.6.24: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
and then I "ls" to see what files were there and this is what i got:

root@joey-laptop:/usr/src# ls
linux-headers-2.6.24-18 linux-source-2.6.24.tar.bz2
linux-headers-2.6.24-18-generic rpm
so the file "linux-source-2.6.24" was not there, there was only a .tar version of such file.

How do I do this with the tar'ed file?
Apparently I didn't give you the complete command...
It should be:
tar -xjf linux-source-2.6.24.tar.bz2

RadiusXE
June 6th, 2008, 09:03 AM
Jocko,

When I entered the command

root@joey-laptop:/usr/src# tar -xjf linux-source-2.6.24


I recieve the following errors:

tar: linux-source-2.6.24: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors

...

I wrote it at post 64,


tar -xjf linux-source-2.6.24.tr.bz2

RadiusXE
June 6th, 2008, 07:06 PM
Anyone else having trouble resuming from suspend after using this cpufreq module? If I copy the old one back it resumes fine. With this one however, the fan spins up to full and the video never gets restored.

Can someone confirm?

for me doesn' t work hibernation (ntb make only shutdown)

:confused:

Arthur Archnix
June 7th, 2008, 08:18 AM
I'm not sure if this is related to the suspend issue some have noted... While undervolting has a clear measurable effect, it's not clear if underclocking really works. /proc/cpuinfo reflects the underclocked frequency, but enabling debug output on cpufreq causes it to say things like "CPU frequency out of sync: cpufreq and timing core thinks of 533000, is 800000 kHz." where the former is the chosen underclocked frequency and the latter is the documented minimum frequency. This discrepancy also causes Software Suspend 2 (http://www.thinkwiki.org/wiki/Software_Suspend_2) to oops during suspend.

Quoted from here: http://www.thinkwiki.org/wiki/Pentium_M_undervolting_and_underclocking

M4rotku
June 7th, 2008, 11:16 AM
Jocko, where do I pick up in the main guide after the steps you gave me?

Much thanks,
M4rotku

jocko
June 7th, 2008, 11:45 AM
Jocko, where do I pick up in the main guide after the steps you gave me?

Much thanks,
M4rotku

What I described was instead of step 2, so start at step 3 (skip the reboot if you already done it, of course).
Good luck.

M4rotku
June 7th, 2008, 12:51 PM
I ran the ./linux-phc-optimize.bash script and the first time it went though and told me that the lowest acceptable VID is 0.

I ran the script again per guide and recieved the following response:

Read phc_default_vids:
> Success!

Load VIDs from 'phc_tweaked_vids'
> ERROR: Wrong VID count!


What does this mean and is it because I'm using a different kernel?

Edit: Also, when I run "cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls", I only get 2 outputs:

9:43 6:19

instead of the usual four that everyone else is talking about. could this be the problem?

sullust
June 9th, 2008, 09:42 AM
Has anyone checked out the REAL frequency their CPU is running at after these changes using the msrinfo tool mentioned on page 7?

I am really curious if anyone has been able to get their CPU to operate at a voltage lower than their original minimum.

For example, even after I changed my lowest FID to use a VID of 1, it is still running at 19.

dixon
June 9th, 2008, 10:22 AM
Has anyone checked out the REAL frequency their CPU is running at after these changes using the msrinfo tool mentioned on page 7?

I am really curious if anyone has been able to get their CPU to operate at a voltage lower than their original minimum.

For example, even after I changed my lowest FID to use a VID of 1, it is still running at 19.
I was not able to lower my voltage under the original minimum...

EDIT: My cpu is Core 2 Duo T5470

stred
June 11th, 2008, 05:02 PM
hi all, anyone has handy the acpi-cpufreq.ko for kernel 2.6.24.18 32-bit?

thnks.

ssc351
June 11th, 2008, 07:25 PM
Thanks! Works so far...had similar problems as other people with the VID going to zero...just put in "1"s at the end as shown in some previous posts and seems to work great with video running.

Don't know if I have gained any battery life or not, since my battery is broken and only lasts 10mins, but bottom of the computer is definitely cooler.

SyntheticShield
June 12th, 2008, 12:02 AM
I tried running lsmod | grep acpi_cpufreq and got no output at all. So does that mean I cannot implement this proceedure? If so, is there any work around? I have an AMD Sempron 3000+ (1.8ghz) processor in my laptop and the fan is on nearly constantly and would love to do anything that would save the battery and cut down on the fan use and heat.

I also went to the PHC website and I dont see anywhere that you can download the files.

Im also on the 2.6.24.18 kernel.

I tried rmmod on the speedstep.centrino and insmod acpi_cpufreq and it tells me that module speedstep doesnt exist and it cant read acpi_cpufreq as no such file or directory exists.

Is there anything I can do or am I stuck?

skinnie
June 12th, 2008, 03:52 AM
hi all, anyone has handy the acpi-cpufreq.ko for kernel 2.6.24.18 32-bit?

thnks.

2 or three pages before you have the solution to "new" kernels.

Ares Drake
June 13th, 2008, 05:18 AM
I updated the howto with a 32bit module for 2.6.24-18 and a mini-howto to compile the module yourself in case you need a 64bit module or for a newer kernel version.

pressureman
June 16th, 2008, 08:09 PM
I updated the howto with a 32bit module for 2.6.24-18 and a mini-howto to compile the module yourself in case you need a 64bit module or for a newer kernel version.

2.6.24-19 just got released... :-?

InfinityCircuit
June 17th, 2008, 12:15 AM
You must enable CONFIG_CPU_FREQ_GOV_USERSPACE to use the script.

aashay
June 17th, 2008, 01:59 AM
I can confirm it not working for me. The scripts goes through the values till -1 where it crashes. Even after echoing the values 13:3 10:1 8:1 6:1 to phc_controls, while working at 800MHZ, phctool shows the target VID to be 3 (.75V) and the current to be 19 (.95V) which was the default for 800MHZ. So basically phc was unable to really use the new values.
Also, I just downloaded and installed the patched module provided in the first post. Would it make a difference if I compiled it on my own?

Hooya
June 18th, 2008, 04:59 PM
I've looked through the thread. Any new information on those of us using speedstep? I've tried blacklisting it and using the acpi_cpufreq but it didn't work since I was just guessing on how to blacklist one and invoke the other. Can someone detail how to do this? What about just using the speedstep module?

I have a Celeron processor, so it's possible I can't even do this though. Can anyone confirm?

Thanks in advance.

Edit, here is the contents of /proc/modules if that will help:
af_packet 23812 4 - Live 0xefd10000
binfmt_misc 12808 1 - Live 0xefd0b000
i915 32512 2 - Live 0xefc88000
drm 82452 3 i915, Live 0xefc97000
ppdev 10372 0 - Live 0xefc79000
ipv6 267780 10 - Live 0xefcc8000
speedstep_lib 6532 0 - Live 0xefc76000
cpufreq_userspace 5284 0 - Live 0xefc73000
cpufreq_ondemand 9740 0 - Live 0xefc6f000
cpufreq_conservative 8712 0 - Live 0xefc6b000
cpufreq_stats 7104 0 - Live 0xefb74000
cpufreq_powersave 2688 0 - Live 0xefb1f000
container 5632 0 - Live 0xefb77000
toshiba_acpi 12100 0 - Live 0xefb4c000
sbs 15112 0 - Live 0xefb7a000
sbshc 7680 1 sbs, Live 0xefb50000
dock 11280 0 - Live 0xefb70000
iptable_filter 3840 0 - Live 0xef96b000
ip_tables 14820 1 iptable_filter, Live 0xefb6b000
x_tables 16132 1 ip_tables, Live 0xefaee000
lp 12324 0 - Live 0xefb47000
freq_table 5536 2 cpufreq_ondemand,cpufreq_stats, Live 0xefb02000
joydev 13120 0 - Live 0xefb1a000
pcmcia 40876 0 - Live 0xefb60000
snd_intel8x0 35356 2 - Live 0xefb27000
snd_ac97_codec 101028 1 snd_intel8x0, Live 0xefb81000
ac97_bus 3072 1 snd_ac97_codec, Live 0xefaab000
arc4 2944 2 - Live 0xef8f3000
snd_pcm_oss 42144 0 - Live 0xefb54000
snd_mixer_oss 17920 1 snd_pcm_oss, Live 0xefb21000
ecb 4480 2 - Live 0xefaff000
blkcipher 8324 1 ecb, Live 0xefafb000
snd_pcm 78596 3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss, Live 0xefb32000
snd_seq_dummy 4868 0 - Live 0xefaf8000
parport_pc 36260 0 - Live 0xefb10000
parport 37832 3 ppdev,lp,parport_pc, Live 0xefb05000
evdev 13056 6 - Live 0xefaf3000
serio_raw 7940 0 - Live 0xefaa5000
rt2500pci 20352 0 - Live 0xefa94000
rt2x00pci 11264 1 rt2500pci, Live 0xef9ba000
rt2x00lib 22528 2 rt2500pci,rt2x00pci, Live 0xefae7000
snd_seq_oss 35584 0 - Live 0xefab2000
rfkill 8592 2 rt2x00lib, Live 0xefa90000
input_polldev 5896 1 rt2x00lib, Live 0xef9c5000
crc_itu_t 3072 1 rt2x00lib, Live 0xef890000
snd_seq_midi 9376 0 - Live 0xefa8c000
psmouse 40336 0 - Live 0xefa9a000
mac80211 165652 3 rt2500pci,rt2x00pci,rt2x00lib, Live 0xefabd000
pcspkr 4224 0 - Live 0xef9c2000
snd_rawmidi 25760 1 snd_seq_midi, Live 0xef9f8000
yenta_socket 27276 1 - Live 0xef9e1000
rsrc_nonstatic 13696 1 yenta_socket, Live 0xef9dc000
cfg80211 15112 1 mac80211, Live 0xef9d7000
pcmcia_core 40596 3 pcmcia,yenta_socket,rsrc_nonstatic, Live 0xefa81000
eeprom_93cx6 3200 1 rt2500pci, Live 0xef83d000
snd_seq_midi_event 8320 2 snd_seq_oss,snd_seq_midi, Live 0xef9be000
snd_seq 54224 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_mid i_event, Live 0xef9e9000
snd_timer 24836 2 snd_pcm,snd_seq, Live 0xef9a8000
snd_seq_device 9612 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi ,snd_seq, Live 0xef9b6000
snd 56996 15 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_ oss,snd_pcm,snd_seq_dummy,snd_seq_oss,snd_rawmidi, snd_seq,snd_timer,snd_seq_device, Live 0xef9c8000
video 19856 0 - Live 0xef9b0000
output 4736 1 video, Live 0xef99c000
soundcore 8800 1 snd, Live 0xef9a4000
snd_page_alloc 11400 2 snd_intel8x0,snd_pcm, Live 0xef945000
iTCO_wdt 13092 0 - Live 0xef99f000
iTCO_vendor_support 4868 1 iTCO_wdt, Live 0xef94c000
ac 6916 0 - Live 0xef949000
battery 14212 0 - Live 0xef994000
button 9232 0 - Live 0xef990000
shpchp 34452 0 - Live 0xef957000
pci_hotplug 30880 1 shpchp, Live 0xef962000
intel_agp 25492 1 - Live 0xef94f000
agpgart 34760 3 drm,intel_agp, Live 0xef8fb000
ext3 136712 1 - Live 0xef96d000
jbd 48404 1 ext3, Live 0xef92d000
mbcache 9600 1 ext3, Live 0xef81d000
sg 36880 0 - Live 0xef93a000
sr_mod 17956 0 - Live 0xef8f5000
cdrom 37408 1 sr_mod, Live 0xef8da000
sd_mod 30720 3 - Live 0xef8e5000
pata_acpi 8320 0 - Live 0xef8d6000
ata_generic 8324 0 - Live 0xef839000
ata_piix 19588 2 - Live 0xef854000
e100 37388 0 - Live 0xef8bf000
mii 6400 1 e100, Live 0xef83f000
libata 159344 3 pata_acpi,ata_generic,ata_piix, Live 0xef905000
ehci_hcd 37900 0 - Live 0xef8cb000
uhci_hcd 27024 0 - Live 0xef8b7000
scsi_mod 151436 4 sg,sr_mod,sd_mod,libata, Live 0xef866000
usbcore 146028 3 ehci_hcd,uhci_hcd, Live 0xef892000
thermal 16796 0 - Live 0xef84e000
processor 36872 2 thermal, Live 0xef85b000
fan 5636 0 - Live 0xef836000
fbcon 42912 0 - Live 0xef842000
tileblit 3456 1 fbcon, Live 0xef825000
font 9472 1 fbcon, Live 0xef821000
bitblit 6784 1 fbcon, Live 0xef818000
softcursor 3072 1 bitblit, Live 0xef81b000
fuse 50580 1 - Live 0xef828000

aashay
June 19th, 2008, 08:51 AM
I can confirm it not working for me. The scripts goes through the values till -1 where it crashes. Even after echoing the values 13:3 10:1 8:1 6:1 to phc_controls, while working at 800MHZ, phctool shows the target VID to be 3 (.75V) and the current to be 19 (.95V) which was the default for 800MHZ. So basically phc was unable to really use the new values.
Also, I just downloaded and installed the patched module provided in the first post. Would it make a difference if I compiled it on my own?

Okay an update on this.
Seems my CPU (Core 2 Duo, don't know the exact model no.) limits the VIDs to a lower bound of 19. So I just set 19 as the VID for all the frequencies. Works like a charm. The processor is 10-15 degrees (C) cooler than what it used to be.

tesna
June 20th, 2008, 02:10 AM
mine always crashes when I tried to manually echoing the values.


tesna@zorg:/etc/init.d$ cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
11:45 10:43 8:33 6:23 136:15


the script tells me only 4 values, which is:

tesna@zorg:~$ cat phc_tweaked_vids
24 24 1 1 15


I tried to echoing 11:24 10:24 8:1 6:1 to /sys/devices/system/cpu/cpu0/cpufreq/phc_controls then it crash instantly.

Tried to echoing higher values than those four, and I added fifth values with them, no success. still crash.

I was able to lower the voltage when booting into windows (I forgot the program name), and got 15-20 degrees decrease in cpu temp. Now using ubuntu my cpu sits at 63 degrees C at idle :(

How do I fix this?

aashay
June 20th, 2008, 10:43 AM
mine always crashes when I tried to manually echoing the values.


tesna@zorg:/etc/init.d$ cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
11:45 10:43 8:33 6:23 136:15


the script tells me only 4 values, which is:

tesna@zorg:~$ cat phc_tweaked_vids
24 24 1 1 15


I tried to echoing 11:24 10:24 8:1 6:1 to /sys/devices/system/cpu/cpu0/cpufreq/phc_controls then it crash instantly.

Tried to echoing higher values than those four, and I added fifth values with them, no success. still crash.

I was able to lower the voltage when booting into windows (I forgot the program name), and got 15-20 degrees decrease in cpu temp. Now using ubuntu my cpu sits at 63 degrees C at idle :(

How do I fix this?
The last in the default list 136:15 seems a bit weird if you ask me. As an alternate, look up on phctool. It's got a GUI if you are more comfortable that way

aldeby
June 20th, 2008, 12:51 PM
I also get 11:vv 10:vv 8:vv 6:vv 136:vv

this is weired since I noticed that there is a fixed divider between the processor frequency and the number before the colon: this is 200.

This is valid for all the first 4 values, however my lowest frequency 800Mhz although should be represented in the phc_controls and phc_default_controls as 4 it is actually represented by 136.

I can't understand why...

PS: my lowest possible voltage is v ID 11, 0.850 v. PHC seems not capable to further lower it.

tesna
June 20th, 2008, 08:09 PM
Update. I tried to set the CPU frequency at a fixed frequency (userspace) before I echoing the values, and guess what. My computer didn't crash! I changed the freq (increase/decrease) after echoing the values and it also didn't crash. But as soon I changed the cpu freq mode to "ondemand" my system instantly crash. Oh I'm confused.

eldragon
June 20th, 2008, 08:29 PM
Okay an update on this.
Seems my CPU (Core 2 Duo, don't know the exact model no.) limits the VIDs to a lower bound of 19. So I just set 19 as the VID for all the frequencies. Works like a charm. The processor is 10-15 degrees (C) cooler than what it used to be.

oh, where did you find that? i have the exact same problem and would love to see if my vids kick at a lower limit too :(

aashay
June 21st, 2008, 05:57 AM
oh, where did you find that? i have the exact same problem and would love to see if my vids kick at a lower limit too :(
I used phctool. You can get it from here: http://phc.athousandnights.de/files
The tool has a Analysis tab as you can see in the screenshot.
To get this to work, you first need to sudo modprobe msr
After this, let the script run and keep refreshing the analysis tab.
For me, the target vids kept decresing, but the reached vid was stuck at 19... indicating that it was the lower limit for my CPU.

eldragon
June 21st, 2008, 03:55 PM
I used phctool. You can get it from here: http://phc.athousandnights.de/files
The tool has a Analysis tab as you can see in the screenshot.
To get this to work, you first need to sudo modprobe msr
After this, let the script run and keep refreshing the analysis tab.
For me, the target vids kept decresing, but the reached vid was stuck at 19... indicating that it was the lower limit for my CPU.

thanks a lot. i was half way through, already had installed phctools, just didnt know what to do with it :D

i found mi lowest vid is 21, so i just set it to that. and thats it?

how odd to have the setting when every perceived frequency works on the lowest of settings.

anyway, thanks, gonna testdrive my battery now... hope it does something

shae
June 21st, 2008, 05:16 PM
This guide is great! I managed to get my C2D 7500T down to 12:31 11:22 8:15 6:15 136:15 though I have not worked much on the 12:31 setting. (15 is the lowest) I have not checked battery life but it is running much cooler.

sarah.fauzia
June 22nd, 2008, 04:50 AM
2.6.24-19 just got released... :-?

I'd really like to know if the HOW-TO is compatible with the updated kernel--my Motion LE1700 always gets hot, so I constantly have to use a laptop fan (it's Intel Core 2 Duo). So I hope the answer is a yes!

And my computer has a 64-bit processor...

jocko
June 22nd, 2008, 09:08 AM
I'd really like to know if the HOW-TO is compatible with the updated kernel--my Motion LE1700 always gets hot, so I constantly have to use a laptop fan (it's Intel Core 2 Duo). So I hope the answer is a yes!

And my computer has a 64-bit processor...

It will work with any kernel if you compile the module yourself (see instructions in this post (http://ubuntuforums.org/showpost.php?p=5119140&postcount=54) ). But there is a precompiled module for 2.6.24-19 in the first post (it's only 32 bit, which may or may not work with a 64 bit kernel. I know the module for 32 bit 2.6.24-18 worked fine with my 64 bit kernel...)
The script from this howto does not always work (for me it just works on full processor frequency and fails to keep the processor at any lower frequency, so the script thinks it can go all the way down to zero when in fact the lowest working setting is 19... ).

eldragon
June 22nd, 2008, 01:30 PM
This guide is great! I managed to get my C2D 7500T down to 12:31 11:22 8:15 6:15 136:15 though I have not worked much on the 12:31 setting. (15 is the lowest) I have not checked battery life but it is running much cooler.

battery life didnt change one bit. :(

i seriously believe there is something really incompatible with this notebook. thanks god i dont rely that much on the battery..

sarah.fauzia
June 22nd, 2008, 07:05 PM
Okay, I was able to run the module, and all the scripts for that matter...I just want to make sure I interpreted what to echo correctly.

This is what I got from running the last step:

Default VIDs: 22 21 20 19
Current VIDs: 0 21 20 19
Testing VID: 0 (700 mV)
..............................
Default VIDs: 22 21 20 19
Current VIDs: -1 21 20 19
Testing VID: -1 (684 mV)
./linux-phc-optimize.bash: line 161: printf: -1: invalid option
printf: usage: printf [-v var] format [arguments]


The lowest acceptable VID is 0.

When I open the phc_controls I get (I mistakenly thought I had to reboot after this step, so after rebooting):

cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
9:1 8:21 7:20 6:19

Unless I'm mistaken, it changed on its own, without me having to "echo" it. But I still added, as the steps said:

echo "9:1 8:21 7:20 6:19" > /sys/devices/system/cpu/cpu0/cpufreq/phc_controls to /etc/rc.local

Did I do everything correctly? I just want to make sure--again, I really hope this helps! My computer didn't freeze at all during this risky procedure, thankfully.

sarah.fauzia
June 22nd, 2008, 07:37 PM
Ah! I was able to see how the script worked--because I hadn't changed <i>both</i> cores yet:


sara@sara-tablet:~$ cat /sys/devices/system/cpu/cpu1/cpufreq/phc_controls
9:22 8:21 7:20 6:19
sara@sara-tablet:~$ cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
9:1 8:21 7:20 6:19


So it worked! (Correct me if I'm mistaken)

jocko
June 23rd, 2008, 02:12 AM
Ah! I was able to see how the script worked--because I hadn't changed <i>both</i> cores yet:


sara@sara-tablet:~$ cat /sys/devices/system/cpu/cpu1/cpufreq/phc_controls
9:22 8:21 7:20 6:19
sara@sara-tablet:~$ cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
9:1 8:21 7:20 6:19
So it worked! (Correct me if I'm mistaken)

I don't think that you allowed the script to finish. It first test the highest cpu frequency until it freezes, then after reboot you have to run the script again to test the next cpu frequency. As you see you still have the original vid's on the 8x, 7x and 6x multipliers.
Also I don't think your processor really ran at full speed during those tests, as the script was able to run all the way to zero. For me the original vid for the highest multiplier was 42 and I managed to lower it to 19 (which causes my computer to freeze, so I set it at 21 to keep it stable). On the lower multipliers the script ran all the way down to zero, but I could clearly see that after the script had set the cpu frequency, my system regained control and re-set the frequency governor back to "ondemand". So the script ran only some kind of simulation.
When I tested what vid's I can use I noticed that even if I set the vid's for the lower multipliers in /sys/devices/system/cpu/cpu*/cpufreq/phc_controls to zero, the actual value never gets lower than 19 (probably a limit in the bios or cpu itself).

Have you tried really stressing your cpu with those settings, making sure it runs att maximum usage at the higest speed on both cores?
If it really runs stable with those settings, I'm pretty sure you can set the vid's for the other multipliers to 1 as well, as it makes no sense to use higher voltage on the 8x, 7x and 6x multipliers than you use on 9x.
Oh, and to get both cores to use the settings, you need to echo the values to both cores.

sarah.fauzia
June 23rd, 2008, 01:06 PM
I don't think that you allowed the script to finish. It first test the highest cpu frequency until it freezes, then after reboot you have to run the script again to test the next cpu frequency. As you see you still have the original vid's on the 8x, 7x and 6x multipliers.
Also I don't think your processor really ran at full speed during those tests, as the script was able to run all the way to zero. For me the original vid for the highest multiplier was 42 and I managed to lower it to 19 (which causes my computer to freeze, so I set it at 21 to keep it stable). On the lower multipliers the script ran all the way down to zero, but I could clearly see that after the script had set the cpu frequency, my system regained control and re-set the frequency governor back to "ondemand". So the script ran only some kind of simulation.
When I tested what vid's I can use I noticed that even if I set the vid's for the lower multipliers in /sys/devices/system/cpu/cpu*/cpufreq/phc_controls to zero, the actual value never gets lower than 19 (probably a limit in the bios or cpu itself).

Have you tried really stressing your cpu with those settings, making sure it runs att maximum usage at the higest speed on both cores?
If it really runs stable with those settings, I'm pretty sure you can set the vid's for the other multipliers to 1 as well, as it makes no sense to use higher voltage on the 8x, 7x and 6x multipliers than you use on 9x.
Oh, and to get both cores to use the settings, you need to echo the values to both cores.

Hmmm. I ran the script three times (restarting after each time), the second and third time making sure to stress the second core as well by running burnMMX simultaneously (and it did say "Terminated" when the first script finished). I can't think of anything I did wrong...could it possibly be that my computer is very good, and can handle the lower voltage? I would truly hope so!

I'll set the other ones down to 1, and see how that goes. And my computer didn't freeze at all while the script was running... It was only after the initial INSTALL of the script that my computer checked my drives, after I had rebooted (that's the step for or after step four, from the guide you linked me to?).

The reason I didn't change the voltages for the other multipliers was because I thought Current VIDs would show me what exact values to use--did everyone else also assume to change all the lower multipliers to the same value? I'm quite new to this, so forgive me! I would just really, really like to have a more temperate computer (and perhaps learn more how it works, too).

Thank you for the help!

HellBoyz77
June 23rd, 2008, 07:31 PM
I followed the guide with just some changes for match my machine.

I have a T5500 Core 2 Duo, Hardy x86.

The script linux-phc-optimize.bash did not work for me, it gave the -1 issue. Also running the script with another istance of burnMMX in a separate tab made the temperature up to 104 degree, it's almost the limit that can support. So, be aware on using it.

Instead i suggest if you have this type of cpu to put the VID at 19, as other users say seems that is impossibile to set a lower level.

You can use PHCTools to set the VID for both the cpu, just pay attention to mark the option "Restore VIDs on Load" under Settings Tab. Before using it launch the script install.sh to set the permissions.

I can confirm that the average temperature has dropped around 10-15 degree.

The compiled module for 2.6.24-19 32bit is below.

Good job Ares Drake.

mailforbiz
June 23rd, 2008, 08:38 PM
I have Intel 7250 C2D, x86. I followed the steps in the original post and used the PHC patch for kernel -16. The original values I got on doing a cat of phc_controls were

$ cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
11:45 10:37 8:30 6:23 136:15


That doesn't seem right, esp the last pair 136:15. From what I understand, the first value should be much lower.

Can anyone with knowledge of this confirm whether this values sound fishy ?

By the way, I still went through the rest of the steps and the script gives me the -1 issue.

Maybe I need to compile my own patch.

Any response appreciated.

TIA,
HT

SyntheticShield
June 23rd, 2008, 10:26 PM
does this how to work with AMD processors, or does this only work with dual core processors?

mailforbiz
June 24th, 2008, 10:08 AM
I went ahead and put 19 as the voltage values for all the frequencies like some folks here have done. I would say there has been maybe a 3-4 deg drop in the temp but not the 10-15 deg some folks have reported. But this could just be my perception. I haven't tried compiling the patch myself yet. Don't know if this matters but I'm using kernel -16.

I have Intel 7250 C2D, x86. I followed the steps in the original post and used the PHC patch for kernel -16. The original values I got on doing a cat of phc_controls were


That doesn't seem right, esp the last pair 136:15. From what I understand, the first value should be much lower.

Can anyone with knowledge of this confirm whether this values sound fishy ?

By the way, I still went through the rest of the steps and the script gives me the -1 issue.

Maybe I need to compile my own patch.

Any response appreciated.

TIA,
HT

blazercist
June 24th, 2008, 10:44 AM
I'd like to try this but before I do can someone confirm this actually has a positive effect on battery life? Can someone post some detailed values in reference to "before and after" battery life. Thanks

aashay
June 24th, 2008, 12:43 PM
Ill gladly run the tests given the right tools. Right now, I can say there has been a marginal increase (10-20 mins). Though the 10-15 degs reduction in temperature makes the whole thing worth it

mailforbiz
June 24th, 2008, 04:53 PM
I don't know how you guys are getting a 10-15 degrees drop. I played around quite a bit to come up with VID values that didn't freeze my laptop. Eventually though, setting the VIDs at those values made my HDD temp go upto 46 deg when earlier it used to hover around 42 deg. Besides it didn't make much difference for my other temps - GPU and cores. So for now I've reverted back to the original values. Maybe I'm doing something wrong.

Has anyone measured the before/after HDD temp using hddtemp ?

I'd love to get the 10-15 deg drop as my laptop gets quite hot and this is one annoying thing which makes me pine for Vista. Oh Gosh, nooooooooooooo!! [Realizes with horror what he just said]

aashay
June 25th, 2008, 10:25 AM
hddtemp shows equal if not lower values after the undervolt.

jocko
June 25th, 2008, 11:25 AM
Has anyone measured the before/after HDD temp using hddtemp ?
Why do you think undervolting the cpu would change the hdd temperature?
It will only change the cpu temperature, nothing else.

mailforbiz
June 25th, 2008, 02:25 PM
Good question, I have no idea why the HDD temp would rise. I was running burnMMX at times but that is only supposed to exert the cpu so who knows. In short, either the steps depicted in this tutorial don't work for my cpu/system configuration else I'm being a braindead bugger and doing something wrong. Either way, there are unpleasant side-effects. :-)

Why do you think undervolting the cpu would change the hdd temperature?
It will only change the cpu temperature, nothing else.

excogitation
June 26th, 2008, 05:29 AM
From my experience undervolting lowers your temperature by a few (~3-8 °C) degrees depending on the the CPU load, ...

I think you're unreasonable expecting figures as high as 15 °C.

Most the time it's only a matter of a few degrees to get those laptop fans to stop and that's what my main interest was when I started using NHC (windows) a few years back.

Unfortunately in Ubuntu my fan still runs about 85% of the time but at least it isn't running 100% and maybe it'll change to the better in the future (... it definitely will with the next laptop ...)

Also undervolting NEVER had any effect on my harddrive temperature (and I've undervolted numerous laptops and even my fileserver running on a Dothan mATX-board).

eldragon
June 26th, 2008, 08:34 AM
doing a dmesg i get the following concerning acpi_cpufreq:
acpi_cpufreq: no version for "struct_module" found: kernel tainted.

does anyone know what that means?

mrpeaches
June 26th, 2008, 12:02 PM
Ok, let me start off by saying that I'm a total Linux newbie. This is my first Ubuntu install and I'm a big fan for the most part. However, I'm interested in undervolting because my CPU fan is always blowing and my laptop does run hotter under ubuntu as compared to XP (I'm dual booting).

So, I looked at the guide and managed to compile and install the PHC thing. I ran the script as well as burnMMX concurrently, but the script counted all the way down to 0 and then crashed. So, going on the advice of others in this thread, I set the values all to 19 and put them in the rc.local file. Unfortunately, this caused my Ubuntu to hang. It loads at boot, then just when it normally goes to the login screen, it just stops with a black screen and is unresponsive. when i went to the recovery boot, and edited out the "echo" commands, ubuntu boots as normal, which is to say, overly warm with the fan always blowing.

Here is some extra information in case it helps:
Ubuntu 8.04 64-Bit
Lenovo X61 laptop
Core2Duo T8300 2.4 Ghz
4GB RAM

and here is what I put into my rc.local file (I upped the 19 to 21 to try and boot with it again, no luck):
echo "13:21 12:21 10:21 8:21 6:21 136:21" > /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
echo "13:21 12:21 10:21 8:21 6:21 136:21" > /sys/devices/system/cpu/cpu1/cpufreq/phc_controls

So, anyone have any ideas? I am totally at a loss as to what to do next. Thank you all for being so kind and helpful so far, and any help anyone could give me would be appreciated!

aashay
June 26th, 2008, 01:47 PM
Ok, let me start off by saying that I'm a total Linux newbie. This is my first Ubuntu install and I'm a big fan for the most part. However, I'm interested in undervolting because my CPU fan is always blowing and my laptop does run hotter under ubuntu as compared to XP (I'm dual booting).

So, I looked at the guide and managed to compile and install the PHC thing. I ran the script as well as burnMMX concurrently, but the script counted all the way down to 0 and then crashed. So, going on the advice of others in this thread, I set the values all to 19 and put them in the rc.local file. Unfortunately, this caused my Ubuntu to hang. It loads at boot, then just when it normally goes to the login screen, it just stops with a black screen and is unresponsive. when i went to the recovery boot, and edited out the "echo" commands, ubuntu boots as normal, which is to say, overly warm with the fan always blowing.

Here is some extra information in case it helps:
Ubuntu 8.04 64-Bit
Lenovo X61 laptop
Core2Duo T8300 2.4 Ghz
4GB RAM

and here is what I put into my rc.local file (I upped the 19 to 21 to try and boot with it again, no luck):
echo "13:21 12:21 10:21 8:21 6:21 136:21" > /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
echo "13:21 12:21 10:21 8:21 6:21 136:21" > /sys/devices/system/cpu/cpu1/cpufreq/phc_controls

So, anyone have any ideas? I am totally at a loss as to what to do next. Thank you all for being so kind and helpful so far, and any help anyone could give me would be appreciated!
Please refer to http://ubuntuforums.org/showpost.php?p=5231160&postcount=91 to see how I got the 19 value for MY system. Find the correct value for your system in a similar way.

HellBoyz77
June 27th, 2008, 04:52 AM
From my experience undervolting lowers your temperature by a few (~3-8 °C) degrees depending on the the CPU load, ...

I think you're unreasonable expecting figures as high as 15 °C.

I think that it depends on cpu. For example, with my T5500 i get impressive result. Before the undervolting, when playing Civ4 with Wine, my cpu go always 97-99 degree. Now i get an impressive 75-85 ... This is very reasonable result.

Most the time it's only a matter of a few degrees to get those laptop fans to stop and that's what my main interest was when I started using NHC (windows) a few years back.

Unfortunately in Ubuntu my fan still runs about 85% of the time but at least it isn't running 100% and maybe it'll change to the better in the future (... it definitely will with the next laptop ...)

If you want to manage the fan noise, you probably need to recompile your DSDT table, when i do it the fan lower the noise a lot. I don't remember the link, but i found a guide in this forum on how to do that.

tesna
July 2nd, 2008, 10:41 PM
Do anyone know how to patch cpufreq in 26.25.9 kernel? Currently in svn only got patch for 26.24

Tao
July 3rd, 2008, 09:06 AM
yes (I've test it on 2.6.25.8 vanilla), with the Teknohog PHC patch. http://howflow.com/tricks/undervolt_your_cpu_with_linux_phc_and_kernel_2_6_2 5

But I didn't succeed on the intrepid kernel... (2.6.26rc6 with ubuntu patches)

chuck232
July 3rd, 2008, 12:04 PM
Core 2 Duos should have a min voltage of 15. The minimum for Core 2's is 0.9V, so 712mV + 15*12.5mV. This is a documented lowest voltage.

As for the 136: xx number people are seeing, this is a setting available for many of the 800MHz FSB Core 2 Duo's. Typically the lowest multiplier is 6, and for a 800MHz quad-pumped FSB CPU, that equates to 6*200MHz = 1.2GHz. However these 800MHz Core 2 Duos can also drop the FSB. At its lowest operating power state, it downclocks to 8 multiplier * 100MHz FSB (400MHz quad-pumped), or 800MHz. That's why it's listed as the last entry. The 136 number is just the represenation of that power state. I'd go out on a limb and say that every 800MHz FSB Core 2 Duo should be able to do that state at 136:15 (or 0.9V i.e. the lowest operating voltage).

tesna
July 3rd, 2008, 08:58 PM
yes (I've test it on 2.6.25.8 vanilla), with the Teknohog PHC patch. http://howflow.com/tricks/undervolt_your_cpu_with_linux_phc_and_kernel_2_6_2 5

But I didn't succeed on the intrepid kernel... (2.6.26rc6 with ubuntu patches)

that works great on 2.6.25.9, Thanks!

M4rotku
July 4th, 2008, 01:34 PM
Ok guys,

I've tried to do this several times now and I think I officially qualify as the least competent person ever to view this thread because it seems that everyone else is able to do this.

Would anyone be willing to work with me through private messages or AOL IM or Skype to give me step by step instructions.

It keeps going wrong and I think I know why, but I have no clue what to do about it and I am just really confused at this point. I would've given up by now but my computer really needs to be undervolted.

Much thanks in advance,
M4rotku

excogitation
July 4th, 2008, 05:52 PM
Ok guys,

... give me step by step instructions.



Derived from the first post:
Step by step:

1. This howto depends on the kernel module acpi-cpufreq to control your cpu. To find out if you're using it try
lsmod | grep acpi_cpufreq
You should see sth. like this:
acpi_cpufreq 14892 2
freq_table 5536 3 acpi_cpufreq,cpufreq_stats,cpufreq_ondemand
processor 36872 4 acpi_cpufreq,thermal
In case you don't see anything, you don't use acpi-cpufreq, but maybe the speedstep.centrino module.
Then this howto is not for you ...

2. You need to get a modified version of your acpi_cpufreq module, one with PHC support (http://phc.athousandnights.de/) build in. PHC (http://phc.athousandnights.de/) means processor hardware control and is the magic that makes it going. There are several ways to get this module.

... the precompiled modules I offer below are 32bit only.
It has to match your kernel. If there isn't the right one compile it yourself or wait for someone to provide it to the community.

3. There are right now versions for kernel 2.6.24-16-generic, 2.6.24-17-generic, 2.6.24-18-generic and 2.6.24-19-generic. To find out what kernel you have open a terminal and type:
uname -r
So once you know, download the right kernel module for 2.6.24-16-generic (www.s3pp.de/misc/16/acpi-cpufreq.ko) or 2.6.24-17-generic (www.s3pp.de/misc/17/acpi-cpufreq.ko) or 2.6.24-18-generic (www.s3pp.de/misc/18/acpi-cpufreq.ko) or 2.6.24-19-generic (www.s3pp.de/misc/19/acpi-cpufreq.ko).
4. First backup your old module.
sudo cp /lib/modules/`uname -r`/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko /lib/modules/`uname -r`/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko.old
(basically copies it to a new name)



5. Then copy the downloaded file to the right place:
sudo cp acpi-cpufreq.ko /lib/modules/$(uname -r)/kernel/arch/x86/kernel/cpu/cpufreq [/INDENT]

5. Reboot. If the module is installed correctly,
cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
should give you sth like this:
12:38 10:30 8:24 6:18
The value before the : stands for the frequency, the later for the voltage.
[B]


I'd get the PHC tool to start tweaking after that.

M4rotku
July 4th, 2008, 11:34 PM
At the line:

cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls

Is where I have the problem. Instead of four outputs, I only get two:

joey@joey-laptop:~$ cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
9:43 6:19


I think that this is where the problem is coming from and I have no idea how to go about fixing it. I have not heard of anyone else having this problem and so I'm starting to wonder what's going wrong.

Can anyone tell me why I'm only getting 2 outputs and how I would go about adjusting the process because of this?

Much thanks,
M4rotku

jocko
July 5th, 2008, 01:59 AM
At the line:



Is where I have the problem. Instead of four outputs, I only get two:



I think that this is where the problem is coming from and I have no idea how to go about fixing it. I have not heard of anyone else having this problem and so I'm starting to wonder what's going wrong.

Can anyone tell me why I'm only getting 2 outputs and how I would go about adjusting the process because of this?

Much thanks,
M4rotku

I don't think you need to adjust anything because of this.
How many "outputs" you get is built in to your cpu, there's no way you can change that. If the cpu can only be set to two different frequencies, you only get two outputs...

Exactly what is your problem? At which step does the howto fail, and what is the command line output from that step?

M4rotku
July 5th, 2008, 05:25 PM
Ok jocko,

I got to the point at which I got confused. In the step in which the script is run, I get confused about how to do it with dual core.

Do I enter "burnMMX" in the same terminal in which I am running the script, or in a different terminal?

Much thanks,
M4rotku

jocko
July 6th, 2008, 03:11 AM
Ok jocko,

I got to the point at which I got confused. In the step in which the script is run, I get confused about how to do it with dual core.

Do I enter "burnMMX" in the same terminal in which I am running the script, or in a different terminal?

Much thanks,
M4rotku

Either you run:
burnMMX & before you start the script in the same terminal, or you run it in a different terminal after you have started the script. Doesn't really matter, as long as you have two burnMMX processes running (one started manually and one started by the script), both cores will be used.

But a little warning on using/trusting the script:
On some cpus it doesn't apply the settings to both cores (it doesn't on mine) and it also doesn't manage to keep control of the cpu frequency governor (mine gets reset to "ondemand" directly after the script claims it has succesfully set a lower frequency), so the script only tests the highest frequency and when it thinks it tests lower frequencies, the cpu still runs full speed...

M4rotku
July 6th, 2008, 02:22 PM
Ok, I think I ran the script correctly and this was the eventual output:

Default VIDs: 43 19
Current VIDs: 0 19
Testing VID: 0 (700 mV)
..............................
Default VIDs: 43 19
Current VIDs: -1 19
Testing VID: -1 (684 mV)
./linux-phc-optimize.bash: line 161: printf: -1: invalid option
printf: usage: printf [-v var] format [arguments]


The lowest acceptable VID is 0.

Recovering CPU.

Run this script again to continue the optimization.
./linux-phc-optimize.bash: line 138: 8816 Terminated burnMMX
[1]+ Terminated burnMMX (wd: ~)
(wd now: ~/Desktop)


Then, when I tried to run the script again, I got this result:

joey@joey-laptop:~/Desktop$ sudo /.linux-phc-optimize.bash
sudo: /.linux-phc-optimize.bash: command not found


Then, I ls'ed to see if it was there and it was:

joey@joey-laptop:~/Desktop$ ls
acpi-cpufreq.ko functions.bash linux-phc-optimize.bash phc_cur_pos phc_tweaked_vids



What am I doing wrong? It didn't crash and I couldn't run the script again as it told me to.

jocko
July 6th, 2008, 06:02 PM
joey@joey-laptop:~/Desktop$ sudo /.linux-phc-optimize.bash

sudo: /.linux-phc-optimize.bash: command not foundit should be:
sudo ./linux-phc-optimize.bashNote that the point is before the slash, not after (which means "run the file "linux-phc-optimize.bash" which is in the current (./) directory", the way you wrote it it means "run the file ".linux-phc-optimize.bash" which is (hidden) in the root (/) directory", and as that file does not exist you get a command not found error).

M4rotku
July 6th, 2008, 06:41 PM
I swear this script hates me. How does it know that it's me when I run it. Ok, here's the problem this time.

When I tried to run the script for the second time, I recieved the following error starting from where it would install cpuburn:

Install required packages.
Will use burnMMX (part of cpuburn package) to stress CPU.
Install: cpuburn
> SKIPPED: Already installed


Will use current directory to store/retrieve test results.

Read phc_default_vids:
> Success!

Load VIDs from 'phc_tweaked_vids'
> ERROR: Wrong VID count!
joey@joey-laptop:~/Desktop/Undervolt$


and then the script quits and I end up back where i started in my Undervolt folder. :confused: grr.

I think this is where I finally gave up the last time. I want to keep going though, so if anyone can tell me what to do, then I'll do it.

Much thanks,
M4rotku

aldeby
July 6th, 2008, 07:01 PM
try deleting these files in your home directory (or in /root one if you are running the script from recovery console)

phc_cur_pos
phc_tweaked_vids


then run the script again.

as for burnMMX simply run

burnMMX &

in the terminal before running the script,
this way you are going to stress both cores of your dual core CPU.

cheers!

M4rotku
July 6th, 2008, 07:21 PM
Don't I need those scripts to run it the second time so that the main script will know where it left off the last time?

aldeby
July 7th, 2008, 04:55 AM
Of course, but something went wrong last time.
I'm not suggesting you to always delete them, just once to try fixing the problem you are experiencing.

M4rotku
July 7th, 2008, 06:38 PM
I tried deleting those files and running it again. Once again, it ran the first time and then the second time I received the same error.

aldeby
July 7th, 2008, 07:02 PM
As far as I remember in phc_tweaked_vids VIDs on the right cannot be higher than those on the left: i.e. 40 34 23 15 is OK while 0 34 23 15 will probably prompt the reported error. Values in phc_tweaked_vids are related to the number listed in phc_cur_pos

phc_cur_pos should list number 0 or 1 since you only have two power states.
It should be 0 if your CPU crashed while running the script the first time.

you can use the vids listed in phc_tweaked_vids after the CPU crashes by adding a few extra values to ensure stability.

if the scripts goes down to 0 most of the times there are some problems.
in my case, for example, it manages to go down to 0 for the first FID, however the second lower one crashes at 35. I cannot set phc 0 35 -- -- because this will prompt an error. First value should definitely be equal of higher.

Hope to remember well...

M4rotku
July 7th, 2008, 07:09 PM
My value on the left went down to 0 and then the script quit after it got to a negative one. But the value on the right stayed at 19 the whole time. I assumed that it was supposed to do that.

But the script didn't crash the system yet, so it still needs to run a few more times.

How would I go about fixing this?

Tao
July 8th, 2008, 10:57 PM
There is a new version of PHC (0.3.1) (two days ago). http://sourceforge.net/project/showfiles.php?group_id=161063

Some changes, longer documentation and a patch for 2.6.26rc8 kernel. :)

M4rotku
July 9th, 2008, 01:05 AM
Tao,

that looks promising. However, I have no idea as to which thing I need off of that site. If I am using 2.6.24-19-generic as my kernel and an Intel Core2 Duo CPU, then which package would I want to download and use? Also, would I still be following this guide or would I have to use a new set of instructions?

Much thanks,
M4rotku

Sebastral
July 10th, 2008, 01:56 PM
Tao,

that looks promising. However, I have no idea as to which thing I need off of that site. If I am using 2.6.24-19-generic as my kernel and an Intel Core2 Duo CPU, then which package would I want to download and use? Also, would I still be following this guide or would I have to use a new set of instructions?

Much thanks,
M4rotku


- find out if you use acpi_cpufreq with lsmod | grep cpufreq

- if you do follow these instructions to enable phc;

http://ubuntuforums.org/showpost.php?p=5119140&postcount=54

- install phctool from the link that looked promising to you.

- do sudo modprobe msr to enable the analasys feature

- find out the lowest possible vid for your cpu with the relevant steps in this howto

- set the new vids using the relevant steps in this howto

Hope this helps. Ever since I couldn't get the vids lower then the lowest official vid I gave up on this. but I've upgraded to kernel 2.6.24 and gave it a shot again. if I can believe phctool and powertop it seriously appears lower vids than the lowest standard vid is possible (using 2.6.24-19 and phc 0.3.1) :cool:

M4rotku
July 11th, 2008, 02:24 PM
- if you do follow these instructions to enable phc;

http://ubuntuforums.org/showpost.php?p=5119140&postcount=54

- install phctool from the link that looked promising to you.

Those instructions were for the 18 kernel, will they work with the 19?

Sebastral
July 12th, 2008, 08:29 AM
Those instructions were for the 18 kernel, will they work with the 19?
Positive, I have done it myself.

M4rotku
July 12th, 2008, 09:32 PM
Tao,

How do I install that patch, it wasn't a .deb package and I don't have any idea how to use it? When I tried to use the install script, it tried to go through wine so it might be a windows app.

aroedl
July 14th, 2008, 04:48 AM
yes (I've test it on 2.6.25.8 vanilla), with the Teknohog PHC patch. http://howflow.com/tricks/undervolt_your_cpu_with_linux_phc_and_kernel_2_6_2 5

But I didn't succeed on the intrepid kernel... (2.6.26rc6 with ubuntu patches)

Today I created a PHC patch for the brand new stable kernel 2.6.26:

Undervolt your CPU with Linux PHC and kernel 2.6.26 (http://howflow.com/tricks/undervolt_your_cpu_with_linux_phc_and_kernel_2_6_2 6)

Andreas

aashay
July 14th, 2008, 08:02 AM
My value on the left went down to 0 and then the script quit after it got to a negative one. But the value on the right stayed at 19 the whole time. I assumed that it was supposed to do that.

But the script didn't crash the system yet, so it still needs to run a few more times.

How would I go about fixing this?

Just set 19 as the VID for everything. The script will never crash as the processor is limiting the value to 19 whenever you put 18, 17..., 0. See my post a few pages back

M4rotku
July 14th, 2008, 05:57 PM
Just set 19 as the VID for everything. The script will never crash as the processor is limiting the value to 19 whenever you put 18, 17..., 0. See my post a few pages back

How would I go about doing so without the script doing it for me since the script keeps going lower? can you give me a terminal command to set the VID as such?

jocko
July 14th, 2008, 06:49 PM
How would I go about doing so without the script doing it for me since the script keeps going lower? can you give me a terminal command to set the VID as such?

The only thing the script does (when it works) is that it tells you which vid's you can use safely. Even if the script misbehaves, you can still follow the rest of the instructions in the howto, but you'll have to test your vid's manually.

If your default vid's are as from your post a few pages back:
cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
9:43 6:19
Then, to set all vid's temporarily to 19, you can use these commands:
sudo bash
echo "9:19 6:19" > /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
echo "9:19 6:19" > /sys/devices/system/cpu/cpu1/cpufreq/phc_controls
exit(the second "echo" command is only if you have a dual core cpu...)
And to really stress the cpu run "burnMMX" in a terminal (or in two terminals to stress both cores of a dual core cpu). Let it run for a while, and if it doesn't freeze the computer within a minute or so, it's probably going to be stable.

If it seems stable, make it automatically load on boot:
gksudo gedit /etc/rc.localAnd add these lines:
echo "9:19 6:19" > /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
echo "9:19 6:19" > /sys/devices/system/cpu/cpu1/cpufreq/phc_controls(again, the second line is only if you have a dual core cpu...)

M4rotku
July 14th, 2008, 08:53 PM
It didn't freeze the computer when set to 19, but when I tried to run a virtual machine which would've consumed 512 MB of ram, it virtual machine (VirtualBox) aborted. Would this be caused by the low VID or is this a separate problem?

aashay
July 16th, 2008, 01:15 PM
I would blame it on something else. This would be an all or nothing. Either everything freezes or it all works fine.

patrickfromspain
July 16th, 2008, 05:35 PM
Thank you!!!

For me, the originals VID's were 10:43 8:31 6:19 and running the script wouldn't crash the system; I set the VIDs all to 1, and then found, using PHCtool, that it wouldn't run any lower than 19 (probably already discussed, didn't read the whole thread).

So now I've set all VIDs to 19 and the system seems perfectly stable and so on, hasn't crashed. A very good thing is that I believe that now the system consumes the same power running with the cpu in performance mode or powersave, is that true?

Sad thing: the battery life won't increase, since the VID was already the lowest possible when running at 1GHz (lowest speed for my proc).

patrickfromspain
July 17th, 2008, 03:43 PM
One more question: whenever I suspend or hibernate, when coming back, phctool won't work. If run in terminal, the message it outputs is this one:

Traceback (most recent call last):
File "./phctool.py", line 467, in <module>
app=appgui()
File "./phctool.py", line 103, in __init__
self.ShowThrottlingControl() ##display trottling Controls
File "./phctool.py", line 258, in ShowThrottlingControl
getattr(self, 'label_TState'+str(cpu)).set_text(self.throttling. data[cpu]['states']['T'+str(tid)]+"%")
KeyError: 'T8'


any ideas? anyone getting the same problem?

aashay
July 18th, 2008, 11:24 AM
I'm not getting any problems running phctool after hibernate

M4rotku
July 18th, 2008, 01:09 PM
I was wondering if this may've messed up some of my start-up things. The startup music bit plays before I log in, but the music that normally plays after I log in doesn't play anymore. Also, it takes a minute or so longer than usual to log in. These alone aren't really that big of problems. However, my Firefox is also messed up. When I try to start Firefox, it fails the first few times and then finally seems stable. Then, when I try to play a game, it fails as soon as the java starts loading.

This has only happened since I made the changes to the "/etc/rc.local" script and i was wondering if I added the lines incorrectly somehow:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
echo "9:19 6:19" > /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
echo "9:19 6:19" > /sys/devices/system/cpu/cpu1/cpufreq/phc_controls

exit 0

Does anything look wrong?

KillaW0lf04
July 18th, 2008, 02:45 PM
hey, im running this script at the moment and its been going on for quite a few times now......started at 46 and now its at 26 :| am i doing something wrong? It hasnt crashed once

KillaW0lf04
July 18th, 2008, 02:53 PM
ok, so i tried this thing out but it never seemed to want to end. Startet at 46 and was going all the way down to 0 from what i can tell. Also i only realised that i had to run BurnMMX till about half way through so i cancelled. What im scared of is that when im running both cores (ie 100% CPU usage, the temperature scales up ALOT), i was scared of it overheating (it was at 98 degrees) so i cancelled. Any advice? Im using an MSI GX600, the one with the turbo button on it........should i not run this becuase of the turbo button configuration?

KillaW0lf04
July 18th, 2008, 03:08 PM
sorry to post yet again, but now when i try running the script the computer just freezes and either restarts or forces me to restart it.........is this the crashing i was supposed to expect?

This is what i got from what the tutorial asked for in the beginning
12:47 11:43 8:28 6:18 134:18

KillaW0lf04
July 20th, 2008, 05:22 AM
bump

Ares Drake
July 21st, 2008, 04:08 AM
[QUOTE=KillaW0lf04;5412549]sorry to post yet again, but now when i try running the script the computer just freezes and either restarts or forces me to restart it.........is this the crashing i was supposed to expect?
/QUOTE]

Indeed. Just run the script again and again until it says finished. Afterwards you will find a text file with the new values in the same directory as you placed the scipt. Substitute the old values after the colon with the new ones. In case the new ones go down to zero, you might use 19 inestead of zero.

KillaW0lf04
July 21st, 2008, 11:51 AM
ok i decided to start ollfrom the beginning again since i dont think i did it proporly at first and once again it doesnt want to crash for me, it just keeps giving me this output (im typing this while running the script):

EDIT: now it says the script has failed due to a segmentation fault

Default VIDs: 47 43 28 18 18
Current VIDs: 48 42 28 18 18
Testing VID: 42 (1372 mV)
..............................
Default VIDs: 47 43 28 18 18
Current VIDs: 48 41 28 18 18
Testing VID: 41 (1356 mV)
..............................
Default VIDs: 47 43 28 18 18
Current VIDs: 48 40 28 18 18
Testing VID: 40 (1340 mV)
..............................
Default VIDs: 47 43 28 18 18
Current VIDs: 48 39 28 18 18
Testing VID: 39 (1324 mV)
..............................
Default VIDs: 47 43 28 18 18
Current VIDs: 48 38 28 18 18
Testing VID: 38 (1308 mV)
..............................
Default VIDs: 47 43 28 18 18
Current VIDs: 48 37 28 18 18
Testing VID: 37 (1292 mV)
..............................
Default VIDs: 47 43 28 18 18
Current VIDs: 48 36 28 18 18
Testing VID: 36 (1276 mV)
..............................
Default VIDs: 47 43 28 18 18
Current VIDs: 48 35 28 18 18
Testing VID: 35 (1260 mV)
..............................
Default VIDs: 47 43 28 18 18
Current VIDs: 48 34 28 18 18
Testing VID: 34 (1244 mV)
..............................
Default VIDs: 47 43 28 18 18
Current VIDs: 48 33 28 18 18
Testing VID: 33 (1228 mV)
..............................
Default VIDs: 47 43 28 18 18
Current VIDs: 48 32 28 18 18
Testing VID: 32 (1212 mV)
..............................
Default VIDs: 47 43 28 18 18
Current VIDs: 48 31 28 18 18
Testing VID: 31 (1196 mV)
..............................
Default VIDs: 47 43 28 18 18
Current VIDs: 48 30 28 18 18
Testing VID: 30 (1180 mV)
..............................
Default VIDs: 47 43 28 18 18
Current VIDs: 48 29 28 18 18
Testing VID: 29 (1164 mV)
..............................
Default VIDs: 47 43 28 18 18
Current VIDs: 48 28 28 18 18
Testing VID: 28 (1148 mV)
..............................
Default VIDs: 47 43 28 18 18
Current VIDs: 48 27 28 18 18
Testing VID: 27 (1132 mV)
./linux-phc-optimize.bash: line 138: 15815 Segmentation fault burnMMX

burnMMX crashed!

Recovering CPU.

Run this script again to continue the optimization.


PS: Is the text file your talking about called phc_tweaked_vids? because after running the script 6 times after (and only having the system crash twice:/), i got the following: 48 29 15 1 1

KillaW0lf04
July 22nd, 2008, 01:30 PM
bump

Ares Drake
July 22nd, 2008, 11:22 PM
Afterwards you will find a text file with the new values in the same directory as you placed the scipt. Substitute the old values after the colon with the new ones. In case the new ones go down to zero, you might use 19 inestead of zero.

Is the text file your talking about called phc_tweaked_vids? because after running the script 6 times after (and only having the system crash twice:/), i got the following: 48 29 15 1 1

Yeah that is the file. Go for it. In case it doesn't work try replacing the values below 19 to 19 as other people suggested.

KillaW0lf04
July 23rd, 2008, 06:03 AM
Yeah that is the file. Go for it. In case it doesn't work try replacing the values below 19 to 19 as other people suggested.

ok, and in case it doesnt run proporly, how can i reset it back to normal?

Rizado
July 23rd, 2008, 07:38 AM
I would blame it on something else. This would be an all or nothing. Either everything freezes or it all works fine.Not correct, the cpu starts making misscalculations that can crash apps before the computer crash. It also heavely depends on the temperature. Cold air mean more stable computer.

Just do a torture test with prime95 to see if it can cope with the voltages.

quirks
July 26th, 2008, 08:51 AM
First of all: thank you soooooooooooooooooooooo much for this incredible post! This reduced my CPU fan speed by two levels and decreased my CPU temperature by 12°C under max load!!! I don't know what the impact is on my laptop battery, since I haven't checked that yet, but probably the effect is almost as impressive.

What makes me wonder a little though is the fact, that at all frequencies, the script went down to -1 and then aborted (without crashing the machine). But my system has run stable so far.

(Why is there no "Thank" button in Ares Drake's post? I want to thank him a thousand times! EDIT: never mind, I thanked him for another post in this thread instead.)

Supersaiyan.IV
July 26th, 2008, 11:42 AM
I've made a 2.6.24-20-generic 32bit precompiled module. Works wonderful on my Pentium M 1.6Ghz.

pressureman
July 26th, 2008, 01:30 PM
Here are some modules for recent kernels in Intrepid Ibex (32 bit).

RadiusXE
August 1st, 2008, 06:55 PM
where can I download phctool? I' m looking for it about one hour and no results

cc7gir
August 1st, 2008, 10:47 PM
cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls

this give me..
12:46 11:43 8:31 6:23 136:15
Which are my default values.



echo "12:44 11:41 8:15 6:15" > /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
gives me....

bash: /sys/devices/system/cpu/cpu0/cpufreq/phc_controls: Permission denied

I need to run as root?
Last time I did that, my screen turned black, and my Inspiron 1520 wouldn't start up until I loaded the default values in BIOS.

Notice that my default Values give me 5 pairs.

I have the Intel Core 2 Duo T7300.
Avail Frequencies :
800MHz
1.2 Ghz
1.6 Ghz
2.2 Ghz

RadiusXE
August 2nd, 2008, 08:26 AM
where can I download phctool? I' m looking for it about one hour and no results

wow I found it somewhere, but I got this err, when I try to load the phctool.sh

sudo ./phctool.sh
generic function library missing or corrupted


whats wrong?

pressureman
August 2nd, 2008, 11:21 AM
where can I download phctool? I' m looking for it about one hour and no results

svn checkout http://phctool.googlecode.com/svn/trunk/ phctool

pressureman
August 2nd, 2008, 11:25 AM
The best thing to do is run the phc-optimize tool as desribed earlier in this thread. It will find the lowest voltages possible for your system. Be prepared for some crashes/lockups while running the optimize tool however.

I added a line to my /etc/rc.local, so that the voltages get set at bootup. eg.


echo "16:22 14:17 12:12 10:8 8:3 6:1" > /sys/devices/system/cpu/cpu0/cpufreq/phc_controls

RadiusXE
August 2nd, 2008, 01:03 PM
The best thing to do is run the phc-optimize tool as desribed earlier in this thread. It will find the lowest voltages possible for your system. Be prepared for some crashes/lockups while running the optimize tool however.

I added a line to my /etc/rc.local, so that the voltages get set at bootup. eg.


echo "16:22 14:17 12:12 10:8 8:3 6:1" > /sys/devices/system/cpu/cpu0/cpufreq/phc_controls


phc-optimize don' t work for me

jocko
August 2nd, 2008, 06:35 PM
this give me..
12:46 11:43 8:31 6:23 136:15
Which are my default values.




gives me....

bash: /sys/devices/system/cpu/cpu0/cpufreq/phc_controls: Permission denied

I need to run as root?
Last time I did that, my screen turned black, and my Inspiron 1520 wouldn't start up until I loaded the default values in BIOS.

Notice that my default Values give me 5 pairs.

I have the Intel Core 2 Duo T7300.
Avail Frequencies :
800MHz
1.2 Ghz
1.6 Ghz
2.2 Ghz

Yes, that needs to be run as root. But why do you try to use only four pairs, when the default for your cpu is five? That can't be good.
And another thing: The echo command is not meant to be run manually; you are supposed to put it (with appropriate values for YOUR cpu) in the file /etc/rc.local as stated in step 5 of the HowTo. That will load the settings on every boot.
You can of course do it manually for testing (e.g. if the script does not work), in that case the settings will be lost on reboot, which means if you set bad values you won't completely kill your ubuntu install...

tony.research
August 8th, 2008, 12:01 PM
Anyone knows how to configure a pc that uses speedstep-centrino instead of acpi-cpufreq?
i have just tried to make not to load the module speedstep- centrino and instead i loaded at the boot the module acpi-cpufreq, if i go to /sys/.../phc-controls the file is there but if i try cat of the file it's says that file doesn't exist.
Anyone can help? even a link...
thanx

pressureman
August 9th, 2008, 04:15 AM
speedstep-centrino has been deprecated since about 2.6.18, and will be completely removed in future.

Is the (unpatched) acpi-cpufreq module even loading? If not, you may need to look at BIOS upgrades for your system. Once you can get the vanilla acpi-cpufreq to load, then you try the phc patch.

pressureman
August 9th, 2008, 04:55 AM
I got this err, when I try to load the phctool.sh

sudo ./phctool.sh
generic function library missing or corrupted

It sounds like you're missing functions.bash, a bash "library" used by the linux-phc-optimize script.

As stated in the first post of this thread, you need http://www.s3pp.de/misc/functions.bash as well as http://www.s3pp.de/misc/linux-phc-optimize.bash

TheJackal12
August 9th, 2008, 10:34 PM
Thank you Ares Drake for this guide. I've used Ubuntu since 5.10 and have always wanted to undervolt my Pentium M in Ubuntu like I could do in XP. I've even switched back to Windows just for the undervolting. This guide worked great on my Thinkpad. Thank you so much. :)

Mine's Ultimate R
August 11th, 2008, 05:23 PM
does anybody know if it works for amd processors yet? i really wanna try this but don't wanna waste my time if it doesn't work

thanks! :)

edit: actually i don't mean yet, i meant has anyone got it to work on machines with amd?

Ares Drake
August 12th, 2008, 09:49 AM
does anybody know if it works for amd processors yet? i really wanna try this but don't wanna waste my time if it doesn't work

thanks! :)

edit: actually i don't mean yet, i meant has anyone got it to work on machines with amd?

I recieved some comments suggesting it doesn't work with AMD. However I am not sure. Your best bet is probably to check the website of the PHC Project. The link is in the HowTo.

pressureman
August 27th, 2008, 07:42 PM
Module for latest Intrepid kernel, 2.6.27-1-generic

Crafty Kisses
August 28th, 2008, 04:05 AM
Thanks for this! :)

Nathan_M
August 28th, 2008, 09:58 AM
~$ uname -r
2.6.24-12-generic

I have all the sources set, and all the latest updates... so why does everyone else have newer kernel versions than me.

Anyway, I tried it with the 24-16 module. If I run the script, the first time, it counted all the way down to VID 0, then asked me to run the script again. When I do, I get this output, after the normal stuff:

Will use current directory to store/retrieve test results.

Read phc_default_vids:
> Success!

Load VIDs from 'phc_tweaked_vids'
> ERROR: Wrong VID count!

My phc_cur_pos file just contains a 0, and phc_tweaked_vids is empty! Any explanation?

Edit: I just deleted the files, and this is what I get the first time I ran it:

Default VIDs: 40 35 30 25
Current VIDs: 0 35 30 25
Testing VID: 0 (700 mV)
..............................
Default VIDs: 40 35 30 25
Current VIDs: -1 35 30 25
Testing VID: -1 (684 mV)
./linux-phc-optimize.bash: line 161: printf: -1: invalid option
printf: usage: printf [-v var] format [arguments]


The lowest acceptable VID is 0.

Recovering CPU.
./linux-phc-optimize.bash: line 138: 12435 Terminated burnMMX

Run this script again to continue the optimization.

pressureman
August 28th, 2008, 03:32 PM
~$ uname -r
2.6.24-12-generic

I have all the sources set, and all the latest updates... so why does everyone else have newer kernel versions than me.

Try running 'sudo apt-get dist-upgrade' from a terminal, in case the later kernels are being held back for some reason. If you still don't get anything later than 2.6.24-12 (which is really ancient - in fact, I seem to remember that was way back when Hardy was still in testing), please paste your /etc/apt/sources.list.

If you're running Hardy, the latest kernel is 2.6.24-19. The module I posted just above is for Intrepid, hence why it's 2.6.27.

InfinityCircuit
August 28th, 2008, 07:27 PM
If you get an error when building the module that says "/lib/modules/2.6.24-19-generic/modules.dep not found", you will be unable to insert the module.

To fix this, a better way to build an individual module is:

$ sudo apt-get install linux-headers-$(uname -r)
$ apt-get source linux-image-$(uname -r)
$ cd linux*
$ patch -p1 -i /path/to/phc-linux-patch.patch
$ cp arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c ~
$ cd ~
$ cat > Makefile << EOF
obj-m := acpi-cpufreq.c
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
EOF
$ make
$ sudo cp acpi-cpufreq.ko /lib/modules/$(uname -r)/kernel/arch/x86/kernel/cpu/cpufreq

pressureman
August 29th, 2008, 06:58 PM
Module for latest Intrepid kernel, 2.6.27-2-generic

Nathan_M
August 30th, 2008, 04:27 AM
Try running 'sudo apt-get dist-upgrade' from a terminal, in case the later kernels are being held back for some reason. If you still don't get anything later than 2.6.24-12 (which is really ancient - in fact, I seem to remember that was way back when Hardy was still in testing), please paste your /etc/apt/sources.list.

$ sudo apt-get dist-upgrade
[sudo] password for nathan:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
nathan@nathan-macinnes:~$ cat /etc/apt/sources.lst
deb http://getswiftfox.com/builds/debian unstable non-free

Now this is weird. I have a sources.list file which contains all this:

deb http://archive.canonical.com/ubuntu hardy partner
deb-src http://archive.canonical.com/ubuntu hardy partner
deb http://gb.archive.ubuntu.com/ubuntu/ hardy main universe restricted multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy universe main multiverse restricted #Added by software-properties
deb http://security.ubuntu.com/ubuntu/ hardy-security universe main multiverse restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-security universe main multiverse restricted
deb http://gb.archive.ubuntu.com/ubuntu/ hardy-updates universe main multiverse restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-updates universe main multiverse restricted

deb http://gb.archive.ubuntu.com/ubuntu/ hardy-backports universe main multiverse restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-backports universe main multiverse restricted
deb http://ppa.launchpad.net/kubuntu-members-kde4/ubuntu gutsy main
deb http://gb.archive.ubuntu.com/ubuntu/ hardy-proposed universe main multiverse restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-proposed universe main multiverse restricted

but I've never heard of sources.list.

Also, there are updates listed in my history:
linux-generic (2.6.24.20.22) to 2.6.24.21.23
linux-headers-generic (2.6.24.20.22) to 2.6.24.21.23
linux-image-generic (2.6.24.20.22) to 2.6.24.21.23
linux-restricted-modules-common (2.6.24.14-20.46) to 2.6.24.14-21.47
linux-restricted-modules-generic (2.6.24.20.22) to 2.6.24.21.23
and
linux-restricted-modules-2.6.24-21-generic (2.6.24.14-21.47) to 2.6.24.14-21.48
linux-restricted-modules-common (2.6.24.14-21.47) to 2.6.24.14-21.48

Is it possible that uname -r is reporting the wrong version for some reason. Sorry this is going off topic, but I presume the undervolting isn't working for me because of this. And sorry that it's so long.

pressureman
August 30th, 2008, 06:48 AM
What do you get from 'dpkg -l | grep linux-image' ?

You can also see what kernel is currently running with 'cat /proc/version'

Nathan_M
September 1st, 2008, 05:51 AM
$ dpkg -l | grep linux-image
ii linux-image-2.6.24-12-generic 2.6.24-12.22 Linux kernel image for version 2.6.24 on x86
ii linux-image-2.6.24-14-generic 2.6.24-14.25 Linux kernel image for version 2.6.24 on x86
ii linux-image-2.6.24-15-generic 2.6.24-15.27 Linux kernel image for version 2.6.24 on x86
ii linux-image-2.6.24-16-generic 2.6.24-16.30 Linux kernel image for version 2.6.24 on x86
ii linux-image-2.6.24-17-generic 2.6.24-17.31 Linux kernel image for version 2.6.24 on x86
ii linux-image-2.6.24-18-generic 2.6.24-18.32 Linux kernel image for version 2.6.24 on x86
ii linux-image-2.6.24-19-generic 2.6.24-19.41 Linux kernel image for version 2.6.24 on x86
ii linux-image-2.6.24-20-generic 2.6.24-20.38 Linux kernel image for version 2.6.24 on x86
ii linux-image-2.6.24-21-generic 2.6.24-21.42 Linux kernel image for version 2.6.24 on x86
ii linux-image-generic 2.6.24.21.23 Generic Linux kernel image
$ cat /proc/version
Linux version 2.6.24-12-generic (buildd@palmer) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu4)) #1 SMP Wed Mar 12 23:01:54 UTC 2008
Weird. So which kernel version do I have?

pressureman
September 1st, 2008, 08:51 PM
Well, it looks like you have the latest kernel there (and a whole lot of previous kernels). But for whatever reason, your box is not booting the latest kernel.

So it's most likely a GRUB issue. Check that in your /boot/grub/menu.lst, you actually have all those kernels listed. If not, there may be a problem with the update-grub hooks that get run whenever a new kernel is installed. Also check that you have "default 0" in your menu.lst - that way, the default/first kernel to be selected will be the latest (since the list sorts reverse-alphanumerically).

If all that fails, try selecting one of the kernels manually by pressing Esc during bootup, so that you actually see what GRUB thinks is installed.

tzorg
September 6th, 2008, 06:21 AM
If I run the script, the first time, it counted all the way down to VID 0, then asked me to run the script again. When I do, I get this output, after the normal stuff:

Will use current directory to store/retrieve test results.

Read phc_default_vids:
> Success!

Load VIDs from 'phc_tweaked_vids'
> ERROR: Wrong VID count!

My phc_cur_pos file just contains a 0, and phc_tweaked_vids is empty! Any explanation?

Edit: I just deleted the files, and this is what I get the first time I ran it:


The lowest acceptable VID is 0.

Recovering CPU.
./linux-phc-optimize.bash: line 138: 12435 Terminated burnMMX

Run this script again to continue the optimization.

First of all, thx for this tuto i was waiting for a long time such solution for my laptop.=D>
I obtain the same result, but i don't have any problem with my kernel revision, mine is 6.24.19.
Is anyboby can help ? I'm not easy with kernel things.:(

Please excuse my frenchenglish

cheaptrick
September 7th, 2008, 01:58 AM
hi there. i couldnt find a .config file in my /boot to copy over in step 2, all i had was a config-2.6.24-19-generic , is that the one? when i ran patch -p1 < linux-phc*.patch

this was the output

patching file arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
Hunk #2 FAILED at 60.
Hunk #3 succeeded at 110 (offset -1 lines).
Hunk #4 FAILED at 749.
Hunk #5 succeeded at 757 (offset -12 lines).
2 out of 5 hunks FAILED -- saving rejects to file arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c.rej

tzorg
September 8th, 2008, 06:05 AM
Hi there,
Next step in my tries,
now with kernel 2.6.24-21-generic, the script do the same, going down to -1 and refusing the second run coz of invalid values...

Default VIDs: 38 29 19
Current VIDs: -1 29 19
Testing VID: -1 (684 mV)
./linux-phc-optimize.bash: line 161: printf: -1 : option non valable
printf: usage: printf [-v var] format [arguments]


The lowest acceptable VID is 0.

Recovering CPU.

Run this script again to continue the optimization.
./linux-phc-optimize.bash: line 138: 7301 Compl

I think the script don't change the VID values coz the cores temp rise to 77/75 °C and never drop, at such theorical low voltage the temp should be lower, isn't it?
THX for help or comments

guilleml
September 9th, 2008, 11:21 AM
Hi! first of all thank you all for posting this tutorial, I've used it to make some tests in my new laptop.

I have a Dell inspiron 1525 with a T5750@2Ghz cpu.

The script didn`t work for me but I followed the instructions from https://www.dedigentoo.org/trac/linux-phc/wiki/FindingTheLowestVoltages

My original VIDS were:

43 35 27 19

So I setup the clock to each one of them (2Ghz, 1,67Ghz, 1,33Ghz and 1Ghz) and I tryed each VID while 2 mprimes were running at 100% in the cpu.
I looked to the cpu temperature, I did the tests whith the battery so I could check the power used using powertop.

I noticed a change in the power required at 2Ghz, not much at 1Ghz.
The VIDS after the test were:

24 1 1 1

At 2Ghz it was using 35W when the VID was 43,when I changed it to 24, it was using 28W.
At 1Ghz it changes from 25-26W to 24-25W and 14W when idle.

Temperature didn't change so much, only when 100% is used, at 2Ghz it was 60C, now it's 54C.

I have some questions:
¿can I change the VIDS to 24 0 0 0?¿or it will be the same as 24 1 1 1?
¿why are the cpu wasting so much energy when they can run at lower voltage with the same results?if this is safe it would be better, ¿is it safe?

Ares Drake
September 10th, 2008, 05:34 AM
I have some questions:
¿can I change the VIDS to 24 0 0 0?¿or it will be the same as 24 1 1 1?
¿why are the cpu wasting so much energy when they can run at lower voltage with the same results?if this is safe it would be better, ¿is it safe?

1. I think 0 doesn't work, so 24 1 1 1 is the lowest. Wouldn't make much difference anyway.

2. Making CPUs is a little bit like growing tomatoes. Not all fruits are equal. Likewise, all cpus even of the same kind differ a little bit. So the lowest safe voltage is an individual value for each single cpu. For the cpu manufacturer (intel) it would be too expensive to test them all for their lowest save voltage. So they specify a limit and just test if they work at that limit. As the lowest safe voltage for a given cpu is lower than the specified limit, the difference is wasted.

3. If it is not save (i.e. you set the voltage too low) your computer will freeze / lock up. But as you discribed above you checked for that, so you can assume it is safe.

guilleml
September 10th, 2008, 07:07 PM
1. I think 0 doesn't work, so 24 1 1 1 is the lowest. Wouldn't make much difference anyway.

2. Making CPUs is a little bit like growing tomatoes. Not all fruits are equal. Likewise, all cpus even of the same kind differ a little bit. So the lowest safe voltage is an individual value for each single cpu. For the cpu manufacturer (intel) it would be too expensive to test them all for their lowest save voltage. So they specify a limit and just test if they work at that limit. As the lowest safe voltage for a given cpu is lower than the specified limit, the difference is wasted.

3. If it is not save (i.e. you set the voltage too low) your computer will freeze / lock up. But as you discribed above you checked for that, so you can assume it is safe.

Thanks for your answers :)
The system seems pretty stable now, it's even safe! I'm quite happy with this tune.

shador
September 11th, 2008, 02:49 AM
Just one question before I get this started. If I by some reason want all of this undone, how do I do that?

knix
September 11th, 2008, 02:39 PM
Anybody got a 2.6.27-2 64-bit module? I'm running Intrepid 64 bit on a C2D and Pressureman's module didn't work.

Thanks.

edit: or 2.6.27-3?
Or a patch for either?

cheaptrick
September 12th, 2008, 12:22 AM
i'm using a C2D LV7500 1.6ghz

cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls gives me
9:37 8:27 6:21 136:11


The first test stoped at
Default VIDs: 37 27 21 11
Current VIDs: 2 27 21 11
Testing VID: 2 (732 mV)

it did not stop until i accidentally pressed a key
and i did noticed that the cpu temperature increased by more 10 degrees during the test
ok the 1st test did not crash at all!
the next few tests crashed during the first round

and i got this
Default VIDs: 37 27 21 11
Current VIDs: 4 2 1 1

Before i continue with step 5 ,does this look right? it seems weird for me.

pressureman
September 12th, 2008, 08:58 AM
Module for latest Intrepid kernel, 2.6.27-3-generic (32 bit)

Tao
September 12th, 2008, 09:06 AM
Which PHC patch did you use for interpid kernel?

pressureman
September 12th, 2008, 06:39 PM
Which PHC patch did you use for interpid kernel?

The one contained in this forum thread http://phc.athousandnights.de/viewtopic.php?f=13&t=2

It says it's for 2.6.26, but works fine in 2.6.27. I guess the acpi-cpufreq source hasn't changed between versions (or at least, not significantly enough for the patch to fail to apply cleanly).

kszonek
September 14th, 2008, 03:47 PM
The one contained in this forum thread http://phc.athousandnights.de/viewtopic.php?f=13&t=2

It says it's for 2.6.26, but works fine in 2.6.27. I guess the acpi-cpufreq source hasn't changed between versions (or at least, not significantly enough for the patch to fail to apply cleanly).

I used this patch with 2.6.27-3 64bit kernel, it was my first time with phc. After reboot i have problems with 'podprobe acpi_cpufreq':


FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.27-3-generic/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko): Invalid module format


I tried to recompile module, I also used your module from post above (32bit one, there was a chance...), but I cant make it working. I left Microsoft 3 weeks ago, I am fresh with linux and the last thing I miss is long battery time with Vista+RMCLock.

Any idea what is wrong?

edit:
of course with backup version of acpi_cpufreq.ko scalling works OK and "lsmod | grep acpi_cpufreq" shows loaded module, but after replace module is not loaded at startup and it cant be loaded manually. Some HOWTOs says to check for speedstep module, but it is not loaded.

edit2:
I have 2 ubuntu on hdd, because I dont want to damage main one with experiments, but I tried to use acpi_cpufreq with first OS (2.6.24-19 64bit). Precompiled module didn't work, but I made one myself and it seems to be ok. Only seems, because every change of phc_controls does nothing. With dual burnMMX in background temps are about 85oC with 11:43, 11:20 and even 11:1. Same with other multipliers - on Vista temperature drop was huge.

I should add that my laptop is Compal FL90, with T7500 cpu and 8600gt.

Now I am trying to run linux-phc-optimize-script, but I am receiving error about missing file functions.bash (i have download it of course, to the same directory - Desktop). Now I am tired fighting with phc (why it is not as simple as with Microsoft) - I should better go sleep.

anjie
September 15th, 2008, 05:46 PM
Hello,

First, thank very much for the useful howto (hope it will work for me soon).

could anyone tell me why at this step

cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls


I get

"no device"? I'm sure I've done all the previous steps well.
I've checked that the copied file was in the right place, and it is.
I've rebooted twice, using two different kernels... 18 - 19.


Thanks,
Anjie

cheaptrick
September 19th, 2008, 02:19 AM
the test werent giving me accurate Vids,
i got this 9:37 8:27 6:21 136:11
from cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls

my tweaked vids output was 6 6 1 1
echoed it, and was never able to boot up again in ubuntu until i undo the echo

pressureman
September 22nd, 2008, 05:52 PM
Module for latest Intrepid kernel, 2.6.27-4-generic (32 bit)

Lure
September 23rd, 2008, 04:23 AM
Did anybody build the module successfully for 64-bit Intrepid kernel? It seems that all positive reports are with 32-bit kernel...

When I try to build it myself, it fails to load with module format error. :-(
If somebody would share a working 64-bit module, I would be more than happy.

linkmaster03
September 25th, 2008, 03:22 PM
OK. I did everything and it was correct, up until I ran the script. It went all the way down to 0 and stopped.

Default VIDs: 40 34 30 25
Current VIDs: 0 34 30 25
Testing VID: 0 (700 mV)
..............................
Default VIDs: 40 34 30 25
Current VIDs: -1 34 30 25
Testing VID: -1 (684 mV)
./linux-phc-optimize.bash: line 161: printf: -1: invalid option
printf: usage: printf [-v var] format [arguments]


The lowest acceptable VID is 0.

Recovering CPU.
./linux-phc-optimize.bash: line 138: 11296 Terminated burnMMX

Run this script again to continue the optimization.


Then when I tried to run the script again...

Load VIDs from 'phc_tweaked_vids'
> ERROR: Wrong VID count!

And it stops. :( Help?

dman4486
September 26th, 2008, 01:28 PM
I have set everything up and run the script, but it will not run past my 3rd VID....it will not save the 3rd VID either.

here is what it saves:

16 8 30 26 22 18

why will it not continue?

when I run the script now, it goes down to "4" which would replace the 30 and crashes, but never saves the "4":confused:

dman4486
September 30th, 2008, 09:29 AM
i have set everything up and run the script, but it will not run past my 3rd vid....it will not save the 3rd vid either.

Here is what it saves:

16 8 30 26 22 18

why will it not continue?

When i run the script now, it goes down to "4" which would replace the 30 and crashes, but never saves the "4":confused:



nobody?:(

dman4486
September 30th, 2008, 10:18 AM
ok....figured out that issue, now how do I do step 5? I have rc0, rc1, rc2, rc3, rc4

kasjak2000
October 1st, 2008, 05:10 AM
Hey guys,

I have a T5870 and my fids are:

root@x64ubuntu8041:~# cat /sys/devices/system/cpu/cpu0/cpufreq/phc_fids
11 10 8 6 136
root@x64ubuntu8041:~# cat /sys/devices/system/cpu/cpu1/cpufreq/phc_fids
11 10 8 6 136
root@x64ubuntu8041:~#

But I cant set down the processor to 600mHz, to 800mHz only :-(

In the windows I can set the 600mHz (6x100) with rmclock successful, why not in linux?

Can anyone set down a C2D-processor to 600mHz? And if yes, how?

Regards
kasjak2000

pressureman
October 5th, 2008, 08:41 PM
Module for latest Intrepid kernel, 2.6.27-5-generic (32 bit)

patrickfromspain
October 6th, 2008, 11:45 AM
I'm running latest intrepid kernel (2.6.27-5-generic) succesfully with the phc extensions, and also was running 2.6.27-4-generic.

How I did? First I moved the acpi-cpufreq.ko original module to acpi-cpufreq.ko-original, then installed the linux-phc package from here http://ppa.launchpad.net/bonniot-users/ubuntu/pool/main/l/linux-phc/ and rebooted.

After rebooting you can run sudo linux-phc-install and reboot, it should work fine. After that I removed the linux-phc package, since it seemed to give out an error when installed.

If I didn't move the acpi-cpufreq.ko module out of the way it gave me an error.

Hope it helps

pressureman
October 7th, 2008, 06:39 PM
Module for latest Intrepid kernel, 2.6.27-6-generic (32 bit)

stillka
October 9th, 2008, 01:42 AM
Module for latest Intrepid kernel, 2.6.27-6-generic (32 bit)

thanks a much for providing compiled modules, it save time :-)

Black16V
October 10th, 2008, 04:11 PM
Hi,

where can I download the patch for 2.6.27 ?

pressureman
October 10th, 2008, 05:46 PM
Module for latest Intrepid kernel, 2.6.27-7-generic (32 bit)

pressureman
October 10th, 2008, 05:47 PM
where can I download the patch for 2.6.27 ?

The 2.6.26 patch works fine with 2.6.27.

http://phc.athousandnights.de/viewtopic.php?f=13&t=2

virtuoso88
October 11th, 2008, 01:14 PM
Has anyone actually saved battery life? I read through all 22 pages and only 1 person mentioned something. I just did this on my W500 and my battery usage is exactly the same.

linkmaster03
October 11th, 2008, 07:57 PM
This is not supposed to save battery life, it is supposed to make your PC cooler and quieter. Can ANYONE help me? :(

Pogeymanz
October 12th, 2008, 10:17 PM
So, I followed this guide to undervolt, but my cpu is not running any cooler. What's up with that?

Here is lsmod | grep acpi_cpufreq:

acpi_cpufreq 14864 0
freq_table 6400 1 acpi_cpufreq
processor 39744 2 acpi_cpufreq,thermal


cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
10:2 8:2 6:2

Why wouldn't my CPU run any cooler? My defaults were:
10:40 8:35 6:29

jmmL
October 13th, 2008, 01:10 PM
Pogeymanz, your output of " cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls " looks suspiciously low. If your CPU is anything like mine, the VIDs cannot be set any lower than the lowest factory VID - which is 19 in my case (with an Intel T5450) and looks to be 29 in your case.

You might want to try manually adjusting your VIDs to

10:29 8:29 6:29


Absolutely no guarantees that that won't harm your computer though; you have been warned.

Also, with regards to the battery life; it should help the CPU draw less power even when it's under load, and should therefore help extend battery life. Anecdotally, I'd say mine has improved by 5 minutes or so - compared to a vanilla install. Lowering my VIDs reduced the voltage across the cores by about 0.3V, which is about a 1/4 reduction in voltage. This should correspond to a 1/4 reduction in power drawn by the processor.

Pogeymanz
October 13th, 2008, 04:01 PM
Thank you JimmL. Can I ask how you found your lowest factory VIDs? I forgot what the number is for my processor, but it's the Intel Dual Pentium 2.0 GHz.

So far my computer is stable. I even ran burnMMX just for funzies and nothing crashed or anything. I guess my temps under stress were a little lower than before, but idle temps are about the same. Maybe it did work and I was just expecting too much?

jmmL
October 13th, 2008, 07:02 PM
When I ran the optimisation script on the first page - I had the same problem. It kept on "testing" VIDs below 19, and reported everything was okay. I killed it at about 5, because I could see it was headed to nonsense, from reading others' experiences in the first few pages of this thread. One guy then posted that you couldn't reduce any of the VIDs below the lowest factory VID, and then mentioned that for him, with his CPU, this number was 19. His CPU was very similar to mine, so I tried it, and sure enough it works. Any lower, and the system just ignores the instruction.

You're using a mobile CPU right? I know there's a command-line way to get this information, but i forget how. Anyway, can you open up Gnome System Monitor (type "gnome-system-monitor" in a terminal) and look under the "System" tab. There should be a number there of the form Txxx or maybe Pxxx, where x is a number. That will be a start to finding out your VIDs.

However, I suspect we might have very similar CPUs - our frequency multipliers are the same (10: 8: 6: ). In this case, it might be safe to try setting all your VIDs to 19, and just see what happens. Emphasis on MIGHT. Do at your own risk.

I noticed about a 2C drop at idle (to about 52C) and a 5C drop under load (about 55C). I wasn't so concerned about the heat though - i did just to eke improvements in battery life.

Pogeymanz
October 14th, 2008, 10:16 AM
Actually this isn't a mobile computer. It's my desktop. But my thought is this: I can make it run cooler and maybe use less electricity, and the price is the same (ZERO), so why the heck not?

I'll try all 19's. I guess it can't really hurt. If it just ignores anything too low, they worst case is that it wont do anything. If that doesn't work, I'll try 29. Thanks for the help.

linkmaster03
October 17th, 2008, 11:09 AM
jmmL, what should I set my VIDs at? (since the script just kept going to 0) I have an Intel T2080.

jmmL
October 17th, 2008, 11:39 AM
What do you get from
cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls

?

linkmaster03
October 17th, 2008, 12:46 PM
13:40 10:34 8:30 6:25

jmmL
October 17th, 2008, 12:57 PM
In that case, try this:
echo "13:25 10:25 8:25 6:25" > /sys/devices/system/cpu/cpu0/cpufreq/phc_controls

You can also place that command in your rc.local, so it gets run every time you boot up. I do this, but also echo it to cpu1 as well as cpu0 - I've got a dual core cpu, and it's just to make sure nothing odd happens. I'm told you can leave out echo to the other core though, as it will automatically adjust.

No guarantees it will work. If it's anything like my CPU, it will do. Run burnMMX for a while, until you're happy it's stable.

linkmaster03
October 18th, 2008, 03:18 PM
Thanks, it worked! I'll see if I notice any heat/fan noise difference.

KillaW0lf04
October 18th, 2008, 03:45 PM
Hey, i got an msi gx600p laptop which has an overclock button included as a feature.

http://global.msi.com.tw/index.php?func=proddesc&maincat_no=135&cat2_no=271&prod_no=1307

Would using this screw around with the whole overclocking thing?

raphoun
October 21st, 2008, 05:37 PM
Does anyone make it work with a T7700 on a dell XPS M1530?

jmmL
October 21st, 2008, 06:12 PM
@ KillaWolf: It won't directly mess up your overclocking I don't think - i.e., having lowering voltage doesn't necessarrily mean lower clocks. However, i wouldn't be surprised if the overclocking made it unstable using lower VIDs. I'd run the stress-test tool on page 1 with your overclocking enabled, just to be on the safe side. Again - NO GUARANTEES.

@ raphoun: these threads are probably of interest to you as well:
http://ubuntuforums.org/showthread.php?t=847773
http://ubuntuforums.org/showthread.php?t=729644

I'm sure people have - it's a common Intel CPU.

easytool
October 25th, 2008, 03:23 AM
Can someone post a 64bit apci-cpufreq.ko for kernel 2.6.27-7 ? 64bit please~~

I tried to compiled it for a whole night, but couldnot work it out.

Many Thanks!!!

coolen
October 26th, 2008, 07:11 AM
This sounds great.

One thing I'm wondering, though: when on AC, can I automatically switch to a higher voltage? I don't particularly mind about heat: the cooling on this laptop is fantastic. If I'm on AC anyway, I want to get the most out of my CPU.

Is there a way to do this?

sarah.fauzia
October 26th, 2008, 03:23 PM
I'm running latest intrepid kernel (2.6.27-5-generic) succesfully with the phc extensions, and also was running 2.6.27-4-generic.

How I did? First I moved the acpi-cpufreq.ko original module to acpi-cpufreq.ko-original, then installed the linux-phc package from here http://ppa.launchpad.net/bonniot-users/ubuntu/pool/main/l/linux-phc/ and rebooted.

After rebooting you can run sudo linux-phc-install and reboot, it should work fine. After that I removed the linux-phc package, since it seemed to give out an error when installed.

If I didn't move the acpi-cpufreq.ko module out of the way it gave me an error.

Hope it helps

With linux kernel 2.6.27-7 in 64-bit Intrepid still gives me an error, and I've been unsuccessful in compiling... I went through all the steps prior to the reboot without any errors, and when I run cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls I get:

cat: /sys/devices/system/cpu/cpu0/cpufreq/phc_controls: No such file or directory

Also, when I enter lsmod | grep acpi_cpufreq
Nothing happens. It just gives another blank prompt, as if I hadn't asked for anything.

But when I restore the backup copy and reboot, I get normal values again.

By the way, I'm using an Lenovo X61T with the latest release of Intrepid (kernel 2.6.27-7).

pardes3
October 29th, 2008, 07:55 PM
I also tried to compile it on 64 bit but was not successful. Anyone here have ahd success yet? If so, please post the compiled version for us.

Thanks!!!

landal
October 30th, 2008, 08:52 AM
The compilation on a 64bit system works well with this how-to : http://wiki.ubuntuusers.de/Prozessorspannung_absenken (link on the first post)

command isn't the same as in this forum. This works :
cd arch/x86/kernel/cpu/cpufreq/
make -C /lib/modules/$(uname -r)/build SUBDIRS=$(pwd) modules

And I post the result.

pardes3
October 30th, 2008, 12:33 PM
The compilation on a 64bit system works well with this how-to : http://wiki.ubuntuusers.de/Prozessorspannung_absenken (link on the first post)

command isn't the same as in this forum. This works :
cd arch/x86/kernel/cpu/cpufreq/
make -C /lib/modules/$(uname -r)/build SUBDIRS=$(pwd) modules

And I post the result.

Sir, very kind of you. Thanks!

quirks
October 30th, 2008, 07:47 PM
I couldn't find the compiled module for the latest Hardy kernel (2.6.24-21-generic), so I compiled it myself. Here it is:

pardes3
October 30th, 2008, 08:04 PM
I am not sure why when I run the optimize script... it starts and goes all the way to -1 and stops. It throws line 161 printf error and says 0 is lowest VID, run the test again. But if I run again it complains about WRONG VID COUNT.

Help?

Thanks

knix
October 31st, 2008, 09:07 PM
I am not sure why when I run the optimize script... it starts and goes all the way to -1 and stops. It throws line 161 printf error and says 0 is lowest VID, run the test again. But if I run again it complains about WRONG VID COUNT.

Help?

Thanks
honestly how i finally did it was use RMclock in windows xp to find the best voltage, then translated it into the vids i got from the script (i wrote them down)

sarah.fauzia
November 1st, 2008, 09:04 AM
Well, the compiled module for 64-bit works, but I think my case might be unique...

cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
10:36 9:25 6:21 136:11

I get a VID for my first frequency of 0. I took the precaution and used 1 instead. However, when I echo it, my computer freezes, and when I added it to my startup in /etc/rc.local, my computer becomes unbootable and the screen strangely dark (though I connected it to the AC). Removing it from /etc/rc.local with the root terminal fixes the problem (though I was scared for a few minutes there!) Does that mean I can't undervolt my processor?

I have a Lenovo X61T, running Ubuntu Intrepid, 64-bit.

seish
November 7th, 2008, 11:23 AM
jmmL, what should I set my VIDs at? (since the script just kept going to 0) I have an Intel T2080.

Hey man, this might come too late but for just in case:

Same thing happened to me (ASUS f3e laptop Intel T5750 2.0ghz) VIDs went down to 0.

I deleted the phc_tweaked_vids and phc_current_pos files
And ran the test again, but I ran burnMMX BEFORE starting the test.

sorry if im speaking as to an idiot but thats how I explain things to myself :)

so:
1) deleted old files
2) run $burnMMX in separate gterm window
3) $sudo ./linux-phc-optimize

This time it crashed(yay!) and after reboot recorded value 10 instead of 0. result was 12:10 10:1 8:1 6:1.

EDIT: I'm not sure i'm noticing any difference between 19 and 10 actually don't know if my cpu igrnores commands below 19 as some users pointed, but its strange that crashed at 10 if values below 19 get ignored. i doubt something else crashed my pc tho its possible i guess

Hope that helps.

stillka
November 9th, 2008, 05:07 AM
Module for latest Intrepid kernel, 2.6.27-7-generic (32 bit)

After last update of 2.6.27-7 kernel phc_controls in this module stop working for me. Could you please recompile it?

pressureman
November 9th, 2008, 11:17 PM
After last update of 2.6.27-7 kernel phc_controls in this module stop working for me. Could you please recompile it?

It's working fine for me. Check that the recent update didn't overwrite acpi-cpufreq.ko with a new (unpatched) copy.

stillka
November 11th, 2008, 12:31 PM
It's working fine for me. Check that the recent update didn't overwrite acpi-cpufreq.ko with a new (unpatched) copy.

I verified this possibility with diff and I have right patched version from this forum. Anyway, new kernel is here so I'll try patched version again...

My notebook is IBM Thinkpad X40:

root@X40:~# lsmod | grep acpi
thinkpad_acpi 66176 0
rfkill 17176 1 thinkpad_acpi
led_class 12164 1 thinkpad_acpi
nvram 16524 1 thinkpad_acpi
pata_acpi 12160 0
libata 177312 3 pata_acpi,ata_piix,ata_generic
acpi_cpufreq 15500 0
freq_table 12672 3 cpufreq_ondemand,cpufreq_stats,acpi_cpufreq
processor 42156 3 thermal,acpi_cpufreq

ivanhoe1024
November 11th, 2008, 06:05 PM
It's working fine for me. Check that the recent update didn't overwrite acpi-cpufreq.ko with a new (unpatched) copy.

Hi everybody!!
It's working fine for me, too, so: a lot of thanks!! (ps. I'm not English, so I'm sorry if I write like an idiot, sometimes!!)
I'd like to ask you a question: with my kubuntu 8.04, I used to compile the patched acpi-cpufreq module by myself, patching the linux-sources from ubuntu, and using this command:
first I copy the config-xxx file from /boot, then
make oldconfig
make prepare
make scripts
make M=./arch/x86/kernel/cpu/cpufreq
all done! And this always worked... Now, with the Intrepid, and 2.6.27, I fails... when I restart the system with the new module, it is not loaded, and phc doesn't work... moreover, I can't use cpufreq anymore... if I try to load acpi-cpufreq manually, it says "invalid module format", or something similar... but with your precompiled module, it works... Does anybody know what's the problem?? I use kubuntu 8.10 32 bit, with a Core2 t7500... thanks!!

stillka
November 12th, 2008, 04:15 PM
Please compile version for 2.6.27-8-generic.

bmidgley
November 14th, 2008, 12:42 AM
I've noticed the same thing. Run "dmesg|tail" and you'll probably see this in the log:

acpi_cpufreq: no symbol version for struct_module

I also don't know how to fix it or what is wrong with the 8.04 instructions. It sure would be nice to be able to build it myself again.

I used to compile the patched acpi-cpufreq module by myself, patching the linux-sources from ubuntu, and using this command:
first I copy the config-xxx file from /boot, then
make oldconfig
make prepare
make scripts
make M=./arch/x86/kernel/cpu/cpufreq
all done! And this always worked... Now, with the Intrepid, and 2.6.27, I fails... when I restart the system with the new module, it is not loaded, and phc doesn't work... moreover, I can't use cpufreq anymore... if I try to load acpi-cpufreq manually, it says "invalid module format

bmidgley
November 14th, 2008, 01:27 AM
ok... here's a fix. from /usr/src/linux-source-2.6.27:

cp ../linux-headers-2.6.27-7-generic/Module.symvers .

before running any of the make targets. I also removed a Module.symvers from the acpi-cpufreq directory to be sure it was using the toplevel version. I followed all the other instructions and it works again. (woohoo)

I've noticed the same thing. Run "dmesg|tail" and you'll probably see this in the log:

acpi_cpufreq: no symbol version for struct_module

I also don't know how to fix it or what is wrong with the 8.04 instructions. It sure would be nice to be able to build it myself again.

Virgofenix
November 14th, 2008, 06:53 AM
I have an Intel Pentium T2370 (http://processorfinder.intel.com/details.aspx?sSpec=SLA4J).

The initial VID values:

13:43 10:33 8:26 6:19

I'm having a problem with the optimization script. The VID value of the first pair(13:43) goes all the way down to 0(700mV)(, and even attempts -1(684mV)), at which point, the script terminates and asks me to run the script again:

./linux-phc-optimize.bash: line 161: printf: -1: invalid option
printf: usage: printf [-v var] format [arguments]


The lowest acceptable VID is 0.

Recovering CPU.
./linux-phc-optimize.bash: line 138: 17047 Terminated burnMMX

Run this script again to continue the optimization.

However, running the script again gives me a read error of the tweaked VID file:

Will use current directory to store/retrieve test results.

Read phc_default_vids:
> Success!

Load VIDs from 'phc_tweaked_vids'
> ERROR: Wrong VID count!


This is a dual-core, so I have burnMMX on.

What's wrong?

ivanhoe1024
November 14th, 2008, 09:49 AM
ok... here's a fix. from /usr/src/linux-source-2.6.27:

cp ../linux-headers-2.6.27-7-generic/Module.symvers .

before running any of the make targets. I also removed a Module.symvers from the acpi-cpufreq directory to be sure it was using the toplevel version. I followed all the other instructions and it works again. (woohoo)

Fantastic!! I'll try as soon as I can, hoping it'll work for me too...