yashsingh1/xdaforums huggingface dataset:
[Nexus 5 General] spibbs:
I've tried everything in this thread, short of a full wipe and reinstall, and the wifi battery drain always appears again after a few days.

Lately, if I reboot then wifi drains the battery normally, only ~ 2% on my battery list at the end of the day.

Then, a few days later it'll suddenly start draining 40% overnight.

So, until this issue is fixed with a software update, I'm rebooting, then waiting a few days until wifi goes nuts, then rebooting again.. This is the strangest android bug/issue that I've seen.
[Nexus 5 General] jineshpatel30:
check your wifi scanning in Location again (turn it off if it's on ) it starts automatically after using navigation (randomly) !
[Nexus 5 General] michaelopolis:
I've noticed this too, very annoying, i wonder if its a bug or google likes to spy ????
[Nexus 5 General] nx1977:
If you start seeing Wifi at the top of your battery stats, best thing to do is use the feedback option to tell Google.

The more reports they get the more likely it is to be addressed as it'll include all your system logs.
[Nexus 5 General] jineshpatel30:
How about both :D :p
[Nexus 5 General] lynnux:
This is all pretty frustrating. Some nights battery will go down 20-30% in 4 hours. I've tried most of the things in this thread with little success. I've just disabled location services for some apps that may be a problem. Wakelock Detector this morning showed Google Play Services with 325 wakes, Android Pay 120 (I've used it twice), nothing else was notable. I'm suspecting it's location services for some apps, I'll see what happens while it sleeps tonight.

I'm running 6.0.1 on my N7 and N10, they lose 1-2% battery overnight, so I don't think it's 6.0.1 by itself.
[Nexus 5 General] spibbs:
I've never seen that turned on, it has never changed on its own. I'd be pretty angry if something was altering the settings on my phone without asking me first.
[Nexus 5 General] kaditi:
Have you unchecked the wifi-scanning in the privacy settings for each app? IE Maps/Now etc have a 'scan wifi for location' toggle defaulted to 'on'............just wondering if those over-ride the wifi setting toggle??

EDIT:Makes no difference, i've now left these on. However after getting constant wifi-reconnects I set my router standard to 'G' which seems to have cleared this up......?
[Nexus 5 General] yunierdj:
Good question. I double know but if someone does.
[Nexus 5 General] rolex0815:
Bug occurred after I did a complete factory reset and installed Android 6.0.1 from scratch.

When I dirty flashed over 4.4 and all 5.x versions the bug did NOT occur.

This needs definitely to be fixed.
[Nexus 5 General] pgoelz:
Please clarify.... exactly how did you dirty flash to prevent the WiFi drain? Is this a potential work-around until Google gets around to fixing it?

And I have never been sure.... the "cell standby" bug seems to be on Google's agenda. What about this "WiFi active" issue? Or are they related?

Paul
[Nexus 5 General] dbal:
Not only the wifi drain is on Google's agenda, but as you can see here https://code.google.com/p/android/issues/detail?id=188909&q=WIFI%20BATTERY&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars it is listed as high priority compared to the mobile active radio drain bug here https://code.google.com/p/android/issues/detail?id=190396

My latest knowledge addition to the issue is yesterday's experiment where at sometime I turned airplane mode off and while I had absolutely no real battery drain as you can see in the screenshot graph, the wifi battery percentage rose up to 23% an kept going...

So maybe (as I have wondered before) this is mainly erroneous stats calculation and reporting? :confused:
[Nexus 5 General] pgoelz:
Sorry.... I should have updated my question. Yes, I checked and found the WiFi drain bug on the Google issues page so I guess there will be a fix a some point in the very indefinite future.

Funny.... you have to opposite issue from me. I have had several instances (see screenshot for example) where the battery discharge level on the graph will show (for example) 62% used (ie., 38% remaining) but the percentages for each entry below the graph add up to FAR less than 62%.

[IMG="Screenshot"]http://pgoelz.com/stuff/Screenshot_20151205-210624.png[/IMG]

The items on the list in the above sceenshot totaled maybe 25%, far short of the displayed 62%. All was OK until I left the house and returned. From that point onwards, the battery was discharging at a rate far above what the individual items showed. It is unclear which (if either) can be trusted. It is my educated guess that the graph is responding to battery voltage and the individual entries are calculated based on their individual battery profiles and time active. So the graph may be fairly accurate and the entries are not actually measured and therefore could be way off. Just a guess though.

Paul
[Nexus 5 General] dbal:
Exactly! And If your "guess" is right, then eventually we shouldn't be so anxious about the long awaited bug fix, which might come fairly soon due to the "high priority" assignement, as it is only misleading reporting...

Despite all these of course, IT HAS TO BE FIXED. (are you listening Google...??? :p )
[Nexus 5 General] pgoelz:
I just edited my original response to add a screen shot. In my case, if the battery graph is to be trusted (it agreed with the battery gauge), there is serious unreported drain. The opposite of your case and far more serious.... again if the battery graph is to be trusted.

I just hope it gets fixed soon..... and before the N5 gets abandoned. With the exception of this bug, the Nexus 5 on MM is FABULOUS. At home on WiFi, the standby time even exceeds that of my trusty old Motorola Razr flip phone (it could go a whole week) which has been my benchmark for years. On the N5, I have seen projections of between 8 and 14 days of standby if I don't use it and don't leave the house.

Paul
[Nexus 5 General] dbal:
You also point another issue that is coexistent and I have noticed since day1 - that the partial reported battery percentages never sum up to the current battery level, but I haven't paid too much attention to it...It is clear that something is wrong out there and hopefully gets fixed soon because I totally agree with you that the N5 is pretty much a golden all-arounder that finds me absolutely satisfied even among today's competition :)
[Nexus 5 General] yunierdj:
I did read somewhere that Google acknowledged the issue of wifi battery drain wrongfully reporting wrong data.
[Nexus 5 General] dbal:
That's where I am concluding so far by myself and most of the guys in the forums I talk with, but if you find the relative link or sth on your way, I would be glad you posted it here
[Nexus 5 General] nx1977:
This isn't merely a reporting issue as the drain IS happening. Rapidly.
[Nexus 5 General] dbal:
No one claimed it's merely reporting but maybe, mainly. Anyway, as a pure bug, behavior varies among users - for example others, even in a flight mode situation like the one I describe before experience rapid discharge while I had almost no battery consumption both in graph and overall percentage...

But above all and before Google puts us at...war, they need to fix the damn bug...
[Nexus 5 General] pgoelz:
Possible temporary and easy workaround. I just installed a little app called "quick reboot". Since I am not rooted, it does not actually reboot the phone. Instead, it closes as many apps and system processes as it can and then terminates. It is very fast..... just run the program and it closes what it can, reports on what it closed and what memory it freed up and then it closes.

So far, using it once each time I return home after being away from WiFi seems to have kept my standby battery drain normal. Kinda the same as rebooting, but easier.... just tap the app icon and you are done.

I'll report back in a couple more days and let everyone know if this is a good temporary solution.

Paul
[Nexus 5 General] yunierdj:
Let's us know how it goes Paul. Interesting.
[Nexus 5 General] dbal:
Can you point to the exact app mate? There are many similar named in the store and 2-3 I tried didn't even start cuz I am not rooted as well. In fact I really wonder how you got this working without root...
[Nexus 5 General] pgoelz:
Sure. It is "Fast Reboot" by Great Bytes Software.

It works without root because it doesn't actually reboot the phone. It just stops whatever apps and processes it can. It reports on what it stopped and how much memory it cleared and then terminates. All it takes is a single tap on the app icon.

So far so good. My next test is to wait for the abnormal battery drain to show up and then use the app to restart the apps and processes and see if that stops the drain.

Paul
[Nexus 5 General] jineshpatel30:
new factory images are coming today or may be tomorrow (yeee ! :D )with January security fix & other fixes (may be :p ) version will be 6.0.1 MMB29S ( source )

let's hope it fixes this annoying issue.
[Nexus 5 General] dbal:
I don't want to spoil any hopes but the bug won't be fixed unless the label in the issue tracker thread https://code.google.com/p/android/issues/detail?id=188909&q=WIFI%20BATTERY&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars turns from "assigned" to "future release" according to "Life of a bug" Google's article here https://source.android.com/source/life-of-a-bug.html. Furthermore, if the info on build number is correct and not 6.0.2 or sth, it means it will be the classic monthly security update with no bug fixing or whatsoever...

So, we keep waiting and waiting...
[Nexus 5 General] pgoelz:
Well.... FAIL. I left the house for a couple hours, which caused the phone to transition off WiFi and onto cell data. When I returned and reconnected to WiFi, the rapid battery drain had started. I activated "Fast Reboot" and waited a while. Battery drain continued without change. So it looks like Fast Reboot does NOT stop the drain.

As of now, all reported battery drain items total 48%. Battery gauge and graph shows 80% drained (20% remaining). That is 32% missing.

I'm about to flash the latest update but it looks like it won't solve anything. I've uninstalled Fast Reboot.

Paul
[Nexus 5 General] rolex0815:
I did not prevent anything. I just had to completely wipe my phone last week because of an experiment which went wrong and after flashing the newest factory image, I recognized this WIFI bug.

The weeks before I was also an Marshmellow, but I just flashed Android 6 over 5 and 4.4 without wiping data. Until the complete wipe, this bug didn't occur.

Do you understand what I mean?
[Nexus 5 General] pgoelz:
Yes, I understand what you mean. Trying to understand why it might have helped ;)

Paul
[Nexus 5 General] grognaz:
Does the problem occur on all roms or are there some that do not suffer from it?

Im using DirtyUnichorn and habe the WiFi drain
[Nexus 5 General] pgoelz:
I have tried CM13, Cataclysm and even KK 4.4.4 and they all had the same issue of sporadic abnormal (and unreported) battery drain after leaving WiFi and then re-connecting some time later.

My best guess is that this is a very basic flaw deep in the OS or the kernal.... or worse, in the radio firmware.... that has been there for a long time. When I was using my Moto X (2013), I had similar issues. It was 100% OK in the house. But when I would go out for a couple hours, it would do all sorts of strange things if I had an in pocket missed call.

Paul
[Nexus 5 General] Isidoro3:
Bug disappeared when I turned off this location setting but I've realised it wasn't actually draining battery since it lasts just the same...

Enviado desde mi Nexus 5 mediante Tapatalk
[Nexus 5 General] rolex0815:
It's weird for me it seems to be a displayed error with battery statistics.

Unplugged the phone yesterday at 8 am, then it was more or less idle the whole day had 2 short phone calls and display-on time guessed ~ 30 minutes.

The screenshot attached was taken 5:40 pm and it shows only Wifi as main consumer.

So for me it's clear there's something wrong with the battery usage calculation...
[Nexus 5 General] dbal:
As you can see from my quoted post, I came to this conclusion as well few days ago...seems that sth is wrong in the kernel code with the calculation of wifi battery consumption, but we have to be reluctant since we can only speculate....anyway, this has better to be FIXED Google... :mad:
[Nexus 5 General] Th3Duck:
As many others wifi is sipping the most battery. Also the graph says wifi is on. Everything wifi related is off. It isnt the total battery consumption I already have 1,5 hour of sot and the phone hasnt seen the charger for 20 hours. Meaning that I can run the phone for 60 hours and 4,5 hours of sot. Wich is great.

I also have uninstalled google wifi services a few days ago.

Maybe the overall battery calculation is wrong?

I have the Nexus 6P rooted with xposed and stock ROM and kernel.
[Nexus 5 General] nx1977:
If it was only a miscalculation, then what is eating my battery so quickly? It's happening on the brand new nexus handsets, so hardware can be ruled out.

The stats say Wifi, the Wifi drain has been on going since lollipop and has gotten worse in Marshmallow.
[Nexus 5 General] DasBöse:
this bug is neither fixed with 6.0.1 nor it is a miscalculation! battery is going down rapidly with WIFI on
[Nexus 5 General] dbal:
Here's what I found and tested working the last week or so, while I was also suffering from the bug but no trick could help me....

To all of you that turning off WIFI scanning does not help, try after disabling it, to open a relevant app eg. Google maps. Marshmallow then will probably show a dialog box proposing to enable the setting --> [now, later or NEVER]

To me, it "worked" only after selecting the "never" option there and not when I simply turned it off in location settings.

Of course I say trick "worked" in quotes, because the bug still exists under the hood if someone wants to have that extra location help with wifi scanning setting active like me, and I recognize that this CAN NOT be, in anyway, considered as a kind of permanent solution...

As per the other "sister" bug of wifi graph showing constant no matter turned on/off, the only trick working so far, is to be careful turning it off BEFORE you leave the access point coverage area, otherwise, only restarting can cure it again...

PS: Battery life for all this week "without" the bug, seems almost unchanged compared to the extreme 30% + drain percentages displayed, so I still stand to my "conclusion" (mark my quotes plz) that the core of the issue is calculation and not real battery consumption/drain that corresponds to the numbers
[Nexus 5 General] yyzzz:
Joining the club.

After 6.0.1 my wifi is draining the battery at very fast rate even it is completely turned off from all the settings! I'm getting about 14 hours of battery life after full charge while screen turned off. Wifi is always number #1 consumer even it is disabled. Have tried all the resets for cache etc etc

Also wifi is working extremely slow speeds at home so im forced to use my 4G. Speedtest app however gives me ~ 80MBps / 10Mbps which is inline with my current connection. For example I can not use youtube app anymore

Clearly this new 6.0.1 is yet another version that breaks more things than fixes and I'm very unhappy about updating from 5.0 a while ago. It's ridiculous

My phone is completely stock and have only a few apps
[Nexus 5 General] ggoomani:
I agree. The drain for me seems real. I lost 20% on standby with screen off all night. Then another 20% while at work. I used to have 2+ days of moderate use on a charge. Now at 7pm, it is at 25% and I hardly used it today. Perhaps 5 minutes of SOT. . Just a few days ago, it barely lost 1% overnight. Is it time to calibrate or replace my battery?
[Nexus 5 General] amnher:
[MENTION=3878777]ggoomani[/MENTION]

what android version where you before when you have 2days?
[Nexus 5 General] isrmicha:
This Video Can Helps You

[YOUTUBE]GnzI_YjbeKg[/YOUTUBE]
[Nexus 5 General] jineshpatel30:
i appreciate your efoort to make video but i sincerely think it wasn't necessary bcz, i think all of XDA members can/should able to follow these simple steps from Pics provided in OP.

anyway,

i'm adding your video to OP & requesting Moderators to close your thread so that all discussion about this matter remains in single thread.
[Nexus 5 General] NinetoFive:
I have nothing new to add, just chiming in with my experiences.

With my N5 from launch, I did a complete clean install to 6.01. The phone felt incredibly snappy, battery life was great. I literally had no complaints. Then a few days later, battery drain seemed to be significantly higher for whatever reason. I installed all of my apps from day 1, so it shoudln't be a faulty app suddenly causing it. No abnormal wakelocks in sight.

Possibly reporting errors, but wifi is always two or three times the usage of "screen on", per the battery page.

I lose 1%/hour in drain too, which seems to be higher than what people get here (when it's working well)
[Nexus 5 General] ggoomani:
[MENTION=4269226]amnher[/MENTION]:

I have been using Cataclysm rom 6.0.1, with latest release from Jan 5th.

UPDATE: Since yesterday, I applied some advice from others and tried clearing cache, and made sure to only activate device-only GPS, instead of the high accuracy option on Maps while using it for navigation today. So far wifi does not appear in the battery stats. I am curious how long it will last, without needing to clear cache or reboot on a daily basis.

As others have suggested, it seems to be related to the device using wifi for location purposes. For now, I will steer clear of high accuracy GPS mode, and report back if the issue pops up again.
[Nexus 5 General] lynnux:
I'd been having the wifi bug off and on for a few weeks on a new N5. Flashing franco kernel over a week ago almost totally stopped it. Most nights I only get a few percentage drop. On a bad night I might lose 10% overnight. Nothing like before. Using default settings. Not saying this is a fix, just that it worked for me. So far...:fingers-crossed:

Edit: rooted stock 6.0.1
[Nexus 5 General] pcphobic:
If u noticed that WiFi has been turned on the whole time via the battery history chart, despite the fact that you did not even turn on WiFi at all during that period, then this can only mean one thing. You must have enabled WiFi Scanning (the famous Scanning always available bug in Lollipop & KitKat).

To disable WiFi Scanning, go to Settings first. Then on the top of settings, there is a search bar. Type in "Scanning".

Then u will see the following options. Make sure u disable WiFi Scanning.

Having said this, there is another annoying bug. This bug is when you have left a WiFi hotspot and forgotten to turn of WiFi. So after awhile u realised it. So u proceed to turn off WiFi. But hours later, u check your battery stat, and it still shows your WiFi have been active the whole time despite turning it off. For this, the only workaround is to reboot the phone. To avoid this bug, always turn off WiFi b4 u leave the WiFi hotspot area.
[Nexus 5 General] AndyAS:
Did someone try to downgrade to Lollipop? I tryed KitKat as well and still observed the drain, wich makes me think it is not a system bug, but a Google Play Services thing.
[Nexus 5 General] rolex0815:
I can come up with some new findings.

For me it must be a mixture of erroneous stats calculation and indeed a heavy drain.

The bad thing it, it's not predictable when draining starts.

For example I charged my phone yesterday morning and had the normal power loss I used to know. Overnight I was in flight mode and lost only 1%.

Today I did some things with my phone and put it away with 39% left.

Around 90 minutes later (phone was not used) I had only 20% left and it was showing me WIFI using 52% of battery usage (!)

It's getting even funnier, tipping on the details of the consumption showed me a computed value of ~2600 mAh.

Battery of my Nexus 5 has only 2300 mAh ... :eek:

An immediate reboot may have stopped the draining, because it stayed a long time at 18%. I'm using no energy saving plans or apps, just Stock Android.

All scanning options (WIFI and Bluetooth) are also enabled here, GPS is set to low accuracy when i'm not using it (as it was the last two years ...)
[Nexus 5 General] AndyAS:
Aren't ~1800 wakelocks from Google app too much, in only 1 day?
[Nexus 5 General] yunierdj:
I would think so ?
[Nexus 5 General] michaelopolis:
I dont have google now and i dont suffer with the wifi drain bug.
[Nexus 5 General] nx1977:
I don't use Google now either and do suffer the drain
[Nexus 5 General] pgoelz:
Is it just luck, or has the battery drain issue gotten better recently? I have now had the phone out of the house and off WiFi three times (I'm retired and don't leave the house every day) and when I returned home the battery drain was normal. That scenario used to trigger abnormal (and often unreported) drain. I'm wondering if one of the Google background services got updated.

Then again, the issue has always been somewhat sporadic, so maybe it is just dumb luck?

Paul
[Nexus 5 General] spibbs:
Now that you mention it, it hasn't happened to my phone in ~ the last week.
[Nexus 5 General] dbal:
I wish I was so optimistic as you do...Play services remains at version 8.4.89 for days now and all official issue trackers remain open...but if you wanna know if it's fixed, why don't you try activating again Wifi scanning?

I don't dare to, since I am "bug free" of extreme percentages by keeping it off more than a week. In addition, for the history details chart bug I am turning wifi off every time BEFORE I leave the coverage area and this way I am patiently waiting for the real Google fix...
[Nexus 5 General] pgoelz:
The issue may be related to WiFi scanning but I have never had it active (ie., it has always been disabled) and the extreme battery drain bug has hit me many times when I leave the house.

I was out again today and I think it might have hit again..... I thought the phone felt a little warm when I took it out of my pocket. Just in case, I rebooted so I don't know for sure if it struck or I was just overly sensitive. Can't tell from the battery graph since I think I caught it very quickly.

Do we know whether this issue (unreported extreme battery drain) is really on Google's radar? The issue I see open relates to abnormal WiFi or maybe cell standby drain. Not sure if that is actually the same issue but it could be.

I opened an issue specifically for extreme unreported drain but I have not gotten around to trying to capture a log while it is happening. And I have to assume that if I am the only one reporting it, no one will pay any attention.

I sure hope it gets fixed before the Nexus 5 gets orphaned.... maybe as soon as Android 7? I could stay on MM happily forever if they would fix this issue. The phone is pretty spectacular when it is not stuck and draining the battery. I like it better than the 5X because it has wireless charging.

Paul
[Nexus 5 General] dbal:
The issue is indeed assigned to Google team as you can see at https://code.google.com/p/android/issues/detail?id=188909&q=WIFI%20BATTERY&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars and all related threads are being merged here if you scroll through the pages, so maybe yours has the same luck too...

Thank God it's listed as high priority and hopefully we get a fix sometime soon (the next 6.0.x maybe?) when the index in the up left corner turns from "assigned" to "future release"

PS: I totally agree with you that I can go all the way with the N5 for a year or more with a few polished bugs like this one - cross your fingers!
[Nexus 5 General] aarons6:
i didnt have this problem before i updated my radio to the newest one. can i downgrade it?
[Nexus 5 General] pgoelz:
FWIW, a while back as an experiment I downgraded to KK 4.4.4 and had the same issue, so not sure downgrading the radio would help if it was possible. In fact, I had very similar issues on my 2013 Moto X on KK. They did NOT get fixed on 5.x and I moved on to the Nexus 5 and 6.x when the Moto X got abandoned on 5.x. Still waiting for a fix.

Paul