yashsingh1/xdaforums huggingface dataset:
[Hero, G2 Touch Android Development] adwinp:
19200 wasn't working; it was too low for the system to even respond to a wakeup event.

This also happened with 122880, but with 160000, everything's just fine.

I use pure cpufreq, no overclock widget.

I've set it to 160/729 and everything's smooth as silk.

Make sure you disable perflock; this might be another reason you're getting battery drains.
[Hero, G2 Touch Android Development] nicandris:
hey guys, currently use the #22 Kernel OC at 691

-whats the difference with #23?

-should we create a change-log?
[Hero, G2 Touch Android Development] dipje:
That's what github is for. Take a look at http://github.com/behnaam/HeRo-2.6.29-GoDmOdE for example. Click on the 'commits' button at the top. You'll see all the changes that are done, by who and on what day. If you click a 'change' / commit, you'll even see the differences in source code. Welcome to basic source-version control :).

If this is new, you'll probably find the button 'Forks' interesting too. In the top right you'll see a 'download source' somewhere. Two to the right of that, is the 'forks' button. You'll see all the other github's account that copied this source, what they did to it and at which point it is copied, etc...
[Hero, G2 Touch Android Development] dipje:
Question @adwinp or the others:

I'm kinda fed-up with my OC-stuff. The clocking is working fine but it keeps eating through my battery. The battery drain is gone the moment I _don't_ let it switch resolution.

So, to narrow it down, what are your settings for:

CONFIG_CPU_FREQ_SAMPLING_LATENCY_MULTIPLIER (500 here)

CONFIG_CPU_FREQ_MIN_TICKS (1 here)

'Default Timer' (GP here)

'Suspend sleep mode' ('Power collapse suspend)

'Idle sleep mode' (Power collapse here)

MSM7X00A_IDLE_SLEEP_MIN_TIME (20000000 here)

MSM7X00A_IDLE_SPIN_TIME (80000 here)

If look through different github account's, a lot of people are using these values (they come from behnaam, and he once started with a /proc/config.gz I figure).

Did you alter these adwinp? Or did you change some /sys or sysctl's somewhere so that cpufreq doesn't poll the cpu state so freaking much (that's the only thing I can think of that is causing the drain right now).

Because or you also have battery drain but didn't notice it yet :P, or it must be one of these simple settings, or it's something in the ROM or an app that's causing cpu-freq to go haywire. I reflashed multiple times from a complete wipe so I can't really blame the ROM I think. Can it be stuff like compcache and / or BFS that's causing cpufreq to go nuts on my compiles?
[Hero, G2 Touch Android Development] adwinp:
Start by changing the multiplier to 200 and ticks to 5.

Tick = 1 is clock overkill.
[Hero, G2 Touch Android Development] dipje:
Shouldn't that make it poll _faster_ ? Or am I thinking backwards now :)
[Hero, G2 Touch Android Development] dipje:
ok, started from scratch. did a full clone, applied bfs patches (swap-notify for compcache seems to be already present now? or was it always the case).

removed a lot of freqs from the table, basicly 160mhz, 352mhz, 518mhz, 691mhz. (I want 518mhz in there for users who do not want to OC... I myself will probably leave 352 and 518 out for my own personal compile, once this is working).

Set the ticks to 5 like you set. Set the sampling rate to once every half a second after the ROM booted, and set the up_threshold to even a bit higher, like 95.

It took a while to settle to 160mhz, but once it did, it sits there nicely. Unlocking and flipping around the homescreens goes smooth. Once I don't touch the phone for a bit, it actually drops down to 160mhz like it should, without sleeping.

checking 'time_in_state' regularly sees the rom being in 160mhz all the time while I don't touch it. It raised to 352mhz once, and that was when a text arrived, and immediately dropped to 160mhz again.

In other words, so far so good. It seems the battery drain was some other stupid mistake I made or a typo somewhere.

Or maybe, compcache isn't working yet (didn't recompile modules yet). Maybe that has something to do with it? I'll leave the ROM going without compcache now for a while, to see if it drains. If that works out Ok, yay! I throw compcache in and see what it does. If it starts draining I'll know the source :).
[Hero, G2 Touch Android Development] adwinp:
@dipje:

I finally found the sweet spot between battery, performance and stability.

I tried 768 but it was crashing all over the place.

Here's what 19/729 can get you:

http://xdaforums.com/showpost.php?p=6663711&postcount=791

Here's the kernel in update.zip.

>EDIT< hopefully fixed wakeup issues.

Here's a version for those with handsets unable to handle 352>MHz>672:

http://rapidshare.com/files/395113822/HikaRi_krn_2.2.0_0_b0rked_hero.zip
[Hero, G2 Touch Android Development] dipje:
Much more interested in the source :).

It seems to go well now. I really must have applied a patch wrong or messed up the config.

With ondemand, my hero also wakes up nice from 160mhz, so yay :). Even trying one linpak with 700+ results in linpak closing, or my phone freezing.

Oh, and with 160mhz playing music isn't ping to well. Every 5 secs it lags for half a second or something.

So I'll probably end up with 245mhz minimum anyway.

Hope with me that the issue is now 'magically' fixed :)

-------------------------------------

Sent from my AOSP Hero Androbin
[Hero, G2 Touch Android Development] adwinp:
In my new kernel, I've only enabled 19/729, although I'll need to up that to 122 or 160 in order for it to be of any benefit, otherwise it will be stuck @729 all the time.

I'll might upload the source after I return from my trip, which will be in ~2 weeks.

Dunno if that will be of any use though, since it's the "vanilla" desirec, I've reversed the patch to get hero-specific source, enabled and cleaned OC and TC, and that's it.

BFS and Compcache are of no interest to me, so I left that out.

I guess the only thing of value would be my .config.

^^

Try my kernel, you'll be pleased.

;]
[Hero, G2 Touch Android Development] behnaam:
If anybody want to be make commits to my experimental branch to keep all nice findings in one place, PM me and I'll add u to commit access
[Hero, G2 Touch Android Development] witysimon:
Hi,All

this is the first time I compile a Linux kernel for htc hero.

I follow behnaam's guide to compile it as:

export ARCH=arm

export CROSS_COMPILE=arm-eabi-

export KERNEL_DIR=/full/path/to/kernel

make oldconfig

make

after that I got the kernel zImage, and it runs well, but I cannot found the wlan.so, where is it? I use find . | grep wlan and still nothing found?

Could any one give me some advice? Thank you very much!:confused:
[Hero, G2 Touch Android Development] R0iZ:
Maybe wlan.ko? If so, take it from first post.
[Hero, G2 Touch Android Development] witysimon:
Hi r00tk1t, I've tried it but it doesn't work with my kernel. so I think I have to make it myself.

------updated------

I make it, just get the wlan source from android source with

git clone git://android.git.kernel.org/platform/system/wlan/ti.git/

then enter the sta_dk_4_0_4_32 directory and make.
[Hero, G2 Touch Android Development] unika:
export KERNEL_DIR=YOUR_ANDROID_KERNEL_PATH

cd PATH_TO_ANDROID_SOURCE/system/wlan/ti/sta_dk_4_0_4_32/

make clean

make

And look for wlan.ko in PATH_TO_ANDROID_SOURCE/system/wlan/ti/sta_dk_4_0_4_32/
[Hero, G2 Touch Android Development] witysimon:
Yes, already got it, thank you very much!
[Hero, G2 Touch Android Development] witysimon:
Question again,

I used arm-eabi- version 4.2.1 to compile the kernel and it works fine.

But when I check the Kernel version in the Settings->About Phone, it shows Unavailable.

but uname -r shows correct kernel name, what's happend?

is it the matter of different compiler version? have to use 4.4.4?:confused:
[Hero, G2 Touch Android Development] dipje:
For a 'next time', the wlan driver is also included in the 2.6.27-community kernel project, and Cyanogen also has the driver source standalone in hit github:

git clone http://github.com/cyanogen/android_system_wlan_ti.git
[Hero, G2 Touch Android Development] unika:
And what's wrong with wlan driver in AOSP repository?
[Hero, G2 Touch Android Development] dipje:
Nothing I guess, but I for one don't want to download the 3.2gb AOSP repo just to get a wlan driver :)
[Hero, G2 Touch Android Development] witysimon:
yes, if just for compiling the kernel, I guess no one would like to download the full android source tree.

but using git to just get the wlan driver is quite easy.

git clone git://android.git.kernel.org/platform/system/wlan/ti.git/
[Hero, G2 Touch Android Development] unika:
that's the point ;)
[Hero, G2 Touch Android Development] adwinp:
@dipje:

Try this one out (Finally fixed wakeup issues?):

http://rapidshare.com/files/395113397/HikaRi_krn_2.2.0_0.zip

Here's a version for those with handsets unable to handle 352>MHz>672:

http://rapidshare.com/files/395113822/HikaRi_krn_2.2.0_0_b0rked_hero.zip
[Hero, G2 Touch Android Development] witysimon:
is this for Sense rom only?

-------------------------------------

Sent via the XDA Tapatalk App
[Hero, G2 Touch Android Development] adwinp:
I'm using it in an AOSP hybrid.

This kernel works with Froyo as well.
[Hero, G2 Touch Android Development] behnaam:
adwinp, how does ur freq table look like?
[Hero, G2 Touch Android Development] blackplatypus:
He seems to use 2 frequencies, 122880,729600, and scaling_max_freq set to 710400, min to 122880, governor ondemand.
[Hero, G2 Touch Android Development] behnaam:
Thanks :) will give the experimental branch a go whenever I got time. There is enhancements needed on the current freq table
[Hero, G2 Touch Android Development] adwinp:
Didn't get a chance to reply earlier:

I have 4 freqs:

19200, 122880, 672000 and 729600

If you keep only 19200, you'll have trouble waking up if you set sleep to power down suspend.

The upper freqs are meant to minimize battery so your phone doesn't use the full 729 if it doesn't need to.
[Hero, G2 Touch Android Development] blackplatypus:
ah ok, thx for the info, strange that time_in_state and trans_table shows only the 2 frequencies. I'm personally using at the moment 2 frequencies 160000 and 710400, seems to work quite well.
[Hero, G2 Touch Android Development] adwinp:
In the kernels I've uploaded, there are only 2; I haven't had a chance to upload the 4 freqs kernels yet. Don't have the time.

As a matter of fact, I'm still fighting with the battery drain.
[Hero, G2 Touch Android Development] dipje:
Remember I had all kind of battery drain issues?

I cloned zjr8's kernel-git again, made the changes to the freq table (Same as yours), compiled it, and tadaah. working ok. Tweaked the cpufreq/ondemand parameters a bit (nice_load set to 1, up_threshold to whatever you like, sampling rate to 500000 (half a sec)).

Drain was gone. Now, is this because of the cpufreq-settings? I don't think so. I think I made a dumb mistake somewhere, turned off some debugging options that apparently can't be turned off or something as simple as that.

Thing is: Once I started from scratch the drain was gone, so maybe yours isn't related to your cpufreq settings?

And on a side note, I really wouldn't use one jump from +/- 160 to +/- 670. There are a lot of processes going on all the time when your phone sleeps, and every little sync check (or whatever) that runs would cause your phone to switch clocks for a bit. Having a +/- 240 or +/- 350 that your phone can rest on _all the time_ with only having to switch when the user does something big, really seems to help in power.
[Hero, G2 Touch Android Development] adwinp:
Well, I started from scratch too.

I don't like copying.

;]

Hmm, gimme a link to the git; I'll take a look if there were any specific fixes included with respect to the vanilla release.

160 is more than enough for background processes; I mightup it to 176, but don't see any reason to.

I've been looking at sysfs exports, and everything seems fine.
[Hero, G2 Touch Android Development] adwinp:
@dipje:

I finally worked out all the kinks and quirks in the kernel.

The battery drain's gone.

You can try out the kernel. Download it from the 1st post in my ROM thread.

Lemme know of your results.
[Hero, G2 Touch Android Development] blackplatypus:
are you willing to share your modifications ? ;)
[Hero, G2 Touch Android Development] reidefors82:
So, this Kernel is for the latest 2.1 official roms?

Just flash it like i did with #22 a few weeks ago?
[Hero, G2 Touch Android Development] adwinp:
Of course.

I will proly upload a full branch once I return from my trip.

The bandwidth is terrible here.
[Hero, G2 Touch Android Development] behnaam:
To set the story straight:

NOBODY hacked HTC's server, the kernel leaks was due to a HTC screw up, where they accidently uploaded a tarball containing all htc kernels and this was dl by some people before it was removed

Second of all, to u Freeyo, it has gone 10 months since the Hero was released. Same goes with Heroc and Droid eris a few months later. NOBODY has managed to build .29 from sources, even with a full patching of all htc changes in .27. I highly doubt, or actually say that it is impossible for someone to use the goldfish kernel source, which is the emulator kernel source, and "using some patches" to get a working .29 kernel. If that was the case some of the very skilled kernel devs over here on xda would have achieved it a long time ago (e.g. toastcfh, wesgarner + a bunch of other people).

And to all you fanboys out there, this is a DEVELOPER FORUM, not some damn Oprah show. Contribute or leave!

EDIT 2: Shenshang, let me post what I told u first lol :)
[Hero, G2 Touch Android Development] pulser_g2:
That would explain why those links disappeared that day. I remember thinking about downloading them and then deciding against it.

Doh!
[Hero, G2 Touch Android Development] shenye:
too slow ;)
[Hero, G2 Touch Android Development] marinierb:
So if we are not developers, we should not be coming to XDA to get the ROMs people here build for free? Is this a new rule?

Please advise.
[Hero, G2 Touch Android Development] Ibanez33:
All he's trying to say is he posted it up in this thread to further development. Not have request for the oc patch or have arguments about sources. Its a pretty reasonable request..
[Hero, G2 Touch Android Development] behnaam:
U are free to use it, but dont come here and say "hey dont listen to those stupid assholes they dont know a ****, I LOOVE YOUR ROM! TEH BEST OMGZZZ"

You users contribute by giving feedback and make requests. But when u stop doing so, u are not of any value of the community.

Because most of those guys dont know a jack **** about what a dev community is. We are not questioning the fact that somebody made a .29 kernel for Hero. But if you are here to play smartass because u got a .29 kernel then ur not in the right forum. Imagine if every dev came here and say "Hey look I overclocked my device to 2.10Ghz, but I wont share my knowledge"

Wouldnt that be useless? Then what function does a developer forum have?

I just wanted to open the chance for other devs to get involved in this kernel and be able to bring the community forward. And what happens? a bunch of people come here to discuss other matters?

As I said, I'm just questioning his methods, not what he does.
[Hero, G2 Touch Android Development] MojUk:
LOL Fairplay - you got to love it when big corporation's drop the ball...human error in display @ it's most impressive :D

On a more important note fair play and massive props go to behnaam, toastcfh and the others.....phenomenal work, developing apps is hard enough so i have enough respect for you guys and the work you do on ROMs :D
[Hero, G2 Touch Android Development] Feeyo:
You know what. f*** it. Its your f***** loss not mine. I would have been happy to help contribute with patches to help the development on xda. But no more.

[highlight]Mod Edit: Please watch your language[/highlight]
[Hero, G2 Touch Android Development] MojUk:
Dude, nobody wants you to leave...well the majority of us don't, you have made a great ROM don't let the opinions of people who don't matter to you ruin that..
[Hero, G2 Touch Android Development] behnaam:
No loss :) Help from someone with that attitude is not worth it...
[Hero, G2 Touch Android Development] acidrainbg:
so you speak about attitude? lol
[Hero, G2 Touch Android Development] pulser_g2:
Are we gonna have to have another war here? Behnaam has basically fixed the kernel up for us, and I can testify that his fixes were needed or it was useless.

But are we gonna have to go down the whole argument again guys?
[Hero, G2 Touch Android Development] behnaam:
if u followed the conversation over his at his thread, u will understand it all started peacefully, then he was a bit mad because we questioned his kernel :)
[Hero, G2 Touch Android Development] shenye:
(Y) no one cares.

Touché.
[Hero, G2 Touch Android Development] MojUk:
Like anon says....we all want the best so should all work together to make the community the best we can....support the work if we can or feedback when asked to if we can't
[Hero, G2 Touch Android Development] D3_:
and nothing of value was lost.
[Hero, G2 Touch Android Development] mikael120:
overclock?

how hard would it be to apply the overclock patch to this kernel? I would love to have a 2.1 rom running at 650 or 768 mhz. and behero + this new kernel has to be the fastes sense rom i have ever used :)
[Hero, G2 Touch Android Development] behnaam:
I agree with anon, this is too much drama. Let's put a end to the discussion here and say peace :)

Now lets focus on this kernel :D
[Hero, G2 Touch Android Development] egzthunder1:
Okay fellas, you can stop the flaming now. Play nice.
[Hero, G2 Touch Android Development] pulser_g2:
Absolutely. Now... what can we add to it ???

iptables would be nice, but IIRC it can be hard. What did teknologist include in his again? It was good at the time.

Pulser
[Hero, G2 Touch Android Development] krandhawa:
flashing

Hi guys, I am a total noob wen it comes to installing kernels, Ive installed many of these but I want to install it on another rom, becuz the other rom has good live wallpaper support, I just need a boost, I tried reading those guides but they are just really confusing, so if someone can help me install or atleast teach me how to install that would be great.

Thanks in advance
[Hero, G2 Touch Android Development] adwinp:
Those guides are really straighforward, so my only guess is that you're too lazy to actually make an effort to understand and you just want to be spoonfed.

That, OR you shouldn't be hanging around a "dev" forum.

That's exactly what a DEV forum IS NOT.

This IS NOT a place for ppl to ask: "show me how to do this or that"

In any case, after my short flame burst, here's some candy:

Reboot to recovery:

# adb reboot recovery

copy over the kernel in img format:

# adb push boot.img /cache/

flash the kernel:

# adb shell flash_image boot /cache/boot.img

copy over the accompanying wlan.ko (if any):

#adb shell mount -t yaffs2 -o rw /dev/block/mtdblock3 /system

# adb push wlan.ko /system/lib/modules

reboot:

#adb reboot
[Hero, G2 Touch Android Development] krandhawa:
Thanks for the help, im still a little confused but ill get it sooner or later. Honestly I did try, but I am not an android expert, I got this far by loading custom roms and theming without asking many questions, im just trying to learn, I just came from using an iphone and decided I needed a change.

Thanks for the help
[Hero, G2 Touch Android Development] witysimon:
any update?
[Hero, G2 Touch Android Development] adwinp:
Any update on what?

A stable kernel?

Well yes, I might be uploading that tomorrow, when I get back from my trip.

I will be releasing 2 versions; 1 for hero's able to go up to 729MHz and the other batch with hero's sticking ~600/650.
[Hero, G2 Touch Android Development] witysimon:
nope，I mean did you have any updated code to solve the battery drain.
[Hero, G2 Touch Android Development] adwinp:
Well, I didn't mean to hijack Ben's thread, but I'm not using his sources.

Yes, I solved my battery drain issue a while back.
[Hero, G2 Touch Android Development] nicandris:
do we have an update.zip for MoDaCo 2.1?
[Hero, G2 Touch Android Development] SpooXter:
Another noob question. Wouldn't it be better if we downloaded the official 2.6.29 kernel for hero just put overclock and a few stuff and we alredy have a better working hero.... Or is this already a moded official release of hero kernel.. PLS EXPLAIN cuuzz as much as I remember this kernel alredy existed when we got the taiwan release
[Hero, G2 Touch Android Development] behnaam:
Hehe np, this is kernel dev in general :) good progress mate!

zajebisty ;)
[Hero, G2 Touch Android Development] Feeyo:
Hi guys,

I was just checking out the config you guys are using on this kernel.

I can not seem to find any reference to:

# CONFIG_ANDROID_GADGET is not set
# CONFIG_ANDROID_RAM_CONSOLE is not set
CONFIG_ANDROID_POWER=y
CONFIG_ANDROID_POWER_STAT=y
CONFIG_ANDROID_LOGGER=y
# CONFIG_ANDROID_TIMED_GPIO is not set
CONFIG_ANDROID_BINDER_IPC=y

Why is that?
[Hero, G2 Touch Android Development] blackplatypus:
hm I can find them all except CONFIG_ANDROID_POWER* in the default config file?

e.g

http://github.com/kendon/HeRo-2.6.29-GoDmOdE/

maybe the HTC Kernel sources are patched in order to automatically enable the essential kernel config settings?

[edit spell mistake]
[Hero, G2 Touch Android Development] adwinp:
These options will appear/disappear depending on other options you might've enabled/disabled while configuring the kernel.
[Hero, G2 Touch Android Development] Feeyo:
Ehm no wrong. These option MUST be enabled.
[Hero, G2 Touch Android Development] blackplatypus:
maybe there is a difference between mainstream and htc patched kernel sources?
[Hero, G2 Touch Android Development] blackplatypus:
Yeah double post ;) however I thought this would be the best place to post.

Lately I played really a lot around with different ondemand governor settings and cpu frequencies, because of strange battery drain issues. As somebody posted already here it is related with disabled kernel debug settings, dunno which or why but with enabled kernel debug settings (like in the "original .config") I have no battery drain issues.

It would be really nice if we could collect statistics (maybe in this thread? about the influence of the different frequencies and ondemand settings on battery usage.

For example benhaam is using the default config with all the frequencies, and default sleep_min_time and min_ticks settings, which should be pretty "inefficient" however people do not seem to complain battery issues?

Whereas the VanillaEclair rom uses 4 different frequencies

122880 245760 518400 691200

with CONFIG_CPU_FREQ_MIN_TICKS=3 and CONFIG_MSM7X00A_IDLE_SLEEP_MIN_TIME=3000000.

adwinp on his side uses

CONFIG_CPU_FREQ_MIN_TICKS=1

CONFIG_CPU_FREQ_SAMPLING_LATENCY_MULTIPLIER - 200 (I think)

and 4 different frequencies

19200 176000 614440 729600.

So you would think, omg 729600 it has to drain the battery like crazy, however it didn't for me (placebo effect? subjective opinion?)

So what impact has the sampling_rate ? (the min value is influenced by the latency multiplier) lower value like adwinp uses with 20000 should poll faster, thus switch faster between the frequencies, but what has more effect the battery drain because the increased polling or the faster switch to lower frequencies? Another approach would be to set the sampling_rate to 500000 (very high) and up_threshold to 90 (higher) in order to switch less often frequencies and therefor have more battery savings ? Unfortunately I do not know a reliable approach (is there one?) to differe between the influence of different frequencies, device usage behavior or ondemand governor settings.

The only thing we really "know" is that there are different hero models out there that support different low/high frequencies and lower frequencies should use less battery and less frequencies hops should also increase battery.

I hope you get what I wanted to point out.