Quantcast Undervolting the Thinkpad x120e...in Linux! (rev 1)

+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Notebook Consultant
    Join Date
    Mar 2011
    Posts
    131
    Rep Power
    9

    Default Undervolting the Thinkpad x120e...in Linux! (rev 2)

    This thread is about undervolting the x120e's AMD E-350 processor in Linux This 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:

    Code:
    sudo ./configure
    sudo make
    sudo cp undervolt /usr/bin
    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).

    4) Now we need to load a module in order for this "undervolt" program to work.

    Code:
    sudo modprobe msr
    And to automate the above command at startup:

    Code:
    sudo nano /etc/modules
    write "msr" (without quotes) on a new line in this file and save (ctrl+x, y, enter).

    Step 2: Understanding The Undervolting Basics

    Undervolting in Linux requires a little more effort than Windows. Look at this formula:

    Code:
    1.550 - 0.0125 * SviVid
    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:

    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:

    Code:
    sudo undervolt -p 0:0x1C -p 1:0x1E -p 2:0x3A
    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 want

    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:

    Code:
    #!/bin/bash
    sudo undervolt -p 0:0x1C -p 1:0x1E -p 2:0x3A
    Save the file.

    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:

    Code:
    sudo chmod +x undervolt.sh
    3) Now we will move this file to a place where it can be started up at startup.

    Code:
    sudo mv undervolt.sh /etc/init.d
    4) Actually starting up on startup

    Code:
    sudo update-rc.d undervolt.sh defaults
    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 visudo
    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:
    %yourusergroup ALL=NOPASSWD:/usr/bin/undervolt
    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.

    Step 5: Applying Undervolts on Resume From Hibernate or Sleep

    1) Type these commands in the terminal one by one:

    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
    Type this replacing hex values with your own:

    Code:
    #!/bin/bash
    	case "$1" in 
    		thaw|resume)
    			sudo undervolt -p 0:0x1C -p 1:0x1E -p 2:0x3A
    			;;
    		*)
    			;;
    	esac
    	exit $?
    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).

    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!!!!!!!!!!!
    Last edited by Metroid_III; 18th September 2011 at 02:14 AM.
    Desktop: GA-MA74GM-S2H|Athlon X2 4200+ AM2|HD 3650|2GB DDR2|200GB HDD|Windows Vista Basic 32
    Laptop: Samsung 15" Chronos 2013|Intel i7-3635QM|8GB DDR3-1600 RAM|256GB SSD|Windows 8 64-bit
    ---
    Links: Mobile CPU Reference|Mobile GPU Reference

  2. #2
    Notebook Consultant
    Join Date
    Mar 2011
    Posts
    131
    Rep Power
    9

    Default Re: Undervolting the Thinkpad x120e...in Linux! (rev 1)

    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
    Last edited by Metroid_III; 7th August 2011 at 10:01 AM.
    Desktop: GA-MA74GM-S2H|Athlon X2 4200+ AM2|HD 3650|2GB DDR2|200GB HDD|Windows Vista Basic 32
    Laptop: Samsung 15" Chronos 2013|Intel i7-3635QM|8GB DDR3-1600 RAM|256GB SSD|Windows 8 64-bit
    ---
    Links: Mobile CPU Reference|Mobile GPU Reference

  3. #3
    Emodicon
    Join Date
    Nov 2008
    Posts
    8,001
    Rep Power
    53

    Default Re: Undervolting the Thinkpad x120e...in Linux! (rev 1)

    Nice work, I've linked to this thread in the first post of my X120e undervolting guide for W7

  4. #4
    Newbie
    Join Date
    Sep 2011
    Posts
    5
    Rep Power
    8

    Default Re: Undervolting the Thinkpad x120e...in Linux! (rev 1)

    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

  5. #5
    Notebook Consultant
    Join Date
    Mar 2011
    Posts
    131
    Rep Power
    9

    Default Re: Undervolting the Thinkpad x120e...in Linux! (rev 1)

    Sorry forgot to put a simple comment. If you didn't get any result from that command skip it :P
    Desktop: GA-MA74GM-S2H|Athlon X2 4200+ AM2|HD 3650|2GB DDR2|200GB HDD|Windows Vista Basic 32
    Laptop: Samsung 15" Chronos 2013|Intel i7-3635QM|8GB DDR3-1600 RAM|256GB SSD|Windows 8 64-bit
    ---
    Links: Mobile CPU Reference|Mobile GPU Reference

  6. #6
    Newbie
    Join Date
    Sep 2011
    Posts
    5
    Rep Power
    8

    Default Re: Undervolting the Thinkpad x120e...in Linux! (rev 1)

    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...^^
    Last edited by doshu; 18th September 2011 at 06:20 AM.

  7. #7
    Notebook Consultant
    Join Date
    Mar 2011
    Posts
    131
    Rep Power
    9

    Default Re: Undervolting the Thinkpad x120e...in Linux! (rev 1)

    Quote Originally Posted by doshu View Post
    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...^^
    That first issue is most likely because you're not on 64-bit Linux. Upgrade for that.

    The second sounds like you missed an instruction.

    sudo modprobe msr

    also you should add it to startup as well for easier use.
    Desktop: GA-MA74GM-S2H|Athlon X2 4200+ AM2|HD 3650|2GB DDR2|200GB HDD|Windows Vista Basic 32
    Laptop: Samsung 15" Chronos 2013|Intel i7-3635QM|8GB DDR3-1600 RAM|256GB SSD|Windows 8 64-bit
    ---
    Links: Mobile CPU Reference|Mobile GPU Reference

  8. #8
    Newbie
    Join Date
    Sep 2011
    Posts
    5
    Rep Power
    8

    Default Re: Undervolting the Thinkpad x120e...in Linux! (rev 1)

    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.
    Last edited by doshu; 21st September 2011 at 02:45 PM.

  9. #9
    Notebook Enthusiast
    Join Date
    Apr 2010
    Posts
    10
    Rep Power
    11

    Default Re: Undervolting the Thinkpad x120e...in Linux! (rev 1)

    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.

  10. #10
    Newbie
    Join Date
    Apr 2012
    Posts
    1
    Rep Power
    0

    Default Re: Undervolting the Thinkpad x120e...in Linux! (rev 1)

    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!

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -4. The time now is 05:14 PM.
Powered by vBulletin® Version 4.2.2
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
SEO by vBSEO 3.6.1