Overclocking App available in the market!

Search This thread

damnoregonian

Senior Member
Jun 28, 2007
109
13
Seattle
on a side note,

as the kernel is entirely GPL, in the case that this program uses a kernel module built off of the kernel sources to do the switching (as i said, cpufreq is not enabled, so this is the only way i know of to do it, but i have not analyzed how his program works as i refuse to pay for this sort of thing) he would do well to follow the word of the license and release the source to said module.

it'd be a shame to be turned into a pariah for a dollar market app.

in the case that there is some userspace interface for setting the cpu frequency, ignore this.
 

ivanmmj

Retired Moderator
Jan 3, 2007
5,165
54
40
well... i don't mind providing basic procedure and source, i just don't want to get dragged into level 1 support of the procedure.

i'll go ahead and package up some source, prebuilt boot images based on JF's RC33 (which is what i run) and a basic procedure.

If you make the pre-build images, I will try to learn everything I can about it and attempt to provide as much level 1 support as possible. ^_^
 

andonnguyen

Senior Member
Nov 12, 2008
842
3
This program does its "work" by installing a script on your sdcard called ocx_tmp.sh, and runs it while modifying the value after echo to the desired cpu freq.

If you open up ocx_tmp.sh inside notepad, youll see this:

mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system ; mkdir /system/debugfs ; mount /system/debugfs /system/debugfs -t debugfs ; echo '528000000' > /system/debugfs/clk_rate/acpu_clk

I had a chat with someone well known in the forums and they stated that the current build of the android kernal does not handle cpu freq scaling well, and said:

once cupcake comes out, the .27 kernel contains a much better way to do it, it uses dynamic cpu frequency scaling, and you can set the minimum and maximum cpu frequencies. That will work even when you turn on/off the screen, but it's not persisted after a reboot, which isn't a big deal imo.
 
Last edited:

damnoregonian

Senior Member
Jun 28, 2007
109
13
Seattle
You guys do know that all this program does install a script on your sdcard called ocx_tmp.sh, and runs it while modifying the value after echo to the desired cpu freq.

If you open up ocx_tmp.sh inside notepad, youll see this:

I had a chat with someone well known in the forums and they stated that the current build of the android kernal does not handle cpu freq scaling well, and said:

the well known person is partially right.
the current build of the stock android kernel does not handle cpu frequency scaling at all. it's specifically disabled. instead they use hardcoded values at hardcoded points to do it.
however, with just a little tweaking you can modify those points and values until you have a reasonable battery life as well as better performance, which is how my kernel patches operate.
setting it via debugfs has several downfalls. first and foremost being that the idle loop clocks down to a specified frequency, and the jump between 528 and the idle frequency is large enough to require switch PLL circuits to accomodate. that's not a big deal, except that the clock frequencies change several times a second under normal operation and every time it switches PLL circuits and voltages this introduces latency and inefficiency. not good for business. i modified the idle loop to use the lowest frequency possible using the same PLL that 528mhz operates on to avoid this, which is why my neocore benchmarks are 27fps instead of 25. ya, it's only a 2fps increase, but given what's involved with rendering a frame, that's a lot less cycles in normal operation meaning less wasted battery.
 

damnoregonian

Senior Member
Jun 28, 2007
109
13
Seattle
This program does its "work" by installing a script on your sdcard called ocx_tmp.sh, and runs it while modifying the value after echo to the desired cpu freq.

If you open up ocx_tmp.sh inside notepad, youll see this:



I had a chat with someone well known in the forums and they stated that the current build of the android kernal does not handle cpu freq scaling well, and said:

also, dynamic scaling has been present in the kernel for ages. it's just may be enabled in the android .27 while disabled in the .25

it is however very easy to turn it on in .25 (just recompile with that option enabled). you will notice that performance takes a HUGE dive if the clock switches are not removed from the idle loop while dynamic scaling is enabled.
 

belding

Member
Jan 5, 2009
20
0
Can I just make that script and run it in the terminal with su?

"mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mkdir /system/debugfs
mount /system/debugfs /system/debugfs -t debugfs
echo '528000000' > /system/debugfs/clk_rate/acpu_clk"

would this be that same effect as the program, or is more needed?
 
Jun 15, 2007
1,091
9
Can I just make that script and run it in the terminal with su?

"mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mkdir /system/debugfs
mount /system/debugfs /system/debugfs -t debugfs
echo '528000000' > /system/debugfs/clk_rate/acpu_clk"

would this be that same effect as the program, or is more needed?

EDIT: hmm actually after trying this, it doesn't work... odd...

EDIT EDIT:After a little working at it I got it to almost work but get a permission denied when it tries to create /system/debugfs/clk_rate/acpu_clk... odd considering I'm superuser...
 
Last edited:

ex87

Retired Recognized Developer
Sep 9, 2008
89
49
36
Ventspils
EDIT: hmm actually after trying this, it doesn't work... odd...

You need to do it each time frequency changes (when phone goes to sleep for example). It could be possible to write script that can set this value for example each second. But then sleeping(power collapse) would not be possible.

About edit edit: You shouldn't create that file. Debugfs should have that file in place. Debugfs is virtual file system, it exists only in kernel. Don't think about those files like regular settings files :)
 
Last edited:

damnoregonian

Senior Member
Jun 28, 2007
109
13
Seattle
EDIT: hmm actually after trying this, it doesn't work... odd...

EDIT EDIT:After a little working at it I got it to almost work but get a permission denied when it tries to create /system/debugfs/clk_rate/acpu_clk... odd considering I'm superuser...

works fine for me if i do that all manually...
you doing it as root?

lol, nm you edited it and answered that question as i posted
 
Jun 15, 2007
1,091
9
works fine for me if i do that all manually...
you doing it as root?

lol, nm you edited it and answered that question as i posted

hmm you got it to work manually? mind posting your steps? Also what tool(s) did you use for it? I'm using terminal emulator and have to run everything through busybox which is why it didn't work at all initially. What I tried is:

busybox mount -o remount,rw yaffs2 /dev/block/mtdblock3 /system
mkdir /system/debugfs
busybox mount /system/debugfs /system/debugfs -t debugfs
echo '528000000' > /system/debugfs/clk_rate/acpu_clk

and it gives a no permission error in the last step when run as superuser from terminal emulator.
 

ivanmmj

Retired Moderator
Jan 3, 2007
5,165
54
40
hmm you got it to work manually? mind posting your steps? Also what tool(s) did you use for it? I'm using terminal emulator and have to run everything through busybox which is why it didn't work at all initially. What I tried is:

busybox mount -o remount,rw yaffs2 /dev/block/mtdblock3 /system
mkdir /system/debugfs
busybox mount /system/debugfs /system/debugfs -t debugfs
echo '528000000' > /system/debugfs/clk_rate/acpu_clk

and it gives a no permission error in the last step when run as superuser from terminal emulator.

Type in "su" first then enter.
Wait for it to ask if you want to allow access. Then try it all in one line like that one script.
 

damnoregonian

Senior Member
Jun 28, 2007
109
13
Seattle
hmm you got it to work manually? mind posting your steps? Also what tool(s) did you use for it? I'm using terminal emulator and have to run everything through busybox which is why it didn't work at all initially. What I tried is:

busybox mount -o remount,rw yaffs2 /dev/block/mtdblock3 /system
mkdir /system/debugfs
busybox mount /system/debugfs /system/debugfs -t debugfs
echo '528000000' > /system/debugfs/clk_rate/acpu_clk

and it gives a no permission error in the last step when run as superuser from terminal emulator.

# busybox sh
/ # mount -o rw,remount /system
/ # mkdir /system/debugfs
/ # mount -t debugfs debugfs /system/debugfs
/ # cat /system/debugfs/clk_rate/acpu_clk
245760000
/ # cat /system/debugfs/clk_rate/acpu_clk
384000000
/ # echo '528000000' > /system/debugfs/clk_rate/acpu_clk
/ # cat /system/debugfs/clk_rate/acpu_clk
528000000
/ # cat /proc/cpuinfo
Processor : ARMv6-compatible processor rev 2 (v6l)
BogoMIPS : 527.15
Features : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture: 6TEJ
CPU variant : 0x1
CPU part : 0xb36
CPU revision : 2
Cache type : write-back
Cache clean : cp15 c7 ops
Cache lockdown : format C
Cache format : Harvard
I size : 32768
I assoc : 4
I line length : 32
I sets : 256
D size : 32768
D assoc : 4
D line length : 32
D sets : 256

Hardware : trout
Revision : 0080
Serial : 0000000000000000
 

ivanmmj

Retired Moderator
Jan 3, 2007
5,165
54
40
ya... I did that... that's why I said I ran it as superuser.

I didn't notice that.

Either way, typing the following worked just fine with me.

Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system ; mkdir /system/debugfs ; mount /system/debugfs /system/debugfs -t debugfs ; echo '528000000' > /system/debugfs/clk_rate/acpu_clk

All in one line. Not sure why it gave you an error.
 

Manacit

Senior Member
Jan 16, 2009
184
8
Seattle
I didn't notice that.

Either way, typing the following worked just fine with me.

Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system ; mkdir /system/debugfs ; mount /system/debugfs /system/debugfs -t debugfs ; echo '528000000' > /system/debugfs/clk_rate/acpu_clk

All in one line. Not sure why it gave you an error.

That worked for me:
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system ; mkdir /system/debugfs ; mount /system/debugfs /system/debugfs -t debugfs ; echo '528000000' > /system /debugfs/clk_rate/acpu_clk
# cat /proc/cpuinfo
Processor : ARMv6-compatible processor rev 2 (v6l)
BogoMIPS : 527.15
Features : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture: 6TEJ
CPU variant : 0x1
CPU part : 0xb36
CPU revision : 2
Cache type : write-back
Cache clean : cp15 c7 ops
Cache lockdown : format C
Cache format : Harvard
I size : 32768
I assoc : 4
I line length : 32
I sets : 256
D size : 32768
D assoc : 4
D line length : 32
D sets : 256

Hardware : trout
Revision : 0080
Serial : 0000000000000000
#
 

wilsonmui

Member
Jul 13, 2007
16
0
That worked for me:
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system ; mkdir /system/debugfs ; mount /system/debugfs /system/debugfs -t debugfs ; echo '528000000' > /system /debugfs/clk_rate/acpu_clk
# cat /proc/cpuinfo
Processor : ARMv6-compatible processor rev 2 (v6l)
BogoMIPS : 527.15
Features : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture: 6TEJ
CPU variant : 0x1
CPU part : 0xb36
CPU revision : 2
Cache type : write-back
Cache clean : cp15 c7 ops
Cache lockdown : format C
Cache format : Harvard
I size : 32768
I assoc : 4
I line length : 32
I sets : 256
D size : 32768
D assoc : 4
D line length : 32
D sets : 256

Hardware : trout
Revision : 0080
Serial : 0000000000000000
#

:D:D:D
thx a lot and that work fine for me too !!!
OH ...but i reboot and i try it again, it won't work.

mount: mounting /system/debugfs on /system/debugfs failed: Device or resource busy

and

echo '528000000' > /system /debugfs/clk_rate/acpu_clk
cannot create /system: is a directory
 
Last edited:

mrfrenchfry

Senior Member
Jan 2, 2009
117
0
[UPDATE]
Incase you didnt see my sig, im not running on a ADP1 phone, so that might by why the fastest setting doesnt work for me, but so far 384MHz is making a noticeable difference with NEOCORE and SWEETER HOME
Hmm thats weird i have the same build as you and the 528 or w/e works for me. No lag at all on pokemon red now! A little on yellow =/.

Oh and how does this 'harm' your phone?
 

n19htmare

Senior Member
Sep 27, 2007
484
116
I don't understand where the overclocking comes in...from the specs the default processor is Qualcomm MSM7201A, 528 MHz.