yashsingh1/xdaforums huggingface dataset:
[HD2 Android SD Development] curiousGeorge:
As for the governor: smartass. As for OC/UV: nope, not this time. As for what process is using the CPU: system. Funny enough, it goes back down after some time and reaches idle again, but the length of the high-draw "cycle" increases over time (this may be a coincidence). As for enabled radios: Wifi was off, phone was on (my usual fare).

Discussion:

Note that I've seen power consumption rise to around 17mA when there is weak signal, but this was not the case under these testing conditions (perfect signal). Radios don't seem to matter overly much -- turning on airplane mode for a few minutes and observing the power draw yielded the same 50-60mA drain and "system" CPU use. Governor doesn't seem to play a huge role here-- I use setCPU to clamp the speed to 245mhz (powersave, for what it's worth) when screen is off. Changing to a conservative governor (245-422MHz, screen off) made no difference (actually, I saw the draw ramp up to 70mA temporarily).

No idea what makes the "cycle" reset. Yesterday the cycle didn't ramp down and I had to restart.
[HD2 Android SD Development] chn110:
I read somewhere some governor caps cpu speed at very low during idle. This does not sound like a good idea to me. If there is not much to run during standby, it may be ok. But if there are tasks to do, such as VoIP registration, we want to run it fast and finish quickly. Otherwise it will end running for a much longer time and as the result consuming more energy. For a certain type of task, there must be an optimal clock speed to finish that task with the least amount of energy (during standby we don't care about how fast it runs). The problem is, we don't exactly know what that optimal clock speed is. We are essentially taking a guess. But guessing at the low end of 200 some Mhz is probably a really bad one.
[HD2 Android SD Development] chn110:
Meant to say caps cpu speed at very low during standby.
[HD2 Android SD Development] hastarin:
I'm confused? :confused: So are you seeing this higher drain on my kernel with Interactive governor? I can see you said you were seeing it with smartass on mdeejay's but not with Interactive?

Based on your comments, and my own observations, I'm starting to suspect the smartass governor is somehow at fault here.

Will have to see how I go testing on the Interactive governor.

Either way I'm certainly having 2nd thoughts about making smartass the default.
[HD2 Android SD Development] hastarin:
Stuff like this is why I had a few kernels that were perflocked.

Locking the CPU to 245MHz is a BAD idea IMO, and it was my #1 concern with smartass. I'd been surprised I hadn't seen side affects of doing it, perhaps this is it.

curiousGeorge please try testing with defaults, ie Interactive governor, no SetCPU profiles, etc and see if you still get the problem.
[HD2 Android SD Development] dubie76:
Wanted to report that the video camera records fine but doesnt have sound. I checked with the guys using the same ROM I am but different kernel and it works fine for them.
[HD2 Android SD Development] mdskrzypczyk:
So does anyone know how I can get the 8.4 kernel with the Nexus libraries working on the shubCRAFT cm6 2.0 build? I tried before and it just screwed the camera over. Thanks
[HD2 Android SD Development] curiousGeorge:
Absolutely can do! Interactive minus SetCPU, here we go. :) Testing...
[HD2 Android SD Development] hastarin:
Well you need to check something else because it's not my kernel. Camcorder works fine here in 800x480 MPEG4. Make sure you have "Record with audio" ticked. :P
[HD2 Android SD Development] chn110:
hastarin, yes with r8.4 kernel always getting 60+ma. Tried smartest, interactive, powersave. All the same and don't know why.
[HD2 Android SD Development] hastarin:
OK well I'll see what happens here. I did notice a bug when changing between governors that I can't track down. Ie sometimes when you change back to the Interactive governor it gets stuck on a frequency.

So currently just trying out things without touching SetCPU.
[HD2 Android SD Development] jcsy:
i searched tones of posts on where and how to "fix" the camera using your HTCcamera.apk and some libraries.. I noticed nearly 20+ users asking the same thing, cluttering the thread. some got rude responses, 1 got an answer and most of them were ignored...

it could have been just slightly better if the steps were posted alongside the **WARNING** in the main post... thats what I was saying..

on another note, your kernel 8.2 had no problems with the camera while immediately a swap to 8.4, there was a problem so judging from your ***WARNING***, i guess the HTCcamera.apk is supposed 2 fix that ^_^

dont get me wrong, i wouldnt want to step on the wrong foot here especially, you.
[HD2 Android SD Development] hutc:
BATTERY

I think the idling time and system idle battery consumption is hign around 45%, it used to be around 25% before, i tried using set cpu no change now i am going to stop set cpu and see what happens,

what i think is happening is it is taking too much time to come back to baseline battery consumption it takes a lot, when i am just going thru phone it is around 330ma, but inspite of this it is like 3% for 90 minutes.will update when i dont use set cpu and will see the change

ITS ALWAYS AROUND 70 MA ALL THE TIME
[HD2 Android SD Development] curiousGeorge:
Interactive with no setCPU or underclocking/UV -- starts out good (5-7mA). Received a call. Constant 65 to 70mA drain thereafter (with a few peaks of ~110mA) for over an hour. Battery now almost dead. ;)

I just now loaded up SetCPU -- it is set so that no profiles will activate and there is no "set at boot." Basically, it's in read-only mode -- it shows that the frequency is changing as it should and dropping to 245MHz on idle, and ramps up when required (e.g. quickly switching to another tab like "About" and back will see an immediate increase to 998MHz).

Discussion:

I remember I "triggered" this problem after a phone call in the past as well. I thought it was just a coincidence at the time. I looked at the commit about the "audio" -- the possibility that the mic does not "power down" properly after use may exist, and "system" may be constantly polling the mic. Just speculation. Will try MDJ's 6.1 (anyone have a copy of 6.0 before said commits?)
[HD2 Android SD Development] Danation:
Hastarin, I don't think this is due to the governor being used. I used to have this problem with the kernel provided in Darkstone's build. I would get low drain but as soon as I got a call, I wouldn't be able to stay under 60mA until a reboot. This happened with all of the default governors (Conservative, On Demand, etc.)

Fortunately for me, I switched to your 8.2 UVOC (which I love.) It has not been a problem since.

I know I haven't provided any proof, but I thought I'd mention my observations.
[HD2 Android SD Development] mattfmartin:
+1 On some of your older kernels only way I was able to get down from 50ma to the average 5-7 was to reboot 3-4 times. It wasn't coincidence either. I replicated it many times.
[HD2 Android SD Development] hastarin:
If you're talking about this commit:

http://gitorious.org/~hastarin/linu...mmit/031a7f796795b6dcb3135bf23121ef46ed792535

It's just cleaning out a variable that wasn't used. I think the commit message is a mistake from huanyu trying to merge another commit at a guess.

We're getting somewhere though. At least we have a way to trigger it. If we can consistently reproduce it then it might be worth testing with an autobuild of the main tree.

dmesg is showing this. I remember seeing that mentioned in LeTama's test wrapper thread. I'll have to see which kernel the person was using and see if I can find where that code is coming from.

<6>[ 1583.550811] intr_status=0x02
<6>[ 1583.554870] intr_status=0x02
<6>[ 1583.559844] intr_status=0x02
<6>[ 1583.562530] intr_status=0x02
<6>[ 1583.565155] intr_status=0x02
<6>[ 1583.567810] intr_status=0x02
[HD2 Android SD Development] the.mono:
Same here, I am using "[Everyday Builds][latest linux_on_wince_htc][PPP] CM6.1+ (11182010 nightly, 31bc15c1)" build with "hastarin r8.4_eb".

After boot ~5mA up to the first call and after it ~67mA.

P.S.

hastarin great job !!!

10x
[HD2 Android SD Development] hastarin:
High battery drain

OK really not sure what's causing this and I'm trying to track it down. :(

A big thanks to curiousGeorge for helping me troubleshoot this on IRC.

I don't suppose anyone knows exactly what version of my kernel this got introduced in?
[HD2 Android SD Development] john_matrix:
Hastarin, on IRC some people talk about LED notifications can cause battery drain.

I've noticed you provide a library for lights in your kernel's package. MDJ don't have this.

Can this be the cause of battery drain?

PS: I'm a total n00b :)
[HD2 Android SD Development] Shivan149:
I heard something about when button backlights are off when starting haret, the battery consumption is high. So I tried first pressing some buttons before starting haret.

Additionally I saw when GPS is on (even when NOT used! no symbol at top) I get an usage of 60mA. When I switch GPS off, it falls down to 7-10mA. Maybe there's still a bug left...
[HD2 Android SD Development] bronx:
well... I suppose that with buil 8.2 and 8.3b my batt was very good, but now the drain is much higher.
[HD2 Android SD Development] hastarin:
Thanks I have traced the problem to somewhere between 8.3b and 8.4

So now I'm trying to narrow down exactly what change has caused this.

With some luck I'll get it fixed over the next few hours and release an 8.5

EDIT: Just a note that the problem seems to be related to the proximity sensor continuing to trigger even after a call is finished.
[HD2 Android SD Development] chn110:
that's a great find! I have linphone started at boot maybe it triggered the sensor?

This makes sense. Drain caused by smartest gnvnt is characterized by longer periods of higher drain, >160ma, but it does have 6-9ma periods in between, not a constant 60ma.

BTW, also saw frequency stuck @245 after changing gvnt'.
[HD2 Android SD Development] bronx:
also I've noticed another interesting, but annoying thing. with 8.4 my leo got unlocked few times by itself in my pocket. I am on froyostone 3.2 with htc's swipe down to unlock lockscreen.

I had to set unlock pattern as aditional lock, as when I was pulling hd2 from a pocket there were weird things on the screen like settings, new message with random characters, wifi router triggered, etc.
[HD2 Android SD Development] hastarin:
Well it would be great if I could figure out what's causing it. I'm now trying to build 8.3b again with my new toolchain. But I have to give up for the day soon. I've been at this most of the day. :(

Yes I've seen the problem with governor. No idea on the cause of that either.

I am pretty sure that's nothing to do with the kernel. Just the crap lock screen that's too easy to swipe itself unlocked in your pocket.
[HD2 Android SD Development] bronx:
well... ok. I just mentioned that because I've never experienced it before on previous versions.

anyway... You are doing a GREAT job. thanks for Your hard work.
[HD2 Android SD Development] mwebb76:
It's definitely a coincidence and not kernel related. I've seen the problem on every sense build I've tried. The unwanted unlocks and answers is the one of two big problems that keep me away from sense builds. (The other is no hotmail activesync.)

None of the alternative lock screens on the market work well enough to solve the problem, so I've switched to NexusHD2. You might be better off with a Nexus or CM build if the lock screen causes too many problems.
[HD2 Android SD Development] atzi:
someone still has the old camera drivers? I will return to R8.2. but the camera doesn't work. I need libcamera.so, libcamera_client.so, libcameraservice.so, liboemcamera.so. I forgot to backup. ;)
[HD2 Android SD Development] shree.cse:
Have those from your original build! or paste to the Android folder everything by keeping your Data.img
[HD2 Android SD Development] hastarin:
Bug in r8.4

OK there is a definite bug in r8.4 and I've managed to trace it to something to do with the new toolchain I was using. Using the old toolchain it doesn't happen.

I really need sleep now so I suggest sticking to 8.3b for now.

I'll try to get a new version of 8.4 compiled with the old toolchain out after work tomorrow night... Well tonight since it's now Monday here. :(
[HD2 Android SD Development] Mariad:
Hotmail provides exchange sync now if that's any good to you. Have a google for the settings. Works fine with sense. :)

@Hastarin: Thanks for your amazing work, we really do appreciate what you do for us. Enjoy your sleep :)
[HD2 Android SD Development] atzi:
ok, I'm back to the old data.img.
[HD2 Android SD Development] mwebb76:
No it doesn't. The only solutions to get Hotmail on sense is to use POP3 or to use the stock Email.apk, and both have significant limitations.
[HD2 Android SD Development] bronx:
[EDIT]

nvm, found it ;)
[HD2 Android SD Development] bountygiver:
hastrin, you better do new kernel AFTER you sleep, or else you got alot of problems like the 8.4, forget add files, lines broken etc...
[HD2 Android SD Development] Mariad:
Interesting. I do use the stock app with exchange, yes. What are the limitations?
[HD2 Android SD Development] chn110:
Please have a good sleep and don't beat yourself up on it - the best battery drain I can get running Winmo with 3G VoIP is 45ma, never any lower. So you guys are making a huge improvement in Android!

A bit more info for your future reference - if I don't apply this change

echo 8 8 > /proc/sys/vm/lowmem_reserve_ratio

echo 8192 > /proc/sys/vm/min_free_kbytes

3G data hangs with kernel constantly dumping the following messages and needing a reboot.

<3>[ 6487.633361] smd_tty_work_func: tty_prepare_flip_string fail

<3>[ 6487.633361] smd_tty_work_func: tty_prepare_flip_string fail

With the change, it has never hung, with your or MDJ kernels. Have not noticed any bad effect so far. May be the change should be put into the kernel as default.

Thanks for all your efforts!
[HD2 Android SD Development] voided:
Power consumption

Hi, I have a qns. On my HD2, I can undervolt 614400 at 800:eek:. Is there a different in battery drain for a CPU runing at 245000 vs 614400 if both their voltage is the same?:confused:

Strangely I need a voltage of 1000 for the next clock speed, 652800 ..:(
[HD2 Android SD Development] puremind:
I like the fact that this is the first uvoc kernel that will boot on my device. Overcloking afterwards doesn't cause any trouble, so I now have all the advantages without the nonbooting issues.

My only issue is that i don't manage to make WiFi work using this Kernel on Mdeejay ROM 1.7 revolution, even though I replaced Zimage and modules.

The even weirder thing is that I dont have this issue on the Nexus 1.7 ROM.

Not sure what is happening.
[HD2 Android SD Development] curiousGeorge:
Glad you traced it! Update on my MDJ kernel experience: after a night's charge (it never made it past 89%, btw) I took it off the charger and waited a few hours on idle. Sure enough: -3mA, -14mA, -2mA, -59mA, -3mA, -52mA, -4mA, -19mA, -58mA, -18mA, -4mA, -32mA, -13mA, -4mA, -27mA, -4mA, -27mA, -80mA, -3mA...

There's definitely something funky afoot with MDJ's kernel too, even though the problem doesn't look exactly the same (and the log is filled with intr_status=0x02 as expected). 8.4 shows a *constant* 60-70mA drain after a call, whereas MDJ S6.1 fluctuates wildly every minute.
[HD2 Android SD Development] Frakatchoo:
I've a wifi error with r8.4_eb and MDJ FroYo Sense Clean v.2.4 (Wifi works with S6.1).

Any solution ?

EDIT : Oky this post solved my pb : http://xdaforums.com/showpost.php?p=9338618&postcount=3451
[HD2 Android SD Development] puremind:
I get this WiFi error as well with MDJ Revolution 1.7. Seems to be exactly the same happening. Unfortunately MDJ Kernel won't work for me because of the non optional overcloking
[HD2 Android SD Development] curiousGeorge:
I had a similar problem with wifi not working. If you're using MDJ's latest (2.4 clean or similar), that's the reason. Apparently it won't properly copy the files from sdcard/Android/root/* over to the system, so the modules aren't getting replaced. This doesn't cause problems for some of the newest builds because the modules just happen to be perfectly compatible anyway. ;)

Just copy them manually using ES (it's included with MDJ's builds) or adb/root explorer/etc.
[HD2 Android SD Development] 3c:
Battery drain ok

Hello all,

for those monitoring battery drain and usage, there is a new widget available on Market called Battery Monitor Widget, pretty good to watch battery drain.

See screen-shot

Used it to test R7.7 until R8.4 and standby drain was steady at 4-6mA with 3G only, 3mA on plane-mode.
[HD2 Android SD Development] Danation:
Looks ok... but why does it need internet access?
[HD2 Android SD Development] Cney:
Hey Guys,

This might be stupid question but i need to ask anyway,

I have tested the latest NexusHD2-FRG83D_V1.7__Froyo 2.2.1_ build for my hd2.

It has a hastarin 8.2 kernel with g-sensor fix.

I'm running the last Shubcraft 2.0 drop(e)mode cm 2.2.1 build. (i love the theme, wish someone would make that theme compatible for other builds, but thats a diffrent story) with the 8.2 kernel from the other build.

My question is:

1. is this an actual fix? and if it is can it be done to the 8.4 kernel to?

2. if it isn't a fix but the workaround thinghy, what is the diffrence between these kernels...

thanks alot in advance
[HD2 Android SD Development] 3c:
For ads retrieval, nothing more.
[HD2 Android SD Development] hastarin:
I didn't see this error with mdeejay's 6.1 kernel in my testing. Some fluctuation is normal. The only way to see a constantly low drain is to put the phone in to airplane mode. Even then some processes will kick in from time to time and use more power.

Unfortunately right at the end of my efforts last night I managed to corrupt my build. :( Hopefully Titanium Backup has been doing it's job and I haven't lost too much.
[HD2 Android SD Development] Danation:
Ok, thanks, I'll try it. Are you the dev?
[HD2 Android SD Development] curiousGeorge:
Yep, not really an error. Just a "gentle flux" over that period. Force locking it to 245 via SetCPU seems to have "cured" this little problem, though. Maximum fluctuations are now between 9-17mA. ;)

:( I back up my main stuff every time I try some kernel wrangling. Just 2 files, really.
[HD2 Android SD Development] xboarder56:
kernal update

hey hastarin could u help support tmobile wifi calling kernal in your build so so many roms will support it to. Thanks for all u do
[HD2 Android SD Development] rhacy:
Hi, I think this has already been mentioned, but I'm looking for some insight or help with a high battery standby drain issue that only occurs after making a phone call. To clarify, prior to making a call, the standby battery drain averages between 5 to 9 mAh. After making a call, the standby drain is about 10 times as much (around 70 mAh on average). This high drain has been happening with both android builds that I'm currently testing: (Core Droid v0.7 with Hastarin r8.2 Kernel) & (MCCM SE V3.3 FroyoStone Sense with Hastarin r8.4 Kernel). If it helps, my GSM signal is excellent, plus GPS, BT, and WiFi are all turned off when the drain occurs, and neither of the Hastarin Kernels are running SetCPU or modified from stock for the build. Moreover, quickly enabling and disabling Airplane Mode does not stop the high drain, and the only way I've found to stop it so far is to do a full reboot and not make any calls. D'oh!

Another strange thing I've also noticed is that the proximity sensor is always on while running Android. This is unlike Windows Mobile, where it's only on during a call. To verify that the invisible infrared sensor is always active in Android. I look at it through a camera, in order to view its infrared violet color light beam just left of the charging and notification LED. Please note that the sensor being on full time does not appear to the cause of high standby drain here, as drain is low until after a call.

Also, my current ROM and Radio are listed below in my signature, and I've tried a reformat with SD Formatter and reload to no avail, if it helps...

Many thanks in advance for any insight or help.

Best to all,

R
[HD2 Android SD Development] hastarin:
r8.5 Beta released

I have noticed the proximity sensor continuing to fire it's interrupt after the call ends, and this seemingly leads to the high drain, in my 8.4 kernel. I have not seen this problem in my 8.2 release

I believe I have traced the issue to some interaction between my code base and the new toolchain I tried using. I want to again thank curiousGeorge for his assistance helping me track this down by testing various kernels for the issue.

For those wanting to give it a go I'm making a beta of 8.5 available. This has a test patch for data (smd_tty) to see if it fixes the loop it gets in to trying to allocate buffers. Otherwise it is the same as 8.4 but built with the old toolchain to avoid the bug mentioned above.

http://www.multiupload.com/T8J37O3BNJ

EDIT - If you got the first version I posted, please be aware it's overclocked.

Sorry there is no extended battery version yet. If I get good feedback on this it will be released as 8.5 and I'll do an eb version then.
[HD2 Android SD Development] 2000impreza:
Edit: Didn't realize hastarin posted just before I did.

The standby battery drain issue can be solved by switching to mdeejay's S6.1 kernel or reverting to Hastarin r8.3. I switched to mdeejay's s6.1 and appears to be working fairly well.
[HD2 Android SD Development] rhacy:
Thanks so much for info and link hastarin. That said, not sure why the drain's happening with 8.2 on Core Droid. I'll test 8.5 and report back. Cheers!

Many thanks for the heads up on the S6.1 and 8.3 fix for the standby after call drain 2000impreza. Cheers!

Best to all,

R
[HD2 Android SD Development] slbenz:
Hastarin, thanks again for doing all the great work for us. A request from my end, if it is possible to include the camera fix into the kernel. I took your current 8.4 and included the camera fix into the folder so that if I did wanted to do changes to the current build of Sense Clean 2.3 to 2.4 and back again and compare, I would not have to add the fixes each time I changed the build. Just a thought. I even added the TMOUS MMS patch just in case into the folder I created. Again, always appreciate the time you put into your kernels.
[HD2 Android SD Development] hastarin:
The changes are build specific (eg Desire base) so it doesn't really make sense for me to do that sorry.

I tried to use mdeejay's Sense Clean 2.4 today when I rebuilt my phone, but I had to give up and modified 2.3 myself because I was getting strange issues with WiFi and a message about system process force close/wait.
[HD2 Android SD Development] hutc:
hi hastarin

will test and report to you in am about the kernel 8.5 beta ,thank you once again. iam using it right now

wifi is good download is 4.5 mbps and upload is 2mbps

will report to you completely

is there any program to check and report how your battery is being consumed
[HD2 Android SD Development] rhacy:
Yes, download Current Widget for free from the Market, and set it to save to log file every minute. Try it to test standby drain before and after making a call, and please post your findings.

Thanks,

R
[HD2 Android SD Development] hutc:
thank you

anybody can i use the set cpu with this

thank you, i am going to use it and then report
[HD2 Android SD Development] 2000impreza:
standby battery drain fixed

The standby battery drain issue appears to be fixed in the 8.5 beta kernel. I made several calls and after each call the battery drain returned to 4 - 7mA. I also removed the 0.7 ril wrapper to test the data connection stability.
[HD2 Android SD Development] jmmmmm:
Wow... I appreciate what you are doing but who deserves that? :( :confused: