NotebookForums.com › Forums › General Notebook Discussions › Linux & Other OS's › Guide to Undervolting in Linux
New Posts  All Forums:Forum Nav:

Guide to Undervolting in Linux

post #1 of 6
Thread Starter 
I initially posted this in 700musers.com linux forums, but I figured this would probably benefit linux users here as well. Note, that these directions are for P-M laptops.

After searching the Gentoo Forums for info about undervolting, I found this thread, which allowed me to get it working: http://forums.gentoo.org/viewtopic-t...ervolting.html

Just in case others haven't stumbled upon this thread, I'll explain the basics here.

Unlike windows, which allows us to use a program like CHC to undervolt, linux requires that any modulation of the core voltage independent of the cpu frequency be configured in the kernel and not on the fly. This is why speedstepping programs such as cpudyn do not allow voltage settings like CHC does.

Step 1. As per the thread I linked to above, you first need to make sure that your kernel configuration (.config file) is set such that X86_SPEEDSTEP_CENTRINO_ACPI is not set (i.e. =n). This makes sure that linux does not read voltage-frequency settings from the acpi-tables.

Step 2. Edit /usr/src/linux/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c to change the voltage settings for a given frequency of your processor. You can find an example speedstep-centrino.c file here: http://www.math.uni-bielefeld.de/~sc...tep-centrino.c

Basically, find the section for your Dothan processor and change the four voltages (in mV) after the clock speed (in MHz). For example, I copied the c file from the above link and then modified the 1.8GHz Dothan section to this:

/* Intel Pentium M processor 745 / 1.80GHz (Dothan) */
static struct cpufreq_frequency_table dothan_1800[] =
{
OP( 600, 700, 700, 700, 700),
OP( 800, 1052, 1052, 1052, 1036),
OP(1000, 1116, 1100, 1100, 1084),
OP(1200, 1164, 1164, 1148, 1132),
OP(1400, 1228, 1212, 1212, 1180),
OP(1600, 1292, 1276, 1260, 1228),
OP(1800, 1164, 1164, 1164, 1164),
{ .frequency = CPUFREQ_TABLE_END }
};

This will give me 0.700V for my min VID at 600MHz, and 1.164V for my max VID at 1.8 GHz. I used these voltages because that's what I determined to be stable in Windows with CHC and Prime95.

Step 3. After you've saved your changes to speedstep-centrino.c, then just compile and install your kernel and you should be set. I'm not going to go into the details here, I figure you can google for it if you don't remember.

Extra tips:
I probably don't need to mention this, but don't overwrite your old kernel in /boot unless you back it up (just in case something goes wrong).

When I did this, I followed the advice of others in the gentoo forums thread and added this line to my speedstep-centrino.c file:

OP( 500, 700, 700, 700, 700)

This puts in a nonsense clock speed of 500MHz which when I compile the kernel should be shown in cpufreq-info, cpudyn, or the like. This will confirm that your system is reading from your handmade table and not the acpi tables (which were disabled in .config) or anything else it might think to try. Once I saw that this was ok (i.e. 500MHz was an allowable option according to the kernel) I went back and recompiled without this line, but it's really not necessary to remove it if you're feeling lazy.

Someone in the gentoo forums reported that the had to increase their voltages slightly in linux (from voltages used in Windows). I've had no problems with my windows voltages thus far. If you do all of this right and your laptop isn't stable, you may want to try using voltages that are slightly higher than what you use in windows.

I'm gonna try and keep and eye on my temperatures and see how they compare. Maybe I'll also be unlazy enough to see if increased battery time is comparable to using CHC in windows.

Happy undervolting!
post #2 of 6
Hmm you have any ideas or helpful hints for Turions on that yet? I am kinda curious myself on this.

Seablade
post #3 of 6
Thread Starter 
Unfortunately, I didn't really look into Turions. There might be a C file in the kernel sources which would have the equivalent information for AMD processors as is in speedstep-centrino.c
post #4 of 6
Ok thanks good to know, I am considering picking one up but I like the idea of running the thing as light as possible in as far as heat is concerned.

Seablade
post #5 of 6
Thread Starter 
After glanicing through the kernel sources, the following files in /usr/src/linux-2.6.12-gentoo-r6 (*or your sources*)/arch/i386/kernel/cpu/cpufreq caught my eye:

powernow-k6.c
powernow-k7.c
powernow-k8.c

I'm not all that familiar with AMDs nomenclature for its architechtures (the last AMD I had was an Athlon cpu bought in 2001), but one of these is likely to be relevant. The k6 files looked pretty short, so might not be right, but the k7 files looked like it had some tables that might be promising. It would just be a matter of trying it and making sure to configure the kernel such that it reads from those tables (you could try a test clock speed like I did)

Anyways, good luck
post #6 of 6
Yea if anything the turion would reference the K8 settings I would think, but like you I am not sure if those carry over to the turion from the Mobile 64s or not, will be interesting to find out if I get one.

Seablade
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux & Other OS's
NotebookForums.com › Forums › General Notebook Discussions › Linux & Other OS's › Guide to Undervolting in Linux