yashsingh1/xdaforums huggingface dataset:
[Android General] Ganfoud:
It seems it disappeared with the ROM updates... I'm (and have always been) under the original ROM (oxygen OS 4.1.1 now)
[Android General] andrea.ippo:
Cool, thanks for the reply.

By the way, did you have the chance to make additional tests? Are you super sure that it was due to the clock? Were you only experiencing the drain when an alarm was set?

On Paranoid Android I now have the Google clock, not the Oneplus app anymore.

Thanks for the info: you're my only help right now, Google is of no help for alarmtimer wakelock :S
[Android General] Ganfoud:
No real additional tests, but it was quite obvious that it was linked: whenever I used the alarm (which was not daily), I had this battery drain issue and this kernel wakelock, and it disappeared when I force killed the app

I also didn't find much at the time I had the issue so glad to be able to help!

I'll need to set the alarm for tomorrow so I'll check if it happens again...
[Android General] Ganfoud:
Ok status as of today:

I set up an alarm yesterday night for this morning and left the phone plugged. It rang this morning and the alarm has been deactivated.

And now, 2h after having unplugged the phone, I have the alarmtimer kernel wakelock shown at 10%...

So the issue is not solved.
[Android General] spuri78:
So in this paragraph:

Something to note with BBS: it seems to have a weird "counting" bug. While testing a ROM with BBS, I finally began to question why my PWL time would be considerably higher than my true wakelock time. "True wakelock time," simply put, is time awake - time awake with screen on. If your phone is awake for 45 minutes and the screen is on for 40, you have five minutes of true wakelock time.

I don't understand this calculation: The screen is on for 40, you have five minutes of true wakelock time. Isn't screen on time true wakelock?

What is a Wakelock?

A wakelock is a software method for applications to control the power state of your device. The purpose of a wakelock is in its name, to lock your device in an awake state keeping the CPU running and preventing it from entering Deep Sleep (Think of a music app or video player). A wakelock can also cause your device to turn on (think syncs or notifications).

A poorly coded application can acquire a wakelock and not release it, causing your device to remain on.

A partial wakelock means the CPU is ON, but the screen is OFF.

A full wakelock means the CPU and Screen are ON. (we don't really need to worry about this)

From: https://xdaforums.com/galaxy-nexus/general/kernel-wakelocks-t1462020

So I suppose what OP means by 'true wakelock' is actually what the above thread calls: A partial wakelock means the CPU is ON, but the screen is OFF. ???
[Android General] blowingoff:
guys... my phone is draining battery AS HELL. i have no weird apps and such, and most of the time BBS won't even have any summary for my battery. only KWLs that seem to be draining battery are powermanagerservice. ok, thats a "catch-all" but, whenever I get info from BBS, there is no PWL or, when there is, it has no high usage and such. and the drain is like... 25% on 15 minutes. even if I'm not using it. I'm clueless to be honest.

came bsck to stock lots of times and... maybe the battery itself is damaged?
[Android General] jlb1959.01:
very helpful info....
[Android General] cowsquad:
Does anyone know why this a60000.ssusb keeps my phone awake all of the time. I know it is related to the USB charging notification on my pixel XL . I keep getting this notification all of the ttime.When I charge my phone I have to click on that USB notification andanually select charging. Otherwise the phone won't charge. If I turn my phone off the phone will charge normally. It tappens on a stock ROM or on a custom RoM.

I can find a way to turn it off. It is driving me insane.

I have tried everything suggested on the web. From cleaning the USB C port to changing some files under the system. Nothing works
[Android General] Kobra.shady:
@ T.J. Bender Thank you for this thread and very informative for beginners, in the OP the way you have explained in commendable. But I am stuck and not getting a way out of it.

My device is NOT rooted, I am using Poco F1, Stable ROM miui 10. I am using two tools better Battery Stats and GSam Battery Monitor.

I checked the partial wakelocks first didn't seem to find anything serious (but I could be wrong as I am a noob, so what do I know !) Anyways I did find some serious offenders in Kernal Wakelocks . As mentioned in the op that BBS seems to calculate wakelocks individually and hence sometimes tends to show the time of wakelocks more than active time, so I used GSam also it seems to be doing good maths as calculations fit in perfectly.

The main problem Kernal Wakelocks in my case are :

#1 PowerManagerService.WakeLocks

#2 PowerManagerService.Display

#3 IPA_RM12

#4 IPA_WS

#5 radio-interface

#6 [timerfd]-system_server

#7 NETLINK-hvdcp_opti

#8 NETLINK-healthd

Now I know its mentioned in the OP that for #1 and #2 that I can't do anything....But i want to know mainly about #3 and #4 as they both are at top of the list in both GSam and BBS after PowerManagerService. And consistently I've noticed both of them at top of my list. Can anyone please tell me what are they and how can i reduce their time, also is there nothing at all i can do about PowerManagerService.WakeLocks.

Please guide me......

Thanks in advance :)
[Android General] Danny94:
How to reduce wakelocks/alarms from android WifiConnectivityManager ?
[Android General] strongst:
Turn wifi off.
[Android General] saikat08:
Thanks a lot for this information. Very helpful :good::good::)
[Android General] tcat007:
Kind of old thread, hopefully someone has an idea. I turn off WiFi each night (at least 8 hours WiFi off, airplane on). I charged to 100% last night and got 5% drain. Not bad, but all seems to come from 10152 (WiFi) related to Chrome. Why would Chrome be using WiFi at night with WiFi off? Attached are stats.
[Android General] EMJI79:
Maybe searching wifi networks, even if wifi is off.

There's an option to "disable the phone searching for wifi and Bluetooth networks, even when Wifi and Bluetooth are off" (I know that sounds weird but that's how android is made).
[Android General] sheikgr:
Can someone help me with my wakelocks?

Is it normal for Android System to have so many wakeup triggers? Also this goes up to 600-700 in a full cycle.

What about kernel wakelocks?

I cant find anything useful to do about the 4-5 first in the list which they will only get higher since I'm on 85% now

[IMG="wakelocks"]https://lh3.googleusercontent.com/uOt0Aa9MLKocraqowMakj5RaEaQ-5RUmu2so53F6usuN7jaUfP1P4Cbu8TvL0Ycvv2bemUeN14z0aEDuzLRUP9IHpEJWjLpY4AgbWweIXJqmMo9a16eNZKPyMrbHZSo4Tj2u4K3_B1lJDlQoZep3W0eCqri1AFp-WmixQ6OY29RphCS6Fv1ea_d8DBWjWZEpkQYIPjk807zwQKd3H2FuFm4VxQJ3AIAEMxuK5D2ILWjtTXb5gkCVO63M6UGEU54xgE9DXm9oMj3hxEkV_nNJ-kM1Lpm6VfeM1b993cBjBkix-at3y3PX55tMdxUmlYRxmn6xq8fbRFntQi1fpQoyEsflNDCYjZcRusql81RaGUN61snZDDMxCVAGNpPAHwZiWJLi367Jjo8uZqdiO1ybiKI60al-Oz6idv8bEp4u4181PZBj59fM3B9uYdUQrHlL8Pzrn9CfBqTqZbzb9TrR-9bjLEFfpxSwLxH2jhSDeNebSoB0PzAIzr5CetHpPs33WG8wyMhPzYfrzkoJWwvY58c0nUcnEnNnhry-fdGopinJSTUUkHylwgaJvTmr6c1byx0KrFVrJSqiKUeKXNyQhYzzAUWZCBtFiX4jSgQu3qQ19MJwAErJZqs2j88Orf7ISDjidBpGAS5hf8AivxVE8t50oW4_Bvwm2y-XgJ094nXtdV-ea9_-RVEHvmdmlA=w411-h904-no?authuser=0[/IMG]

[IMG="wakelocks"]https://lh3.googleusercontent.com/oxflZKtEpLbNe3H-Jb8hC3vSP6tC3WUFh-jxJw1lo0d3bTusS4f8pC05y137NzHVE0f-_bdwLdRjvwPj8LLJ-LFDmPt-lTB5g-EUdAsGmlUDTPCeK4lRA-svi0rCBVKCXkr4Ztp267wqNHRbCzXEWddHNaaOSI8o-KHi_XvRC6W8s488rlTZ7qQA9jjfauwMmu3ezeQLtGII7waFff4y9t9FsoMzy6OvQbVbMu8afAC0PPqwtDIf1lfxKbVLuhYCubdEErrn1i82hm5ALtPFFnXsngMyXtXaTGKUOpJy7_eiLydqiujlTPZQu1xirwKmlQkAgF3G9UK61H8tvZpM_D6iIRzci2sTWUjClchedODNHz95HyB6w1GKi89qyOmgcG5FOAvqzE7Uit13NpzgklibZjszgMs7utnydSROh-t-4mutYiFLwG6khl1ZOGMlIGKNdBKUvaU-Ul3pEhRYs3EUyZwdH2eFJXdYQPekfF-T6lbuDexuQM1P8ICYxgIhPwxNyzUeE8TqgfcSmPhhQ2_GuFN11CWUUhVG4Rlnamc72Y3jFJG3cE8TGs7XVrOyJ0wI7BfxBSQieUhzIJVZYZWv3-Iy0tXkWhgtMRTQH0BsvYOCVzcLiEd_Riz-gf_K2YQ00DH4TikbhH78NjBVNgyyoBjqsFWM8XyFJlO2pFBkLyF9J99ciO0po480Og=w411-h904-no?authuser=0[/IMG]

I'm worried more about the wlan and wifi_deep sleep (as i guess keep the device from sleeping) and also the powermanager_suspendlockout
[Android General] pk1bgt:
I have this PowerManagerService.WakeLocks

15% battery for 12 hours!
[Android General] mielletseed:
really good to know!

thanks
[Android General] pk1bgt:
You know how fix it?
[Android General] TNSMANI:
You don't fix it. If you do, your phone will become a paper weight.

It is actually the sum of wakelocks relating to keeping the screen on. You meddle with it, your screen may not turn on.
[Android General] pk1bgt:
Or another tom its ok on CrDroid or EvolutiobX is only.

Mayby is some apps drain?
[Android General] TNSMANI:
You can't analyse battery drain by looking at the number of wakelocks alone. Some wakelocks are good and some are a must. Ofcourse if an app misbehaves, then also you may get too many wakelocks.

If the drain is too much, head over to HERE, read the first page and save an idle dump and post it in that thread. Someone will reply and help.
[Android General] zbysogi:
Hi all.

What happened to amplify and Greenify? Are those apps obsolete? How do you kill wakelocks these days? I'm having battery draining issues and was searching for a solution to kill wakelocks but it looks like the latest thread is from 2017.
[Android General] Augustoandro:
You will need to install Riru Xposed framework. It is available as a Magisk module.

You can install greenify, amplify and power nap then to limit wakelocks.
[Android General] Schroeder09:
As I understand it android's stock doze features make greenify and amplify outdated and useless. In some cases they make things worse by "frustrating" and "working against" the stock Android features that are already in place to limit wakelocks. The same thing goes for the magisk module that is supposed to limit Google play services wakelocks. I suppose you can give it a try and uninstall an app if there is no gains or things get worse. I'm just posting this as an FYI. I have looked into what you're asking right now, and these are the things that have been told to me or I've found in doing research.
[Android General] zbysogi:
I'm fighting with several wakelocks:

- appwidget_update, 40 during the night,

- WiFiconnectivityManager schedule periodic scan timer 426 during the night,

- alarm wakeup activity detection, 61 during the night;

- network location locator, 144 during the night.

There is literally no info online regarding those wakelocks. I turned of WiFi scanning and limited the WiFi scanning in developers options but didn't help the WiFi wakelock. I'm getting 1,5%/h of battery drain during the night. At day I'm able to get only 3,5h of SOT with over 6%/h battery drain and that only on wifi. I didn't have the chance yet to verify the drain on data but it's gonna definitely be worse.

These is the BBS data from past night. Don't look at the 15h time period and 0,2%/h battery drain, it's not accurate. The phone was idle for almost 7h resulting in over 1%/h battery drain and wakelocks as on screenshots.

How to check what OTHER apps are using the battery?

Mi9 miui 12.5.2

3300mAh replaced battery (Ive had the phone since January 2020)

Aida64 shows 2880mAh of effective battery capacity but 3120mAh when I do a full discharge and charge it do 100% (that works only for 1 charge)

EDIT:

I lost 5% of battery last night after clearing cache of Google play services and Google store. Wakelocks chart during the night looks bad
[Android General] caradawc:
I have not been able to install the module in Magisk in manual. It sounds like a joke but file explorers that show the wakeblock folder won't let you open it, and file explorers with root don't show the folder.

Edit: In fact, once the module is created, Root Explorer does not find the wakeblock folder, nor the wakeblock-magisk.zip file.
[Android General] garydv2002:
I've been using it for a few days now and so far its doing what it said. But what has got me baffled is I also had sdio and audio out partial wakelocks and since installing this I haven't had those anymore. Does that make any sense to you? Cause I'm still new to this wakelock stuff. Also I'll be the first to report any I'll effects if I experience any cause normally I don't recommend apps but this one seems to be OK so far...
[Android General] T.J. Bender:
Not really, but it wouldn't shock me either. AudioOut family wakelocks are definitely linked to media, and sdio frequently are as well. Some kind of trickle-down effect wouldn't be a shocker.

Have you played any music files on your phone lately? I suspect those trigger AudioOut wakelocks.
[Android General] garydv2002:
Yes I play both music and definitely watch alot movies on my phone and that's the only time I see media service but that's to be expected. I was really shocked to see the battery life this app gained me really shocked. That's the only reason I ever recommended it because of the improvement in my battery life. After 10 hours normal use I had still had 40% where before I would have been at 10%. That's a big enough improvement for little no effort for me not to give it a shot lol...
[Android General] T.J. Bender:
Yeah, I've still got it on here. Won't be able to do a true calibration run for a few days, but I'll see how it performs in the meantime.

I've got this fear deep-down that forcibly shutting the media scanner off will cause some huge FC mess that prompts a wipe, but, yeah, only one way to find out.
[Android General] garydv2002:
The only force close I've got was once from the Samsung video player but I flashed the one from the note that has a few more features than ours but once I changed the permissions after forcing the app in the system folder I've no force closes or no problems and I think this day 3 I been using it but like I said I'm being a guinna pig and any problems I will report asap
[Android General] :
I gotta say this thread is very comprehensive tj are you updating op regularly I haven't been keeping up
[Android General] kchen96:
Does anyone know what the wake lock RILJ is?

Also sdio is a big one for me and I'm 100%sure it's due to poor data connection.

I get a lot of mmc0,1,2,3. If I format my external sd and then re copy files on will it go away?

Facebook is a wake lock even though I have auto syncoff and notifications off in Facebook settings?

Lastly, is there a good "find my phone" app that doesn't constantly wake up my phone? I sure wish Google would just bake it into the os like apples find my phone feature...
[Android General] :
Have you tried cerberus
[Android General] chinthekng:
use fast for facebook fastest and most lightweight facebook alternative in my opinion and RILJ proably has something to do with youre radion. Bad connection maybe try flashing different ones and see which works for your area
[Android General] T.J. Bender:
Thanks man. I'm updating semi regularly, mostly when someone else finds a fix at this point, as I'm hardly running any wakelocks now.

RILJ, unless I'm mistaken, means you're in-call.

Appreciate the feedback on sdio. I can also confirm that sdio family wakelocks, particularly sdio_dmux, happen frequently while I'm on data.

Facebook is a real ahole of an app. It does not respect the restrictions you put on it. Hence my suggesting replacing it with Friendcaster.

Can't help you on the phone locator. Seems to me they'd all need to use GPS, which will cause wakelocks...
[Android General] garydv2002:
Oh yea Tj I did download the rescan apps from the play store and not the website, I never recommend anyone to install anything unless its from the play store or here on xda. Anyone that gets it from the website definitely does so at their own risk..

Oh and thanks for this thread I'm learning a lot and if I happen to learn anything that hasn't been discovered here yet I will definitely share. Maybe together one day we will be getting a week from a single charge :D
[Android General] T.J. Bender:
I can already do that with my Captivate. No SIM card, leave it sitting on a desk with no activity to discharge for its monthly cycle. :laugh:

Seriously, though, I think that once JB ROMs stabilize, we'll be able to milk some incredible battery life out of them.
[Android General] haloeight:
Thanks for the suggestion, didn't know about this one. Personally I just opted to uninstall Facebook as I find the mobile web version does pretty much all I need it to (using email for notifications and Instagram for picture sharing) and Friendcaster just didn't sit well.
[Android General] kchen96:
I'm trying to configure bbs and the widget and the wake lock is frustrating. Under preferences I'm ting to the so that PWL and KWL percentage shows only counting percentage of me while I have screen off. I checked "%of time awake minus time with screen on" yet I have 100% time screen on since custom reference and PWL is still showing 15.8 percent?
[Android General] T.J. Bender:
Use times instead of percentages. Much more useful and much less confusing.
[Android General] kchen96:
How?id love to do that but I only can set it in percentages. Thanks
[Android General] T.J. Bender:
Scroll down to Widgets in the settings menu, select it, then uncheck "Show %"
[Android General] garydv2002:
Tj I have a couple of questions for you if you don't mind...

1. With the phone unplugged and off charge with the screen off and phone on just laying on the table is 89-91% deep sleep showing on CPU spy good or should it be higher?

2. And with the phone on and plugged up to the charger and screen off should it still deep sleep when on charge? Mine never goes into deep sleep when its plugged up even after reaching full charge if its plugged in no deep sleep at all.

You know more about this wakelock stuff than me but I'm studying on ways to squeeze every bit of juice possible and still remain useable. In other words not so stripped down you don't enjoy your phone anymore. I'm thinking if we can defeat these wakelocks before trying other tweaks that's gonna make a huge difference.....
[Android General] Datron:
I think this is unavoidable. Something to do with the usb port actively being used (to charge). This prevents deep sleep from what I can recall. I think it's way back in this thread. Anyone feel free to correct me if I'm wrong. Cheers.

Unclefest v2 alive and kicking - support SeanZ!
[Android General] mimart7:
Once the phone is fully charged, of should go into deep sleep.
[Android General] T.J. Bender:
1. Tough to say without knowing what you have going in the background, and how long it was sitting there for.

2. I've never seen my phone hit deep sleep while plugged in, even if fully charged. It always stays at the lowest clock setting (in my case, 384MHz).
[Android General] kchen96:
Almost done with wake locks! Got 18 hours this time with 2 hours screen on WiFi and 7 hours in 4G area with minimal use. Any way to reduce BBS alarm manager wake lock? Also the only major alarm now that's wake locking me is android system calender...any ideas for fixes?
[Android General] T.J. Bender:
Let's put this in perspective: you're over 8h of uptime, with no PWLs higher than ~17m.

You don't need to keep tweaking. At this point, you're likely to mess something up and do more harm than good! :laugh:
[Android General] kchen96:
True true...well I mean I drain about 5 percent an hour with no use in lte areas and then about 1 percent goes every 2-3minutes using in lte so this is with use ONLY in wifi. Also I got this 17 hours by turning data off while 6 hours in school so it drained maybe 10 percent in those 6 hours?
[Android General] T.J. Bender:
Are those idle drain percentages? If so, you've got something really unpleasant going on.
[Android General] kchen96:
If what u mean by "idle drain" is like screen off during the lte than yes. That's the one thing I've NEVER been able to fix. I get drain like 5 percent an hour with screen off data on in 4g/H+. I tested this by keeping data on and going to sleep. Went to sleep and woke up 7 hours later, battery down 35 percent. It's not too big of a deal, I've learned to live with it but I'd LOVE to learn to fix this.
[Android General] T.J. Bender:
Have you tried different radios? Might be a bad network in your area for UCLF6.
[Android General] kchen96:
Yup in fact I"ve tried like all of them. I get GOOD reception here at my house, close to full bars. It's not 4g actually though cycles from H and H+. I have to go a couple minutes out to get 4G. Anyways, i checked under alarms since charged and i probably have the culprit. Location services? I've had 1100 or so wakeups from that, so I guess I"ll be turning off location services and the such and test again tonight when I go to sleep, hopefully it helps. I can't believe so many wakeups though, how can Google expect people to get decent battery life and get business away from Apple, when they set their services to check your location so often that it kills the battery? Google Now is fun and amusing, however I don't NEED it, but would love to have it just for fun. Sad that I will have to give away these features for battery life.
[Android General] T.J. Bender:
Little stuff like location might help. Jumping from LTE to HSPA+ might have something to do with it--did for me.

Beyond that, we're outside of the stuff I know really well, and I don't want to tell you something that might cause huge problems down the road.
[Android General] kchen96:
Ok I'm sorry for the thread up with personal issues but here it is. 5 percent in 25 minutes with 2 minutes screen on H. Getting good deep sleep too
[Android General] NoSpamDan:
I use androidlost. It's free and has a decent web interface...

Sent from somewhere in Galaxy SII...
[Android General] T.J. Bender:
Illnevertell has a great battery life help thread around here. Others there might be better able to help you nail it down.
[Android General] kchen96:
Ok back again... I think my bbs is just flat out not working and that's why I actually do have wake locks but it's just not showing them. As you can see bbs shows almost no wake lock yet under battery in system settings it shows my device on basically the whole time
[Android General] T.J. Bender:
BBS pulls directly from what your phone's reporting, but you can reinstall it if that eases your mind. I'd seriously pull a BBS dump and logcat and head over to the battery life help thread, because it looks like a config or hardware issue.
[Android General] kchen96:
Instructions on doing this?
[Android General] T.J. Bender:
Go up to the second post, the one about KWLs, and look for suspend_backoff. The instructions for dumping a dmesg to text are there. Use the first line of those directions, but change "dmesg" to "logcat" both times it appears in that line. Don't bother with the "ps" part, as the logcat doesn't need it.

A dmesg won't help much, because it's not a wakelock causing the problem. You can pull one if you want, though. Good practice to learn how to read those, as I've very quickly come to realize that they're even better than BBS in finding the root cause of KWLs than BBS.

When you post in the battery life thread, please make sure to pastebin or attach as .txt your logcat and BBS dump. If you paste them directly into the post, you'll blow up the thread. :laugh:
[Android General] kchen96:
View attachment BetterBatteryStats-2012-09-28_083736605.txt

View attachment 1362097

Here are screenshots and logcat/dump. Drained about 5 percent an hour just idle while i slept. (7 hours, you can see in screenshot that huge area with screen off, yet I'm awake most of the time) BBS still says I'm in deep sleep like the entire time. That hour or so of screen is basically all before I went to sleep on wifi, taking my battery down to about 70. Woke up to about 43 or 44? This is normal when I leave data on.
[Android General] T.J. Bender:
Put it in the battery life help thread! :laugh:

Wakelocks are not your issue. Nothing there looks out of the ordinary. It's either system configuration or hardware.
[Android General] kchen96:
Yeah I did. Hold up though, wakelocks are the issue are they not? Under system battery, its showing my phone wakelocked for about 80% of the time while bbs shows 85% deep sleep!