Linux Undervolting, any news?
Moderators: NeilBlanchard, Ralf Hutter, sthayashi, Lawrence Lee
-
- Friend of SPCR
- Posts: 1439
- Joined: Tue Dec 14, 2004 4:06 pm
- Location: New Hampshire, US
- Contact:
Linux Undervolting, any news?
I'd really like to fold in Linux, what with the SMP client being a little more efficient with the OS. I don't see a point in folding if I don't undervolt though. There's no reason to waste those extra watts when the CPU can run perfectly stable at lower power levels. So, does anyone know of any new programs that can manipulate processor voltage?
Also, what are some good, easy to use, possibly GUI based system monitoring utilites, for voltages/fan speeds/temperatures? Do any exist?
Also, what are some good, easy to use, possibly GUI based system monitoring utilites, for voltages/fan speeds/temperatures? Do any exist?
For Linux, undervolting has to be either done at BIOS level (not possible on all boards), or using an experimental kernel patch that currently works with Pentium M and to some extent Core Solo/Duo. I think I've seen someone testing it out on Core 2 too. Not sure if that's only with the mobile versions, though.
And to klegg: Yes, you can undervolt with software in windows. RMClock and Notebook Hardware Control are two apps who can do this.
And to klegg: Yes, you can undervolt with software in windows. RMClock and Notebook Hardware Control are two apps who can do this.
-
- Posts: 316
- Joined: Thu Aug 10, 2006 11:07 am
this is diff for 1.0 and 1.275V (kernel 2.6.20):
something similar would be for 0.9 and 1.175V - only difference would be number of steps we shift in first two lines.
Code: Select all
598a599,600
> data->powernow_table[0].index = data->powernow_table[0].index + (5 << 8); // 1.275V
> data->powernow_table[1].index = data->powernow_table[1].index + (4 << 8); // 1.000V
665a668,670
> return 0; /* allow override of VID values in print_basics() */
>
-
- Friend of SPCR
- Posts: 1439
- Joined: Tue Dec 14, 2004 4:06 pm
- Location: New Hampshire, US
- Contact:
I know, it's been a while, but I'm still not sure how/what exactly all that refers to. The forum link posted earlier seems to apply to Pentium M systems. I'm not well versed in linux command line/code manipulations, so a nice simple step-by-step how to would be helpful, or just point me in the direction of someone who's already done it and has documented their progress, and I can try to learn that way.trxman wrote:this is diff for 1.0 and 1.275V (kernel 2.6.20):
something similar would be for 0.9 and 1.175V - only difference would be number of steps we shift in first two lines.Code: Select all
598a599,600 > data->powernow_table[0].index = data->powernow_table[0].index + (5 << 8); // 1.275V > data->powernow_table[1].index = data->powernow_table[1].index + (4 << 8); // 1.000V 665a668,670 > return 0; /* allow override of VID values in print_basics() */ >
-
- *Lifetime Patron*
- Posts: 541
- Joined: Sun Jan 04, 2004 11:35 am
- Location: Chicago, Ill., USA
- Contact:
There's also gkrellm, which I've been using for many years.klegg wrote:I'm not using it at the moment, but for temps and fan speeds there is lm-sensors, with GUI-extensions, ksensors (as well as possibly xsensors and others).
First off, this requires a kernel recompile, which is a whole question on it's own if you don't know how to do it already. Once you figure out how to do that (what distro are you using BTW?), you edit the file arch/i386/kernel/cpu/cpufreq/powernow-k8.c , and look for this:ryboto wrote:I know, it's been a while, but I'm still not sure how/what exactly all that refers to. The forum link posted earlier seems to apply to Pentium M systems. I'm not well versed in linux command line/code manipulations, so a nice simple step-by-step how to would be helpful, or just point me in the direction of someone who's already done it and has documented their progress, and I can try to learn that way.trxman wrote:this is diff for 1.0 and 1.275V (kernel 2.6.20):
something similar would be for 0.9 and 1.175V - only difference would be number of steps we shift in first two lines.Code: Select all
598a599,600 > data->powernow_table[0].index = data->powernow_table[0].index + (5 << 8); // 1.275V > data->powernow_table[1].index = data->powernow_table[1].index + (4 << 8); // 1.000V 665a668,670 > return 0; /* allow override of VID values in print_basics() */ >
Code: Select all
for (j = 0; j < data->numps; j++) {
powernow_table[j].index = pst[j].fid; /* lower 8 bits */
powernow_table[j].index |= (pst[j].vid << 8); /* upper 8 bits */
powernow_table[j].frequency = find_khz_freq_from_fid(pst[j].fid);
}
The only other way (other than switching mobos) is recompiling the ACPI DSDT table. Not really an easier way huh...ryboto wrote:so, there's no other way to do it? you have to recompile the kernel? I have no clue how to do that...I'm using the beta of the 7.10 ubuntu at the moment, but I haven't been using it for the sole reason that I cannot undervolt.
With Ubuntu you can compile the powernow driver only. So...
Code: Select all
sudo apt-get install linux-source build-essential
tar xjf /usr/src/linux-source-2.6.22.tar.bz2
cd linux-source-2.6.22
cp /boot/config-`uname -r` .config
#^^^ those are backquotes
make prepare
#^^^ answer no to random question
make scripts
mkdir .tmp_versions
gedit arch/i386/kernel/cpu/cpufreq/powernow-k8.c
#^^^ make driver edits here
make arch/i386/kernel/cpu/cpufreq/powernow-k8.ko
sudo modprobe -r powernow-k8
sudo insmod arch/i386/kernel/cpu/cpufreq/powernow-k8.ko
One could also use k8fq. It's a command line utility that allows one to set the frequency and voltage of K8 processors. It is, unfortunately, at alpha stage, but it works (at least for me). I'm using it to set my dear 3000+ to 1,6 GHz/1,1 V during startup.
It requires MSR support in kernel (module is msr.ko), and all cpufreq utils must be turned off to allow proper operation.
I must emphasis that k8fq is ALPHA software, and should be used with proper care.
And if it does work properly, please report back (and give a pat on the back to the author of k8fq for such a fine utility ).
Cheers,
Jan
It requires MSR support in kernel (module is msr.ko), and all cpufreq utils must be turned off to allow proper operation.
I must emphasis that k8fq is ALPHA software, and should be used with proper care.
And if it does work properly, please report back (and give a pat on the back to the author of k8fq for such a fine utility ).
Cheers,
Jan
-
- *Lifetime Patron*
- Posts: 51
- Joined: Sat Apr 09, 2005 10:35 am
- Location: Berkeley, CA
- Contact:
You might like to check out LessWatts.org, a site dedicated to tips for saving power in Linux.
-
- Friend of SPCR
- Posts: 1439
- Joined: Tue Dec 14, 2004 4:06 pm
- Location: New Hampshire, US
- Contact:
see, that's amazing, thanks for the info! now, the only issue is that I don't know what code corresponds to what vcore/frequency....preferrably I'd only want to run 1 frequency, can I configure the driver to only have 1 power state?aaa wrote:The only other way (other than switching mobos) is recompiling the ACPI DSDT table. Not really an easier way huh...ryboto wrote:so, there's no other way to do it? you have to recompile the kernel? I have no clue how to do that...I'm using the beta of the 7.10 ubuntu at the moment, but I haven't been using it for the sole reason that I cannot undervolt.
With Ubuntu you can compile the powernow driver only. So...
After that you should be undervolting. Or it'll crash because you put the wrong voltage in or something.Code: Select all
sudo apt-get install linux-source build-essential tar xjf /usr/src/linux-source-2.6.22.tar.bz2 cd linux-source-2.6.22 cp /boot/config-`uname -r` .config #^^^ those are backquotes make prepare #^^^ answer no to random question make scripts mkdir .tmp_versions gedit arch/i386/kernel/cpu/cpufreq/powernow-k8.c #^^^ make driver edits here make arch/i386/kernel/cpu/cpufreq/powernow-k8.ko sudo modprobe -r powernow-k8 sudo insmod arch/i386/kernel/cpu/cpufreq/powernow-k8.ko
-
- Posts: 247
- Joined: Fri Oct 20, 2006 1:00 am
Here's an article on power consumption of different releases of Ubuntu: http://www.phoronix.com/scan.php?page=a ... =878&num=1
-
- Posts: 43
- Joined: Wed Oct 10, 2007 11:46 am
Cool link! Thank you.Zed Lopez wrote:You might like to check out LessWatts.org, a site dedicated to tips for saving power in Linux.
LessWatts? Is that a subsidiary of BadEnglish.org? (Should be fewer) /pedantZed Lopez wrote:You might like to check out LessWatts.org, a site dedicated to tips for saving power in Linux.
-
- Posts: 139
- Joined: Thu Nov 10, 2005 2:04 am
- Location: Los Angeles, CA
- Contact:
My Asus A8V-Deluxe doesn't recognize my Opteron 185 so I had to write a custom DSDT for it anyway. So I have the entire frequency/voltage table in my DSDT, undervolted at each step. No patching of kernel files needed, but of course you still have to reboot to install a different DSDT. I guess it would still be nice to have the corresponding linux-phc patch, but I remember writing to AMD about it and they said they would never endorse a patch like that going into the mainstream kernel. They will never support end-users tweaking their PowerNow/C'n'Q tables. Oh well.
I can conform that linux-phc is working for a Core 2 Duo. My BIOS is probably buggy, so I had to change the source a tiny bit. If you get a "not such device" error, just ask me. About AMD support: I asked the developer and they are on it. At the moment, they move to a new server.
Howto: Download the release and try the inluded binary modules. If that's not working, follow this HOWTO: https://www.dedigentoo.org/trac/linux-p ... ubuntu_001
Howto: Download the release and try the inluded binary modules. If that's not working, follow this HOWTO: https://www.dedigentoo.org/trac/linux-p ... ubuntu_001
Remember, you need to download your kernel source, navigate to the source directory and look at arch/i386/kernel/cpu/cpufreq/powernow-k8.cryboto wrote:I'm still curious if anyone can point me to information regarding the actual editing of the powernow.c file. I haven't had time to attempt it yet, but I really am not sure what I'm going to change when I finally get there.
Look at the above quote from trxman for the two lines you need to change. They're at about line 600 in his example, but they could be at a different location depending on what kernel you're running. Just search for the print_basics function.
As for the actual editing, there's a good discussion in this thread on how to do it. If you still can't figure it out, post back with the values you want and we'll help you out.
-
- Friend of SPCR
- Posts: 1439
- Joined: Tue Dec 14, 2004 4:06 pm
- Location: New Hampshire, US
- Contact:
i read through that discussion...it may be that I'm just stupid, but I can't for the life of me figure out what they're actually editing. I see that they change the for loop to 3 single power states, but I have absolutely no idea how they're determining the voltage from the language in the code. I've gotten to the point of editing the powernow-k8.c using aaa's amazing list of commands(that have worked without issue up to this point!), but I'm stuck here. yep...i just tried reading through the end of the thread, I'm lost. If anyone can translate it, I'd appreciate it, maybe I just need some sleep.
The frequency and voltage are represented by id numbers, fid and vid:
frequency = 800 + fid * 100
millivolts = 1550 - vid * 25
Well, back to this:
So with those last lines of code, you can subtract from the original voltage. Now there's a a one there (at 1 << 8), subtracting 1*25mv. Then you just need to remember that original voltage will be 1.1v at 1ghz instead of 1.35v or whatever for full speed. Run "dmesg | grep powernow" to see your original freq/voltage table, so you know how many lines to add.
frequency = 800 + fid * 100
millivolts = 1550 - vid * 25
Well, back to this:
Code: Select all
for (j = 0; j < data->numps; j++) {
powernow_table[j].index = pst[j].fid; /* lower 8 bits */
powernow_table[j].index |= (pst[j].vid << 8); /* upper 8 bits */
powernow_table[j].frequency = find_khz_freq_from_fid(pst[j].fid);
}
//Add a few lines looking like this, for each frequency:
data->powernow_table[0].index = data->powernow_table[0].index + (1 << 8);
data->powernow_table[1].index = data->powernow_table[0].index + (1 << 8);
-
- Posts: 247
- Joined: Fri Oct 20, 2006 1:00 am