This thread is about undervolting the x120e's AMD E-350 processor in LinuxThis is a little more complicated than Windows so be patient.
Disclaimer: not responsible for damages due to stupidity. BUT damages shouldn't happen as long as you are doing reasonable voltage changes (aka not overvolting).
What to expect: A noticeable decrease in temperatures when processor is at full load (depending on the undervolt up to 10 degrees less), lower idle temps (3 to 6 degrees less), less fan noise (the fan may even turn off for awhile if you are able to undervolt enough). Reduced heat emission (cool air or none at all), increased battery life (30 minutes with a good undervolt), and a general feeling of satisfaction and accomplishment overall![]()
Now let's begin:
Step 1: Installing "Undervolt" and Loading Modules
1) First download the "undervolt" program created by thierrygoubier here:
Undervolt
2) Extract the undervolt folder somewhere (I personally have a folder at ~/ called source which i extract source code to).
NOTE: if the first of the following commands doesn't work, just ignore it =P
3 ) cd into the undervolt folder and type:
Now the source has been compiled into a usable binary and installed to a location where we can easily access it (without cd'ing to its directory everytime).Code:sudo ./configure sudo make sudo cp undervolt /usr/bin
4) Now we need to load a module in order for this "undervolt" program to work.
And to automate the above command at startup:Code:sudo modprobe msr
write "msr" (without quotes) on a new line in this file and save (ctrl+x, y, enter).Code:sudo nano /etc/modules
Step 2: Understanding The Undervolting Basics
Undervolting in Linux requires a little more effort than Windows. Look at this formula:
This is the formula for calculating the voltage of the processor(s). The SviVid is the variable we will modify to calculate our own voltage. The SviVid is a hexadecimal value such 0x1A or 0x14 (0x is simply a prefix, what's after that is what matters). Since we're dealing with hexadecimal numbers we are in base 16 (that is numbering is like this: 0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F-10-11-12-13-14-15-16-17-18-19-1A), etc. What would be helpful is to get yourself a hexadecimal to decimal converter like this:Code:1.550 - 0.0125 * SviVid
Hexadecimal to Decimal Converter
Use it to find the decimal value of 0x18 (just type 18) for example, and take the decimal value and insert it into the formula to calculate the resulting voltage (should have got 1.3V). Now you guys who already undervolted to stable voltages in Windows can just mess around with numbers 'till you find your Windows voltages and you're good. For those people, write down the hex values that get you your voltages for each P-state somewhere for the next section when we actually undervolt.
For reference:
To undervolt you want to INCREASE the hexadecimal values. for example from 0x18 (default P0 SviVid) to 0x19 is an undervolt of about .0125V, while going from 0x18 to 0x1A would be an undervolt of about .025V, so there's a reference for you.
We'll start with these values, which should be stable undervolts for just about anyone (but not everyone), go back a step or two if not:
P0's (1.6Ghz) SviVid: 0x1C (1.200V)
P1's (1.28Ghz) SviVid: 0x1E (1.176V)
P2's (800Mhz) SviVid: 0x3A (0.825V)
Step 3: Undervolting!
This step is easy.
1) Open a terminal. Now look at this command:
The #: that precedes each hex value represents the P-state you're modifying. To you guys who have done undervolting already, replace the hex values if you wantCode:sudo undervolt -p 0:0x1C -p 1:0x1E -p 2:0x3A![]()
2) Now that command I just showed you is the default undervolt I provided, so feel free to copy-paste into the terminal, you should get a message showing your old voltages and the new ones that you just undervolted to, twice, once for each processor.
Step 4: Applying Your Undervolts at Startup
1) Create a empty text file called undervolt.sh somewhere. Now type this in there, replace the hex values with your personal ones if you have already know stable voltages that worked for you in Windows:
Save the file.Code:#!/bin/bash sudo undervolt -p 0:0x1C -p 1:0x1E -p 2:0x3A
2) open a terminal (if it's not already open) and cd to the directory where you have your undervolt.sh file in. We're going to make this file executable now. Type this in the terminal:
3) Now we will move this file to a place where it can be started up at startup.Code:sudo chmod +x undervolt.sh
4) Actually starting up on startupCode:sudo mv undervolt.sh /etc/init.d
5) Okay, so you restarted in a hurry and you're voltages reset! Why??!! Well you should have waited a little longer, we have to make it so that the script can execute root commands without a password.Code:sudo update-rc.d undervolt.sh defaults
Add this line at the end of the file and save it, replacing "yourusergroup" with the group your profile was registered in when you installed (to check you can just check the properties of undervolt.sh and see what it says under Permissions->Group:Code:sudo visudo
6) Save if you haven't already and close the file. You can restart now and check if the voltages stick now by running the same undervolt command again when you restart, the voltages should be the same before and after the undervolt.Code:%yourusergroup ALL=NOPASSWD:/usr/bin/undervolt
Step 5: Applying Undervolts on Resume From Hibernate or Sleep
1) Type these commands in the terminal one by one:
Type this replacing hex values with your own:Code:sudo touch /etc/pm/sleep.d/undervolt.sh sudo chmod +x /etc/pm/sleep.d/undervolt.sh sudo nano /etc/pm/sleep.d/undervolt.sh
2) sleep, resume, and run undervolt again to make sure everything's good (I'd restart first just to make sure the changes are applied though it should be instantaneous).Code:#!/bin/bash case "$1" in thaw|resume) sudo undervolt -p 0:0x1C -p 1:0x1E -p 2:0x3A ;; *) ;; esac exit $?
Step 6: Adjusting Voltages
Go to Undervolting Basics for tips on actually calculating voltages. This section is about applying new undervolts. It's not hard at all, just edit /etc/init.d/undervolt.sh and /etc/pm/sleep.d/undervolt.sh and edit the hex values, then save and restart.
Now.....PROFIT!!!!!!!!!!!
-
-
Updated guide, a rather stupid error I made with the voltages being a little too low, would have just crashed the computer. Also triple-checked for consistency. NOW the guide is good to use
-
Nice work, I've linked to this thread in the first post of my X120e undervolting guide for W7
-
Hello,
I just found out what how much I can undervolt my E-350 running Brazostweaker under windows. I wanted to apply those settings to my ubuntu install, but there's no "configure" file in the "Undervolt" archive, so I'm stuck at the very beginning of this guide >_<.
Am I just plain stupid and missing something obvious, or what ?
Thanks for your help -
Sorry forgot to put a simple comment. If you didn't get any result from that command skip it
-
Thank you for the quick answer!
In fact, despite the thing with the configure file, I tried to go on with the tutorial, but I got some other problems along the way.
First, when I try to build the program :
undervolt.c: In function ‘main’:
undervolt.c:303:21: warning: passing argument 2 of ‘divtomsr’ from incompatible pointer type
undervolt.c:180:6: note: expected ‘int64_t *’ but argument is of type ‘long int *’
I guess I need to run on a 64bits OS, right ? I'm currently on Ubuntu 11.04 32bits with kernel 3 rc7 (cause on vanilla kernel my system froze a lot...). However, I plan to go to 11.10 64 bits when it comes out, so if the 32/64 bits is the problem here, it shouldn't arise later on.
Still, I tried to go on, but when I do "sudo undervolt -p 0:0x1C -p 1:0x1E -p 2:0x3A", I get this :
Seek to msr register: Success
Failed reading msr register. Is the msr module loaded?
I tried to download the msr tools from synaptic, and searched a bit on google too about my error message, but couldn't get to the bottom of it.
Any ideas ? It would be so plain wrong if I could only undervolt under Windows and not Linux...^^ -
The second sounds like you missed an instruction.
sudo modprobe msr
also you should add it to startup as well for easier use. -
Ok, I'll try on 11.10 64 when it comes out, and report back here.
As for msr, I did enter the command... I found a french forum (where Thierryg, the author of undervolt, seems quite active) where someone had the exact same problems as me a few weeks ago, so I asked over there too, but no answer yet.
edit: on another forum, the author of the program confirmed that the 32 bits OS is the culprit. -
Thanks for the guide, it's very clear and step-by-step.
Unfortunately for me, I think my chip is from the crappiest batch ever. As soon as I undervolt even slightly it hangs (even if I'm in the UEFI)! Oh well. -
Thank you for the really great and very well detailed guide!
I undervolted my 1215b netbook with e-450, used "undervolt -p 0:0x1D -p 1:0x28 -p 2:0x38" (not yet fully tested!). I used the BrazosTweaker on windows. After finding this, there are now less reasons to use windows!
One small step I think you didn't mention, to check the current states use "undervolt -c". But it only shows the currently active P-states. Is there other command to check all of them? And are there any "cpu-z" alike tools for linux? I would want to see if the volts are actually valid.
Also do you know is there a way to change the "div" the divider? In BrazosTweaker there was "multiplier divided by.." and the divider was able to be set. Undervolt shows the div of the p-states, would be great if it could also be changed!
Undervolting the Thinkpad x120e...in Linux! (rev 1)
Discussion in 'Lenovo' started by Metroid_III, Aug 5, 2011.