[How-To] Overclock/Undervolt Your X in the Big 2.2

El Poblano

Well-known member
Jul 31, 2010
139
14
0
Visit site
First off, I IN NO WAY TAKE CREDIT FOR THIS METHOD AND/OR FILES!! The hack is a compilation of work put in by Mirage for the original hack on the Milestone, nadlabak for adding support for 2.2, and FreeWELL at AndroidForums for the port to the X. The original thread is located here.
As always NEITHER I NOR FreeWELL NOR ANYONE ELSE 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 three 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.

Older users of the X might recognize that the method is largely unchanged from 2.1 to 2.2. There are, however a few VERY important differences that require attention. Thus, please read the WHOLE How-To unless you are very comfortable with the inner workings of your phone.

Ok! On to the undervolting!

INDEX
1. Obtain the necessary files/programs.
2. Place files/set permissions.
3. Set clock speed/voltage/scaling.
4. Important notes.
5. Set on Boot. DANGER! (Due to character limits this section is in a separate post further down this page.)

1. Obtain the necessary files/programs:
- It is very possible to accomplish the following with only adb shell or a terminal emulator. This can be 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:
terminalp.png
rootexplorer.png

- 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, and requires almost no extra effort. SetCPU is required to enable scaling. This can be found here:
setcpu.png

- Next comes the files necessary for the undervolting/overclock. Like I stated before, these were developed by FreeWELL at AndroidForums.com. There is only one zip necessary: droidx_22_oc.zip. This is attached below.

2. Place the files in the correct location and set permissions:
- droidx_22_oc.zip contains two files we need: overclock.ko and setscaling.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:

overclockug.jpg


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



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 clock speed values to be entered WILL VARY IN FORMAT from from Hz to kHz! 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.1 gHz and 48 vsel, which is well below stock (and the battery gains are by lowering the voltage anyway).
- Open Root Explorer and navigate to setscaling.sh that you already placed (/system/xbin).
- Mount the system as R/W.
- Long press setscaling.sh and scroll down to Open in Text Editor.
- It will look like this:

setscalinginfo.jpg


- 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 used to set sclock speed and voltage points. 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.
- Open up terminal emulator, and run the following commands:
Code:
su
insmod /system/lib/modules/overclock.ko
setscaling.sh

- As a note, every time you reboot, you must enter this set of commands to achieve overclocking/undervolting. Yes, you phone returns to stock on reboot.
- Congratulations... you are now overclock/undervolted! ...but we're not done yet.

- 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: (yes, I did enter the command wrong the first time... stupid big thumbs...)

mpuz.jpg


- This, amongst other things, will show both the stock (vseld) and the applied (vsel) voltages and and the applied clock speeds.
- Open SetCPU and behold the magic!

4. 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.
- 'Turtle Mode' - Each phone has different tolerances due to small differences physically (making the chips isn't always a !00% duplicate). Sometimes your phone will REALLY dislike a clock speed/vsel combination and will slow WAY down (hence turtle mode). All this means is that the combo is outside of your phones tolerance. Don't worry! Just reboot and try a new combination: e.g. my phone wouldn't stick at all at 1.2 gHz no matter the vsel, but I can run it just fine at 1.25 and 59 vsel:
setcpu.jpg
quadp.jpg

- 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.
- Thus far 2.2 seems MUCH more sensitive to changes in voltage. Here are a list of lowest semi-stable (I say semi due to lack of time testing) clock/voltage pairs I have found:
300/27
600/30
900/44
1100/48
1150/52
1250/59
- As all who have read the main thread now, there is a file included (install-recovery.sh) to apply the hack at boot. As I have not had enough time to verify stable values, I have decided to refrain from adding this step to the how-to. This will be added later when at least a few days without issues is achieved. If know how to fix this if there is a problem, you probably don't need this tutorial anyway! =)
- One note, I'm not sure if I just haven't had good luck, but every time I have tried to adjust setscaling.sh after having run the command, my phone has locked up. I think the only way to adjust the values AFTER entering the command is to reboot and then edit setscaling.sh in root explorer.
- I'm sure that this How-To will evolve as more experienced is gained, but please feel free to add any comments- they help us all out!


Once again I take no credit for the method above, rather I just compiled what I saw as the useful information into one place.
 
Last edited:

GTvert90

Well-known member
Jun 26, 2010
673
2
18
Visit site
Can You possibly post a guide or find one that breaks it down more using the computer? The one on android forums isn't cutting it for me.

Until I find something better Ill give it a shot on the phone like you've laid out. Very much appreciative. Very easy to understand :)
 

GTvert90

Well-known member
Jun 26, 2010
673
2
18
Visit site
wasn't bad at all doing it on my phone.

I went to a max of 1.1 at stock voltage of 56 while 1615 quadrant 15 linpack stress testing it now.
 

quic

Well-known member
Dec 29, 2009
73
1
0
Visit site
followed this exactly and if anything it seems to have slowed down my phone to a almost non stop lag. and that was with basic values like 56 vsel and 1.1gHz. But thanks for the tutorial. i guess i'll just wait till someone simplifies the entire process into a one step sort of deal... maybe that will help me.
 

El Poblano

Well-known member
Jul 31, 2010
139
14
0
Visit site
followed this exactly and if anything it seems to have slowed down my phone to a almost non stop lag. and that was with basic values like 56 vsel and 1.1gHz. But thanks for the tutorial. i guess i'll just wait till someone simplifies the entire process into a one step sort of deal... maybe that will help me.

Ahhh yes... the mysterious 'turtle mode'. I forgot to address this anomaly. So as we all know, each chip has very minute physical differences, which give each chip distinct tolerances. Just as an example, while testing yesterday, I couldn't get my phone to stick at ANY vsel @ 1.2 gHz. However, 1.25 gHz runs just fine at 59.
Moral of the story, the occurrence is well known and doesn't signify that your device or the method doesn't work; just perform a battery pull and try a new set up! I'll edit the How To to address this, and let me know if this works.
 

quic

Well-known member
Dec 29, 2009
73
1
0
Visit site
ok i'll try some other values a little later and check back with you to let you know what happened. Thanks again for the tutorial.
 

GTvert90

Well-known member
Jun 26, 2010
673
2
18
Visit site
Is there a theory or method to deciding which way to go.

I was at 1.1 with stock vsel.

now I'm up to 1.3 it seems not a whole lot different when going threw menus and browser ect. But I'm getting extreamly low benchmarks. Like 5xx quadrant and 5.xx linpack. Not that numbers mean much. but makes me wonder.

So where do I go do I try lowering clock a little? Do I add 2 voltages? do I reduce voltage?

Ill start back at 1.1 then should I creep up? go to 1.15 with the same voltage? then if that works creep up again. If it doesn't work go to 1.15 with +2 or 3 volts?
 

El Poblano

Well-known member
Jul 31, 2010
139
14
0
Visit site
Ha... So I passed the character limit for a post, but I have an addition to make:
5. Set on Boot. DANGER!!
- After being stable without any random reboots/kernel panics, I have played around with the install-recovery.sh function, or the set on boot.
- The method described in the original thread replaces the system's standard install-recovery.sh with a modified one. The modified file contains only three lines of code (two of which we run in terminal emulator, i.e. insmod, setscaling.....).
- The stock file, however, contains other code.
- The method I used was to add in the lines of code I wanted without replacing the stock.
- This is done by navigating to /system/etc in Root Explorer and opening the file install-recovery.sh in text editor.
- Place the two new lines of code (insmod /system/lib/modules/overclock.ko setscaling.sh) directly after the first line of code.
- It will look like this:
recoveryy.jpg

- Your phone will now load the hack on boot, removing the requirement to run the commands in terminal emulator after each reboot.
- If you prematurely decide to set your overclock on boot without verifying stability, you open the possibility to bricking your phone!! You MUST test your value before setting in on boot.
- If you decide to adjust your values after setting the hack on boot, you MUST remove the two lines from install-recovery.sh. Failure to due so may again result in your phone becoming unstable, ad bricking.
 
Last edited:
  • Like
Reactions: JkdJedi

GTvert90

Well-known member
Jun 26, 2010
673
2
18
Visit site
Is there a theory or method to deciding which way to go.

I was at 1.1 with stock vsel.

now I'm up to 1.3 it seems not a whole lot different when going threw menus and browser ect. But I'm getting extreamly low benchmarks. Like 5xx quadrant and 5.xx linpack. Not that numbers mean much. but makes me wonder.

So where do I go do I try lowering clock a little? Do I add 2 voltages? do I reduce voltage?

Ill start back at 1.1 then should I creep up? go to 1.15 with the same voltage? then if that works creep up again. If it doesn't work go to 1.15 with +2 or 3 volts?
upon looking into it more. I think my phone went in to turtle mode as I had a few type-o's. LOL

carry on.
 

JkdJedi

Well-known member
Aug 20, 2010
2,197
218
0
Visit site
So i'm getting ready to jump into this soon, was wondering though on the difference between setscaling.sh and setscaling100.sh. im asking because beesleys overclock from RomManager landed in setscaling100.sh. I probably did this prematurely.

Sent from my DROIDX using Tapatalk
 

DaRkL3AD3R

Well-known member
Jul 17, 2010
1,060
24
0
Visit site
Well I ran the mod, all the stock frequencies in setscaling100.sh.

Must say, seeing some nice gains in performance. Hit 15.445 on my first run of Linpack. Haven't done a Quadrant yet, but truthfully I don't think I care to.

Also, PSX4Droid saw some nice improvements in speed. Final Fantasy VII runs noticeably faster. I am quite content. And as far as I can tell I'm running the same voltage at 1.1ghz as I was 1ghz, so there should be no harm done.

I'm not quite so sure how to mess with the setscaling.sh file, as when I tried to mess with it it just screwed up at run-time. Said something about no directories and what not. Anyways if you guys find something higher than 1100 thats stable and worth the increase due to performance gains, post it up. I'd like to push for 1200 but I am skeptical. This chip seems like it was already pushed to its furthest safe point when they put it out at 1ghz =/
 

El Poblano

Well-known member
Jul 31, 2010
139
14
0
Visit site
So i'm getting ready to jump into this soon, was wondering though on the difference between setscaling.sh and setscaling100.sh. im asking because beesleys overclock from RomManager landed in setscaling100.sh. I probably did this prematurely.

Sent from my DROIDX using Tapatalk

setscaling100.sh is just a pre-customized setscaling.sh that has been renamed. There will be issues with setting one boot and terminal commands if you use setscaling100 rather than the standard one.
 

Bald Steve

Well-known member
Jun 29, 2010
259
24
0
Visit site
I just followed El Poblano's how-to instructions to the letter (weird note: had to switch to multi-touch from my beloved swype, as you cannot backspace in Emulator with swype...and I make a LOT of typos in there) and used the settings he tested:

1250000 @ 59
900000 @ 44
600000 @ 38
300000 @ 27

After an hour it's been smooth and stable. I'll follow up later this evening to report smooth sailing or any reboots/turtle-mode occurrances.

This morning: 1396 Quadrant
After Overclock: 1672 Quadrant
Linpack after overclock: 16.545 (sorry - forgot to run pre-overclock)
EDIT: Last linpack 17.207

The phone is noticably faster now. Folders and apps snap open instantly. This is super cool.

Huge thanks to El Poblano for taking the time to post this and run the tests!!!

Edit 2: Ran a 15 minute stress test in SetCPU and got zero errors.
 
Last edited:

doctorlove316

Retired Moderator
Jun 23, 2010
1,145
25
0
Visit site
Well I ran the mod, all the stock frequencies in setscaling100.sh.

Must say, seeing some nice gains in performance. Hit 15.445 on my first run of Linpack. Haven't done a Quadrant yet, but truthfully I don't think I care to.

Also, PSX4Droid saw some nice improvements in speed. Final Fantasy VII runs noticeably faster. I am quite content. And as far as I can tell I'm running the same voltage at 1.1ghz as I was 1ghz, so there should be no harm done.

I'm not quite so sure how to mess with the setscaling.sh file, as when I tried to mess with it it just screwed up at run-time. Said something about no directories and what not. Anyways if you guys find something higher than 1100 thats stable and worth the increase due to performance gains, post it up. I'd like to push for 1200 but I am skeptical. This chip seems like it was already pushed to its furthest safe point when they put it out at 1ghz =/

I can't get anything to work above 1.1 for some reason, no matter what I do. Anything higher will send the device in to ultra slow-mo and I'll have to do a battery pull or execute my gscript to cancel overclocking.

I wouldn't worry about 1.2 when some people are getting stable with 1.38 and 1.4 :eek:
 

JkdJedi

Well-known member
Aug 20, 2010
2,197
218
0
Visit site
Overclocked Baby!

Thanks Pablo!

Followed PABLOS instructions and yes Beesleys cheat sheet (Rom Manager) made it easier to jump into an overclock of 1.38! Gonna stress test this. thanks!
CAP201010201901.jpg
CAP201010201908.jpg


first crash I get, I'm gonna follow Pablos lead and try the overclock/undervolt thing. 1.25?59?
 
Last edited:

doctorlove316

Retired Moderator
Jun 23, 2010
1,145
25
0
Visit site
what is the "cheatsheet" i downloaded it and i cant find it on my phone. Could u post the values?

If you downloaded it through ROM Manager, it's there. Just go back into ROM Manager and try to download it again. It fill find the file and then go through the install process. Obviously, no need to wipe and backup if you want/need to.

It's not really a cheatsheet, it's a update.zip that has the files to overclock to 1.38 (I believe) and puts them in the necessary folders with the correct permissions.
 

Forum statistics

Threads
942,995
Messages
6,916,799
Members
3,158,766
Latest member
be1digital