Android OS killing battery

Search This thread

RyderOCZ

Member
Dec 30, 2011
15
4
Kalamazoo
These are my results on LTE/CDMA SGN.
I am running AOKP Milestone2 with Franco Nightly #12.
I have the KK15 Bootloader and the EK06/EK04 radios (4.0.3 radios for CDMA/LTE respectively).

I do NOT have the huge battery drain, but I DO have very high Android OS usage. Just think what the battery would be like if we can resolve this.
 

Attachments

  • detailed_battery.png
    detailed_battery.png
    34.4 KB · Views: 200
  • kernel_wakes.png
    kernel_wakes.png
    56.2 KB · Views: 177
  • main_battery.png
    main_battery.png
    46.2 KB · Views: 192
  • os_battery_detail.png
    os_battery_detail.png
    31.5 KB · Views: 177
  • partial_wakes.png
    partial_wakes.png
    71.7 KB · Views: 173
  • better_battery.txt
    16 KB · Views: 4

McDeadagain

Senior Member
Dec 22, 2011
91
26
Roswell
I switched back to Android 4.0.2 (MoDaCo custom Ir9) and Franco #12, and guess what's not giving me any more trouble? Android OS.

Please note that I have airplane mode+WiFi enabled in this image because I have no cell reception at work. Like my more rigorous scenario above, this configuration was also causing preposterous battery drain, which further lends credence to the theory that it is an Android 4.0.3 problem preventing the phone from going into deep sleep. Perhaps this is one of the glaring reasons why an official 4.0.3 image has not yet been released for the Toro or Maguro.

Let me be very clear: Android OS should never be the #1 consumer of power. It should be your display, phone idle, or an intensive application such as a game. The core Android OS process should not be consuming as much battery as it does in Android 4.0.3. Even if you get what you feel is great battery life it could be better if this problem were fixed. Your idle drain is 5-20x higher than it could be.

Android Battery Stats

Completely agree, and as a non-rooter I remain hopeful that Google will acknowledge and fix the issue.

I love android, but I honestly cannot imagine recommending it to anyone non-technical. It should not be this much work.

By the way, that battery stats screenshot is gorgeous ;-) Would love to get that flatline on mine.
 

RyderOCZ

Member
Dec 30, 2011
15
4
Kalamazoo
@Droiddog,

That is interesting, you have several "spurts" of awake time with no screen on, but you show a huge amount of deep sleep time. Curious.
 

droiddog

Senior Member
Dec 3, 2010
96
1
Orange County, CA
@Droiddog,

That is interesting, you have several "spurts" of awake time with no screen on, but you show a huge amount of deep sleep time. Curious.

I'm know. It's weird. Those shorts spurts are the android os wake time. They match up perfectly to the 350Hz time. I can't figure out what's doing it. If anyone knows a program/app to help figure it out let me know. Btw, I'm running lte 4.0.2 stock rooted unlocked.
 

Thracks

Senior Member
May 9, 2010
262
75
37
Austin
I have the same symptom.

My phone reported deep sleep for 7 hours with CPU Spy, but the Android OS process had the phone awake for almost every single minute of those seven hours.
 

fiveoh

Senior Member
Aug 2, 2010
53
0
I, like so many others, have also been having this issue with my phone. It all started after I switched kernels. Today I went back to the kernel I was using prior to the issue, and AndroidOS is no right at the bottom of CPU usage. I did wipe my cache before applying g the kernel, so if someone could do a cache wipe and then monitor their battery stats it might be a good step.

The kernel I am using is the 1.5 version found at http://xdaforums.com/showthread.php?t=1399970

Well kernel didn't fix it. After a reboot today, the problem is back.:mad:
 

tannor

Senior Member
Dec 12, 2010
235
15
I was just reading a lot of this thread, and my experiences has been good overall.

Screen taking up 53% while Android OS is 18%

Yeah that is high for Android OS but I just checked and going 18 hours, at 18% left.

To me that is great since I also watched a 1.5 hour HD movie on the train on the way to work this morning.

The only thing I do that might be different my phone is always in 3G mode all the time, since 4G is horrible around here for any phone.

I am still on stock 4.0.2, and still locked. After reading all this I think I might wait a bit before trying different roms and kernels.
 

s2d4

Senior Member
Mar 28, 2009
1,341
395
Setup:

1. Performed a complete wipe on my Maguro SGN.
2. Flashed AOKP Build 16 and Franco 12.
3. Did the initial setup process to sign in with Google.
4. INSTALLED ABSOLUTELY NO APPLICATIONS AND CONFIGURED NO SETTINGS
5. Installed BetterBatteryStats via ADB.
6. Charged phone to 100% and then unplugged it straight to screen off.
7. Phone spent 7h1m with its screen off, which is 100% of the time the phone was on
8. UGKL1 baseband + PRIMEKK10 bootloader.

RESULTS: Phone lost 31% battery in 7h1m. The phone was only idle for less than 30 minutes of that duration. It was not kept awake by any user application. and I have the screenshots to prove it.

1. BetterBatteryStats Kernel Wakelocks
2. BetteryBattery Stats Partial Wakelocks
3. Main Android Battery Screen
4. Detailed Android Battery Screen
5. Android OS Process Details
6. BetterBatteryStats Log File

THIS IS NOT A USER ISSUE.
you really don't make it easy for ppl to see what the problems is. Something is stopping your phone to go into deep sleep. 1864 counts, duration of over 5 hrs
Code:
================
Kernel Wakelocks
================
"suspend_backoff" (): 5 h 10 m 26 s  (18626 s) Cnt:(c/wc/ec)1864/0/1864 72.0%
"musb_autosuspend_wake_lock" (): 1 h 1 m 48 s  (3708 s) Cnt:(c/wc/ec)18546/0/0 14.3%
"mipi_link" (): 5 m 14 s  (314 s) Cnt:(c/wc/ec)562/0/0 1.2%
"radio-interface" (): 2 m 35 s  (155 s) Cnt:(c/wc/ec)145/0/0 0.6%
"alarm_rtc" (): 2 m 19 s  (139 s) Cnt:(c/wc/ec)153/0/90 0.5%
"event2-201" (): 2 m 14 s  (134 s) Cnt:(c/wc/ec)18549/0/0 0.5%
"KeyEvents" (): 1 m 3 s  (63 s) Cnt:(c/wc/ec)37285/0/0 0.3%
"PowerManagerService" (): 51 s  (51 s) Cnt:(c/wc/ec)1198/0/0 0.2
Pass this info to Franco or romanbb if you want something done.
btw, i am on different bootloader(kl01) and modem(dvkk6).
EDIT: Just realised that now rom/kernel are different coz i havent updated yet..
 
Last edited:

gogol

Senior Member
May 20, 2005
3,735
216
I'll just leave this here... Reverts the Wifi FW to the previous version from 4.0.2 to match the 4.0.2 bcm4330.hcd version which is used with current 4.0.3 AOSP ROM's

The only file which really changes is fw_bcmdhd.bin, but I've included the rest for consistency to ensure things actually work. I can't test the TORO version, but MAGURO works for me (as I'm on a GSM Nexus)

For me, battery drain from Android OS is now completely gone, and also the Wifi sleep settings are working again (so turn off when screen off/not on charge, etc, from Advanced Wifi options)

Please feedback with results :) And remember to do a Nandroid backup before you flash/test!

MD5's

bf095df14eb5099f00842dbf5de79fd8 TORO-galaxy-nexus_battery_wifi-signed.zip
7c903d2ee534e00242c52f6cb774494b MAGURO-galaxy-nexus_battery_wifi-signed.zip

Cheers

Paul

Paul, how is the Android OS Keep awake time now?

Could you post a screenshot?

Thanks

Sent from my Galaxy Nexus using xda premium
 

Genious

Senior Member
Jun 24, 2010
93
1
D.C
I think I may have this OS drain issue but I'm not really sure how to read all the stats
4588c2a5-01f7-1c54.jpg


Sent from my Galaxy Nexus using XDA App
 

Thracks

Senior Member
May 9, 2010
262
75
37
Austin
you really don't make it easy for ppl to see what the problems is. Something is stopping your phone to go into deep sleep. 1864 counts, duration of over 5 hrs
Code:
================
Kernel Wakelocks
================
"suspend_backoff" (): 5 h 10 m 26 s  (18626 s) Cnt:(c/wc/ec)1864/0/1864 72.0%
"musb_autosuspend_wake_lock" (): 1 h 1 m 48 s  (3708 s) Cnt:(c/wc/ec)18546/0/0 14.3%
"mipi_link" (): 5 m 14 s  (314 s) Cnt:(c/wc/ec)562/0/0 1.2%
"radio-interface" (): 2 m 35 s  (155 s) Cnt:(c/wc/ec)145/0/0 0.6%
"alarm_rtc" (): 2 m 19 s  (139 s) Cnt:(c/wc/ec)153/0/90 0.5%
"event2-201" (): 2 m 14 s  (134 s) Cnt:(c/wc/ec)18549/0/0 0.5%
"KeyEvents" (): 1 m 3 s  (63 s) Cnt:(c/wc/ec)37285/0/0 0.3%
"PowerManagerService" (): 51 s  (51 s) Cnt:(c/wc/ec)1198/0/0 0.2
Pass this info to Franco or romanbb if you want something done.
btw, i am on different bootloader(kl01) and modem(dvkk6).
EDIT: Just realised that now rom/kernel are different coz i havent updated yet..

I've given all the information there is to give. Every possible log and screenshot on a fresh ROM with no apps but BetterBatteryStats, exactly as you requested. Do you have anything useful to offer?
 

s2d4

Senior Member
Mar 28, 2009
1,341
395
I've given all the information there is to give. Every possible log and screenshot on a fresh ROM with no apps but BetterBatteryStats, exactly as you requested. Do you have anything useful to offer?
I am not on 16 as I said I haven't update it yet.
It would've made more sense if you stayed on milestone2 to test rather than build 16, to isolate the issue as we were on the same setup when I had no problems but you did.
Now new variables have been introduced.
Anyway, Build 17 is out coz deep sleep issues.

O that wasn't a request, it was a suggestion to help find the issue.
Don't drag me into this attitude game of asking if I can be useful to you, especially after trying to help.
 
Last edited:

Thracks

Senior Member
May 9, 2010
262
75
37
Austin
I am not on 16 as I said I haven't update it yet. It would've made more sense if you stayed on milestone2 to test rather than build 16.
Build 17 is out coz deep sleep issues.

The deep sleep issues were corrected by enabling and disabling bluetooth, which was done for this run.

Even so, I'm continuing to experience the same issue on b17, and I did on M2.

Nothing will appear in any log or screenshot we post, because Android OS is the process that's keeping the phone awake. It certainly is not an app holding wake. No, it's something in Android. Now, what that something actually is is beyond my ability to discover.

Even so, I'll be back in ~12 hours with another battery run on AOKP b17/Franco 12/XXKL1/PRIMEKL01. Hopefully something improves.
 

BlackRabbits

Senior Member
Aug 19, 2010
86
12
Vancouver
I've been experiencing this issue myself, and the only thing that looks really suspect is com.android.email, which registers at a whopping 9600 wake locks, with the next highest at ~500. Not sure if this helps at all.

Sent from my Galaxy Nexus using Tapatalk
 

PaulW21781

Senior Member
Jan 15, 2006
356
67
Manchester
Paul, how is the Android OS Keep awake time now?

Could you post a screenshot?

Thanks

Sent from my Galaxy Nexus using xda premium

I'll post a screenshot up later on today (trip to the dentists first), but for the 7 hour uptime, the wake time for Android OS was around 15 minutes longer than the screen on time.
 
Last edited:

Syndicate0017

Member
Feb 15, 2011
6
10
I'm giving Paul's zip a shot now. Will edit this post with my results in a couple of hours.

Edit: About 12 hours on Paul's zip and I have about 66% battery life remaining with a little over an hour screen time. Relatively light use today. Still seeing high android OS and wake time is much higher than screen on time.
 
Last edited:

zkosn

Member
Aug 18, 2010
9
1
Austin
Added info from Dianne Hackborn @ Google

Dianne Hackborn @ google posted this on her google+ page yesterday.


Android OS is power usage of the core system, below the Android framework. This is the kernel (and its drivers) and many of the low-level non-Dalvik processes like init, ueventd, etc. (Prior to ICS the only thing that could impact this was CPU usage of those processes; as of ICS this is also any wake time that is not accounted for by Android framework wake locks.)

So, this is probably outside of what I can really address, since the part of Android I work on is system_server and the frameworks (Android System would typically be things I know about more). This is also where manufacturer-specific issues can appear, if they have their own native daemons (they very often do) with issues, or driver issues, etc.

At any rate, to dig into this more than just the user UI shows, you can hook up adb and use "adb shell dumpsys batteryinfo" to see the low-level data about what is going on to cause that power usage to be shown in battery stats. For example, for this ICS phone I've had sitting on my desk, here is the data under user 0, which is Android OS is measuring:

Code:
#0:
Proc irq/308-mxt224_:
CPU: 0ms usr + 210ms krn
Proc iscan_sysioc:
CPU: 0ms usr + 1s 100ms krn
Proc /init:
CPU: 730ms usr + 1s 290ms krn
Proc ksoftirqd/0:
CPU: 0ms usr + 60ms krn
Proc vold:
CPU: 70ms usr + 80ms krn
Proc file-storage:
CPU: 0ms usr + 10ms krn
Proc kworker/u:4:
CPU: 0ms usr + 1s 370ms krn
Proc kworker/u:3:
CPU: 0ms usr + 5s 10ms krn
Proc kthreadd:
CPU: 0ms usr + 4s 480ms krn
Proc loop0:
CPU: 0ms usr + 20ms krn
Proc loop1:
CPU: 0ms usr + 20ms krn
Proc jbd2/mmcblk0p2-:
CPU: 0ms usr + 2s 150ms krn
Proc netd:
CPU: 110ms usr + 450ms krn
Proc mmcqd/0:
CPU: 0ms usr + 11s 540ms krn
Proc kworker/0:0:
CPU: 0ms usr + 9s 50ms krn
Proc kworker/u:0:
CPU: 0ms usr + 4s 470ms krn
Proc kworker/0:1:
CPU: 0ms usr + 9s 490ms krn
Proc kworker/0:2:
CPU: 0ms usr + 3s 480ms krn
Proc kworker/u:2:
CPU: 0ms usr + 5s 30ms krn
Proc kworker/u:1:
CPU: 0ms usr + 7s 440ms krn
Proc bdi-default:
CPU: 0ms usr + 180ms krn
Proc zygote:
CPU: 180ms usr + 700ms krn
Proc debuggerd:
CPU: 0ms usr + 30ms krn
Proc flush-179:0:
CPU: 0ms usr + 670ms krn
Proc irq/334-cypress:
CPU: 0ms usr + 10ms krn
Proc yaffs-bg-1:
CPU: 0ms usr + 470ms krn
Proc khubd:
CPU: 0ms usr + 10ms krn
Proc ueventd:
CPU: 30ms usr + 40ms krn
Proc dhd_watchdog:
CPU: 0ms usr + 180ms krn
Proc mmcqd/0boot1:
CPU: 0ms usr + 10ms krn
Proc flush-31:4:
CPU: 20ms usr + 50ms krn
Proc flush-31:6:
CPU: 0ms usr + 50ms krn
Proc kswapd0:
CPU: 0ms usr + 3s 210ms krn
Proc sync_supers:
CPU: 0ms usr + 30ms krn
Proc dhd_dpc:
CPU: 0ms usr + 2s 640ms krn
Proc installd:
CPU: 20ms usr + 290ms krn
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    battery drain

    Hi,

    I have also big issues with battery drain, (from 35mA to 150mA in standby, sometimes goes 13mA but only for a couple of minutes).
    After inspecting various logs and kernel drivers i'm absolutely positive it's kernel driver issue. Well, to confirm this i need some kernel logs, so if any of you can post (pastebin preferably) dmesg logs. (adb shell dmesg > dmesg.log) and upload it to pastebin.

    EDIT: Uploaded screenshot after performing some possible temp. fix. Will post details when i confirm it's working ok. (after fix. drain is 2mA)

    EDIT2: Sadly but tmp. fix didn't do anything significant, 2mA drain last only for half an hour, maybe more, then goes back to 13-25mA
    If you want to take a shoot you can try this:
    Connect phone with PC, wake screen and enter this command on pc:
    adb shell
    echo N>/sys/module/otg_wakelock/parameters/enabled

    after that unplug cable and power off screen, don't do anything with phone for some time to see if you'll get lower battery drain (half an hour should be enough)


    - Root source of problem (at least by inspecting logs) is twl6030 driver and interrupts handling. There is something wrong, because every time device goes to deep sleep shortly after thet it's awaken by TWL6030-PIH (IRQ 39).
    Just take a look at my kernel log and search "Resume caused by".

    log pastebin: http://pastebin.com/GVCty3gg

    As soon as i get some free time i'll explore this further..
    2
    Note sure that this has got to do with wifi at all as I reset my phone to factory and I still have the 'Android OS' usage taking 23% of battery. I have no apps nor have I yet linked phone to my Google account.

    I have read some comments to do with the Galaxy S2 which too suffered from the same problem. I remember reading something about Samsung driver implementation causing this with the S2. I will update the links when I find something conclusive. Also I have another HTC desire that has the AOSP code compiled rom and that does not suffer from this at all and it is happily sitting idle at almost 2 days with nearly 70% battery still left.

    :(

    Yes, the problem was with the suspend process eating up CPU. You can install Watchdog and set it to watch non-Android processes, and that will be able to tell you which "Android OS" process is actually the one eating up battery.
    2
    Just some data:

    -I have WiFi and Sync always on, WiFi router is always on and connection is good
    -at home I get 4 bars 3G reception
    -I lose ~6% battery over night (9h)

    Over x-mas I was home at my girl's parents place, they live on the countryside with the worst cellphone reception you can imagine, barely 1 bar and literally half of the time there is no connection at all, esp. if you do something crazy like actually holding your Nexus in the hand.
    I was on WiFi with a good connection and lost ~20% over night and noticed a higher "Android OS" usage as well. "Cell standby" was very high too, of course.
    2
    Here is an updated comparison between my wife's Nexus and mine. The two main differences between these two phones would be her's is on wifi 95% of the day whereas mine is on wifi probably 20% of the day. .

    I'd need logs to verify what the issue is, but her phone is working harder than yours at something. Do you guys have really crappy reception in you house? There's so many factors and variables at play, you can't really assume its the same issue. Try throwing the phone in airplane mode (if you can - I understand you need to be connected) for as long as you can and see if it decreases. Keep me updated, please.

    A few points before I disappear for the holidays:

    1 - THIS IS NOT A BATTERY ISSUE This is about AndroidOS awake times. The battery will suck with high awake times, but just becuase your battery sucks does not mean its AndroidOS. I'm all for the info you guys are posting, as every bit helps out, but please post your awake times as well. If you're not doing an idle test, I cant really take your info into account though, as so many other thing go on behind the scenes... ie-polluted data

    2 - This is a mobile data issue with ICS. It's NOT the Galaxy Nexus, its not Verizon/GSM, its not your SIM card. You may have problems with those specific areas, but the problem with high awake times is in ICS.

    3 - Please dont send PMs asking about the kernel. I'm running into 1000's of problems, and with the time of year it is, I much rather be getting drunk with friends and family then staring at lines of code - I think most of you would agree. If battery time is KILLING you right now, check out some battery saving techniques across the forum. As of this post, there is no perma-fix for AndroidOS wake time bugs.

    4 - PM me for any questions. This thread moves pretty fast, I can't answer all of your posts.

    5 - Everyone have a good holiday season. I'll keep you updated.
    2
    I turned my phone off while charging. I immediately turned it back on, and it charged 25% in that time. Something cannot be right here haha.

    It probably took an arrow to the knee.