yashsingh1/xdaforums huggingface dataset:
[Nexus 5 General] eddiehk6:
[MENTION=4942685]jineshpatel30[/MENTION]

I'd be careful about your thread title before you actually confirm anything properly, you said in the OP that your battery life is actually better than it was before, is this still the case?

I'm suspicious that the bug is actually in the reporting of the battery statistics, rather than actual 'drain' from WiFi. If it was actually 'draining' as what the thread title suggests, then you would get worse battery life than before.

I'd recommend you investigate further, try and confirm which of the two it actually is. Perhaps consider changing the thread title until you do.
[Nexus 5 General] jineshpatel30:
@All quick update/summary from OP

[MENTION=535343]all[/MENTION]

it's not specific ROM or Kernel related issue..it will chase you whatever setup you choose provied it's 6.0+ as it's native andoid bug and it can't be solved by changing things until some dev (none is lucky till date)/ google patch whatever the cause. i think google patched this on 6p & N5x in new march factory image MHC19* so we can expect this fix in next factory image (or may be 6.1 :p )

so No i don't think your battery is dead...may be slight weaker ( i have relatively new battery and i get 3hr + SOT with 9hr+ usage with above normal use )

there are lots of work around for this provided by many people. but to be honest most accurate one is what i wrote in OP.

turn off wifi scanning in location setting

it works every damn time for me ( scanning auto turns on when you use navigation as google asked our permission for the same while setting up device ) so you need to keep an eye on scanning off every time you see some unusual wifi battery drain and turn it off it it's on.

if you are unlucky one as some of others and if above thing won't stop your drain then there is not much you can do. try other work around (clear cache/ reboot/ keep WiFi on/ restart apps etc) but don't put hope on them because on my knowledge they are just lucky charm and you will see wifi drain after some days again. so hope that workaround in OP works for you.

other workaround providers plz don't take this post personally this is my honest opinion after going through entire thread, there is good chance that your work around is working great for you but it's not working for others with 100% accuracy :)

Cheers !

(btw i'm seriously wishing that N5 should get Android N officially, it's basically perfection update for Marshmallow and adds some nice goodies .. figure-crossed )
[Nexus 5 General] dbal:
A detailed post by the OP that I totally agree with except the fact that I seriously doubt a fix is contained in the Nexus 5X&6P updates, because the bug status on Google code remains "assigned" and not "future release" as it should be the case... I wish I am proved wrong but...
[Nexus 5 General] tiiinko:
Anyone tried Android N? Any hope a solution to this problem has been implemented?
[Nexus 5 General] cheeze.keyk:
theres no Android N as of now for Nexus 5.
[Nexus 5 General] nx1977:
After the march update I thought this was cured.

Until today and the issue is back again ?
[Nexus 5 General] higedamc:
I think this workaround doesn't work for Nexus 5 with Marshmallow because it drains battery more when wifi location scanning off rather than on, it is reporeted by some users that the 6.0.1 sysyem feature is concerned and so does mine really. (especially app Permissions) Of course, it must be all up to every environment though, at least if you have some of apps installed for the actual daily use, I think it doesn't work.

Tapatalk を使用して私の Nexus 5 から送信
[Nexus 5 General] alvarorojas4:
Just don't turn on/off the wifi.

Let it on always, or off always and it's gone.

If you toggle it, restart the phone. You'll see how the battery last longer and the wifi doesn't even appear in stats.

I already posted this before, and It's been almost a month and that's the only real workaround to this bug

Enviado desde mi Nexus 5 mediante Tapatalk
[Nexus 5 General] Zrbtfm:
Absolutely true. Worked on my oneplus 2 nxrom.us... But... Can't stick to a such policy.... One reboot per wifi switch. No way.

Btw it is not about wifi up order down. It is about wifi scanning of + reboot + full charging cycle and then wifi disappears until you accidently switching on. Wifi scanning through a click on a new up... And then... Crazy wifi draining battery even if scanning switched of in the following minutes.... And then another round of full charging / reboot...
[Nexus 5 General] Huntex:
I tried everything possible, even going through a factory reset, and only installing the apps I need most. But I still get my battery drained like crazy. I'm lucky if I get an hour of sot. But the thing is, there's nothing helpful on battery stats (screen 5%, android system 4%, voice calls 2%).

This is making me crazy..
[Nexus 5 General] jineshpatel30:
if there is nothing that sucks your battery ridiculously then it's battery problem..time to get new one ;)
[Nexus 5 General] pgoelz:
Not so fast..... if the percentages in the battery stats while you are experiencing rapid battery drain do not approximately add up to the total discharge shown on the battery graph, this is an issue I have been fighting ever since LP. I have reported it but Google does not seem very interested in it.

A reboot fixes it until the next time.... which seems related to transitioning from WiFi to cell data and back. Doesn't happen every time, but when it does, the extreme battery drain does not stop until a reboot.

Either it does not affect everyone, or not everyone notices it.

Paul
[Nexus 5 General] jineshpatel30:
don't have this issue on N5..my battery stats perfectly match 100% use.

though i had similar issue on my galaxy i9070 but it wasn't software related at that time as well, i changed it's battery and every thing was ok.

IMO if it's software related then everyone should face it and we might have seen some cry out thread like this one :p

still anyone of you has root access try wake lock detector app form play store & EX kernel + Ex kernel manager app... this both apps shows perfect information regarding battery drain
[Nexus 5 General] Huntex:
Now that you say it, I do have a % mismatch. Battery drained by 20% while I was sleeping, but android battery stats show a total of 4%.

Also, I'm not rooted
[Nexus 5 General] rmean:
Mine didn't ever match. I already changed the battery and get about 4 hrs SOT. But still, the %age doesn't match ;)
[Nexus 5 General] jineshpatel30:
i wasn't not talking about battery stats provided In setting , it aught to differ because it doesn't consider kernel and many miscellaneous battery use.

still over entire charge cycle (100 to 20) difference should be normally ~10-15% if difference is more than 20% then something is not correct...there is where wake lock detector come in picture to see what other things sucking battery.

right now for me in Setting stats battery use is 60% and app usage provided there add ups to 48% so extra 12% is kernel & misalliances which can be found in above app.

there is adb method for Non-root user to use that app , though not easy and doesn't work with very device . you can give it shot if you want. visit app play store page for more info
[Nexus 5 General] pgoelz:
There ya go.... I think this is more widespread than folks realize. The mismatch depends on how long it has been since the drain began. My best guess is that the drain is around 10%/hour and is not reflected in the battery stats. I have seen mismatches of 50% when it has been allowed to continue for several hours before rebooting (and have a battery monitor screenshot of it).

It could of course be hardware, but I doubt it. The reason not everyone notices it is that A) it may not happen to everyone and B) when it does, you might not notice it unless you do the math and add up all the battery stat percentages. It happens to me maybe once out of five excursions out of the house (and away from WiFi, and reboot ALWAYS stops it.

FWIW, I'm currently running the stock ROM, but when I ran Pure Nexus, it seemed less frequent.

Paul
[Nexus 5 General] Pastorelli's:
I can confirm that the WiFi battery drain is related by transitioning from WiFi to cellular data and back. I can use my phone for a few days without using cellular data but only WiFi and i will have no WiFi battery drain, soon as i toggle cell data the battery drain occurs within a few hours. I resolved this by disabling Wi-Fi scanning, Mode to Device only in Location settings and WiFi Advanced set to 2.4 Ghz only.
[Nexus 5 General] jineshpatel30:
MOB30D build Wifi bug fix ? check & report

Hello, if anyone is using completely stock with new MOB30D build please check and report whether WiFi bug reported in OP is fixed as claimed in above change log or not (don't use work around of turning off wifi scanning in location off while testing )

user who are not full stock can also check but there is good chance that if you Custom ROM uses old framework then it'll not be fix ( for example Cataclysm Mod ) so i'm waiting for someone fully stock (root & custom kernel is okay) to come up with test result.

I'm quite busy so i can't flash & test it my self but if no one will come up with fully stock result i'll do it next week & share the result.

Let's hope this annoying bug is finally fixed. Fingers crossed ;)
[Nexus 5 General] lynnux:
Wow, this would be great news. And long overdue. I'll flash it today, but the drain is most noticeable for me overnight, so I won't be able to report anything until tomorrow.
[Nexus 5 General] pgoelz:
Flashed it yesterday so way too early to be sure. But I have not seen abnormal unreported battery drain today in spite of leaving the house and WiFi and transitioning to cell data (and using it) and then back to WiFi. In fact, standby battery drain was substantially lower than usual while out of the house. I took it off charge yesterday evening at between 95% and 100%. About 18 hours later (including five hours off WiFi and on cell data), I am at 90% remaining. Maybe 3-5 minutes screen on time, so most of that was standby, either on the table or in my pocket. I'm not sure I have had it installed long enough for doze mode to hibernate my unused apps either.

In my experience, it will be a couple weeks before I can say for sure if they fixed anything since we're trying to prove a negative. And I'm most concerned with the "extreme and unreported battery drain issue", which may or may not be related to the WiFi scanning / active issue that most of you are tracking.

Paul
[Nexus 5 General] nx1977:
Is this on the OTA stack yet?
[Nexus 5 General] Zflash:
It's wider than the Nexus 5. I have exactly the same on my Oneplus One with the new COS13, and can confirm it happens when you switch from WiFi to cellular and back. Hopefully the new fixes will help.
[Nexus 5 General] jineshpatel30:
Thanks for the quick update.

Keep checking as you said and let us know if you find anything abnormal o interesting ;)
[Nexus 5 General] pgoelz:
So far, so good. It has been running about two days and the battery monitor is projecting another seven. The discharge graph shows a nearly straight ten day downward slope with no bumps or glitches, including when I was away from WIFi yesterday. However, I have only left the house that once since flashing so not a thorough test yet. I'm about to go out again in a little bit.... we'll see how it goes. This time I will be in a relatively weak signal area, which seems to be loosely associated with triggering the rapid unreported discharge issue. News at 11.....

Paul
[Nexus 5 General] pgoelz:
OK, so far so good. I was out of the house, off of WiFi and on cell data with mostly poor to no signal for several hours today. During that time, the battery drain increased by a factor of 2X-5X as expected. Upon return to home and WiFi, the battery drain returned to its previous level. And, all of the battery drain is accounted for in the battery percentages.

Again, too soon to know for sure, but definitely a good sign.

Paul
[Nexus 5 General] amnher:
So far so good also to me though i only installed it about a day. But in older firmwarea, whenever i have my scanning and left the area with wifi on(connected to that wifi), just a matter of hours the drain on wifi risea. Now there isnt any. Ill try to observe more
[Nexus 5 General] dbal:
May I ask where does this changelog screenshot comes from? Not because of doubt, but because the "official" bug thread here https://code.google.com/p/android/issues/detail?id=188909&q=WIFI%20BATTERY&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars remains still labeled as "assigned" and not "future release" as it should be when fixed and that makes me worry...

Of course, it could only be forgotten by the Google team (fingers crossed) but we have to be cautious for any conclusions anyway since it's too early after the update was released

Luckily, I am fully stock so I will turn wifi scanning on again for testing purposes and report my results here :)
[Nexus 5 General] jineshpatel30:
ofcourse you can ;) it's from AOSP change log for April MOB30D release here.. http://aosp.changelog.to/android-6.0.1_r17-to-android-6.0.1_r30.html

2nd thing don't relay or brag on Google bug report page's status..because many times they don't change status for months to be certain that's actually fixed otherwise some cry babies cry out loud on that issues again :D

so check it your self if it's fixed or not and report ;)
[Nexus 5 General] dbal:
My intention was certainly not to "brag"...I am just trying to rely on official sources as much as possible like the Google bug report and of course the AOSP changelog you posted

Afterall I myself mention the possibility of the bug status not being updated timely, which of course I hope to be the case

So, let's all start testing and pray this ridiculous bug be history soon...!

PS: It's interesting to point as well that the title "fix for wifi scan reporting" may indicate that the whole bug was about absurd percentage stats that were not directly related to actual battery drain, which was how I experienced the bug before I turned wifi scanning off. Just a guess IMHO...
[Nexus 5 General] prog19:
The test to see if the bug is gone should be: connect to Wi-Fi, leave wifi range until it disconnects. Turn Wi-Fi off and wait a couple hours. Go to battery stats, click on the battery chart and see if the Wi-Fi got really off when you manually turned it off.

If wifi still show as on on the period of time after you turned it off then the bug oersists and will cause drain eventually.

Note that this bug affects me the way I deacribed it even with wifi scanning off.

But im not in the latest security patch image

I'm a Brazilian without English Course, sorry and be comprehensive :)
[Nexus 5 General] pgoelz:
I am going to call this one provisionally fixed (and about da**ed time too). After many days of testing, I have not experienced any issues where battery drain (real or reported) increased when I left the house AND THEN FAILED TO DECREASE when I returned home. Each time I leave WiFi and then return, the battery drain falls back to its normal 0.5 to 0.75 percent per hour. This is a big change from the previous many builds, where the battery drain would often remain at very high levels even after returning to WiFi. WiFi location scanning was always turned off.

It will still take a couple more weeks to be absolutely sure, but as of now I think it is finally fixed. And I have to say that for me at least, that was the last major bug in Android that I have been waiting many revisions to get fixed. Going back to KK 4.4.4 in my Moto X (and even as a test in the Nexus 5), there has been something funky and unpredictable about the transition from WiFi to cell data and back. Never got fixed in LP.

Paul
[Nexus 5 General] dbal:
Good news to hear Paul...!

I didn't get it clear though, after the latest update are you testing with wifi scanning still off?

If so, conclusions may not be safe since I had it "fixed" by turning wifi scanning off as a workaround all this time...that's why the OP in the first post about the AOSP finding, also suggests that all testing be done with wifi scaaning on so we can be sure that we have a fix...
[Nexus 5 General] pgoelz:
WiFi scanning on my phone is always off. The issue I have been fighting is slightly different than the "WiFi drain" issue most of you are talking about. However, I believe it is related. In my case, the issue is massive drain that begins after a WiFi to cell data to WiFi transition and is NOT accounted for in the battery percentages. This is what I am reporting is apparently fixed.

Paul
[Nexus 5 General] prog19:
Same here. Will try tomorrow the new build

I'm a Brazilian without English Course, sorry and be comprehensive :)
[Nexus 5 General] prog19:
For me, the Wi-Fi showing as on in the battery stats even as I turned it off persists. Let's see if the drain is gone.

I'm a Brazilian without English Course, sorry and be comprehensive :)
[Nexus 5 General] dbal:
You probably mean the wifi bar in the "history details" chart - I have the same behavior with random intermittent breaks but I think it's normal since I have reactivated Wifi scanning for testing purposes. When I turn it off, now or before the update, it was cut off as it should be

Good news is that no matter setting I ve tried so far, wifi percentage remains at a reasonable 2% maximum so we can still be optimistic...
[Nexus 5 General] prog19:
Wifi and bluetooth scanning play any significant role on the day to day of you guys ? Just asking because im not expert in location services

I'm a Brazilian without English Course, sorry and be comprehensive :)
[Nexus 5 General] amnher:
Guys the drain is there. I turned my scanning for bluetooth and wifi and I slept with everything(wifi,bluetooth,gps) off and I have also greenify with aggressive doze + notification. And last night my phone didnt entered doze mode between 10Pm till 6PM. It was full charged before I slept and got 71% when I woke up and battery stats showed that wifi is the top with around 7h34m33s running :(
[Nexus 5 General] jineshpatel30:
If you are not on latest Fully stock then,

(Always) State your setup while reporting issue

Rom

Kernel

Root

Other mods

Xposed or not etc.

PS: if you are fully stock MOB30D then try without using Greenify
[Nexus 5 General] amnher:
Fully stock MOB30D without root and also locked BL. Ok ill try without greenify. By the way here is the screenshot of my drain. There are two things n the list "phone idle" and this one
[Nexus 5 General] prog19:
26mAh after 7 hours running seems negligible. After all you allowed it to keep scanning. Its like little more than 1% of your battery capacity after 7 hours running

I'm a Brazilian without English Course, sorry and be comprehensive :)
[Nexus 5 General] dbal:
[MENTION=4269226]amnher[/MENTION]

this runtime is consistent with the option of wifi scanning set to "on" and cannot be considered battery drain with 26mah of consumption. My wifi bar for example in the second chart is uninterrupted even if I have it turned off, because wifi scanning is back to "on" for testing purposes. The bug difference is that the percentage remains [MENTION=1067919]1-2[/MENTION]% max instead of the crazy stats of 30-40% when we first found the problem

Anyway, please post the two screenshots with the graphs (battery usage and history details), not only wifi details, so we can assume better
[Nexus 5 General] amnher:
But the actual drain is 37 percent overnight standby. WIFI,BLUETOOTH,GPS,AUTOSYNC Off. Even signal is fine. And the phone didn't entered doze mode because greenify will notify me when it goes to doze mode together with the duration.

Well I'll do a test again. Because last night the drain didn't came out even though wifi/bluetooth scanning is on
[Nexus 5 General] prog19:
In my experience greenify sometimes meas with doze. Its a poor performance in the idle, but it doesn't seem to be because of Wi-Fi. Unfortunately android have this crap battery consistency since the beginning and it doesn't seem to getting better at it.

There are days that my battery will last long, and there are days that will be draining like hole in a pool, with the same usage.

That's what annoys me more about android

I'm a Brazilian without English Course, sorry and be comprehensive :)
[Nexus 5 General] kapsi123:
Finally after almost a year (?) this bug gets fixed and I can stop being annoyed at this ****.
[Nexus 5 General] 511pf:
Any update on this from folks testing? My idle power consumption jumps to from ~1% per hour to about 2.5% per hour within a few days of a reboot, even while GSAM shows Doze is actually on over night. Wifi is (now?) not reported as a major factor in the standard battery stats, but the stats are also not reporting all battery use. GSAM reports that it's Wifi. I've tried dozens of different settings, to no avail. I'm on MOB30D.
[Nexus 5 General] pgoelz:
So far, after about two weeks of testing, my battery drain has been completely normal. I leave the house and the standby drain rises. I return home to WiFi and the standby drain returns to normal. I have had no incidents of elevated standby drain and/or unreported drain. Where the phone would often become very slightly warm in my pocket away from home, it now is cold.

My standby drain at home on WiFi with strong cell signal is somewhere around 0.5 to 0.75%/hour with NFC, WiFi scanning, daydream all disabled, no accounts syncing in the background and doze active.

Note that at present I am running PureNexus (with the updated radio and bootloader from MOB30D), but stock MOB30D behavior was the same. I'm a happy camper.

Paul
[Nexus 5 General] pgoelz:
Well crap. After two weeks of flawless operation, I returned to stock MOB30D and it happened again. Very high battery drain after leaving WiFi and then returning, with some of it not accounted for in the percentages. If it makes a difference (I think it does), I used the cell data while off WiFi this time out.

So maybe it is NOT fixed after all. I'm so confused.

Paul
[Nexus 5 General] zsocop:
Sorry, i dont have any time for look thru the thread, but i have a question. Is anybody else having this issue, when yes then have you any solution? I have it for a while, reboot helps until the next charging. Thx

Tapatalkkal küldve az én Nexus 5 eszközömről
[Nexus 5 General] dbal:
Well, As you say, you experience a problem slightly different than the OP's issue we are concerned in this thread...I myself am trouble free days now after the latest bug fixing update (no crazy stats, normal battery consumption, wifi scanning left ON all the time) which is also the case for all recent posts in Google's bug tracking thread...

So, No offense but, maybe you should start your own thread so as not to confuse other members here?
[Nexus 5 General] pgoelz:
Sorry if I confused anyone. I think I have been VERY clear exactly what my issue is and that I believe it is likely related to the "WiFi drain" issue since it appears to be triggered the same way the WiFi drain issue gets triggered. The only difference seems to be that most are reporting that excessive battery drain is linked to the reported drain from WiFi and I am reporting that the excessive drain is not linked to ANY device or process.

I thought it would be more useful to keep these two (assumed) closely related issues together.

Paul