Page 1 of 2 12 LastLast
Results 1 to 25 of 42
  1. Thread Author  Thread Author    #1  

    Default [HOW-TO] Undervolt your way to 18+ hours per charge. (And overclock too!) 2.1 ONLY

    First off, I IN NO WAY TAKE CREDIT FOR THIS METHOD AND/OR FILES!! All the work put into this was done by Elkay at DroidForums.net. The original thread is located .
    As always NEITHER I NOR ELKAY ARE RESPONSIBLE FOR ANY HARM/LOSS OF DATA AS A RESULT OF THE FOLLOWING PROCEDURE. YOU MAY VOID YOUR WARRANTY. IT IS MEANT AS AN OPPORTUNITY TO DISCUSS THE POSSIBILITIES OF YOUR DEVICE AND YOU USE THE FOLLOWING METHOD AT YOUR OWN RISK!
    However, I have been undervolting/overclocking my phones for more than two years now and have done so without any problems.
    My reason for posting this is more as a guide to those who may be nervous about unleashing the real potential that their phones have. I have tried to make this as simple as possible. That being said, if anyone knows of a better method, by all means lets discuss it.

    Ok! On to the undervolting!

    1. Obtain the necessary files/programs:
    -It is very possible to accomplish the following with only adb shell or a terminal emulator. This is quite difficult however, and requires that one is familiar with command line (chmod, mounting, ect...), and as such is NOT RECOMMENDED for the average user (the target of this how-to).
    -Rather, with the help of root explorer, you can issue very simple terminal commands to undervolt/overclock. The Terminal and Root Explorer are here:

    -After initial overclock/undervolting is achieved, you may want to take advantage of the the ability to set your own scaling points with user defined voltages. This is optional, but recommended if you goal is to extend your battery. SetCPU is required to enable scaling. This can be found here:

    -Next comes the files necessary for the undervolting/overclock. Like I stated before, these were developed by Elkay at DroidForums.net. There are two zips necessary: DX OC Tools.zip and DX OC.zip. These are attached below.

    2. Place the files in the correct location and set permissions:
    -DX OC.zip contains two files: overclock.ko and overclock.sh
    -These two files can be moved onto the sdcard by mounting the card in usb mode, or by extracting within root explorer. Mounting is the easier method.
    -Once both files are on the sdcard, open root explorer and navigate to /sdcard.
    -Move overclock.ko to the folder /system/lib/modules by long pressing the the file and selecting move from the menu. Pressing move will give two buttons at the bottom of the screen, cancel and paste. Press the hard key BACK to return to / and navigate to /system/lib/modules. Press paste once there.
    -Now is time to set the permissions for the overclock.ko. First mount as R/W by pressing the button that says 'Mount R/W'. If not mounted correctly, Root Explorer will return an error saying the file system is read only. Once again long pressing the file and select permissions. Overclock.ko must have its permissions set to User R/W and Group/Others R (644). It will look like this:


    -Next, following the same method as described above, place the overclock.sh in the folder /system/bin. Permissions should be set at User R/W/E, Group/Others R/W (755), or like this:


    -The remaining two files (setclock.sh and setscaling.sh) from the DX OC Tools.zip should be placed in the same directory as overclock.sh and with the same permissions as overclock.sh (they are all scripts).

    3. Set the clock at the desired speed/voltage.
    -This is the fun part! But first some information. This is where you can get yourself into trouble if you are not careful. The idea here is to get the highest clock speed with the lowest voltage AND REMAIN STABLE. You don't have to overclock at all, really. Just setting the voltage to lower than stock will give you the battery benefits without the supposed danger to your device.
    -The overclock.sh script is et up so that the first value entered will be the clock speed IN HZ, NOT MHZ! i.e. 1150000 is 1150 mhz. The second value is a coefficient in an equation to determine voltage, known as vsel., e.g. 80 vsel is 1.6v, 96 vsel is 1.8v. The stock voltage on the X is 66 at 1 gHz.
    -The greater the clock speed you set your phone at, the greater the voltage necessary to maintain stability. Do NOT go above 96 vsel, or you could fry your phone. In fact, I wouldn't go much above the stock 66 at all, as I have tested my phone to be stable at 1.15 gHz and 46 vsel, which is well below stock (and the battery gains are by lowering the voltage anyway).
    -Open up terminal emulator, and run the following commands:
    Code:
    su
    overclock.sh <desired clock speed> <desired voltage>
    -It will look like this:

    -Congratulations... you are now overclock/undervolted! ...but we're not done yet.

    4. Fine tuning and scaling.
    -You might find that after entering a clock speed/voltage, that you phone becomes unresponsive or sluggish. No worries! That is what the setclock.sh script is for.
    -Once again open the terminal emulator and enter in the the command:
    Code:
    su
    setclock.sh <desired clock speed> <desired voltage>
    -This way you can change your voltage or clock speed to something a bit more stable with out the need to reboot.
    -Notice this is the same format as the overclock.sh, but if you have already entered in a command using overclock.sh since the last boot, you must use the setclock.sh command to change the clock speed/voltage.
    -Once you discover which setting you most like (i.e. at the speed you want and most stable), you can set up the scaling. This will further give you better battery life! This is optional, however, and your phone will run just fine without scaling.
    -Once agan open up root explorer and navigate to /system/bin. Make sure you are mounted R/W and long press the file setscaling.sh. Scroll down and select open in text editor. It will look like this:



    -Each of the values can be edited so that SetCPU can run your custom operating points.
    -The first two lines are the max voltage and max clock speed you want your phone at. The second set of commands are similar to those we have entered in using terminal emulator. Remember- not all values are in the same format! (Hz vs mHz) Maintain the correct number of digits to avoid problems.
    The last set of lines is for SetCPU, and are used as the operating point that it will scale to.
    -Set as desired.
    -After all the values are correctly set, press the menu button and hit Save and Exit.
    -Exit Root Explorer and open Terminal Emulator.
    -Run the command:
    Code:
    su
    setscaling.sh
    -There will be NO readout after the command.
    -To ensure that you values have been entered as desired, stay in Terminal Emulator and enter the following command:
    Code:
    su
    cat /proc/overclock/mpu_opps
    -It will look like this:



    -This will help ensure your desired values have taken effect, if you are concerned they haven't.
    -After all the values are to you liking, open SetCPU and behold the magic!!

    5. Important Notes!!!
    -If you phone locks up or reboots, DON'T WORRY!! These don't run on start-up, thus you phone is back to stock when it reboots.
    -A faster method of getting the undervolting back after a reboot is through a simple command:
    Code:
    su
    insmod /system/lib/modules/overclock.ko
    setscaling.sh
    -Once you open SetCPU after these commands, you'll be back to what it was before the reboot.
    -Some might say that undervolting hurts your CPU by increasing the amperage... IT DOESN'T! V=IR (Voltage=Current(in amps) x Resistance). We are adjusting the voltage, and the resistance of your processor remains the same no matter what. Thus I=V/R, i.e. current decreases by undervolting resulting in less power used and cooler temps. Everyone wins.
    -Feel free to mess around with your values, as long as your voltage is low. A high clock speed that can't be maintained by a chosen voltage will only result in a random reboot. No harm done.
    -I have found my phone incredibly stable (5 days and counting) at 1.1 gHz and 32 vsel. This works out to less than HALF the voltage of stock. My battery is awesome- for ex. I unplugged at 7am, and its 8pm here, my battery is at 70%.
    -This is currently only for 2.1, though Elkay has mentioned that his is working on a version for Froyo.
    -UPDATE: There is one known bug that I had forgotten about. If after running the cat /proc/overclock/mpu_opps command you notice that your voltage didn't stick, run the command setclock.sh <clock speed> <voltage> to fix it. Remeber though that the overclock module must already be loaded after boot for the setclock.sh command to work (the module is loaded either by the overclock.sh or the insmod /system/lib/modules/overclock.ko commands).

    Once again I take no credit for the method above, rather I just compiled what I saw as the useful information into one place.
    Attached Files Attached Files
    Last edited by El Poblano; 08-29-2010 at 03:26 PM. Reason: Update for Scaling
  2. #2  

    Default

    Dumb question... But why wouldn't it come undervolted?
  3. #3  

    Default

    Thanks for the great tutorial!
    My only problem was with the setscaling.sh step. When I verified it, it still had the default values. In root explorer, I see my file, named setscaling.sh, as well as another file named setscaling.sh.bak. Is that file overriding the scaling that I'm trying to do?
  4. #4  

    Default

    Excellent write up man! This needs to be a sticky!
    Samsung Galaxy Note 2 on Verizon
    Jelly Beans Build 16 - Perseus 36.3
  5. #5  
    jdbower's Avatar

    Posts
    750 Posts
    ROM
    CM9,Tablet Mode,Nova

    Default

    Quote Originally Posted by GTvert90 View Post
    Dumb question... But why wouldn't it come undervolted?
    Stock settings are a compromise between battery life, performance, and reliability. Increase one, and you sacrifice one or both of the other two. It's all about your own priorities around the phone - if battery life is the most important aspect go for it. If performance is what you want, I'd do with one of the overclocking threads. Personally, I'm glad to see threads like this one that allow you to make that choice - thanks!
    Galaxy Nexus (VZW)
    Motorola Droid X (WiFi)/Motorola Droid 2 Global (VZW)
    Motorola 9505A (Iridium)/HP Zeen (WiFi)
  6. Thread Author  Thread Author    #6  

    Default

    Quote Originally Posted by alosenster View Post
    Thanks for the great tutorial!
    My only problem was with the setscaling.sh step. When I verified it, it still had the default values. In root explorer, I see my file, named setscaling.sh, as well as another file named setscaling.sh.bak. Is that file overriding the scaling that I'm trying to do?
    Lol... after reading you post again, I think I answered the wrong thing.... However, the setscaling you are trying to edit is the one WITHOUT the .bak. Root Explorer automatically backs up any file you edit, so that after setting the values you want in the setscaling.sh, it will make a copy of what it was. Also, when it the text editor, make sure you press the menu button and save. That could be the reason why its not showing the correct values.
    EDIT!! So sorry for confusing you like this... I realized I forgot to put a step in the how to for scaling. After saving the values you have to return to terminal emulator and run the command setscaling.sh. I edited the howto to reflect this. Follow the steps again and let me know if it works.
    Last edited by El Poblano; 08-28-2010 at 02:16 PM. Reason: Wrong answer.... so I tried again!
  7. #7  

    Default

    Running the setscaling.sh command did the trick. Thanks again!
    I'm assuming the values in the tut are what you have running on your X. Those still working out well? I have mine set identically for now.
  8. #8  

    Default

    One more thing. You mentioned SetCPU in your post. If you've gone through your tutorial, do you still need SetCPU for anything?
  9. Thread Author  Thread Author    #9  

    Default

    Quote Originally Posted by alosenster View Post
    One more thing. You mentioned SetCPU in your post. If you've gone through your tutorial, do you still need SetCPU for anything?
    I should have clarified the scaling. While our method sets up the scaling points (or OPerating PointS (OPPS)), its up to SetCPU to set the MPU (microprocessor unit) at the defined speed. In otherwords, we define what we want SetCPU to do. Without this step SetCPU would auto detect the OPPS and you wouldn't be able to take advantage of clock/voltage adjustments you made. To sum it up, yes you need SetCPU. I'll edit the Howto to reflect this.
    Thanked by:
  10. #10  

    Default

    How does this affect performance?
  11. Thread Author  Thread Author    #11  

    Default

    Quote Originally Posted by UnicyclistRobe View Post
    How does this affect performance?
    There is a modest gain to performance if you choose to overclock. I have mine set at 1.1 ghz (which might not seem like much but that's still 10%) and generally score in the high 1300s to low 1400s on the quadrant. However the biggest gain is in battery life. Mine is undervolted to less than half stock, even with the overclock. I can't kill my battery in a single day unless I only stream pandora!
    Fission 1.1t4 X - Rooted Overclocked/Undervolted
    Thanked by:
  12. #12  

    Lightbulb

    Quote Originally Posted by El Poblano View Post
    There is a modest gain to performance if you choose to overclock. I have mine set at 1.1 ghz (which might not seem like much but that's still 10%) and generally score in the high 1300s to low 1400s on the quadrant. However the biggest gain is in battery life. Mine is undervolted to less than half stock, even with the overclock. I can't kill my battery in a single day unless I only stream pandora!
    So undervolting doesnt have any negative effect on performance?
    Well then what the heck! Why isn't everyone doing this?! :-)
    I will be seting this up as soon as i have free time. This sounds brilliant.
  13. Thread Author  Thread Author    #13  

    Default

    Quote Originally Posted by UnicyclistRobe View Post
    So undervolting doesnt have any negative effect on performance?
    Well then what the heck! Why isn't everyone doing this?! :-)
    I will be seting this up as soon as i have free time. This sounds brilliant.
    Nope, no negative impacts on your hardware from the undervolt. The reason manufacturers don't lower the voltage is due to stability. This is discussed more at length in the how to, but it basically boils down to this: while many chips can handle the lower voltage without issue, not all can. This is in fact entirely random even in the same batch of chips. My phone personally didn't like anything over 1.1 ghz unless I actually overvolted, but 1.1 runs just fine. However, others have had theirs up to 1.25 with a minimal undervolt.
    Fission 1.1t4 X - Rooted Overclocked/Undervolted
    Thanked by:
  14. #14  

    Default

    If I took the time to learn and do this.... Would it disappear and go back to stock once 2.2 was rolled out? Would it lock at the 1.1 and what ever I undervolt it to? Or would I still be able to change it?

    Thanks
  15. #15  
    thebizz's Avatar
    phone addict

    Posts
    3,449 Posts
    Global Posts
    3,578 Global Posts
    ROM
    mean

    Default

    Thx for editing the title because I've been following this on df and knew it didn't work on 2.2 kinda wished it did I want a slight overclock/undervolt
    Rooted for life
  16. Thread Author  Thread Author    #16  

    Default

    Quote Originally Posted by GTvert90 View Post
    If I took the time to learn and do this.... Would it disappear and go back to stock once 2.2 was rolled out? Would it lock at the 1.1 and what ever I undervolt it to? Or would I still be able to change it?

    Thanks
    So without getting in to too much linuxery, the overclock.ko is a kernel module that isn't loaded on bootup. So every time you restart your phone, it's back to stock. This includes going to 2.2- the files will be there, but not loaded. Note, however, that it is not compatible with 2.2. As for changing clock speed/voltage, you can change it as much and as often as you'd like in 2.1 using the command setclock.sh. This is discussed at length in the Howto.
    Fission 1.1t4 X - Rooted Overclocked/Undervolted
  17. #17  

    Default

    When I type
    overclock.sh 1100000 34
    into the terminal it spits out an error saying
    insmod: init_module '/system/lib/modules/overclock.ko' failed (Exec format error)

    Does anybody have an idea why that keeps happening?
    Bicycles, Skateboards, and Gadgets...
  18. #18  

    Default

    since this needs to be run every time you start the phone to get it setup correctly, has anyone tried using tasker to auto run the code?
  19. Thread Author  Thread Author    #19  

    Default

    Quote Originally Posted by thisisbenji View Post
    When I type
    overclock.sh 1100000 34
    into the terminal it spits out an error saying
    insmod: init_module '/system/lib/modules/overclock.ko' failed (Exec format error)

    Does anybody have an idea why that keeps happening?
    Are you running 2.2? I had this exact error when i first loaded the leak.
    Fission 1.1t4 X - Rooted Overclocked/Undervolted
  20. #20  

    Default

    Nope I'm running 2.1, I'm confused as to what I did wrong. I just got my phone yesterday, I wonder if that has anything to do with it? Are there different versions of 2.1?
    Bicycles, Skateboards, and Gadgets...
  21. Thread Author  Thread Author    #21  

    Default

    Quote Originally Posted by thisisbenji View Post
    Nope I'm running 2.1, I'm confused as to what I did wrong. I just got my phone yesterday, I wonder if that has anything to do with it? Are there different versions of 2.1?
    So the error means that the overclock script isn't interacting with the module correctly, or that the module isn't loaded (I believe). This could be a result of the permissions being set wrong, but I won't have an opportunity to check just yet. You might want to try replacing the the overclock.ko in the /system/lib/modules/ and the overclock.sh in the /system/bin/. Give that a whack and let everyone know if it changes. Also, has anyone else seen this?
    Fission 1.1t4 X - Rooted Overclocked/Undervolted
  22. #22  

    Default

    I recopied all of the files and it works now.

    One other question, after setting the scaling and opening SetCPU do I change anything in SetCPU?
    Bicycles, Skateboards, and Gadgets...
  23. #23  

    Default

    I only did the scaling part because Im just looking to improve my battery life. I followed all the steps (besides the oc. ones), put the files in the right places, with the right permissions, the insmod.. & scaling comands ran fine. Here is the part i dont understand.. in my scaling i set the points at 300, 500, 800, and 1000 Mhz. but when i open SetCPU, the points it lets me choose from are 300 600, etc.. shouldnt the 600 be a 500???
    whats wrong here? what didnt happen right? i feel like for some reason my phone isnt really UV. is there some easy way to check that it really is UV correctly?
  24. Thread Author  Thread Author    #24  

    Default

    Quote Originally Posted by orion11 View Post
    I only did the scaling part because Im just looking to improve my battery life. I followed all the steps (besides the oc. ones), put the files in the right places, with the right permissions, the insmod.. & scaling comands ran fine. Here is the part i dont understand.. in my scaling i set the points at 300, 500, 800, and 1000 Mhz. but when i open SetCPU, the points it lets me choose from are 300 600, etc.. shouldnt the 600 be a 500???
    whats wrong here? what didnt happen right? i feel like for some reason my phone isnt really UV. is there some easy way to check that it really is UV correctly?
    You can check the points (clock speed and voltage) that are currently set by running the command cat /proc/overclock/mpu_opps. Remember that you have to run the command setscaling.sh after editing the file to set the desired points. If you continue to have problems, please post the read out from the above command, as well as your setscaling.sh file.
    Fission 1.1t4 X - Rooted Overclocked/Undervolted
  25. #25  

    Default

    I just want to add my findings with this, as I just today flashed back to 2.1 and am going to sit on this for awhile and see how I like it.

    First impressions:

    1.1ghz @ 34vsel. Seem stable enough. Managed to browse the web, run multiple Linpack and Quadrants (btw, 8.8 Lin, 1370 Quadrant) and no crashes or restarts yet.

    Can't really comment on battery life as its been plugged in most of the time, but if its half the voltage, then battery life should be much improved. Will update in a couple days after I gather more intel.
    Samsung Galaxy Note 2 on Verizon
    Jelly Beans Build 16 - Perseus 36.3
Page 1 of 2 12 LastLast

Posting Permissions