yashsingh1/xdaforums huggingface dataset:
[Android General] Adrianrff:
Hi, I've been having battery drain from Google Services ever since I got the 5.1 update in my Nexus 5. At was completely stock at the moment, I'm now on Chroma 5.1.1 coming from CM 12.1. I've seen a whole bunch of wakelocks in all this time. When I installed Chroma, which comes with Franco Kernel, Wakelock Detector shows little awake time (less than 10%) but at the same time it lists all sorts of wakelocks. Here're a few screenshots:

Google Services (I have no idea why it shows a whitish background, it does that sometimes, but it's readable):

Android System

Phone (RILJ is nasty and has always been there)

Kernel WL

Battery Stats You can see that the OS is reporting some activity during screen off, but WD and Better Battery) don't

What's strange, is that the drain seems to happen only on mobile data. It's not too drastic, 10-12% over 6 hours idle in the worst case, but it's noticeable. Through Battery Monitor Widget I can see that it takes the device at least an hour, sometimes more, to enter a decent deep sleep (<1%/h), in the meantime it's using 2 to 8%/h. It frequently wakes up in the middle of the night for neveral minutes to use the same 2-8%/h, hence the drain, I believe.

Before installing Chroma, awake times were reported to be much higher and bam_dmux_wakelock seemed to be responsible for it. It still shows now, but it's not being reported as awakening de device.

Other things to notice: Location is always off and so is Location History, inspite of this, I got +400 location requests from Google Services in 24 hours and near 1000 keep awake requests (I saw this using Provacy Guard with CM 12.1 which monitors these requests). I tried denying permissions to Google Services, I mean EVERY permissions, and still got the drain. It drained even without third party apps installed (after factory reset). Morover, there are a lot of sync related wakelocks there, autosync is OFF, EVERY Google sync service is disabled (contacts, fit, people, Gmail... every single one) and I still get those wakelocks. This has to be Google Services missbehaving, right? Even disabling services is uneffective. Under phone there are some new wakelocks, I didn't see those in CM 12.1 nor in Stack 5.1.

I'd appreciate any help, as none of the ususal approaches seem to work.
[Android General] Celestial Fury:
[MENTION=6052462]Adrianrff[/MENTION], I can't see much on some of the white screenshots. If you can use Amplify, follow the guide. If not, use Servicely to kill Google Play Services and lots of unnecessary wakelocks and alarms like the ones you mentioned will be gone (but if you use Google Backup, it will also not work properly in idle mode).
[Android General] Celestial Fury:
Post #2 updated.

Added a bunch of limited wakelocks/alarms and changed duration of others. Those no longer limited have been removed.

I disabled Greenify and tried out Servicely but got Google Play Services (only reason to use Servicely) has stopped responding - couldn't find out which individual service was disabled in Servicely and also got some reboots and ALARM_WAKEUP(#####) also came back so I stopped disabling stuff in Servicely.

Reactivated Greenify, and now after several days, there is hardly any kernel wakelocks, partial wakelocks, alarms and ALARM_WAKEUP(#####) has also disappeared. I can't explain it.

Only thing is, drain is now >1%/h and BBS can no longer identify where the drain is since EVERYTHING it reports is low (even KERNEL). GSam Battery Monitor reports that the most drain is coming from phone radio and WiFi so it's time for me to go back to establishing baselines for my phone.
[Android General] Adrianrff:
I was going to reply to your previous post, and got this notification.

I identifed the cause of my problem, a nasty bug that allows apps that use internet to keep your mobile radio active for insane amounts of time after being used (and apparently Android System uses CPU too much too). That's why the drain was only noticeably while on mobile data and not so much on Wifi. Are you on Lollipop? I may be wrong, but it seems you're having the same problem I'm having. I don't have any wakelocks either and based on your description, this fits. Check the mobile radio active times in the system battery stats for apps that use internet, it;s probably much longer than the time you've actually used them.
[Android General] Celestial Fury:
[MENTION=6052462]Adrianrff[/MENTION], I'm on KitKat and not likely to change until Xposed is stable for Lolipop. Also, don't use mobile data, only WiFi but there hardly any traffic through WiFi.

GSam is a recent addition so I'm not too familiar with it yet but it has a nice main screen where it shows where the drain is going that all adds up to 100% of the battery used. BBS doesn't show this but it breaks up the partial wakelocks and alarms which can conveniently be identified and limited in Amplify.

I'll post some baseline shots and others in the next few days.
[Android General] boojay:
Same issue here, my wakelocks (and alarms) are way down now and my phone is in deep sleep most of the time, yet my idle drain is a disappointing 1.1%/hr. I can't identify what the culprit is through BBS as everything looks like it should be. Must be a Lollipop issue.
[Android General] khr0n0s12:
Is it bad to apmlify ALARM section "com.android.internal.policy.impl.PhoneWindowManager.DELAYED_KEYGUARD" because it says "Wakeups: 29(15.5/h)" and im wondering if i can limit that off. :confused:

Here it is for better view. :) really need some pro advice hehehe thanks.
[Android General] Celestial Fury:
[MENTION=5927935]khr0n0s12[/MENTION], you've already used the phone for nearly an hour. See Post #3 under

Test Idle Battery Drain

on how to test. Amplify does NOT show drain. com.android.internal.policy.impl.PhoneWindowManag er.DELAYED_KEYGUARD is an important function. Don't limit it. High count in Amplify does NOT mean high drain.
[Android General] khr0n0s12:
Ok got it..thank you :) thanks button hitted, oh btw that numbers that i mentioned is from better battery stats
[Android General] Celestial Fury:
[MENTION=5927935]khr0n0s12[/MENTION], oh I see. If it's high it's because you've used the phone for nearly an hour so you key guard keeps getting activated. Otherwise, it shouldn't be high in idle and I've never seen it high.
[Android General] -m3tac0rt3x-:
Just some OT... But maybe you have a battery drain due to your phone currently having a Warez app installed... and it's Alarming your device up to force you to uninstall it. :rolleyes: :cyclops: :highfive: :victory:
[Android General] Celestial Fury:
[MENTION=4179760]-m3ta-[/MENTION], I see what you mean. I don't look closely once I see that a phone has been in use. But that particular alarm only woke up once so not a cause of idle drain. ;)

________________________________

My screenshots in Airplane Mode.

Insignificant kernel wakelocks, partial wakelocks and alarms are totally empty. Top 2 drain reported by GSam is Android System and Android OS. I used to get 0.3%/h in Airplane Mode and now it's 0.7%/h. :eek:
[Android General] zambranoher:
First of all: Thanks a lot for this awesome guide.

i have followed #2 and #3 posts and even my results are not best actually.

my device:

zte v970m dual sim

android 4.4.2

please some help. thanks in advance!!!!
[Android General] Celestial Fury:
[MENTION=6669144]zambranoher[/MENTION], in future you can attach (not post) the screenshots for easier reading - my fault, the guide did not state it, I've edited it now.

If you've followed Post #3, you should know that you shouldn't use the phone before taking the screenshots. I can see that you've used it for 37 mins so all the screenshots are not idle drain.

Post #2 was updated yesterday with more alarms/wakelocks and longer duration.
[Android General] zambranoher:
Sorry, i edited my post to attach images instead posting directly.

thanks for quick reply.

in fact the awake is 37 min. but it wasn´t me. did you se the screen on it is only 1 minute 12 seconds.

is that because i post here, i don´t know why this 37 minutes awake the device i just disconnected from the charger and i went to sleep. the phone was untouched by 5 hours 47 minutes.

what do you think about!!
[Android General] khr0n0s12:
i'm sorry guys but i don't get what saying, what is Warez app, where is it?? :D

yeah dude Celestial Fury right, my eyes hurts :eek:
[Android General] Celestial Fury:
My mistake, I swapped them, must have been the pics :o, so here we go - limit these (some more):

ALARMS:

- android.content.syncmanager.SYNC_ALARM

- com.rim.bbm.ACTION_PLATFORM_WAKEUP_ALARM

(too high but limiting it is reported to break MailWise and BBM but do test for yourself)

- com.bbm.BBMService.HealthCheck

If BBMessenger won't play nice, it's time to find an alternative.

- com.google.android.intent.action.MCS_HEARTBEAT

- GPS_ALARM_BALANCED_ACCURACY

Duration to limit is in Post #2. Once these alarms are limited, do another idle test for another reading. Partial wakelocks should be different then and other alarms may come up.
[Android General] zambranoher:
hey Celestial Fury, thanks for the tips.

i´m adjusting the recommended alarms and will test idle tonight. will post the results tomorrow. hope i could reach at least 99% deep sleep, with that i´ll be happy.

cheers!!
[Android General] leandronb:
Hi guys, I have a htc m8 and noticed that some wakelock are not present in amplify. Is it normal?

And some others have different name in guide than in my phone.

And why it says to set audiomix to 7200 and later it says that is dangerous? Thanks.
[Android General] Celestial Fury:
[MENTION=4869687]leandronb[/MENTION], thanks for catching AudioMix . It was initially limited but later found to affect notifications and so no longer recommended but not removed from the limited section (now removed).

It's normal to have different wakelocks/alarms in different phones but some should be the same for all android phones. If you don't use Google Backup then android.app.backup.intent.RUN shouldn't appear. If you don't use WhatsApp then com.whatsapp.MessagingService.RECONNECT shouldn't appear. Same thing for Greenify. If you do used them then they should appear once they're used. The other two should be more generic and should also appear once they're used. Different versions of androids may also have slightly different names.
[Android General] leandronb:
I understand, i use whatsapp and greenifym and some wakelocks appear and other don't.

For greenify the wakelock "com.oasisfeng.greenify.CLEAN_NOW" is not present but exists other two "cleaner service" and "wakeup monitor".

For whatsapp the wakelock "com.whatsapp.MessagingService.RECONNECT" do not exists but there is other 4 wakelocks already limited.

about backup i think in my m8 it uses htc backup but my photos and contacts are still being saved by google.

i did the first idle test for 7 hours and was 96% idle in bbs, maybe because of dumpster app, i greenified it and will see results tomorrow. i had 2% drain, but maybe cause notification light was blinking for more than 5 hours.

and another question, in dangerous section it says:

Services

- com.google.android.gms/.checkin.CheckinService

(its related wakelock will run wild)

- com.google.android.gms/.checkin.EventLogService

(its related wakelock will run wild)

so i should leave these alarms untouched?

- com.google.android.gms/.checkin.EventLogService$Receiver

- com.google.android.gms/checkin.CheckinService%Receiver

or should i set allow 86400 as in the guide?
[Android General] beeshyams:
second round of testing

Hi [MENTION=5401012]Celestial Fury[/MENTION]

well, gave it some time and flashed a different ROM to rule out possibilty of ROM error but the results are same

would request you to have a look at results. network and processes is one part i am just not aware if it is OK or not

have asked around in other forums quoting your thread but haven't got a response yet. Guess people don't baseline with cell switched off :)

It is a systematic way but then each to his own and frankly being methodical doesnt appeal for most seeking instant results

Kindly revert with your views if there is anything i can do to fix this or it appears to be a hardware issue. I am totally perplexed with this

Thanks in advance as i would be travelling for next three weeks and doubt if i would get net connectivity at all but once i get back would like to close this , hopefully positively
[Android General] Bingley:
This looks awesome! As soon as Xposed is supported in Lollipop Touchwiz my S4 will be getting this :)
[Android General] Celestial Fury:
These are services. Don't disable these 2 particular services or it's related wakelock will run wild.

These 2 alarms you can limit as per the guide.
[Android General] Celestial Fury:
[MENTION=6285129]beeshyams[/MENTION],

BBS text file is a mess. Can hardly read it. Perhaps it's something to do with how you copy+pasted it? In the screenshots, everything is low but BBS reports 4 mins of awake time with some significant CPU activity. WLD (I'm not familiar with it) says the 4 mins of awake time is due to PowerManagerService but which BBS reports as only 35 secs. WLD also shows SuperSU awake for 14 mins (which BBS doesn't show) but I'm not sure if that's a partial wakelock or alarm.

It looks like I'll have to install Wakelock Detector to investigate the conflicting info and the difference on my phone.
[Android General] beeshyams:
Thanks [MENTION=5401012]Celestial Fury[/MENTION] for a quick reply

Am on train to no internet land for next three weeks, so am quickly typing out a reply from my cell

Firstly, sorry about BBS mess, probably a part of zip process and I see no way of uploading it from my cell. So will try to send you PM with file if possible

Secondly, regarding wake lock detector, this may be a good starting point http://www.slideshare.net/ahikmat1/android-wakelock-detector. I do remember reading somewhere that BBS statistics don't count up and at times inflated picture comes whereas WLD doesn't do. I have neither verified not probed further but got used to WLD for simplicity when I rooted about 8 months ago :)

Thanks for your response and helpful attitude... Appreciated

Edit

Here is drop box link for BBS file . Hope it helps

https://www.dropbox.com/s/o6r32qry3pletwf/BetterBatteryStats-2015-05-10_132237851.txt?dl=0
[Android General] Celestial Fury:
What does it mean?

I've seen it and it looks like what I previously said. Does WLD have any text file to export? As I'm not too sure what I'm looking at in the WLD screenshots.
[Android General] leandronb:
Second test after following the guide. do you guys think there could be any improvement?
[Android General] beeshyams:
[MENTION=5401012]Celestial Fury[/MENTION]

Really bad connection bring in train so hope this goes through.. In a few hours will be in no connection zone

1. What I recollect as reading is that if you total individuals wake locks in BBS it exceeds total wake lock reported. Read a very technical explanation advancing two theories for this, beyond my comprehension. It was on XDA forums and well may be in WLD thread

2. I presumed WLD would be familiar to you , my bad. Not certainly to add to your load of helping me out

3. WLD doesn't have a text file export option. I will attempt to explain in words since I cannot upload snap shot on this connection. You need to look at second icon in the top portion snap shot , first being the WLD icon and common to all .

symbol like sun represents screen wakelock and here it does SuperSU 14 minutes.

Symbol like IC chip or processor represents CPU wakelock

Symbol like shaded circle with dark center is kernel wakelock

Alarm clock like symbol shows wake up triggers and to my understanding is a picture of what caused all the kinds of wake ups described above

Hope this clarified a little bit

If this doesn't help, may I request you to guide me based on your assessment of BBS... Is there anything I can do to fix ??? Or have hardware night mares??? :)

Look forward to your views whenever I get connected

Thanks again
[Android General] Celestial Fury:
It's very good already. Was this on a full charge to 100%? To limit further, click on the top 2 alarms for more details on what can be limited.
[Android General] Celestial Fury:
It's probably just a different counting system - BBS is most likely not based on total percentage of drain like GSam is.

How can WLD show screen wakelock by Super SU for 14 mins when you've only turned on your screen for 1 min as reported by BBS? Or was your screenshot by WLD taken much later?

As BBS shows everything as low, you'll need to get a GSam screenshot for a more accurate picture of where the drain is going. Also, the Battery Usage and History Details screenshot under Android Settings.
[Android General] khr0n0s12:
@Celestial Fury

i know this ain't related to amplify but are you using stamina mode in your Xperia device?? I tried it recently and i have some problems about it, when i'm using stamina mode my led notification is not working, well stamina mode also helps in saving battery right? this somehow help achieve that [0.0%/h] :) Do you have any idea on how to keep led notification working while in stamina mode? :confused:
[Android General] Celestial Fury:
Click on stamina mode to add applications to the exception list. Maybe devicemonitor or devices?
[Android General] khr0n0s12:
ok i will try that..FB later. :fingers-crossed:

Edit: Didn't work :( i only see devices and i add it in white list but nothing happen
[Android General] Celestial Fury:
[MENTION=5927935]khr0n0s12[/MENTION], are you saying if you turn off stamina mode, your led notifications will work? If so, then one of the apps should be added to the stamina mode exclusion list - which, I don't know and those were my two best guesses.
[Android General] leandronb:
yes, 100% battery. i clicked on top alarms and some wakelocks that haven't appeared when i followed the guide appeared this time. i will test again now.

one problem i had was with whatsapp, the messages only arrive after a long time or after i close the app, and when i open the messages appeared. and when i try to send any messages it didn't send, only after i close the app.
[Android General] eywan:
I have follow your guide a to z. Everything seems to be ok. But i lost push notification for my blue mail. ( i only received mail after reboot).
[Android General] Celestial Fury:
I have no problems with it. It's just sometimes WhatsApp server is slow. You can try Push Notifications Fixer v4.5.2.

Same suggestion and maybe also:

Reset Amplify statistics

Use Blue Mail

Open Amplify and see what is being used that is blocked
[Android General] eywan:
I think i have solved it. Something with gcm. I forgot the full name in alarm section. Will do trial n error to make sure which one is the culprit. Btw, thanks!
[Android General] leandronb:
i did the test again today with whatsapp limited and for 7 hours no notifications, when i opened the app all messages appeared. i read the link in push notifications fixer that it change the heartbeat interval and in the guide is an alarm called com.google.android.intent.action.MCS_HEARTBEAT do you think it may be related to dalayed messages? i never had a problem with whatsapp before.

btw in today's test the drain was bigger 4% in 7 hours. i remember that with my htc m8 i could get 8 hours in night with no drain in kitkat stock unrooted if i did this guide in kitkat i would probably get even better, but maybe is lollipop that is not so good on battery after all.
[Android General] Celestial Fury:
[MENTION=4869687]leandronb[/MENTION]

Is WhatsApp greenified (deep hibernation, maybe)? If so, then if overnight it can be hard to wakeup. It's the same for me but as I'm not going to wake up in the middle of the night to answer a WhatsApp message, it's fine for me. During the day, when the phone is used more often, the messages come in ok.

com.google.android.intent.action.MCS_HEARTBEAT is what regulates the TCP connection, yes.
[Android General] leandronb:
No is not greenfield, just checked to be sure, so is better let mcs_heartbeat untouched? I limited the whatsapp alarms again and will do the drain test overnight and will see if whatsapp will become offline again tomorrow. Thanks.

EDIT:Just made a quick test, sent a message from my brother's phone to my whatsapp, message didn't received so i closed whatsapp from recents and when opened the message appeared.
[Android General] WilliamVelez30:
Nice. Thanks for sharing.!! :D
[Android General] leandronb:
Latest overnight test

still a "big" drain compared to the guide. i think maybe is lollipop fault. whatsapp notifications was back to normal.
[Android General] khr0n0s12:
@Celestial Fury

Should I limit all Facebook in Alarm section including its messenger???
[Android General] Celestial Fury:
[MENTION=4869687]leandronb[/MENTION], 0.2%/h isn't that "big" a drain :p.

Google Now (your screenshot) seems quite active. I'm not sure how you're using it, but it doesn't act up for me. I don't have it limited but I do sometimes have to refresh by pulling down. It's up to you to reduce and limit if you like. com.google.android.gms.gcm.ACTION_CHECK_QUEUE (your screenshot) is also high but this is part of push notifications.

To everyone else: I'll put all the GCM/push notifications together and identify them in the guide.

[MENTION=5927935]khr0n0s12[/MENTION]

If like me, you only want FB to be active when you open it, and you don't use FB Messenger, then yes. If you need to know right away when someone posts/comment/likes/messages something, then no. :D
[Android General] khr0n0s12:
How about when someone calls you through Facebook Messenger, will it still function like as it is without limit?
[Android General] Celestial Fury:
[MENTION=5927935]khr0n0s12[/MENTION]

Sorry, no idea as I don't use FB Messenger. You'll have to get someone to call you and try. But, FB Messenger itself isn't limited in the guide because I don't use it/have it.
[Android General] organick87:
wakelocks showing in Amplify, but not BBS ???

First you should know, I charged my phone to 100% before bed and always reset Amplify counter within seconds of unplugging it to lay idle over the night hours ( at least 7 to 8 hours).

This morning, Amplify states that, [for example] the "Icing" wakelock ran for 3:30 w/ 356 wakeups allowed since reset. According to BBS this same wakelock only ran for 5 seconds w/ 32 counts.

NOTE: "Icing" is a wakelock that I DO NOT currently have limited by Amplify

Example #two: "FbClientConnManager" is a wakelock that I currently DO have limited by Amplify and it shows that it ran for 15 seconds with 6 allowed. Now, this wakelock is not in BBS's list whatsoever.

What am I missing here? I am trying to go by many's recommendation to pretty much only Amplify things that are causing battery drain, but the two apps seem to show inconsistent results.

Please advise.:good:
[Android General] khr0n0s12:
@Celestial Fury

Do you know why i have no reading in this?:confused:
[Android General] zennonace:
Probably because you just rebooted.....

LG G3 D855
[Android General] khr0n0s12:
i don't think so, i'm also checking it few hours after reboot and still no reading..
[Android General] Celestial Fury:
[MENTION=5901127]organick87[/MENTION]

I think Amplify and BBS either count things differently or get the stats in a different way. Usually, we use BBS as the guide on what to limit and I have in the past on several occasions said that Amplify does not show drain but what you say does make sense and they should report the same numbers if they both start counting at the same time. As I'm currently experiencing ghost drain, I'll look further into this myself.

[MENTION=5927935]khr0n0s12[/MENTION]

If you've followed the guide, then there will hardly be any alarms. I get the same blank alarm screen too after an overnight period. But after a while, some alarms will appear. It'll depend on what you're doing or not doing.