How To undervolt with PHC 0.3.0
It seems the only usable tutorial for undervolting Ubuntu — mine — was never updated to match the changes in Linux-PHC 0.3.0.
Time to remedy that oversight.
Before you get excited, this is still for Pentium M users only: if you are not using a Pentium M processor of some sort, you should not follow this guide. It could easily break your set up.
As usual, # signifies a command that must be run as the root user, preferably by typing “sudo” first, while $ signifies a command you can execute as your normal user account.
Open up your favorite terminal program and punch in the following commands:
$ cd ~
$ wget http://jaist.dl.sourceforge.net/sourceforge/linux-phc/
linux-phc-0.3.0.tar.gz
$ tar zxpvf linux-phc-0.3.0.tar.gz
$ cd /lib/modules/2.6.22-14-generic/kernel/arch/i386/kernel
/cpu/cpufreq
# cp acpi-cpufreq.ko acpi-cpufreq.ko.bak
# cp /home/YOURUSERNAME/linux-phc-0.3.0/kernel-modules/ubuntu-
2.6.22-acpi-cpufreq.ko acpi-cpufreq.ko
$ cd /etc
# cp -r /home/YOURUSERNAME/linux-phc-0.3.0/init-scripts
/ubuntu/etc/* .
At this point, the module is installed and all scripts are in position. You must reboot your computer to bring it up with the new ACPI module.
After your computer comes back up, go to your terminal again and execute this command:
$ cat /sys/devices/system/cpu/cpu0/cpufreq/phc_vids
$ cat /sys/devices/system/cpu/cpu0/cpufreq
/scaling_available_frequencies
This should echo something like “38 32 27 23 18″ and “2000000 1600000 1333000 1067000 800000″ to the terminal. What these are, are voltage states. Each corresponds to the frequency below it. What you must now do is tweak these voltage state numbers as much as possible to use less power, but not so little your machine dies.
You can do this by hand, or if you don’t mind using SubVersion (SVN) to grab some stuff, you can use the Linux-PHC team’s PHCtool.
# apt-get install svn
$ cd ~/linux-phc-0.3.0
$ svn co https://www.dedigentoo.org/ro-svn/linux-phc/trunk
/src/utils/phctool
$ cd phctool
# ./phctool.py
This will bring up a small GUI application. Click the Voltage tab and start tweaking the voltages for each VID. It would be a good idea to also use the Gnome CPU Frequency Monitor plugin in your toolbar to force your CPU to sit in each frequency while you test this out.
If the plugin does not let you change your frequency, or if the options are grayed out, you may need to add some permissions. Try this command line, then log out of your desktop and log back in.
# chmod +s /usr/bin/cpufreq-selector
Clicking “Save Values” will store these to your voltage table.
People working off the command line can try the comparatively dangerous act of directly editing /sys/devices/system/cpu/cpu0/cpufreq/phc_vids like a text file.
When you are all done and get some numbers you like, write them down. On my system, I use “24 17 11 5 0″.
Open /etc/phc-config/undervolt in your favorite text editor as the root user (e.g. `sudo mousepad /etc/phc-config/undervolt`). Enter the first set of numbers you got as the value for DEFAULT_VTABLE. Enter the second set you came up with as CUSTOM_VTABLE. Lastly, set IS_CONFIGURED to “yes”.
Now you just need to make the new undervolting script run whenever your computer starts up.
# update-rc.d undervolt defaults
Congrats. You are now undervolting.
You can continue to tweak your values with PHCtool. Whenever you make some changes that you are happy with, add the values to /etc/phc-config/undervolt.
About this entry
You’re currently reading “How To undervolt with PHC 0.3.0,” an entry on CinnamonPirate.com
- Published:
- Friday, December 28th, 2007 at 4:28 pm
- Author:
- Derrick Sobodash
- Category:
- Ubuntu












No comments
Jump to comment form | comments rss