UbuntuWiki:UndervoltingHowto
文章出处: |
{{#if: | {{{2}}} | https://wiki.ubuntu.com/UndervoltingHowto }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/af | • {{#if: UbuntuWiki:UndervoltingHowto|Afrikaans| [[::UbuntuWiki:UndervoltingHowto/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/ar | • {{#if: UbuntuWiki:UndervoltingHowto|العربية| [[::UbuntuWiki:UndervoltingHowto/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/az | • {{#if: UbuntuWiki:UndervoltingHowto|azərbaycanca| [[::UbuntuWiki:UndervoltingHowto/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/bcc | • {{#if: UbuntuWiki:UndervoltingHowto|جهلسری بلوچی| [[::UbuntuWiki:UndervoltingHowto/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/bg | • {{#if: UbuntuWiki:UndervoltingHowto|български| [[::UbuntuWiki:UndervoltingHowto/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/br | • {{#if: UbuntuWiki:UndervoltingHowto|brezhoneg| [[::UbuntuWiki:UndervoltingHowto/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/ca | • {{#if: UbuntuWiki:UndervoltingHowto|català| [[::UbuntuWiki:UndervoltingHowto/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/cs | • {{#if: UbuntuWiki:UndervoltingHowto|čeština| [[::UbuntuWiki:UndervoltingHowto/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/de | • {{#if: UbuntuWiki:UndervoltingHowto|Deutsch| [[::UbuntuWiki:UndervoltingHowto/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/el | • {{#if: UbuntuWiki:UndervoltingHowto|Ελληνικά| [[::UbuntuWiki:UndervoltingHowto/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/es | • {{#if: UbuntuWiki:UndervoltingHowto|español| [[::UbuntuWiki:UndervoltingHowto/es|español]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/fa | • {{#if: UbuntuWiki:UndervoltingHowto|فارسی| [[::UbuntuWiki:UndervoltingHowto/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/fi | • {{#if: UbuntuWiki:UndervoltingHowto|suomi| [[::UbuntuWiki:UndervoltingHowto/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/fr | • {{#if: UbuntuWiki:UndervoltingHowto|français| [[::UbuntuWiki:UndervoltingHowto/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/gu | • {{#if: UbuntuWiki:UndervoltingHowto|ગુજરાતી| [[::UbuntuWiki:UndervoltingHowto/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/he | • {{#if: UbuntuWiki:UndervoltingHowto|עברית| [[::UbuntuWiki:UndervoltingHowto/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/hu | • {{#if: UbuntuWiki:UndervoltingHowto|magyar| [[::UbuntuWiki:UndervoltingHowto/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/id | • {{#if: UbuntuWiki:UndervoltingHowto|Bahasa Indonesia| [[::UbuntuWiki:UndervoltingHowto/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/it | • {{#if: UbuntuWiki:UndervoltingHowto|italiano| [[::UbuntuWiki:UndervoltingHowto/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/ja | • {{#if: UbuntuWiki:UndervoltingHowto|日本語| [[::UbuntuWiki:UndervoltingHowto/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/ko | • {{#if: UbuntuWiki:UndervoltingHowto|한국어| [[::UbuntuWiki:UndervoltingHowto/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/ksh | • {{#if: UbuntuWiki:UndervoltingHowto|Ripoarisch| [[::UbuntuWiki:UndervoltingHowto/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/mr | • {{#if: UbuntuWiki:UndervoltingHowto|मराठी| [[::UbuntuWiki:UndervoltingHowto/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/ms | • {{#if: UbuntuWiki:UndervoltingHowto|Bahasa Melayu| [[::UbuntuWiki:UndervoltingHowto/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/nl | • {{#if: UbuntuWiki:UndervoltingHowto|Nederlands| [[::UbuntuWiki:UndervoltingHowto/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/no | • {{#if: UbuntuWiki:UndervoltingHowto|norsk| [[::UbuntuWiki:UndervoltingHowto/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/oc | • {{#if: UbuntuWiki:UndervoltingHowto|occitan| [[::UbuntuWiki:UndervoltingHowto/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/pl | • {{#if: UbuntuWiki:UndervoltingHowto|polski| [[::UbuntuWiki:UndervoltingHowto/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/pt | • {{#if: UbuntuWiki:UndervoltingHowto|português| [[::UbuntuWiki:UndervoltingHowto/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/ro | • {{#if: UbuntuWiki:UndervoltingHowto|română| [[::UbuntuWiki:UndervoltingHowto/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/ru | • {{#if: UbuntuWiki:UndervoltingHowto|русский| [[::UbuntuWiki:UndervoltingHowto/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/si | • {{#if: UbuntuWiki:UndervoltingHowto|සිංහල| [[::UbuntuWiki:UndervoltingHowto/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/sq | • {{#if: UbuntuWiki:UndervoltingHowto|shqip| [[::UbuntuWiki:UndervoltingHowto/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/sr | • {{#if: UbuntuWiki:UndervoltingHowto|српски / srpski| [[::UbuntuWiki:UndervoltingHowto/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/sv | • {{#if: UbuntuWiki:UndervoltingHowto|svenska| [[::UbuntuWiki:UndervoltingHowto/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/th | • {{#if: UbuntuWiki:UndervoltingHowto|ไทย| [[::UbuntuWiki:UndervoltingHowto/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/tr | • {{#if: UbuntuWiki:UndervoltingHowto|Türkçe| [[::UbuntuWiki:UndervoltingHowto/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/vi | • {{#if: UbuntuWiki:UndervoltingHowto|Tiếng Việt| [[::UbuntuWiki:UndervoltingHowto/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/yue | • {{#if: UbuntuWiki:UndervoltingHowto|粵語| [[::UbuntuWiki:UndervoltingHowto/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/zh | • {{#if: UbuntuWiki:UndervoltingHowto|中文| [[::UbuntuWiki:UndervoltingHowto/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/zh-hans | • {{#if: UbuntuWiki:UndervoltingHowto|中文(简体)| [[::UbuntuWiki:UndervoltingHowto/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuWiki:UndervoltingHowto | UbuntuWiki:UndervoltingHowto | {{#if: | :}}UbuntuWiki:UndervoltingHowto}}/zh-hant | • {{#if: UbuntuWiki:UndervoltingHowto|中文(繁體)| [[::UbuntuWiki:UndervoltingHowto/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuWiki:UndervoltingHowto|:UbuntuWiki:UndervoltingHowto|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :UbuntuWiki:UndervoltingHowto/zh | | {{#ifexist: UbuntuWiki:UndervoltingHowto/zh | | {{#ifeq: {{#titleparts:UbuntuWiki:UndervoltingHowto|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:UbuntuWiki:UndervoltingHowto|1|-1|}} | zh | | }}
How to undervolt a Pentium M CPU on Ubuntu Edgy
WARNING !
Use this document at your own risk. Changing the voltage of a Pentium M CPU is not recommended because it can make it run out of its specifications. It can possibly damage your computer. Backup your data regularly to an off line medium.
Introduction
The Pentium M family of CPU's has the ability to change the frequency of the CPU. Each frequency has a specific voltage related to it. Lower frequencies work with a lower CPU voltage and higher frequencies needs a higher voltage. If the CPU switches to a lower voltage it consumes less energy (= voltage2 / resistance) and as a result dissipates less heat.
The BIOS of your laptop contains a good table of the possible frequencies and the related voltage. The kernel reads this table and applies the correct voltage to the CPU. It is possible to override this table with even lower voltages. Some reason why you might want to try this are:
- Longer battery live
- Less noise
- Less heat
- More environmental friendly
Some reasons you don't want to do it:
- The functions to change the voltage are not supplied with the Linux kernel in Ubuntu. You have to recompile the kernel yourself (read on).
- Your system can become unstable. The standard voltages are tested by Intel. A too low voltage can crash your computer or make it unstable (e.g. damage your filesystem).
- Although I didn't read any reports about it, it can possibly permanently damage your hardware, void your warranty and explode in your face.
If you are happy about your laptop, it is stronly recommended not to use this howto.
Rebuilding the kernel
This procedure is based on the KernelCustomBuild page.
Create a new working directory:
$ mkdir ~/undervolt cd ~/undervolt
Download the latest kernel source (replace vv with the version of the current kernel):
$ apt-get source linux-image-2.6.17-vv-generic
This creates a directory in your working directory with the kernel source.
Download the latest version of the linux-phc patch at the projects website https://www.dedigentoo.org/trac/linux-phc/ in the undervolt directory.
$ wget http://mesh.dl.sourceforge.net/sourceforge/linux-phc/linux-phc-0.2.9.tar.gz tar zxfv linux-phc-0.2.9.tar.gz
Now we are ready to patch the kernel:
cd linux-source-2.6.17-2.6.17.1 patch -p1 < ../linux-phc-0.2.9/kernel-patch/linux-phc-0.2.9-kernel-ubuntu-2.6.17.patch
The patch adds a few options to the kernel configuration so we have to run:
debian/rules updateconfigs
Answer allways yes (y) to the new options.
If this fails with error number 127, try: (Replace vv with your appropriate kernel version)
sudo apt-get build-dep linux-image-2.6.17-vv-generic
The command can return an error because the files in the directory debian/bin/ are not executable. Make all the files executable in this directory and try again.
chmod +x debian/bin/*
This bug will probably be resolved in later version of the kernel package. Remove this note if the above command worked fine for you.
sudo apt-get install fakeroot kernel-wedge
To build the package enter:
AUTOBUILD=1 fakeroot debian/rules binary-debs flavours=generic
This compiles only the 'generic' kernel. You likely want to use this flavour on a Pentium M system.
When the build is ready, install it on your system. Replace xxxx. This is a random string.
sudo dpkg -i debian/build/linux-image-2.6.17-vv-xxxx-generic_2.6.17.1-11.35_i386.deb
Reboot.
Check if the installation was successful:
cat /sys/devices/system/cpu/cpu0/cpufreq/voltage_table
(the file should exist).
If you have an Intel IPW2200 wireless card or something else that needs files from /lib/firmware/`uname -r` the hardware is not working when booting with the new kernel. To fix this create a link to the old directory:
cd /lib/firmware/ sudo ln -s 2.6.17-10-386 `uname -r`
Userspace
This part describes how to install the user space scripts and how to configure them.
cd ~/undervolt/linux-phc-0.2.8/ubuntu
First we have fix a small error on the first line of the startup script. Change #!/bin/sh
in #!/bin/bash
in etc/init.d/undervolt
.
Install the userspace scripts of the Linux-PHC package:
sudo cp etc/init.d/undervolt /etc/init.d/ sudo cp -r etc/phc-config/ /etc/
Change the configuration file /etc/phc-config/undervolt now.
cat /sys/devices/system/cpu/cpu0/cpufreq/op_points_table
Copy this value in the configuration file in the DEFAULT_VTABLE
variable and change the IS_CONFIGURED
value to yes. Optionally you can set the SWITCH_BACK
value to yes.
Now you have to find out the best 'undervolting' values for your system. Start with the values original values in /sys/devices/system/cpu/cpu0/cpufreq/op_points_table. You can change the values with this command:
sudo sh -c "echo 798000:700,1064000:844,1330000:892,1596000:908" > /sys/devices/system/cpu/cpu0/cpufreq/op_points_table"
The settings take effect immediately. The Gentoo wiki contains information how to find out the best values for your system. The settings in the table turned out to be remarkably accurate for my system. YMMV.
If you found a value that satisfied your needs, copy it into the CUSTOM_VTABLE
variable in /etc/phc-config/undervolt
.
Add the startup script to the boot sequence:
sudo update-rc.d undervolt defaults
Unfortunately the init script for Ubuntu from PHC version <=0.2.7 has a litle mistake so you probably need to change it. edit /etc/init.d/undervolt
sudo gedit /etc/init.d/undervolt
and change the second line from
source $CONFIGURATION ;
to
. $CONFIGURATION ;
Done !