• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [RESEARCH] Overclocking and Performance

imfm

Well-Known Member
I think it would be helpful to compile whatever information/resources we can find on enabling overclocking. I finally found something that looks promising, so I will start it off.

How to overclock OMAP devices
This post notes that there some files which appear to directly dictate max cpu speeds. Specifically these are:
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
Of course, these are both currently set at 1000000 on our phones. I tried to alter these in root explorer, but the changes do not save. I also tried in a terminal using the following commands:
sudo echo 600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
-error: sudo not found
echo 600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
-error: cannot create /sys/.../scaling_max_freq: directory nonexistent

It is my understanding that changing the clock speed would also require changing the voltage. Luckily, compatible voltages have already been found on the Optimus Black:
https://docs.google.com/spreadsheet...DMxVUlNcGhkNmJocDhOZFdYaDNQTEE&hl=en_US#gid=0

Unless someone knows of a clever workaround, I think we will have to alter the kernel source and then compile it. And, unless I'm missing something, the process should be to change the CPU frequency values in those files and find where the voltage settings are stored, then recompile and flash the new kernel like so (although these instructions are for the motodroid so there will be some differences in the process):
How to compile your own kernel.

Any thoughts? Anyone find anything else that might be useful?

Also, has anyone found anything that might help us figure out what the deal is the USB plug-in performance boost?
 
Ugh! I've been trying to wrap my head around an approach to developing an overclock kernel, but this stuff is still way over my head. I did find something which looks quite promising though. There is an open-source project on code.google.com which appears to be capable of enabling overclock WITHOUT the need to flash a custom kernel. It doesn't work with our phones yet, but it is developed for our processor and I've submitted a request for the devs over there to take a look. If any of you experienced android devs want to give it a shot, I would imagine that tweaking the code to work with our phone wouldn't be impossible:

milestone-overclock - Overclocking your rooted Motorola Milestone, Droid, Droid X/2 and others! - Google Project Hosting
 
Ugh! I've been trying to wrap my head around an approach to developing an overclock kernel, but this stuff is still way over my head. I did find something which looks quite promising though. There is an open-source project on code.google.com which appears to be capable of enabling overclock WITHOUT the need to flash a custom kernel. It doesn't work with our phones yet, but it is developed for our processor and I've submitted a request for the devs over there to take a look. If any of you experienced android devs want to give it a shot, I would imagine that tweaking the code to work with our phone wouldn't be impossible:

milestone-overclock - Overclocking your rooted Motorola Milestone, Droid, Droid X/2 and others! - Google Project Hosting
The DX etc can be oc'd by use of a custom module used by apps like Android Overclock and Quick Overclock. ;)
 
So then ur indicating there should be a way to over clock without flahig a modified kernel
Well the module is more for devices with locked bootloaders which lg doesnt have. SO there is no reason why someone cant do a custom kernel since the src is available. I've just not had time to work on it n figure how to add oc to omap.
 
Well the module is more for devices with locked bootloaders which lg doesnt have. SO there is no reason why someone cant do a custom kernel since the src is available. I've just not had time to work on it n figure how to add oc to omap.

Well, some benefits of using a script/module as opposed to kernel are that its safer, easier to install, and can be used with any kernel (including stock).

At any rate, a custom kernel would probably be a little easier to develop. From what I can gather, overclocking OMAP is pretty straightforward. We just need to locate where the frequency table is defined and change the clock speeds and voltages. We already have the appropriate combos in the spreadsheet I posted above. On the Motorola Milestone, the frequency table is defined as follows:

The values of the available frequencies are shown in /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies. This sysfs entry is defined by struct freq_attr cpufreq_freq_attr_scaling_available_freqs in drivers/cpufreq/freq_table.c, which defines show_available_freqs as the function that ends up writing the file. The code is simple, it gets a frequency table specific to the cpu being queried (in our case there's only one of course) and proceeds to iterate over it, writing its values to a buffer. So, change the table, and the file will be changed accordingly.

Read more here:
SmashingTheAndroidKernel - milestone-overclock - Smashing the Android Kernel for Fun and Overclock - Overclocking your rooted Motorola Milestone, Droid, Droid X/2 and others! - Google Project Hosting
 
OK, I have successfully modified the ZVC kernel source code to overclock the Marquee to 1.2GHz. I wasn't able to "add" 1.2GHz as another scalable frequency ; instead I replaced the 1GHz entry with 1.2GHz and updated several tables in the Marquee "sniper" BSP. Additionally, I defaulted the governor to "ondemand" in an attempt to get the phone to use the full range of frequencies for battery saving purpose, instead of running at 1.2GHz all the times; you can change that governor behavior with SetCpu. I have asked Blooddawn for permission to use the ramdisk in his Hyper 0.2 kernel update; if he lets me, I'll upload it later. The ramdisk I'm posting here is just the stock ZVC ramdisk along with my OCed kernel.

Operating frequencies:
  • 300MHz
  • 600MHz
  • 800MHz
  • 1200MHz

Attached is the ZVC Overclocked 1.2GHz update. Prerequisites are the usual:
  • Rooted
  • CWM installed
  • ZVC-based ROM

Instructions
  1. Download and copy zip file to sdcard
  2. Boot into CWM
  3. Make a nandroid backup (highly recommended in case you have to recover)
  4. Install from zip file on sdcard
  5. Choose zip from sdcard
  6. Flash
  7. Reboot
  8. Download SetCpu from market and configure whichever way you like it; I set the governor to "ondemand" by default so I think it will throttle the speeds from low (300MHz) to high (1200MHz) depending on the load

WARNINGS: as usual, I'm not responsible for damaging your phone; overclocking can damage the OMAP processor on the phone. This is an experimental kernel so use with caution; I have run this kernel on my phone for 7 hours without issues.

NOTE: I know some kernel stuff but am not a kernel expert by any means; this is more of a "hacking" effort. I'm pretty sure PlayfulGod and Bloodawn (and asadullah) are hard at work with their kernel. In the meantime, this is for those who want to try it out. Enjoy!!!

Performance notes: I usually get 2000-2050 on AnTuTu benchmark; when OCed to 1200MHz, I get 2260, a nice 200 points increase. If using the USB to PC cable connection trick, I get 2827!!!

Great work! I'm testing it now. So far its working flawlessly.
 
Great work! I'm testing it now. So far its working flawlessly.

Thanks. Not sure if this greatly reduces battery life, but it's definitely snappier.

I will see if i can find out about the USB trick and emulate it.
 
Back
Top Bottom