yashsingh1/xdaforums huggingface dataset:
[Hero, G2 Touch Android Development] dipje:
As stated before, you are one of the lucky owners with a newer / better Hero. You can do lower than 300mhz and higher as 700mhz... I can't for example, I have to choose between 300mhz and 690mhz, otherwise it reboots or just stalls completely.

About the whole BFS talk a few page(s) back: I just did a 34.2fps run on Neocore, with 'only' 690mhz. I couldn't get past 31fps before BFS + Compcache. Who knows, maybe they do help a bit.
[Hero, G2 Touch Android Development] jell:
as for BFS - realy strange...
[Hero, G2 Touch Android Development] behnaam:
Updated, check first post, for changelog, look at commits in github!
[Hero, G2 Touch Android Development] dipje:
Looking from the commits, you added changes to the freq-table, but later undone them again. Why?

Is there something wrong with what I did for example: Remove the 'useless' 537mhz, and use the slot to add a 352mhz. That way I don't completely restructure the freq-table, but add a nice one between 245mhz and 480mhz.

And oowwwww, a shiny experimental branch :)

And addition:

- You removed perflock a while back. what is the difference between the normal (I take it) perflock frequencies and the way we do it now?

- For example, I now use 691/691 (min/max) when screen on, and 352/352 when screen off, using OC-Widget. Can't I just turn the perflock lines back in the .config with these frequencies and don't bother with the widget?
[Hero, G2 Touch Android Development] kendong2:
why wouldn't one just use all the available frequencies? i build a kernel with that, it switches to all clocks nice (up to 710, that is where mine freezes, got successful reports with 730 though) and seems pretty stable:

{ 19200, ACPU_PLL_TCXO, 0, 0, 19200, 0, VDD_0, 30720, 0, 0, 4 },
{ 122880, ACPU_PLL_0, 4, 1, 61440, 1, VDD_3, 61440, 0, 0, 4 },
{ 160000, ACPU_PLL_1, 1, 5, 53333, 2, VDD_3, 61440, 0, 0, 6 },
{ 176000, ACPU_PLL_2, 2, 5, 88000, 1, VDD_3, 61440, 0, 0, 5 },
{ 245760, ACPU_PLL_0, 4, 0, 81920, 2, VDD_4, 61440, 0, 0, 5 },
{ 352000, ACPU_PLL_2, 2, 2, 88000, 3, VDD_5, 128000, 0, 3, 7 },
{ 480000, ACPU_PLL_1, 1, 1, 120000, 3, VDD_6, 120000, 0, 2, -1 },
{ 518400, ACPU_PLL_2, 2, 1, 132000, 3, VDD_7, 160000, 0, 5, -1, 0x1a },
{ 537600, ACPU_PLL_2, 2, 1, 132000, 3, VDD_7, 160000, 0, 5, -1, 0x1b },
{ 556800, ACPU_PLL_2, 2, 1, 132000, 3, VDD_7, 160000, 0, 5, -1, 0x1c },
{ 576000, ACPU_PLL_2, 2, 1, 132000, 3, VDD_7, 160000, 0, 5, -1, 0x1d },
{ 595200, ACPU_PLL_2, 2, 1, 132000, 3, VDD_7, 160000, 0, 5, -1, 0x1e },
{ 614400, ACPU_PLL_2, 2, 1, 132000, 3, VDD_7, 160000, 0, 5, -1, 0x20 },
{ 633600, ACPU_PLL_2, 2, 1, 132000, 3, VDD_7, 160000, 0, 5, -1, 0x21 },
{ 652800, ACPU_PLL_2, 2, 1, 132000, 3, VDD_7, 160000, 0, 5, -1, 0x22 },
{ 672000, ACPU_PLL_2, 2, 1, 132000, 3, VDD_7, 160000, 0, 5, -1, 0x23 },
{ 691200, ACPU_PLL_2, 2, 1, 132000, 3, VDD_7, 160000, 0, 5, -1, 0x24 },
{ 710400, ACPU_PLL_2, 2, 1, 132000, 3, VDD_7, 160000, 0, 5, -1, 0x25 },
{ 729600, ACPU_PLL_2, 2, 1, 132000, 3, VDD_7, 160000, 0, 5, -1, 0x26 },
{ 748800, ACPU_PLL_2, 2, 1, 132000, 3, VDD_7, 160000, 0, 5, -1, 0x27 },
{ 768000, ACPU_PLL_2, 2, 1, 132000, 3, VDD_7, 160000, 0, 5, -1, 0x28 },
{ 787200, ACPU_PLL_2, 2, 1, 132000, 3, VDD_7, 160000, 0, 5, -1, 0x29 },
{ 806400, ACPU_PLL_2, 2, 1, 132000, 3, VDD_7, 160000, 0, 5, -1, 0x2a },
{ 825600, ACPU_PLL_2, 2, 1, 132000, 3, VDD_7, 160000, 0, 5, -1, 0x2b },
[Hero, G2 Touch Android Development] vido.ardes:
If you check the aHero thread some people are reporting successful overclocks up to 768MHz... I say let it go up and down to whatever the processor allows and let us find out for ourselves what our phones can handle
[Hero, G2 Touch Android Development] intronauta:
+1 ¿why not?.

I'd like to see in time_in_stat how all frecuencies works, but only show some by default.
[Hero, G2 Touch Android Development] kendong2:
find my arch/arm/mach-msm/acpuclock-arm11.c attached

(edit: this is part of the kernel source, you need to compile the kernel with this before you can use it!)

, it enables clocks up to 825 mhz:

19200
122880
160000
176000
245760
352000
480000
518400
537600
556800
576000
595200
614400
633600
652800
672000
691200
710400
729600
748800
768000
787200
806000
825200

i have tested all clocks up to 710mhz for a few minutes, at least it doesn't crash instantly ;)

i have never got my hero above 710 without crashing, pulser had 730 stable on his with this clock settings.

if anybody cares i can add even higher clocks, but i will do that only if someone shows that he got 825 running ;)

imho this is insane, but since it seems to freeze the phone and not instantly brick go ahead and try. nevertheless do it on your own risk!
[Hero, G2 Touch Android Development] vido.ardes:
Forgive me if it's a stupid question, can I flash this into a ROM or do I need some skills higher than shifting zip files about to use it?
[Hero, G2 Touch Android Development] smiskkissen:
why shouldn't we use setcpu?

the reason i'm asking is simply that i prefer setcpu over overclock widget
[Hero, G2 Touch Android Development] Bo$s:
Firstly you have to compile kernel (this is

source code

, check Wikipedia for info) to use it.
[Hero, G2 Touch Android Development] vido.ardes:
I meant the file kendong posted
[Hero, G2 Touch Android Development] Bo$s:
It's part of source code.
[Hero, G2 Touch Android Development] vido.ardes:
Fairy nuff, thanks for the clarification
[Hero, G2 Touch Android Development] kendong2:
this is why the thread is marked with [DEV] ;)

i added a hint that it is source code.
[Hero, G2 Touch Android Development] MaXo64:
does anybody know how to fix A2DP for vanilla ROMs?

i'm working on zjr8's source which is a moded version of this kernel.

xaueious said he fixed it here:

http://xdaforums.com/showthread.php?t=686295

but I don't see any difference in the .config file.
[Hero, G2 Touch Android Development] behnaam:
Well if u have alot of freqs in between e.g. 245mhz and 480mhz the speed switching will become less efficient.

I removed perflock since it screws up user defined freq's.

U can add perflock back in with ur desired freq's, no issue with that. I just thought it's better to leave that option the users?
[Hero, G2 Touch Android Development] blackplatypus:
first, thanks for the great work :)

is your auto backlight/sensor working? in the 2.6.27 kernel it was LIGHTSENSOR_ALG, seems to be missing?
[Hero, G2 Touch Android Development] yozgatg:
wow, i went from an AOSP one to BeHero+ to try out hte new kernel, and i'm quite suprised

this kernel solves the one big issue i always had: the device became slower when you touch the screen while playing a game

now you can finally properly play games on the hero

plus with the OC, this thing is flying

i set it to 352/352 when sleeping and 480/691 (though removed most frequences, only 3 remain: 480, 576, 691 mhz -- reduce switching) when awake

i'm still playing out with the settings, had a freeze once while playing a game but that's it

i found out that if i set the sleep lower (< 300 mhz) sometimes it simply doesn't wake up (keypad lits up but can't get to the lockscreen)

ps auto-backlight sensor is working for me
[Hero, G2 Touch Android Development] dipje:
Thanks, helps me understand why the changes are done in the first place :). I'm curious like that.

Ofcourse this should be up to the user. I was only asking if it was safe to change it back for my own personal compile. Not telling you what to do here, just asking what I can safely change for myself :).
[Hero, G2 Touch Android Development] adwinp:
I'm posting here since the thread pertains to the 2.6.29 kernel; don't want to clutter the other threads;

Does/did any body encounter issues with the touchscreen not working in an otherwise working kernel, with *ANY* build config, using the stock 2.6.29 kernel (desirec; the one toast and behn based their tree on) with the reversed patch for the other boards?
[Hero, G2 Touch Android Development] dipje:
Probably a stupid suggestion (you probably know this already), but did you take a look at the synaptics-i2c.c file? There is a 2nd version in behnaam's tree with 'AOSP fix' after it. Probably the normal one only works for Sense ROMs (why I don't know, didn't take a look in those files)
[Hero, G2 Touch Android Development] adwinp:
It's there also in the vanilla tree.

My mistake was some exotic patches...

Anyway, fixed. Thanks anyway.

btw, on a sidenote, the kernel boot just fine after being compiled with the 4.5.0 toolchain I built.

;]
[Hero, G2 Touch Android Development] lambstone:
just a quick question, i took a look at the nexus forum and it seems that they have acheive in undervolting as well. will this ever be possible for our hero? Also, im apparently one of the unlucky ones whose hero can only overclock up to 691mhz, does that mean thats the max that i can ever overclock it to?
[Hero, G2 Touch Android Development] dipje:
Because the kernel is actually quite clean code that has been tested against 4.5.0 I think :). I thought the problem was going to be dirty written code from modules or in the Android tree, where gcc 4.5.0 would be throwing errors where 4.4 would not.

And as you stated in your ROM thread, the HTC libraries compiled with 4.4.0 are not working if you compile your Android build with 4.5.0 right? Is there something like that for the kernel too?
[Hero, G2 Touch Android Development] adwinp:
Well, I always work (or at least, start working with fresh code; I don't really like exotic patches from ppl I don't know).

The kernel compiles just fine, wlan works, 3G and data as well.

Audio and 3D also.

Compiling throws a few warnings, but I will turn that off during the next compile to see how it goes.

I'm just running into trouble with sleep/idle states. I just got back from my training, and have a few hours of free time, I'll thus check cpufreq and freq tables.

I have one of the first heroes, which is why my handset is quite picky about foreign freqs.
[Hero, G2 Touch Android Development] pulser_g2:
Hi mate. If you have trouble with frequencies, give kendon a shout (user kendong2). There's a VillainROM kernel with all possible CPU speeds enabled in it, and he'll gladly give you his changes if you ask him (he's trying to make a patch of them, but I think he got it sorted)
[Hero, G2 Touch Android Development] blackplatypus:
Any suggestions regarding my auto backlight problem? Even using the "default" config it doesn't work for me, some incompatibility between the kernel and android 1.5?
[Hero, G2 Touch Android Development] lambstone:
this kernel is for 2.1 only i think. you should try the lightspeed kernel.
[Hero, G2 Touch Android Development] kendong2:
here is my patch against behnaam-HeRo-2.6.29-GoDmOdE-53aa9a0. the clocks work fine for me from 19 to 710, for pulser/anon even to 730 iirc, and there were reports in the vr forums about 750mhz...

i am planning on cleaning the tables, and put only a few clocks between 350 and 690mhz in it, so it should be safe for everyone to use.
[Hero, G2 Touch Android Development] NeBouse:
Should we just flash this patch from recovery , over the #23 kernel ?
[Hero, G2 Touch Android Development] demento:
dont think so, its a sourcecode path. You should apply the patch, compile kernel, get boot.img from rom, extract kernel and ramdisk, replace kernel with new one, repack, zip up, sign and then flash from recovery
[Hero, G2 Touch Android Development] adwinp:
Hey.

Thanks for the shout, but I sorted it out.

Looks like perflock is really needed.

Got OC working; 4.6+ linpack result.

Just like Ken, if I get a few moments, I'll clean up the tables to remove unnecessary freqs in between.
[Hero, G2 Touch Android Development] Feeyo:
Let tasks jump between SCHED_BATCH/NORMAL policies

Index: android-cronos/kernel/sched_bfs.c
===================================================================
--- android-cronos.orig/kernel/sched_bfs.c	2010-05-29 19:32:03.000000000 +0800
+++ android-cronos/kernel/sched_bfs.c	2010-05-29 19:32:03.000000000 +0800
@@ -3226,6 +3226,12 @@
case SCHED_BATCH:
if (policy == SCHED_BATCH)
goto out;
+	/*
+	* ANDROID: Allow tasks to move between
+	* SCHED_NORMAL <-> SCHED_BATCH
+	*/
+	if (policy == SCHED_NORMAL)
+	break;
if (policy != SCHED_IDLEPRIO)
return -EPERM;
break;
[Hero, G2 Touch Android Development] kendong2:
can you leave a few words on perflock? what does it and why is it needed, and how does it mix with OC?
[Hero, G2 Touch Android Development] blackplatypus:
Correct me if I'm wrong, but perflock is a driver implemented by HTC in new kernel, to save power/battery by scaling down the cpu when you are not using it and again scaling up if you use it, but if you want to OC the cpu you want to set your own cpu frequencies e.g using cpufreq modul, however perflock hooks the cpufreq module and makes overclocking inefficient/not working.

great post going more in detail about "overclocking"

http://xdaforums.com/showthread.php?t=679102
[Hero, G2 Touch Android Development] kendong2:
yeah, but afaik we use a different method of overclocking...
[Hero, G2 Touch Android Development] kendong2:
CONFIG_NETFILTER_XT_MATCH_OWNER=y

to make droidwall working. if anyone asks if this can be flashed via update.zip i'll slap him with a rotten fish :D
[Hero, G2 Touch Android Development] powerPT:
I have a problem, sometimes, unlocking the screen. When I rolldown the panel the screen turns on (really?? lol) but sometimes it appears weird, with low frequency and pink color.

This happens when I patch my BeHero+, with this update.
[Hero, G2 Touch Android Development] adwinp:
Okay now, here's something strange:

I've been building a custom kernel for the new Hik@Ri, and it works just fine.

When I use this exact same kernel with the Froyo port I'm working on, I get boot-stuck with:

#W/MountService( 168): Waiting too long for mReady!

Looks like I'm not the only one, since here's a pastebin:

http://pastebin.com/9DqNrVv7

Booting the EXACT SAME rom with the stock htc leaked kernel works fine, which leads to assumptions, that the problem is with the way the boot.img is assembled.

The question is:

why is it working fine with 2.1 and not with froyo?

I've diffed both configs, and can't find anything that might influence the start sequence.

init is okay.

Any ideas? = PM

>edit<

Fixed; looks like there was a difference in the init
[Hero, G2 Touch Android Development] ltraddical:
Behnaam,

Since you're quitting Hero devving, i'm wondering who's picking up on this github / .29 kernel devving?
[Hero, G2 Touch Android Development] dipje:
Something about a 'big fat trout' and the good ol' IRC days :).

More seriously though:

@adwinp: Sorrry can't help you, no Froyo experience (didn't want your question to go completely ignored)

my question at the rest:

I've been testing now for a few days with different freqs, and basicly we all had the same idea: Switch to ondemand governor, min_freq 352 and max freq 691. (or lower and higher if your Hero can take it), and let the kernel sort it out. Reduce the number of frequencies, so the kernel switches less often, and it should work out OK.

Thing is, 'out of nowhere' it drains battery like crazy. Before this, I used the same settings, but the governor was set to 'performance' by the ROM, and using a widget and / or software to clock to 691/691 screen on, and 352/352 screen off. That was working _fine_, no battery drain what so ever.

I'm beginning to think that 'ondemand' actually uses juice like crazy... or there must be some other config that causes the drain but I sure can't figure out which. (I turned _off_ some debugging, but I refuse to believe that causes drain :)).

So, to 'concur' with AdwinP... I think good ol' htc-perflock might still be the way to go. Perflock was the 'one freq screen on, one freq screen off' way of doing things, only it was done by the kernel instead of a piece of android software.

We overclock now by changing the min/max freq settings of the cpufreq method, and use software to control it...

But if '352/352 691/691' costs _less_ battery than '352/352 352/691' then something is wrong (I'm talking difference between 36h on a charge and 8h here, really that much).

I'm thinking of setting htc-perflock back in with 352 screen off, 691 screen on and see what happens. (what were the defaults? 480 off, 518 on?).

Opinions?
[Hero, G2 Touch Android Development] adwinp:
@dipje:

1: I sorted out the issue; it was some garbage in initrc

2: I've dropped htc perflock; was really messing with cpufreq after a wakeup from idle/sleep

3a: to minimize battery drain, set your clock ticks to a conservative value and set your timer to low resolution (GP)

3b: clean up the cpufreq table in arch/arm/mach-msm to remove all values in between yours (minimises freq-hopping, and thus, battery usage).

4: if you must, set the values in stone, upon each reboot automatically (requires you to edit init.rc/init.hero.rc in the ramdisk)

I had the best stability:battery:performance result with 160:672

I'll test my final settings during the night today.
[Hero, G2 Touch Android Development] demento:
@dipje: so you're saying the ondemand governor is flaky? Sounds really hard to believe. I'm not saying it's not possible though :).

any output from /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state?
[Hero, G2 Touch Android Development] dipje:
Wasn't the wakeup from idle /sleep thing a 'too low' frequency? At least it was for me. With the same kernel (with no perflock), 245mhz-screen-off and the phone wouldn't wake up anymore, or maybe once in 10 tries if I was lucky. Raising it to 352 and the problem never appeared again (same kernel).

I think (thought? :)) that the wakeup-issues are the same as some heroes not being able to run at 710mhz - even for a few secs - and others doing it stable. It looked to me as if some heroes (like mine) simply couldn't do 245mhz and properly wake up. 280mhz might also be enough, but I went from 245 to 352 and never got the problem again.

There's the thing, I already did that. I learned that idea from Atom cpu's, where speedstep or downclocking must be avoided, because switching speeds costs more power than running at full speed all the time :).

I ever compared my table's to that of kendong's latest commits in his github, and also compared them with zjr8's and the base behnaam's (which worked for me before), they are pretty much the same. I removed all frequencies between 352 and 691 except 571. So I went from 352, 571, 691... with the same reason: minimize speed-switching by having less freq's in between.

When it boots, I check the current freq's and settings in /sys. Just to make sure the min/max are what I set in the kernel config, and the governor is indeed 'ondemand' and it is indeed a low 352mhz when the screen if off, and a 691mhz when I flip through homescreens or run a Neocore.

That's the thing. I also don't really believe it. But the (oversimplified) facts are this: I had a running stable overclock, with governor 'ondemand' in kernel, but set to 'performance' by ROM at boot. Using setcpu or OC-Widget, using 352/352 screen off, 691/691 screen on. Battery was great, performance was great. I was annoyed by the slight laginess when waking up (it takes OC-Widget a few secs to turn the freq up).

So I switched to fulltime 691/691 to see if that helped with the laginess. It did, but I burned through the battery in 8 hours or so (no real surprise there. I wouldn't have guessed it would go that fast though).

And now, I can't get it back to nice battery time :P :P. I might just clone behnaam's 22 or 23 again, alter the min/max to 352/691 again and recompile without changing to see what that does, but I'm still annoyed and amazed :).

Also jealous of heroes going to 160mhz and still waking up :)
[Hero, G2 Touch Android Development] robin04:
this is the problem (IMHO). Ondemand requires more switching between the frequency respect to performance, and this requires more cycles for the cpu and therefore increased consumption of battery.
[Hero, G2 Touch Android Development] pulser_g2:
Are you jealous of mine which happily sleeps and runs at 19MHz?

Still not proven beyond doubt if it's better to underclock like this or not, but the advanced settings of SetCPU are worth reading through, as you can adjust how much load there should be wire increasing speed.

I got my phone now running from 19MHz to 710 or 730 (can't remember which) without any lags, as I got it set to change less often.

P
[Hero, G2 Touch Android Development] adwinp:
No.

I've tried 19200 but wakeup from sleep, in case of calls, resulted in too long a delay.

I realized that the problem was too many freq hops.

I've just now cleaned up the freq table, edited my initrd.

I left only 4 freqs:

19200, 122880, 672000 and 729600 (anything more is overkill)

In fact, for a 528MHz CPU, the max theoretical stable throughput is 130%, which is why I set 672 instead of 691. 729 is just in case, and I control my freqs via sysfs or initrd. No need for overclock thingies.

Results:

wakeup from 122880 is working, stable.

I'll try 19200 in a few secs.

>EDIT<

19200 checked:

I was right: there is increased latency from wakeup, but thanks to the fact that there's only 1 lower frequency to hop, this isn't so much an issue. A full speed jump is performed.

Let's see how the battery usage fares.

>EDIT<

Here's a link to the kernel, if you want to play.

http://rapidshare.com/files/394237937/HikaRi_2.2.0_0.zip

>NOTE<: Don't use that kernel; looks like 19200 is too low for wakeup-from-deep-sleep; I'll post another version in the evening with 122880/160000

On a side note, I don't understand why ppl keep adding ext3,ext4 and other exotic fs's to the kernels?

The Hero doesn't have the horsepower (or, if you want it to, it does, at the expense of battery life) to drive journalling fs'es.

ext4 on the other hand is a RAM killer.

What most ppl don't realize, is that ext4 is "faster" because it does a lot of RAM caching, and guess what? Hero users are a bit RAM poor. So why the heck?

O_o
[Hero, G2 Touch Android Development] MrPadie:
Hi all. Sorry to butt into the intense dev conversation ;).

I am just looking for a little guidence or help. I would like to compile these sources into a kernel that will run on VanillaEclair 3.2. Now, I know my way around the terminal and most git codes, but I am utterly lost as to where I would begin doing this. I have taken a squiz through the links posted on the first page, but once again, I need it to be specific to this ROM.

Anyone willing to help out? Or, otherwise, anyone willing to compile one for me? :P

Mr P.
[Hero, G2 Touch Android Development] adwinp:
You have a zImage and accompanying wlan.ko in post #1. Use those.

O_o

There's no such thing as a kernel being specific to a ROM (unless it's 1.5)

If you want to play around, pull a .config from HTC's leaked kernels (I recommend build 568) or you can use default configs from arch/arm/configs/hero_defconfig

This requires some basic linux/kernel compiling knowledge.

Integrate your zImage into an initrd (again, strip this from HTC's), copy and flash_image it.
[Hero, G2 Touch Android Development] dipje:
If you know a your way a bit around a linux console, PM me if you want instructions. No problem to help someone get started.
[Hero, G2 Touch Android Development] dipje:
Hmm.. Ok, then I have a problem.

When I set setcpu / OC-Widget to 245/245 when the screen is off, 50% of the time the screen will turn on ok, but will directly turn off and then _not on again_. I see the buttons being lit, and the ROM thinks it's out of sleep mode and working, but my screen is still off.

If I press power to sleep again, and power again to wake it up, I again have a 50/50 chance it will work ok this time.

When settings the freqs to 352/352 with an OC-tool, I never get this issue.

So I do have problems waking my phone when the freq's are too low. Still, the OC-Widget or SetCPU could be the cause... I'll test with no OC-tool but just ondemand, and see if it fixes my waking issues.

I still have battery drain when using ondemand though (just confirmed, the drain is gone when I use an OC-tool to set it to 691/691. The moment I set it to things like 352/691, the battery drains like crazy. But this is probably a messed up chance I made or a wrong timer value somewhere. I'll keep digging.