(updated with how to check centrino-speedstep vs acpi-cpufreq)
(updated with note for 64bit os)
(updated about initscripts)
(updated some stupid typos and errors)
(updated slightly more intelligent way to get correct linux source)
this works wonderfully on my x31, with kubuntu 7.10 aka gutsy; and x61t with kubuntu 7.10 64bit. these steps should work fine on any pentium-M, core duo or c2d thinkpad; the only difference will be tuning exact voltages per your particular cpu.
(as for dynamic frequency, ubuntu seems to have automagically installed all the necessary modules and sysfs bits; I added kpowersave applet to my kde panel/tray and set its policy to 'dynamic' and that was it)
CAREFUL! while the latest phc is designed to prevent ever EVER over-volting your cpu at each discrete frequency step, you still should make sure you know what the heck you are doing when setting voltages manually (or in the initscript config)
VORSICHT! if your dog runs away or you burn your toast or your truck won't start, this guide denies any liability whatsoever.
info and many of the steps come from the following, I've just combined and streamlined a bit. for more in-depth explanations, check 'em out:
https://www.dedigentoo.org/trac/linux-p ... ubuntu_001
http://phc.athousandnights.de/files
https://wiki.ubuntu.com/UndervoltingHowto
let's go!
Code: Select all
## install essential compiler tools, svn source control tool
sudo apt-get install build-essential subversion
## see which module it is you need (so choose accordingly in some steps further below)
lsmod | grep speedstep_centrino
lsmod | grep acpi_cpufreq
## check out latest phc development code; I found this necessary to get it working properly on my machine
mkdir ~/build
cd ~/build
## check out latest phc code
svn co http://phcpatches.googlecode.com/svn/trunk/ phcpatches
###***
## note: if you already checked out the code and want to see if there are any updates to check out, instead of "svn co blah/blah/blah" just:
cd ~/build/phcpatches
## and then:
svn update
###***
## change to root, enter kernel source directory and extract linux source code
su -
cd /usr/src
apt-get source linux-image-$(uname -r)
#(may vary based on kernel version installed)
cd linux-source-2.6.22-2.6.22
## copy the module patch from your regular user home directory i.e. /home/YOU
#(may vary based on phc version and kernel version installed)
## for speedstep-centrino
cp /home/YOU/build/phcpatches/speedstep/patches/linux-phc-0.3.1-kernel-vanilla-2.6.22.patch .
### OR ###
## for acpi-cpufreq
cp /home/YOU/build/phcpatches/cpufreq/patches/linux-phc-kernel-vanilla-2.6.22.patch .
#(again, may vary based on phc version and kernel version installed)
## for speedstep-centrino
patch -p1 < linux-phc-0.3.1-kernel-vanilla-2.6.22.patch
### OR ###
## for acpi-cpufreq
patch -p1 < linux-phc-kernel-vanilla-2.6.22.patch
## build a new kernel module using current kernel settings
## you will see some questions when the old .config is parsed. according to the phc wiki:
### There will be some questions (all SHOULD have something to do with frequency/voltage), answer them with YES. ###
cp /boot/config-$(uname -r) .config
make oldconfig
make prepare
make scripts
make M=./arch/i386/kernel/cpu/cpufreq
## backup the existing kernel module and copy the new one over it
## for speedstep-centrino
cp /lib/modules/$(uname -r)/kernel/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.ko ~/
cp arch/i386/kernel/cpu/cpufreq/speedstep-centrino.ko /lib/modules/$(uname -r)/kernel/arch/i386/kernel/cpu/cpufreq
### OR ###
## for acpi-cpufreq
cp /lib/modules/$(uname -r)/kernel/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.ko ~/
cp arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.ko /lib/modules/$(uname -r)/kernel/arch/i386/kernel/cpu/cpufreq
### !!!OR FOR 64bit systems!!! ###
cp /lib/modules/$(uname -r)/kernel/arch/x86_64/kernel/cpufreq/acpi-cpufreq.ko ~/
cp arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.ko /lib/modules/$(uname -r)/kernel/arch/x86_64/kernel/cpufreq/
## (I know this LOOKS WEIRD AND DODGY, but if you check the Makefile for arch/x86_64/kernel/cpufreq you will see that it simply references the code from arch/i386. all I can say is that it works for me on 64bit kubuntu 7.10...)
exit
## unload and reload
## for speedstep-centrino
sudo rmmod speedstep-centrino
sudo depmod -a
sudo modprobe speedstep-centrino
### OR###
## for acpi-cpufreq (it may not let you rmmod it, in which case simply reboot your machine)
sudo rmmod acpi-cpufreq
sudo depmod -a
sudo modprobe acpi-cpufreq
## see if it worked!
## this is a list of your machine's default voltages (per frequency step)
cat /sys/devices/system/cpu/cpu0/cpufreq/phc_default_vids
## and this is a list of your current voltages (right now it should be exactly the same as the default ones)
cat /sys/devices/system/cpu/cpu0/cpufreq/phc_vids
## set up initscript for undervolting (if you get it working right, you'll need to add it to your multiuser runlevels -- runlevel 2 at the very least)
sudo mkdir /etc/phc-config
sudo cp ~/build/phcpatches/tools/init-scripts/ubuntu/etc/phc-config/undervolt /etc/phc-config
sudo cp ~/build/phcpatches/tools/init-scripts/ubuntu/etc/init.d/undervolt /etc/init.d/then set up the initscript config...
the default VIDs on my x31 1.4 are:
49 46 38 30 16
aka
1484mV 1436mV 1308mV 1180mV 956mV
pretty brutal huh?
so far I've been doing ok with
32 22 16 10 6
aka
1212mV 1052mV 956mV 860mV 796mV
better, eh? and although the low end is about as low as I can get at max load when at 600MHz, I really have not spent any time testing how much lower I can bring the top end. it can vary from each person's machine, so don't take my VIDs for granted even if you also have a 1.4GHz p-M.
Code: Select all
sudo nano /etc/phc-config/undervolte.g. in my case:
Code: Select all
SWITCH_BACK="yes"
DEFAULT_VTABLE="49 46 38 30 16"
CUSTOM_VTABLE="32 22 16 10 6"
IS_CONFIGURED="yes"




