![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
A Carafe of Ubuntu
![]() Join Date: Jul 2006
Location: Tschörmany
Beans: 98
Ubuntu 9.04 Jaunty Jackalope
|
Edit: EEEK!! Why is it to wide? Anyone else seeing it too wide? Anyone a clue how to fix it?
This howto is based on own experiences and this german wiki page, so thx to them. It is tested for intel Core2Duo and CoreDuo cpus. I have no clue if it works for AMD as well. Some answers I received suggest that it currently doesn't work with AMD cpus however. From wikipedia: Undervolting is the practice of reducing the supply voltage of a computer's CPU. There are many reasons to perform this sort of modification, but a common one is to reduce power consumption and thus heat generation in laptop computers. Lower heat generation provided by undervolting and underclocking is also helpful in making computers quieter. Performance will not suffer as the energy you will save was just wasted (as heat) before. Safety: Undervolting notebook processors is not uncommon. My older notebook (Toshiba S1) even came with a Windows utility that did automatic undervolting preinstalled. So the "undervolted" processor is nothing dangerous. The way to get there might be, if no care is taken. What might happen: 1) The voltage controls stability and temperature. The higher the voltage the higher the temp, but without enough voltage the cpu wont be stable and your PC will lock up. In fact with the following procedure we are trying to find the minimum stable voltage to get the cpu as cool as possible. The energy saved will increase battery life as well.Once the scipt finishes (you need to run it several times, once for every freqency your cpu is capable of), no more lock-ups are to be expected as the script now knows the individual critical voltage for your cpu and will stay savely above. With all these precautions I think it is rather save to undervolt. Still there? Then let's get on to it! Step by step: 1. This howto depends on the kernel module acpi-cpufreq to control your cpu. To find out if you're using it try Code:
lsmod | grep acpi_cpufreq Code:
acpi_cpufreq 14892 2 freq_table 5536 3 acpi_cpufreq,cpufreq_stats,cpufreq_ondemand processor 36872 4 acpi_cpufreq,thermal 2. You need to get a modified version of your acpi_cpufreq module, one with PHC support build in. PHC means processor hardware control and is the magic that makes it going. There are several ways to get this module. a) You can download a patch on their website and compile it yourself. If you have never compiled anything, this is not for you as there are easier ways (see b) ). However as I hardly find the time to post updates here I will give a mini-howto for compilation here in case a kernel update breakes compatibility with old modules. You need to compile yourself in case you are running 64 bit as well as the precompiled modules I offer below are 32bit only.3. Reboot. If the module is installed correctly,Mini-Howto for compilationb) Download a precompiled module. It has to match your kernel. Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls Code:
12:38 10:30 8:24 6:18 4. Okay, now we need to find the lowest save voltages. We will use this optimizer script. Download it (you will need this file as well), then right-click the files, open the permissions tab, and and down at the bottom check the box that says "allow executing the file....." Then run it from the terminal with Code:
sudo ./linux-phc-optimize.bash IMPORTANT:When you're finished with the script, you will have a text file with the new and optimized frequency : voltage pairs. 5. To use these optimized values, you will need to echo them to /sys/devices/system/cpu/cpu0/cpufreq/phc_controls. An easy way to do it automatically every reboot is to add a line like this: Code:
echo "12:21 10:1 8:1 6:1" > /sys/devices/system/cpu/cpu0/cpufreq/phc_controls 6. Check if it works: Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
__________________
HowTo: Ask Questions the smart way | keep on rockin'... GEEK CODE Version: 3.1: GJ/MD d s a- C++ ULS++ P L+++ E---- W++ N* ?o K- w--- ?O M-- V-- PS+>$ PE++>$ Y+ PGP++ t-- 5- X R tv b+ ?DI D+ G++ e+++ h-- r++ y+ Last edited by Ares Drake; June 20th, 2008 at 01:46 AM.. |
|
|
|
|
|
#2 |
|
First Cup of Ubuntu
![]() Join Date: May 2008
Beans: 5
|
Re: HowTo: Undervolt your notebook CPU for longer battery life
Hi,
Thanks for posting this how-to. I am a complete beginner in linux and know absolutely nothing, so its refreshing that someone has posted a tutorial thats easy to understand even for people like me(believe me, Ive been trying to get linux PHC to work for days). So I have a problem, when I use your command on Step 5, the terminal says "bash: echo: write error: Invalid argument". I tried using this command, "echo "20:18 20:18 20:18 20:18 12:11" > /sys/devices/system/cpu/cpu0/cpufreq/phc_controls" to replace my default(?) voltages, which were "11:47 10:39 8:29 6:18 136:11" on Step 3. I am running a Lenovo T61 with a Core 2 Duo T7300 (2 GHZ) on Ubuntu 8.04 64-bit. Thanks alot for your responses, this is a very great and helpful community! EDIT: I dont know why there are 5 of these settings for mine and you only have 4. I searched around and found a formula for the VID: Vcc = 712.5 + VID*12.5 Is this the right formula for the VID? I wanted to run my laptop at a constant 2 GHZ with .9375 volts. Last edited by w4ngsta07; May 10th, 2008 at 10:42 PM.. |
|
|
|
|
|
#3 |
|
First Cup of Ubuntu
![]() Join Date: May 2008
Beans: 5
|
Re: HowTo: Undervolt your notebook CPU for longer battery life
Well ok, this is probably easy to answer. I cant run the linux-phc optimizer script. I downloaded it to my desktop. double clicking it does nothing, just runs the text editor, and terminal says 'command not found'
|
|
|
|
|
|
#4 |
|
A Carafe of Ubuntu
![]() Join Date: Dec 2006
Location: Vietnam (U.S. expat)
Beans: 131
Ubuntu 7.04 Feisty Fawn
|
Re: HowTo: Undervolt your notebook CPU for longer battery life
w4ngsta07:
you need to make a script executable before you can run it. The easiest way is right-click the file, open the permissions tab, and and down at the bottom check the box that says "allow executing the file....." That should do it. |
|
|
|
|
|
#5 | |
|
A Carafe of Ubuntu
![]() Join Date: Jul 2006
Location: Tschörmany
Beans: 98
Ubuntu 9.04 Jaunty Jackalope
|
Re: HowTo: Undervolt your notebook CPU for longer battery life
Quote:
Code:
sudo -s then run your echo command again. But to be honest, I don't think it is an access problem to that file so it probably won't help. I think it is rather a problem with your value pairs. I don't know if it is possible to use PHC to keep your cpu constant at 2ghz. I for myself kept the first value for the frequency step and just changed the voltage for it after the : Try doing the same, you then can still lock your cpu frequency with other methods to 2ghz, i.e. there is a terminal command (wich I can't remember, but I read it in this forum) to change the access permissions of the panel cpu freq applet to let you control your cpu speed manually from there.
__________________
HowTo: Ask Questions the smart way | keep on rockin'... GEEK CODE Version: 3.1: GJ/MD d s a- C++ ULS++ P L+++ E---- W++ N* ?o K- w--- ?O M-- V-- PS+>$ PE++>$ Y+ PGP++ t-- 5- X R tv b+ ?DI D+ G++ e+++ h-- r++ y+ |
|
|
|
|
|
|
#6 |
|
A Carafe of Ubuntu
![]() Join Date: Jul 2006
Location: Tschörmany
Beans: 98
Ubuntu 9.04 Jaunty Jackalope
|
Re: HowTo: Undervolt your notebook CPU for longer battery life
Thanks for your hint, I added it to the howto.
__________________
HowTo: Ask Questions the smart way | keep on rockin'... GEEK CODE Version: 3.1: GJ/MD d s a- C++ ULS++ P L+++ E---- W++ N* ?o K- w--- ?O M-- V-- PS+>$ PE++>$ Y+ PGP++ t-- 5- X R tv b+ ?DI D+ G++ e+++ h-- r++ y+ |
|
|
|
|
|
#7 |
|
First Cup of Ubuntu
![]() |
When I run phc optimize script, I get
Code:
./linux-phc-optimize.bash: line 3: functions.bash: No such file or directory ERROR: Could not load functions.bash Thanks |
|
|
|
|
|
#8 |
|
A Carafe of Ubuntu
![]() Join Date: Jul 2006
Location: Tschörmany
Beans: 98
Ubuntu 9.04 Jaunty Jackalope
|
Re: HowTo: Undervolt your notebook CPU for longer battery life
Sorry, I just forgot that file. I updated the howto, but without reading through all that again, here is the link You need to make it executable as well.
__________________
HowTo: Ask Questions the smart way | keep on rockin'... GEEK CODE Version: 3.1: GJ/MD d s a- C++ ULS++ P L+++ E---- W++ N* ?o K- w--- ?O M-- V-- PS+>$ PE++>$ Y+ PGP++ t-- 5- X R tv b+ ?DI D+ G++ e+++ h-- r++ y+ |
|
|
|
|
|
#9 |
|
Gee! These Aren't Roasted!
![]() Join Date: Oct 2007
Location: Nottingham
My beans are hidden!
Ubuntu 8.04 Hardy Heron
|
Re: HowTo: Undervolt your notebook CPU for longer battery life
Would you undervolting guys with multi core systems please have a look at:
http://ubuntuforums.org/showthread.php?p=4960606 and provide some thoughts?
__________________
Sony VAIO SZ4 - Limited edition MS DOS since 5.0, Windows since 3.11, Linux since kernel 2.6, OS-X since 10.4, and, last but not least, MS Minesweeper since 1.0 |
|
|
|
|
|
#10 |
|
First Cup of Ubuntu
![]() Join Date: May 2008
Beans: 5
|
Re: HowTo: Undervolt your notebook CPU for longer battery life
Is it possible for you to also make a HOW-TO for compiling the linux phc in case our kernels get updated?
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|