yashsingh1/xdaforums huggingface dataset:
[Nexus 5 General] dondian:
My guess is that google is deliberately doing this, so that the users would go ahead and upgrade to 5X or 6P. Conspiracy theory or not, it doesn't make any sense. Why google wouldn't be able to fix this fast (maybe they don't want to)?
[Nexus 5 General] pgoelz:
What I am most afraid of is that it is something deep in the architecture or even a hardware flaw. Something that is not easy to fix with a simple software revision. That would explain why it has been around for so long.

Do we know if the 5X and 6P have the same issue?

Paul
[Nexus 5 General] nolook:
yep i think this is their way of forcing n5 users to buy new nexus phones...

[MENTION=5575318]pgoelz[/MENTION] dont think its a hardware issue as this bug wasnt around before MM
[Nexus 5 General] pgoelz:
Maybe not exactly as it exists today, but there definitely was a very similar bug in 4.4.4 on my Moto X. It was triggered the same way too.... leave the house and transition to cell data, stay away for a while, receive a call or use the web and often you would find the phone getting warm, discharging the battery and/or activating random apps. It got WORSE in 5.x.... same symptoms, just much more frequent. I assumed it had something to do with the fact that the Moto X could turn the screen on without my knowledge (like when it sensed movement) and blamed it on poor coding for the functions that were unique to the Moto X, but maybe not.

The scary bit is that something similar was even present in Android 2.x on my Atrix 4G, triggered when it received an in-pocket or BT call.

They may or may not be related, but it is troubling that major bugs like this are still with us. And if Google moves on to Android 7 without fixing it and abandons the Nexus 5 on Android 6, I will be VERY MUCH NOT PLEASED. I don't consider the Nexus 5X to be a suitable replacement for the 5.... too big and no wireless charging. I want to keep my Nexus 5.

Paul
[Nexus 5 General] username8611:
Change the setting "keep WiFi on during sleep" to "always". I always set it as that and never knew this bug existed. Turning it off results in WiFi batteryusage being just below the screen. With it set to always, its usually around 1% - 2%.
[Nexus 5 General] basti84:
this is so sad, that google doesn't give a damn about this problem.

well i stay at 5.1.1 now ... until i buy a new phone or Google fixes this bug ...
[Nexus 5 General] pgoelz:
I have always noticed that bad things (like the WiFi bug) seem to be triggered when network changes occur. Like leaving WiFi and transitioning to cell data or vice versa. And then this morning I stumbled on a thread about disabling IPV6 to solve connection issues that occur on network changes. I don't fully understand the ins and outs of IPV6 and it is disabled in my router. But it is apparently not disabled on cell data since when I looked, I found that the phone has an IPV6 address. And I found other threads complaining that Android refuses to support DHCPv6. Any chance this is related to the WiFi drain issue? It would certainly explain why there is no fix.

I may have a go at disabling IPV6 in the phone but it requires root (not too hard) and some other things that I don't yet fully understand so some more reading is in order.

Paul
[Nexus 5 General] username8611:
Has anybody tried my suggestion above?
[Nexus 5 General] pgoelz:
Since that setting is the default, I think you will find that most of us (including me) have had "keep WiFi on during sleep" set to ALWAYS from day one. It does not solve anything.

The issue is intermittent, so anyone who tries "something" and finds that the issue is gone (for now) thinks their "something" is THE solution.

Paul
[Nexus 5 General] awakener777:
The bug is not hardware for those who keep saying it. Is android 6.0.x at this point hope they fix it quickly since I just upgraded to 6.0.1 and found this forum after doing a search for why WiFi was draining my battery so terribly and keeping my phone awake even when untouched for hours.
[Nexus 5 General] iraklisan:
nexus 5. battery sudden drain

thanks for this tip and explanation. i will try. i was confused when i saw my phone dead/ turned off today.

this forum prevents me to post link. so ill modify it

imgur > KiPyJdV
[Nexus 5 General] andressancher:
Finally, I could fix it, I done this:

I have stock MMB29S, franco kernel last build r79, and root supersu 2.66

The first is to go to Settings > Backup and reset > Network settings reset to clear all your connection data.

Second install Naptime from play store

Three discharge battery to 1% , power off , charge in off to 100% , turn on and this is all
[Nexus 5 General] vladm7:
I second this. Using exactly the same setup and finally I see "flat line" over night in my battery meter.
[Nexus 5 General] pracs4u:
My battery was drained due to WiFi scanning in settings of location. When I turned it off my battery is working normal no abnormal drains so far. You guys give it try may be your battery drain gets resolved.
[Nexus 5 General] amnher:
Anyone tried de-googlefied play services? microG

To confirm whether it is on GP Services core or Android core itself?
[Nexus 5 General] toddesmith:
CM13 Nightlies

I was frustrated too with all kinds of wifi issues and the dreaded battery drain. Fed up, I flashed the CAF version of CM13 and have experienced significant improvements with wifi stability and battery drain. I'm not going to attempt to try to understand why it happened. It could have been the prescribed wiping that is required when flashing CM13, the baseband/radio required or improvements in the CAF version of CM13. No matter, give it a shot if you're frustrated and want to restore some reliability back to your beloved N5.
[Nexus 5 General] c20h25n3o:
Ever since I've had my Nexus 5, I was on CM12, 12.1 and later 13. Apparently something in there was causing a horrible battery drain for me because I never managed to get through a day.

Long story short; I'm on Cataclysm now + EX kernel and after 10 hours of sleep (waking up once to check my phone) I lost 8%.

Is this within the spectrum of what is normal battery drain over 10 hours and waking the phone up once?

Just asking to see if I have to dig deeper, I already have every location setting, wifi scanning etc etc switched off. And aside from the time I opened the screen, there were no wakelocks.

This seems pretty great to me, but what drain do you guys get overnight? (wifi always on btw)

Thanks.

[edit]

WiFi is not a problem for me, doesn't even appear in top 5 :).
[Nexus 5 General] c20h25n3o:
I downloaded an app called aTuTu battery test or something, which stress-tests your battery.

Got a score of 2999, which is well under the Nexus 5 score mentioned in the app as a reference (which is more like 4500).

Does that imply my battery has lost a little of it's power? I'm on Cataclysm + EX with pretty much everything switched off.

Ah well, monday I will have a replacement battery. See if I can get over a score of 3000 after I run the 6 cycles.
[Nexus 5 General] jineshpatel30:
MMB29Q is also just security patch for February so this bug is still present...in case someone is wondering :p ;)
[Nexus 5 General] neelkewl:
This worked for me

OK, so this is what I did and looks it works. (At least for me)

Steps

1.Turn off WiFi - This is the first thing to do

2. Go to settings - Location. Click on the three dots on the top right corner. Go to Scanning. Turn Off WiFi and Bluetooth Scanning.

3. Go to settings. Click on More. Turn off NFC.

If you are able to kill WiFi battery drain at these 3 locations, you are game.

Let me know in case you get stuck. I'm on neel.kewl@gmail.com
[Nexus 5 General] nx1977:
I'm just sending a daily feedback via my phone ref battery stats.

Come on Google, we need to get this sorted!
[Nexus 5 General] primal2005:
So I did the temporary fixes (turned off scanning, only using 2.4GHz, Keep Wi-Fi on during sleep only when plugged in) but today I noticed that my wifi is consuming more than it normally does. Turns out, wifi no longer turns off during sleep. I changed the setting to Never, locked the screen, waited, lit up the screen and I saw the wi-fi icon was still on. Normally I can see it missing right when I turn the screen on and it would take a few seconds to reconnect. Now my wi-fi uses 43% under battery stats, screen on time is 12%. Usually it's in the 20s for wifi.

What is going on? Everything is stock.

EDIT 1: I wiped the cache partition in recovery. It's been about an hour after fully charging my phone and I have no stats for wifi now under battery. Seems to still be draining quickly. It says I only have 2 hours left. Screen is 3% right now and thats the highest.

EDIT 2: It's been about 4 hours, I'm currently at 42% and the battery says 3 hours remaining. Wifi stat now appears. Screen on time is 1h 42m (8%), Wifi is 3h 46m (5%).

EDIT 3: been about 10 hours now, battery at 28% with 4 hours remaining. wifi is at 27%, screen at 9%. Seems to have presented itself again. Wifi still stays on all the time too!
[Nexus 5 General] rolex0815:
Didn't have it for about two weeks, yesterday it happened again, but a reboot solves the problem temporarily.

I doubt more and more that it has something to do with Android 6 or even Android, I'm suspecting the (Google) Play services which are automatically updated.
[Nexus 5 General] nolook:
after trying everything in this thread I just found something that makes this WiFi bug go away. disabled Google now and now the bug is gone (also changed location to device only - tried this before but not with disabling Google now so I guess that's the right combo)
[Nexus 5 General] nx1977:
I already have now disabled and location to device. Makes no difference
[Nexus 5 General] tfernandes:
Hello,

Im using the Nexus 5 pure rom with elementx kernel

I applied all tips said on this thread.. Disabled NFC, WiFi search (on location settings)

And my battery still very bad...

Last night I went to sleep and I got 93% , wake up 6 hours later only with 76% without touching the phone! WiFi was on.

I attached some pics

Can someone help me?

PS: no overclock or undervolt...

Thx
[Nexus 5 General] pgoelz:
Looks kind of normal to me? Notice how the battery drain dropped dramatically in a couple small steps after you (assumed) stopped using it. That looks very much like doze activating over several hours. After doze was fully active, your battery drain was much lower than at the beginning of the graph. That all looks very normal to me on stock MM as well as Pure Nexus.

What I find more interesting is the fact that your total of ~25% drain does not seem to be fully reported in your battery stats. That is something that I have been trying to figure out on my phone too. When the battery drain is "normal", the battery stats add up to within 1-2% of the total drain as reported by the graph. But when the battery drain is "abnormal", the "abnormal" amount is NOT reflected in the stats. I have seen as much as a 50% discrepancy between the total battery used as shows by the graph and the sum of all the discharging apps in the battery stats. In other words, I have seen a total drain of (say) 75% (25% remaining) but the individual amounts only add up to about 25%. My current theory is that it has something to do with Pandora or perhaps what Pandora does on the network during transitions from WiFi to cell and back to WiFi. I have not seen the issue for about two weeks and during that time I was not using Pandora. However, I used Pandora yesterday while in the car. When I returned home, I found the battery drain was massively higher than normal (and remained at that level for hours) but like on your phone, the abnormal component of the drain only showed up on the graph.... not in the battery discharge stats. I uninstalled Pandora and rebooted and am waiting to see what happens. next

I have reported this issue on the Google issue tracker but since no one else seems to be reporting it, I doubt they will ever look at it.

Paul
[Nexus 5 General] basti84:
Hi,

i think i found a good combination ....

Recovery: http://xdaforums.com/showpost.php?p=65194197&postcount=1021

ROM: http://xdaforums.com/google-nexus-5/orig-development/rom-cyanogenmod-13-nexus-5-t3241046

Boot.img:http://xdaforums.com/showpost.php?p=65274086&postcount=1032

Screenshot:

Settings from OP-Post are made too...

Seems to run very stable and battery looks good

i will keep an eye on it

##edit

still looking good
[Nexus 5 General] mini2015:
I am facing this weird issue of Battery drain after updating to MM 6.0 on moto xt1068 (2014) or say 2nd gen..

I tried everything given on sites to solve the issue .. but it fails soon.

You reboot the phone with wifi default in OFF … battery drain normally

You turn ON the WIFI even for a second and turn off… the battery still drains like anything … even if you have kept the WIFI to OFF all night.. in the morning the battery info shows the battery drained due to usage by ON WIFI … Is this WIFI or Ghost in my phone … :P

I heard google ppl have not solved this issue since 5.1.1 update & its still there on 6.0.1 on nexus .... :eek:

My location setting is in OFF ... all off ... still no help ...

I think i have to go back to buy a basic non-android NOKIA phones of 90's... lolzzz
[Nexus 5 General] siamer:
just want let you know that krexus rom is working fine. there is no problem with battery (at least I don't have any). before I used several differnt roms and always was some problems with battery but not krexus so I can recommand that rom (worth to try)...

good luck!

siamer
[Nexus 5 General] kzz17:
Restart phone after turning on wifi. Works for me=] been doing it for a while now.
[Nexus 5 General] dbal:
Just because it happened to me recently, I want to confirm that the wifi scanning setting can be triggered to "ON" without your "consent" (by a system app probably?) causing the percentage reporting error bug to reappear

Manually switch to "OFF", restart (preferrably while connected to WIFI) and all temporarily fixed again, until Google squashes the bug in their damn battery consumption code... (if ever) :mad:
[Nexus 5 General] tedrogers61:
Mine is off and remains off after several restarts / days.
[Nexus 5 General] rainyguy:
I am using Nexus 6p but of course on 6.0.1 stock. What's should be off are already off. The restart will temp fix and then something will trigger on again. Guess have to wait or trial and error with the (uninstalling) of the apps.
[Nexus 5 General] dbal:
Mine was also already off for many days but suddenly the bug reappeared and upon checking the setting I found it back to ON, and I was certainly not the one to do it.

Just wanted to point it out so you keep your headz up!

Regarding the reason, probably is try catch with the apps installed (especially gapps) but I won't spend so much effort discovering, when I can simply check the setting periodically :)
[Nexus 5 General] RazorMC:
Haha this is weird. I just saw the OP's point on Wifi scanning switching ON automatically. Checked the location settings and it was indeed ON, turned it off and enjoyed better battery.

It turns on every time I use location, so I've set the device to use GPS only. Will report back on this though.
[Nexus 5 General] tedrogers61:
Must be an app that has been previously granted location services turning it back on surely? Haha, bet its fine in safe mode! All day long.
[Nexus 5 General] alvarorojas4:
This is the only thing that works.

I let the wifi turned on always, and my battery last much longer than before. So if i turn on/off the wifi I just restart the phone and wifi oen't even appear on stats, or sometimes at 1%

Thanks!
[Nexus 5 General] krishna dev:
I downgraded my N5 with lollipop factory image file and upgraded to marshmallow by ota update and now my battery is calibrated and it shows 1 day 18 hours left with 92% battery. This helped me calibrate my battery but after ota upgrade don't forget to wipe cache partition and reboot system.
[Nexus 5 General] tedrogers61:
Isn't that because when you've rebooted the WiFi is still off as this was the last setting before you rebooted? I can save lots of power by having no WiFi too.
[Nexus 5 General] alvarorojas4:
Yep, is because of that.

Enviado desde mi Nexus 5 mediante Tapatalk
[Nexus 5 General] tedrogers61:
So, just turn it off then. Fixed.
[Nexus 5 General] crypticc:
Hi. I sincerely think the cause is a single logic issue which then triggers a bug.

First the logic issue... Before marshmallow WiFi sleep and scanning used to have a higher priority than Location being set to either high accuracy or battery saving.

Since marshmallow, if location is set to ON with any mode that includes WiFi, say to high accuracy, it tries to collect and use Wi-Fi data. It does that regardless of the settings "WiFi look for open networks", or " location scanning always available" .

And now the root cause...

Lollipop text in network settings was...

"Let Google's location service and other apps scan for networks, even when WiFi is off "

Marshmallow is now...

"Improve location by allowing system apps and services to detect WiFi networks at any time".

This setting is simply not working. When it was moved from WiFi properties to location properties they introduced a change in the priority of the settings. Now the only fix is to disable high accuracy or battery saving modes and revert to device only.

Then the bug... This is just simply that even if scanning and location by WiFi were enabled Android shouldn't muller your battery. In fact it seems that if you have WiFi on it can help, presumably because the location service connects, sees your location, find some WiFi, and then send to Google and closes. I'd guess with WiFi turned off it gets in a tizzy somewhere along the way.

Now here's there crunch, some apps insist on you enabling high accuracy, presumably to allow them to collect and build their own material. Waze is one example so I uninstalled that. Google now seems to be another though it does allow you to say " no".

The final bug is this. When you first turned on location settings with the toolbar shortcut it asked you if you want to share data with Google. If you disagree you got device GPS only and all was good in the world. But then it nags you constantly whenever you disable or enable until you agree. Once you agree, that's it, whenever you use the shortcut to enable location settings it will turn on high accuracy even if the last time you used it you set it to device only. For those that wonder why Android keeps reverting high accuracy this is the reason. You need to wipe plat services and play store to reset back to the device only/nag mode.

Chris
[Nexus 5 General] grognaz:
I had set up a tasker event to trigger a signal when it connects and disconnects to my wifi, at some point when the screen was off and i was not using the device for some time it started to turn wifi off and on for a couple of times. Not sure if this is some conflict with tasker and doze or so but this seemed really strange and could explain the drainage if this toggling continues
[Nexus 5 General] MtDewFella:
Battery drain, is this normal

I have had a battery drain problem on my phone on both stock rom and pure nexus with and without franco kernel, can some one tell me if my battery drain is normal or is there a problem
[Nexus 5 General] Sage:
got the problem here too 6.0.1 Pure Nexus ROM. Wifi is always on and always the top consumer.. Nothing i can do will turn it off.
[Nexus 5 General] tedrogers61:
My battery drain is reduced with device only/ no scanning enabled, but I use the high accuracy mode all the time, so o have to live with it. Franco kernel made no difference to me, and it crashed more than stock, so I reverted to fully stock rooted only.
[Nexus 5 General] dbal:
Interesting to confirm that 3rd party kernels do not fix the issue...
[Nexus 5 General] MtDewFella:
Some people are reporting great battery life and changing roms/kernels don't seem to affect the issue, is it possible our batteries are going bad?
[Nexus 5 General] jineshpatel30:
Huh ?? What am I supposed to see here ?!

Don't reply if you have no idea what we are talking here !
[Nexus 5 General] darthanubis:
So you're blind?
[Nexus 5 General] jineshpatel30:
No

That's the one..and I know it already someone told it 2 hrs ago

Now go check the 1st attachment you upload & relate it with matter we were discussing here...and you were expecting better reply from me for irrelevant matter ?!

Just a suggestion for you in future never reply blindly !
[Nexus 5 General] Yaz75:
You're really looking silly here. But fine, go ahead and keep raging away.
[Nexus 5 General] jineshpatel30:
Really ?

Care to explain how ?
[Nexus 5 General] m52 power!:
I noticed the SAME issue today too. I've used my phone maybe 10 minutes today, it's mostly just been in my pocket connected to work 5G wifi all day. 100% stock MM image.

At the same time yesterday on MM my battery was 78% which I thought was pretty good.
[Nexus 5 General] jineshpatel30:
Report it in link provided in OP as well?
[Nexus 5 General] jineshpatel30:
Report it in link provided in OP as well
[Nexus 5 General] Nexus311:
If you also have this issue, please star the bug in bug tracker linked in OP.

I'm also having this happen to me now all the sudden. Didn't happen yesterday, but has been creeping up today. Only thing I've done is toggle WiFi scanning a few times. Only use WiFi at work too. Don't know if it's a reporting error or what.
[Nexus 5 General] cpanos:
Same issue here as well. From the same room I get massive WiFi drain (estimated ~700mah in 8 hours) on the nexus 5, while on my nexus 7, I get around 20mah drain (same duration). Next day, I can tell battery drops really fast on WiFi, but WiFi is not listed at battery stats at all. Weird stuff. Hope this get sorted soon. Sucks getting better battery life out of a mobile network.

P.S. clean install from factory images, wifi/bt location scanning off.
[Nexus 5 General] tebore:
Makes sense

I read through the whole AOSP change log and they had a whole bunch of comments about WiFi power reporting and estimation to fall back on when it misreports. So they must have had issues with misreporting.

There's also comments for extra debugging because of unfixed bugs.
[Nexus 5 General] Nexus311:
This bug report has been acknowledged by Google. Maybe star this one as well.
[Nexus 5 General] kicksilver:
It seems to me that the system is displaying the wrong info about the power consumption of wifi.
[Nexus 5 General] [hfm]:
I see it as well

Flashed factory image Monday evening.
[Nexus 5 General] Ananay Singh:
I flashed the stock image. Did a clean install. Been 2 days. No WiFi bug at all. Battery life has considerably increased.

PS: how do i enable the percentage indicator in the battery icon?
[Nexus 5 General] [hfm]:
Long press the settings gear on the notification shade for about 5 seconds and lift. You should enter settings with a notification that System UI Tuner has been enabled. It shows up as the last option in settings. It's a toggle in there.
[Nexus 5 General] jineshpatel30:
They merged our issue with one you stated...so every time you comment/ star OP issue it will ultimately stars Assigned issue as well (afaik)��...the reason I put issue submitted by in OP is, that assigned issue was reported by N6 user so if we comment in separate N5 issue they can know many more users having same problem in N5 as well and it'll also count in assigned issue as they are already merged

..........

Anyway [MENTION=535343]all[/MENTION]

I'm also experiencing wifi taking long time to connect (every time..not only 1st )...it takes much time after clicking wifi tile in QS but if i go to view available networks in Quick tile (by drop down Aero) it connects instantly !

If anyone else seeing this bug plz reply
[Nexus 5 General] peter032:
I had this 'bug' as well. Just turn of Wifi scan in the advenced Location settings.