yashsingh1/xdaforums huggingface dataset:
[Nexus S Android Development] FirePoncho86:
Poncho's Average Battery Study

I'm an average guy. I use my phone like an average guy. I've been monitoring with systempanel all day, and i've come to a conclusion. for tl;dr, scroll to the bottom. I am on CNA 3.3.2 with Marmite 4.2.

So I have average usage. I use my phone for a bit of calling, texting, browsing, some games, streaming music to my xbox. I used 2g+wifi for some of the day, and 3G+data for the rest, my signal was from Good to decent.

After 10h 57m of uptime...

I lost 75% battery

Screen on time was 3h11m, resulting in 35% of my batter drain

Android OS CPU total was 1h8m, 288KB sent, 759KB received.

Now I've read many posts on these forums that average screen on time for the Nexus S is about 4 hours with average use. This is easily obtainable, even with the android OS usage, Can it be cosmetic?

Like I said, I have been Using SystemPanel and I took sceenshot as I don't know what some of this means.

System Processes has taken the bulk of my usage, with 9.7%

System is second place, with 2.3% (I think this is reasonable, System only took 5% of my battery)

I pressed System processes to see what it is, this is where my nubishness shows, I have no idea what Kworker/u:(number) is.

I've uploaded screens, hopefully Bedalus can analyze this, and compare, as he has been running system panel too.

tl;dr I am getting average to good battery life, even with Android OS using alot of battery. Either It is a cosmetic bug, or if I fix it, I'll be getting 6H screen on time.
[Nexus S Android Development] xjerlzx:
Well it the format process worked when I was awake last night. But then I woke up seeing this...
[Nexus S Android Development] Blackcrx:
Difference is your awake time is 2 mins compared to my awake time of 30mins minimum.

I didn't format my SD card as be dal us suggested. But what I did do was do a fresh install. Format system, data, cache, etc..

Installed rom and kernel. Setup from scratch. So far so good. 1 hour on time. 2 mins of CPU time and no awake time
[Nexus S Android Development] :
Kworker has a high likelihood of being connected to wakelocks.

Perhaps all it is is BLN. If you want BLN to time out, have max_blink_count at a sensible value.
[Nexus S Android Development] :
Maybe not.

Just had a look over my BLN code: in the case that blink_finalstate was set to 1 (i.e. light stays on after timeout) the wakelock was held when it should have been released. I'll upload a fixed version now. Fingers crossed, this will solve the Android OS problem completely.
[Nexus S Android Development] kwibis:
So just normal download link? Or do you have an updated download link?
[Nexus S Android Development] :
http://xdaforums.com/showpost.php?p=30539588&postcount=1698

Updated to 4.3.1

-Fixed potential wakelock issue (depending on blink_finalstate being enabled)

Hopefully this update fixes Android OS drain.

EDIT: Links fixed!
[Nexus S Android Development] yihtang:
I am on 4.2 - I didn't turn on BLN, but experiencing high android os usage (around 40-50%). I like to stay with 4.2 because 4.3 gave me some reboots (quite random, like when I am typing this post on xda, or when updating my apps). I will test on 4.3.1 and report with last_ksmg if I am still having problems :D
[Nexus S Android Development] :
Maybe you should format your system and cache, reinstall your ROM and my kernel
[Nexus S Android Development] Blackcrx:
But what if your bln isn't set to blink. Mines set to stay on. NStools shows 0 seconds time out. BLN pro shows 1hr time out.

---------- Post added at 02:20 AM ---------- Previous post was at 02:16 AM ----------

That's exactly what I did and it fixed my issue. Format system, data, loader, basically everything except SD card. Flashed ROM and kernel. So far 6 hours on time and android os is at 9mins CPU time, no awake time
[Nexus S Android Development] :
NSTools timeout setting affects nothing. I don't really know why it's there. My guess is that it might have had some purpose with CM9 (ICS) only.

In my kernel you need to set the max_blink_count to control the timeout. I've put a safety check in the code, that if you want the final state to be on, and you don't want blinking, the BLN wakelock is released immediately so the processor can sleep. Then it doesn't matter what max_blink_count was set to.

However, if you want blinking, or want a shorter timeout with no blinking, the processor needs to be awake to control it. I've limited the timeout to a maximum of 20 minutes in v4.3.1. That should be more than enough for anyone.

Yeah, I'm not 100% certain that my faulty BLN code is to blame, but it certainly didn't help. But we need a bit of testing time now to see what people come back with.
[Nexus S Android Development] Articudos:
http://db.tt/TBw0ywGi

Just freezed in 4.3+ dario's rascarlo version.

Adb reboot worked,

My settings:

Didn't enabled swagger, no OC.
[Nexus S Android Development] :
While your phone was off, a bunch of apps suddenly got killed, then the device wouldn't wake up. I don't know why this happened.
[Nexus S Android Development] caliban2:
Sounds very familiar though... ^^
[Nexus S Android Development] :
I'm thinking of going back to 3.0.38, or even 3.0.34 which was totally fine. I'll build a test one and we can see if these sorts of issues go away again.

EDIT: http://xdaforums.com/showpost.php?p=30539588&postcount=1698

I posted a link to a new 3.0.38 version, so if people have had issues, and want to help eliminate the kernel mainline patch set as the cause, please try that download.
[Nexus S Android Development] FirePoncho86:
Testing now, I've never had any issues with your kernel, aside from the Android OS, which: A) I'm still getting sold life with. B) I can apparently fix if format everything except sdcard

Sent from my nexus s eating jellybeans in the matr- er...uhm...Marmite ;)

---------- Post added at 08:55 AM ---------- Previous post was at 08:31 AM ----------

If kworker is connected to wake locks, could it be possible that I got those wakelocks because I was streaming music from my phone to my TV? I was doing this for a solid 2 hours yesterday. Might sound like a stupid idea, but I'm still learning all this stuff :P

Sent from my nexus s eating jellybeans in the matr- er...uhm...Marmite ;)
[Nexus S Android Development] :
Yeah, it would keep your phone awake, but it would involve media server specifically.

I think the Android OS usage is solved. I suspect faulty code in bln.

Anyone who gets a freeze should try the .38 version because this may be a different issue entirely.
[Nexus S Android Development] asphantix:
Had a freeze with 4.3.1while playing a game. The buttons didn't respond at all. Had to pull out the battery so no last kmsg.
[Nexus S Android Development] :
I'll upload a 3.0.38 build for stock as soon as i can
[Nexus S Android Development] gregorypeg1000:
My phone freezed on v4.3 marmite while i was downloading an app from play store.Also had to remove battery.Went back to 4.2 which is rock stable for me.
[Nexus S Android Development] :
Here are two new builds, but using old configurations:

marmite_v4.3.2: http://d-h.st/fEM

marmite_StockOTA_v4.3.2: http://d-h.st/1UJ

-Gone back to mainline 3.0.38

-Disabled s5p high res timers

However, BLN wakelock issue is fixed, and wifi is patched to latest. This time I used the patches directly from https://android.googlesource.com/kernel/common/+/android-3.0

So I've gone forwards in some ways, but back in others. I'm not totally convinced that the mainline is to blame for the Android OS issue. But I'm going back to 3.0.38 anyway, because I'm fairly certain this is the point after which freeze and reboot issues started emerging. The other thing I've rolled back on is the high res timers. I can't remember why, but I also think this might be the culprit for the freezes. Also, formatting the SDCard* partition may help.

Because the issues are fairly sporadic, and I haven't personally suffered with them, it makes it very tricky to diagnose. Anyway, the narrowing down process must continue!

*copy all your music/photos/downloads/CWM backups/titanium backups/etc. to a computer first!
[Nexus S Android Development] doc_v15:
Never had an issue with v4.3.
[Nexus S Android Development] :
Some people are. There must be a reason for it, but it is proving quite difficult to pin down.
[Nexus S Android Development] :
Never had a freeze problem or anything, but I do have the androidOS having unusually high battery drain. Drained 12% overnight (about 8 hours), which, in my experience, is quite a bit
[Nexus S Android Development] alen1901:
Because test environment is not controlled and theres not many of them who understand everything. Im on v3.5 still, and NO ISSUES AT ALL. And it has mainline 3.0.40. So.. :D

Sent from SpeedMachine i9023
[Nexus S Android Development] mpjoe2000:
hi bedalus, take a look to this screenshots, i have not change baseband or ROM.

What do you think about it?
[Nexus S Android Development] mpjoe2000:
Maybe some of them have installed buggy apps, malwares and a lot of cracked apps!

Maybe some of them have some buggy script tweaks installed

Some of them don't give all details about about their issues

Must of them can't even reproceduce the bug or give at least a logcat.

Bedalus you must demand full detail bug reports!
[Nexus S Android Development] jimdem:
I've never had any issues with any of your current versions. Everything is fantastic. Running with cna and smartass+cfq. Extra smooth. Thank you for sharing your work. ;)
[Nexus S Android Development] kwibis:
Just reporting: after switching to 4.3.1 the issue of android OS is gone for me and my gfs phone. Thanks bedalus! Your kernel rocks!
[Nexus S Android Development] :
It's not a problem of the kernel. Very strange though.
[Nexus S Android Development] FirePoncho86:
I've also lost the android OS usage with 4.3.1. BUT, I find my battery life, especially on standby is worse then in 4.2. CPUspy shows that my CPU stays at higher clock rates rather than lower ones. On 4.2 it would stay on lower ones rather than higher. I am confused...but it might just be me, or maybe the .34 mainline likes my phone?

Sent from my nexus s eating jellybeans in the matr- er...uhm...Marmite ;)
[Nexus S Android Development] FirePoncho86:
Android OS bug gone from 4.3.1. I was one if the people who had it before 4.3.x

Sent from my nexus s eating jellybeans in the matr- er...uhm...Marmite ;)
[Nexus S Android Development] jojoost:
For me it disappeared on 4.3.2!! Great work Bedalus
[Nexus S Android Development] tchaari:
Hey bedalus, how is it going your marmite? :)

Can you please fix bluetooth in 4.3.2? it seems broken.
[Nexus S Android Development] alen1901:
Im sorry if this is stupid question, but, does radio version can have impact on phones permormance? I flashed older radio version and it seems like my phone is even faster on same settings..

Sent from SpeedMachine i9023
[Nexus S Android Development] jojoost:
Try wiping cache and reflashing the kernel!

---------- Post added at 11:47 PM ---------- Previous post was at 11:47 PM ----------

Maybe an old radio uses less ram? I don't know
[Nexus S Android Development] asphantix:
Had a SOD with v4.3.2 for stock. Using the power button only toggled the LEDs on and off.

I'm back on 4.2 since it's the last stable for me. 3.5 also was stable for me.
[Nexus S Android Development] tchaari:
Installed again and everything was fine :) Didn't stick at first install. Though, I did a wipe dalvik & cache, flashed the kernel and fixed permissions.
[Nexus S Android Development] linuxxp:
I have same issue (battery drain) with 4.3.2. Try full wipe but no success. This drain is gone after some random time.
[Nexus S Android Development] :
Uh, ok. Let's call that one a fluke. If it happens again, I'll go back to .34
[Nexus S Android Development] :
I've got a feeling that wiping might be necessary under certain conditions, but I haven't been able to figure out what those conditions might be.
[Nexus S Android Development] :
I don't believe in stupid questions, and I appreciate your help testing my kernel! I know some people like kb3 because it's uncapped. I never heard about performance increase, but if it's a real effect you can confirm by flashing your previous radio and looking for a performance decrease
[Nexus S Android Development] alen1901:
Tnx, i flashed KF1. Before i was on newest KI1. After flashing older radio, phone really got some performance upgrade. Maybe its just coincidence but.. thats what my eyes see. And i have JB bootloader xxlc2. Now im not in the need of flashing newer kernel. :D

Also, what do you say about 3.0.41 mainline, is it worth to update to 3.0.41?

Sent from SpeedMachine i9023
[Nexus S Android Development] jackie70:
I've updated to version 4.3.2 (from 4.3.1) and it seems swagger is gone?

can't find the swagger folder under /sys/class/misc.
[Nexus S Android Development] 4tticuz:
For me v4.2 runs the best!

no Android OS issue or something like that.

Thanks for your great work!
[Nexus S Android Development] XxSilent22xX:
Changing your radio will only affect the phones download speed not overall performance or fluidity of the os.

As for the kernel, I see nothing wrong with 4.2. there might be a kernel wake lock but i have yet to experience it or trigger it and I have tried it on the following ROMs:

Slim bean

Baked bean

Cm10 nightly

Currently I am on the latest cm10 nightly with its stock kernel and a android os usage of 13% which is only 2% lower then the highest I have seen on marmite 4.1/4.2.

Sent from my Nexus S
[Nexus S Android Development] caliban2:
Just to post something different from all those percentages and screenshots - which are rather pointless in my opinion:

Bedalus found another 4 mb of ram, it's 400 in total now. :) So that leaves another 4 in the lingo... *making a greedy face*

j/k, this is very nice.

Just flashed back to 4.3.1.

4.3.2 was doing great, but .1 seems to be most "advanced" and I only had it on for a couple of hours before .2 came along, so I'm curious.
[Nexus S Android Development] :
Yes, sadly swagger is gone. It interferes with civilised behaviour.
[Nexus S Android Development] JokerAce:
I hope the image you posted didn't misinterpret Android OS with Android System. I am still having Android OS bug on 4.3.2. I have formatted my sdcard and reflash kernel with caches wipes.
[Nexus S Android Development] asphantix:
Also noticed that I have crap performance in some games (ski safari for example got unplayable) with marmite 4.3+ and it's fine with 4.2.

I didn't alter my OTA rom in any way so I suspect that the stuttering was caused by the kernel.

But I will flash 4.3.2 again soon for more testing. Keep up the good work :)
[Nexus S Android Development] :
Do you remember when this started happening?
[Nexus S Android Development] kwibis:
Bedalus, I believe it has been asked before, but how come your colors are off from morfics'? Just flashed the TUEV and have to say that they look absolutely stunning. Tried it? Maybe you'd be convinced to implement it =D
[Nexus S Android Development] :
Have you tried tweaking the rgb values in voodoo? It should be possible to get pretty close.
[Nexus S Android Development] kwibis:
Guess need to download voodoo app for that? As ns tools doesn't work:/

And do you have any suggestions for settings?
[Nexus S Android Development] :
202... / 172... / 232...

For R / G / B

but everyone has their own tastes
[Nexus S Android Development] kwibis:
Are the NS settings disabled because of Morfic's colours? As I've done a clean install with everything working, only after flashing kernel it is not possible to adjust it anymore.
[Nexus S Android Development] :
AFAIK, NSTools never had the option to adjust colors. Only voodoo did that
[Nexus S Android Development] :
Do you mean ns tools?
[Nexus S Android Development] kwibis:
No I mean under the tab "advanced" in CM10 you have the display settings that are non adjustable after flashing the kernel.
[Nexus S Android Development] :
Cm use their own kernel and methods for interfacing with it. Voodoo is just as good a solution. It's definitely worth having the paid version, just to support supercurio!
[Nexus S Android Development] kwibis:
It's the one in the market right? Voodoo sound plus, as that one does not offer screen adjustments :\ If you could link me to the app that I can use to set my screen adjustments with your kernel :D
[Nexus S Android Development] :
Voodoo sound: https://play.google.com/store/apps/details?id=org.projectvoodoo.controlapp

Voodoo plus licence: https://play.google.com/store/apps/details?id=org.projectvoodoo.controlappdonate

You don't need to pay for the licence, but it's a nice gesture. But without it, the settings won't stick across reboots.
[Nexus S Android Development] kwibis:
But am I stupid? :confused: where are the options to ajdust screen settings?
[Nexus S Android Development] jojoost:
You know there are no voodoo colors options with a SLCD screen, right?
[Nexus S Android Development] kwibis:
I've the amoled version

Edit: I know where the settings should be, maybe I get the european version of the app? or does it auto detect amoled screens?

Edit 2: Got everything working now, don't know why I couldn't find the settings before. Thanks for your help guys
[Nexus S Android Development] :
Can you go to your settings > about phone... See if your phone has become an i9023

It happened to someone a few posts ago. (wasn't sure if he was joking tbh) but maybe it is a real thing?
[Nexus S Android Development] jojoost:
Bedalus, would this kernel version 3.4.39 be more energy sufficient than 3.5? Because later versions aren't really working out for me, because of the Android OS bug... and is it stable of course?

I ask it because the DI frequency is lower, and I'm looking for long battery time ATM!
[Nexus S Android Development] linuxxp:
I return again to the issue of battery drain. Today I decided to try the lastest Air KERNEL and Matr1x 22.5. Shortly after flashing no problem, but later it appeared. These two also have battery drain. Surely it's kernel issue?
[Nexus S Android Development] caliban2:
No, my bet's always been on ROM.

Well, ROM and users, actually. (Lots of bugs reported for cm10-nightlies, none of these on jellybro, yet jellybro IS cm10 + cherries -> go figure...)

I never had this drain on jellybro, and it's still not happening. Bedalus, too early to claim it stable, but 4.3.1 seems very nice. :)
[Nexus S Android Development] kwibis:
For me it's still the 9020 :D
[Nexus S Android Development] mpjoe2000:
it was a real strange crazy thing :silly:

---------- Post added at 09:15 PM ---------- Previous post was at 09:00 PM ----------

it has been some days since i have installed Codename Android 3.3.2 and i haven't had any android os draining issue. I've tested Air Kernel (at least 1 day) and Marmite Kernel without any draining issue. I like marmite because i get a better battery life especially when my phone goes to sleep.

The only way i have reproduced your "android os draining bug" is when i left my phone downloading via wifi, post-install game files (>100MB). It has been the only way i have seen "android os" process going up of the battery use. Please check your apps and try to install a firewall or an ad blocker and make your tests.
[Nexus S Android Development] :
Any firewall/ad blocker app you recommend? Thanks
[Nexus S Android Development] xjerlzx:
4.3.2, os usage still high, think I will format my SD later
[Nexus S Android Development] mpjoe2000:
Before format try to fix permissions via recovery!!!
[Nexus S Android Development] 309041291a:
Anyone getting 5 hours on screen use on JB? I can't get it anymore.

Nexus S. (GSM i9020a)

Paranoid (1.991 - 4.1.1)

Air Kernel (Week 193 - Vodoo)

Ondemmand (1000/200)

Deep Idle (On - Deadline)

BLX (98 - Inverted. Apps)

Black Exodus (UnderVolted)
[Nexus S Android Development] JokerAce:
My answer won't help you. I came from matrix Kernel when you released 4.3. On matrix I didn't notice Android OS being listed with 25%
[Nexus S Android Development] Imppy:
3g is the really battery killer...which kernel has the best battery life at the moment?
[Nexus S Android Development] towelboy:
Weird battery drop also high android os usage. Marmite v4.3.2
[Nexus S Android Development] :
It's becoming probable that drain statistic is a ROM or usage issue.

Here are some all-purpose strategies for resolving problems, in ascending order:

No. 1

Go to recovery, wipe cache, fix permissions

No. 2

Go to recovery, wipe cache, format system, flash ROM, flash kernel

No. 3

Backup apps, go to recovery, wipe cache, format system, format data, flash ROM, flash kernel (you will have to restore your apps and settings)

No. 4

Backup apps, go to recovery, mount SDCard, copy app backups / CWM backups / photos / music / Downloads / etc. to a computer, wipe cache, format system, format data, flash ROM, flash kernel (you will have to restore your SDCard contents, your apps, and settings)

One user suggested it happened while an app was syncing data. I wonder if I forgot to turn on PM_FAST. If I did, that might explain why people are getting improved sleep, and could also explain why Android OS is higher (if data syncing falls under this statistic).

I'll have a look now.

EDIT: Yes, PM_FAST was not included. So I'm including it now. I'm also merging up to 3.0.41! :wreckless:
[Nexus S Android Development] xjerlzx:
Did that a lot of times hahahahhaa I am trying fix permission with big men patch(camera not working on 4.3.2) after patch it was working. Now charging up to 100 then test for a andrio os batt drain
[Nexus S Android Development] rrohanjs:
i am, with androxide marmite 4.2 deadline/smartass v2

---------- Post added at 01:08 PM ---------- Previous post was at 01:05 PM ----------

hey bedalus, when im using backlight dimmer on 4.2 with androxide .. while typing the light comes on and stays on till i press the back button, what could the reason be and how can i get red of it

i have set it to 500ms
[Nexus S Android Development] :
I don't have that issue. Seems quite strange. Anyone else getting this?
[Nexus S Android Development] :
Here is v4.4

- For Stock OTA only: http://d-h.st/vh3

- For all other ROMs: http://d-h.st/zdM

This version updates to 3.0.41 and includes PM_FAST.

PM_FAST has full-speed wifi when the screen is off. This means faster downloads/syncing, and actually saves power during this activity, at the expense of slightly higher idle drain.

Hopefully this will resolve the Android OS statistic bug for everybody. However, if you still have issues, please report fully your ROM, your uptime, your screen-on time, and your Android OS statistics.
[Nexus S Android Development] linuxxp:
Thanks! Now testing...
[Nexus S Android Development] xjerlzx:
Same here!
[Nexus S Android Development] rrohanjs:
testing this too since no one seems to have the problem im facing in 4.2
[Nexus S Android Development] :
Maybe try a different kernel with bld. See if the problem goes away. If you still have the problem, it must be the ROM
[Nexus S Android Development] rrohanjs:
pheww .. its working perfectly well on 4.4 now .. thanx ..

so far kernel is smooth fast .. using deadline/smartassv2
[Nexus S Android Development] :
That's good. Must have been a glitch.
[Nexus S Android Development] rrohanjs:
i dont know what it was because i got that problem on miui also with 4.2, i even flashed the kernel again to see, but then alls good that ends well, now i have a perfect working kernel :victory: :silly:
[Nexus S Android Development] :
Ohhhh... 4.2 had a glitch in the BLN code. It might have been interfering with BLD somehow.
[Nexus S Android Development] CrackerTeg:
bedalus, I gotta ask this. Is bigmem now included in the kernel? I saw in the changelog that the patch was for pre 4.3. I haven't been following the last few days as my phone was getting moisture sucked out of it in a small container full of kitty litter after its fateful swim on Thursday. The kitty litter was new and not used before anyone says anything.