Real Cause of battery drain/wake lock in MJ7/MK2 and fix

Search This thread

mongoose3800

Member
Feb 21, 2011
9
6
I am posting this as it is very hard to wade through information in forums. I'm hoping the following will be useful to those, who like me, experienced battery drain caused by Android Wake Locks after upgrading to MJ7 / MK2.

I am 100% certain the battery drain in MJ7/MK2 is caused by connecting to WIFI networks in environments that have multiple AP's. i.e. once WIFI roams from one AP to another the battery drain starts. All my testing confirms this - consistently. I have actually tested being connected to one AP in a multiple AP environment for a long period and observed no wake locks on Android OS. Yet as soon I move to another location (i.e when I make it roam) the wake lock and battery drain starts. All this rubbish about clearing cache, factory resetting, nobbling your phone and so on are all stabs in the dark - It's the reboot that temporarily fixes it so people mistakenly put two and two together. So, if you use WIFI in a large building with multiple AP's try forgetting the network and not connecting to WIFI with multiple AP's. If you have already connected to a SSID with multiple AP's reboot your phone because once the battery drain starts it does not seem to stop until you reboot. You don't have to disable WIFI at all as scanning does not cause the wake lock. I have tested this thoroughly and so far I have not had any battery drain since not connecting to SSIDs with multiple APs. I can also back this up as I can create battery drain at will by simply connecting to a WIFI environment with an SSID distributed over multiple AD's.

My battery life is again fantastic and I am happy now that I know the cause.

Pretty poor testing by Samsung/Google as I see in past versions of Android Roaming has been an issue.
 

stanley08

Senior Member
Jun 23, 2012
2,740
1,828
Lagos, Nigeria.
titaniumideas.blogspot.com
I am posting this as it is very hard to wade through information in forums. I'm hoping the following will be useful to those, who like me, experienced battery drain caused by Android Wake Locks after upgrading to MJ7 / MK2.

I am 100% certain the battery drain in MJ7/MK2 is caused by connecting to WIFI networks in environments that have multiple AP's. i.e. once WIFI roams from one AP to another the battery drain starts. All my testing confirms this - consistently. I have actually tested being connected to one AP in a multiple AP environment for a long period and observed no wake locks on Android OS. Yet as soon I move to another location (i.e when I make it roam) the wake lock and battery drain starts. All this rubbish about clearing cache, factory resetting, nobbling your phone and so on are all stabs in the dark - It's the reboot that temporarily fixes it so people mistakenly put two and two together. So, if you use WIFI in a large building with multiple AP's try forgetting the network and not connecting to WIFI with multiple AP's. If you have already connected to a SSID with multiple AP's reboot your phone because once the battery drain starts it does not seem to stop until you reboot. You don't have to disable WIFI at all as scanning does not cause the wake lock. I have tested this thoroughly and so far I have not had any battery drain since not connecting to SSIDs with multiple APs. I can also back this up as I can create battery drain at will by simply connecting to a WIFI environment with an SSID distributed over multiple AD's.

My battery life is again fantastic and I am happy now that I know the cause.

Pretty poor testing by Samsung/Google as I see in past versions of Android Roaming has been an issue.

Funny thing is that when i am using mobile data the drain is worse, So I'm pretty sure this is not the main issue man. Also, I have a Mobile 'WiFi' router. Only me has WiFi connection in my entire hostel. So I don't really think it's the issue. Good finds tho! It will definitely help someone. Cheers! :)
 

mongoose3800

Member
Feb 21, 2011
9
6
39089665568

Agree with stanley, this is not the only cause.

Agreed. There are many things that will cause elevated use. But Im talking the rapid drain that occurs when you're not using the phone. Ever since taking the action I describbed my battery life has been excellent. Eg 94% after 14 odd hours with no use. And, I'm still connecting to my home wifi. Beforehand it could be below 60% with no use and this is the real problem people are talking about. Hope that makes sense.
 
Last edited:

aydc

Senior Member
Jul 31, 2006
1,036
390
Actually it's the opposite. If you set up your modem to have a separate AP for the phone and isolate it from the rest of the network, you'll have much better battery life on wifi because you'll stop your phone from waking up by broadcast packets.
 
  • Like
Reactions: P30SiNa

Nazty111

Member
Dec 26, 2013
22
0
Actually it's the opposite. If you set up your modem to have a separate AP for the phone and isolate it from the rest of the network, you'll have much better battery life on wifi because you'll stop your phone from waking up by broadcast packets.

I don't get it. What am I supposed to do exactly? :confused::confused:
 
Actually it's the opposite. If you set up your modem to have a separate AP for the phone and isolate it from the rest of the network, you'll have much better battery life on wifi because you'll stop your phone from waking up by broadcast packets.

What about unicast traffic? i know the Client Isolation sort of "VLAN"s every client associated, just wondering if that might affect client to client communication?

Good point btw, im also wondering how many services wake the damn thing up, waking up over network is more an enterprise workstation scenario...to me it sounds like HotSpot 2.0 services being active, but i have not enabled it.

HS2.0 can let client and AP sort of talk without associating.
 

aydc

Senior Member
Jul 31, 2006
1,036
390
I don't get it. What am I supposed to do exactly? :confused::confused:

Most modems have a sort of 'guest mode' or allow you to open another access point and isolate it from the rest of the network. If you connect your phone to this guest access point or isolated access point, your phone will reach internet without problems, but will not reach the local network through the router. Nor will any other device on the network reach your phone.

Most of the problems with Wifi draining battery, like wifi wakelocks, occurs because devices on the network keep sending packets to the phone waking it up. With the method I describe above, you will isolate your phone and the phone will remain in deep sleep, significantly increasing battery life.
 
  • Like
Reactions: EddieN

EddieN

Senior Member
May 13, 2011
164
27
Gothenburg
Most modems have a sort of 'guest mode' or allow you to open another access point and isolate it from the rest of the network. If you connect your phone to this guest access point or isolated access point, your phone will reach internet without problems, but will not reach the local network through the router. Nor will any other device on the network reach your phone.

Most of the problems with Wifi draining battery, like wifi wakelocks, occurs because devices on the network keep sending packets to the phone waking it up. With the method I describe above, you will isolate your phone and the phone will remain in deep sleep, significantly increasing battery life.

This is very true. Back on my old GNex i used to have crazy wifi wakelocks and I couldn't for the life of me figure it out. I never figured it out, actually. But I am positive it is one of the two PC's on my network that are broadcasting packets across the network, waking my phone up. I haven't had time to extensively test the wifi wakelock in the environment i've previously encountered it in to see if it still applies, but since I haven't changed anything regarding any of the two computers involved on that network, I'm positive I will have the same wifi wakelock issue when I get back and test. Is there a way (besides using Shark) to see what programs are broadcasting packets across the network?

But to get back on topic, I am experiencing battery drain connected to ONE router with ONE AP. I am in an apartment building with several other routers nearby, though. Maybe they are broadcasting packets somehow that the kernel is interpreting and keeping the phone awake? However it seems as though the Android OS bug keeps coming back for everyone no matter what, even in airplane mode.
 
Wifi has evolved a lot the last decade, not just by technology standards but into integration as well. carriers use them as small cells, we'll see them more often in the future (malls, stadiums, etc), and HS2.0 adds to make it a bit more seamless, they call it offload, taking your data needs through small wifi cells rather then the macro cells (3g, 4g), hence offload.

my point is that they would have never invested in that if the wifi chips inside consumer products were not efficient enough, so nearby APs shouldnt be a problem at all. But im still puzzled for what would one need the waking up process through wifi?

If Wifi is the general bugger, then somebody throw an eye on the Passport service, thats the consumer name for HS 2.0 services.

PS, tested AP Isolation on my sh!tty WRT120N, no difference unfortuantely.
 

AeonXS

Senior Member
Sep 30, 2013
200
7
Will there be a future update from Sammy or will we get Kitkat directly

Sent from my SM-N900 using Tapatalk
 

mongoose3800

Member
Feb 21, 2011
9
6
Just a follow up. I have still had no battery drain since avoiding connecting to wifi networks that use multiple APs. Now, i only connect to wifi networks where i know there is only one AP. Before I stumbled across this the drain and Android os wake lock was bad, really bad, after I had connected to large wifi networks - I just hadn't put two and two together. This is more than coincidence - my testing is sound and replicable. And, this week I have been in remote areas with weak to no 3g signal and the battery life has still been fantastic and no wake locks so that sort of rules that out - Sure there is a little increase in battery usage but nothing dramatic, something to be expected and certainly not something to complain about. I have seen many claims to fix battery drain but these are just fine tuning and not addressing the major drain caused by Android OS wake locks. Clearly, there must be an issue with the wifi software driver in MJ7/MK2 and I hope Samsung/Google are aware of it. The annoying thing is getting Samsung to acknowledge the issue and take feedback.
 

EddieN

Senior Member
May 13, 2011
164
27
Gothenburg
I get wake locks even if I manually turn wifi off and only use data. When I use wifi i am connected to only one AP and I still get wake locks. The wake locks aren't apps, they are "Powermanager.wakelocks" and "Powermanager.Display" and show up as "Android OS" in battery settings.

I am still not convinced avoiding multiple AP wifi networks is the one-for-all solution for everyone.

However, I have put "wifi on during sleep" to "never," yet my phone slept maybe 50% yesterday but wifi was on 100% of the time. Why is this? Shouldn't it have turned off the 50% that the phone was sleeping?

Something is weird with the wifi module..

Sent from my SM-N9005 using xda app-developers app
 

mongoose3800

Member
Feb 21, 2011
9
6
I get wake locks even if I manually turn wifi off and only use data. When I use wifi i am connected to only one AP and I still get wake locks. The wake locks aren't apps, they are "Powermanager.wakelocks" and "Powermanager.Display" and show up as "Android OS" in battery settings.

I am still not convinced avoiding multiple AP wifi networks is the one-for-all solution for everyone.

However, I have put "wifi on during sleep" to "never," yet my phone slept maybe 50% yesterday but wifi was on 100% of the time. Why is this? Shouldn't it have turned off the 50% that the phone was sleeping?

Something is weird with the wifi module..

Sent from my SM-N9005 using xda app-developers app

Have you ruled out any other wifi connections? Have you tried rebooting if you have connected to another wifi network? Have you tried forgetting all wifi networks? Reboot after forgetting all networks. Then give it a couple of days with out connecting to any wifi network - just a test to confirm it is wifi related. I tend to think setting wifi to never on during sleep makes no difference - I had previously tried it too. Once the drain starts the only way to stop it is to reboot.
 

EddieN

Senior Member
May 13, 2011
164
27
Gothenburg
Have you ruled out any other wifi connections? Have you tried rebooting if you have connected to another wifi network? Have you tried forgetting all wifi networks? Reboot after forgetting all networks. Then give it a couple of days with out connecting to any wifi network - just a test to confirm it is wifi related. I tend to think setting wifi to never on during sleep makes no difference - I had previously tried it too. Once the drain starts the only way to stop it is to reboot.

Yes, just last week I was on another Wifi AP about ~300km away (totally different environment) and I still had the same wake locks. I have rebooted when connecting to another wifi network. I have tried forgetting all wifi networks i have connected to, and reconnecting to them. I have also rebooted once forgetting networks. During this time I also took the liberty of doing the normal rounds of disabling location services etc. before rebooting, but nevertheless i did reboot once forgetting the network. All networks I have been connected to have been single-AP wifi networks.

I have not let it sit for a few days without connecting to any wifi networks. That's the only thing I haven't tried. However I have let it go a whole day with wifi turned off (and only data enabled), but the same wakelocks persisted. For me it's always "Powermanage.Display" and "Powermanager.Wakelocks" no matter how long i just let my phone sit around with the screen turned off. I have it right beside me so I always have visual access to the screen in case the phone wakes up on its own, but it never has. I guess I could try turning wifi off for a few days and seeing how it fares, but I doubt I will see any difference (wake lock wise).

I'm thinking something is strange with the wifi module anyway. Surely wifi should turn off by itself once the phone sleeps, right? Like I said in my other post, my phone slept maybe 50-60% of the time on a 14 hour day. That means Wifi should have been on 40-50% of that time, and off 50-60% since the phone technically should have been sleeping. Yet I can see in the battery settings menu that wifi is a solid green bar all across the 14 hours.
 
Last edited:

mongoose3800

Member
Feb 21, 2011
9
6
Yes, just last week I was on another Wifi AP about ~300km away (totally different environment) and I still had the same wake locks. I have rebooted when connecting to another wifi network. I have tried forgetting all wifi networks i have connected to, and reconnecting to them. I have also rebooted once forgetting networks. During this time I also took the liberty of doing the normal rounds of disabling location services etc. before rebooting, but nevertheless i did reboot once forgetting the network. All networks I have been connected to have been single-AP wifi networks.

I have not let it sit for a few days without connecting to any wifi networks. That's the only thing I haven't tried. However I have let it go a whole day with wifi turned off (and only data enabled), but the same wakelocks persisted. For me it's always "Powermanage.Display" and "Powermanager.Wakelocks" no matter how long i just let my phone sit around with the screen turned off. I have it right beside me so I always have visual access to the screen in case the phone wakes up on its own, but it never has. I guess I could try turning wifi off for a few days and seeing how it fares, but I doubt I will see any difference (wake lock wise).

I'm thinking something is strange with the wifi module anyway. Surely wifi should turn off by itself once the phone sleeps, right? Like I said in my other post, my phone slept maybe 50-60% of the time on a 14 hour day. That means Wifi should have been on 40-50% of that time, and off 50-60% since the phone technically should have been sleeping. Yet I can see in the battery settings menu that wifi is a solid green bar all across the 14 hours.
Well that's interesting. At least in both cases we know it's Wi Fi. I wonder if it's something if it comes down to the type of connection. Eg 2.4 vs 5ghz
 

EddieN

Senior Member
May 13, 2011
164
27
Gothenburg
Well that's interesting. At least in both cases we know it's Wi Fi. I wonder if it's something if it comes down to the type of connection. Eg 2.4 vs 5ghz

It could be. Both networks I have been connected to have been 2.4GHz Wireless-N capable routers. I just find it odd that a lot of things don't add up when looking at awake times in Settings -> Battery and comparing it to kernel/partial wakelocks in BBS/WLD/CPU Spy. All of the times seem to be roughly in the same ballpark, but they never add up to correspond to each other. Surely there must be information missing in this regard.
 

duffmannr3

Member
Jun 12, 2011
10
2
I can confirm the WiFi issue on my N9005 but there's another one.
1. Wifi: I experienced this at my university, where we have good Wifi coverage on the whole campus. They use Radius for logging in. After using Wifi for about 15min, I had these wakelocks, which didn't stop until I rebooted the phone. Since I knew this, I haven't been using Wifi there any more. But: In the meantime, I did a factory reset and got this little stability update. A few days ago, I gave it a try again. Used Wifi at university for ~25min and hat no issues. Maybe it's gone, I will test again some day.
2. I had an app called "gentle alarm". On my GNexus, which I used before my Note 3, I also had wakelocks, but couldn't figure out what it was, since wakelock detector, better battery stats etc. didn't show more than PowermanagerService.Wakelocks/Display. So I got my new Note 3 and still had these Wakelocks - I did much Monitoring and: It was this tiny alarm app. Very funny: After having excluded every other possibility and having the wakelocks active I uninstalled the app on my Note 3 and it instantly rebooted!

Great battery life now.

Hope this helps someone. BTW: The Wifi issue on larger networks seems to be a problem not only on Samsung phones, many people are experiencing this (e.g. found similar reports for Nexus 5...).
 
  • Like
Reactions: EddieN

EddieN

Senior Member
May 13, 2011
164
27
Gothenburg
I can confirm the WiFi issue on my N9005 but there's another one.
1. Wifi: I experienced this at my university, where we have good Wifi coverage on the whole campus. They use Radius for logging in. After using Wifi for about 15min, I had these wakelocks, which didn't stop until I rebooted the phone. Since I knew this, I haven't been using Wifi there any more. But: In the meantime, I did a factory reset and got this little stability update. A few days ago, I gave it a try again. Used Wifi at university for ~25min and hat no issues. Maybe it's gone, I will test again some day.
2. I had an app called "gentle alarm". On my GNexus, which I used before my Note 3, I also had wakelocks, but couldn't figure out what it was, since wakelock detector, better battery stats etc. didn't show more than PowermanagerService.Wakelocks/Display. So I got my new Note 3 and still had these Wakelocks - I did much Monitoring and: It was this tiny alarm app. Very funny: After having excluded every other possibility and having the wakelocks active I uninstalled the app on my Note 3 and it instantly rebooted!

Great battery life now.

Hope this helps someone. BTW: The Wifi issue on larger networks seems to be a problem not only on Samsung phones, many people are experiencing this (e.g. found similar reports for Nexus 5...).

Thanks for your input. Is the wifi issue you are talking about the fact that it doesnt turn off when having "wifi on during sleep -> never" set? Or the multiple-AP issue the thread is talking about?

What stability update is it that you have received? What country are you in and what firmware are you using? Did you get this stability update while on MJ7/MK2 firmware? I haven't received any notification for a stability update OTA...

Thanks for the Powermanager.Display/Wakelock issue. I guess I will have to sift through my apps and uninstall each, one by one, to see if the wakelocks disappear. If not, there is some other issue :(
 

duffmannr3

Member
Jun 12, 2011
10
2
Is the wifi issue you are talking about the fact that it doesnt turn off when having "wifi on during sleep -> never" set? Or the multiple-AP issue the thread is talking about?

It's the issue about "multiple" APs, but I don't think that it is about the number of APs. What I have read is that there is so much traffic on those big networks, e.g. broadcasts from other devices. I don't know how it should be with your problem that wifi doesn't turn off - can you see if it's reconnecting after some standby time? If yes, then wifi is turned off during sleep, but is just not shown in statistics.

What stability update is it that you have received? What country are you in and what firmware are you using? Did you get this stability update while on MJ7/MK2 firmware? I haven't received any notification for a stability update OTA...
I'm currently on MJ7/MK2. My device is unbranded and I'm living in Germany. It came on 26th of December and was about 30MB or so.

Thanks for the Powermanager.Display/Wakelock issue. I guess I will have to sift through my apps and uninstall each, one by one, to see if the wakelocks disappear. If not, there is some other issue :(
It's definitely worth a try! There was absolutely no hint that pointed to this one app. I started with having a look at the battery statistics ~every 30min after a fresh reboot. After a few days it was clear that it only could be the alarm app, battery draining started only in the morning.
 
  • Like
Reactions: EddieN

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    I am posting this as it is very hard to wade through information in forums. I'm hoping the following will be useful to those, who like me, experienced battery drain caused by Android Wake Locks after upgrading to MJ7 / MK2.

    I am 100% certain the battery drain in MJ7/MK2 is caused by connecting to WIFI networks in environments that have multiple AP's. i.e. once WIFI roams from one AP to another the battery drain starts. All my testing confirms this - consistently. I have actually tested being connected to one AP in a multiple AP environment for a long period and observed no wake locks on Android OS. Yet as soon I move to another location (i.e when I make it roam) the wake lock and battery drain starts. All this rubbish about clearing cache, factory resetting, nobbling your phone and so on are all stabs in the dark - It's the reboot that temporarily fixes it so people mistakenly put two and two together. So, if you use WIFI in a large building with multiple AP's try forgetting the network and not connecting to WIFI with multiple AP's. If you have already connected to a SSID with multiple AP's reboot your phone because once the battery drain starts it does not seem to stop until you reboot. You don't have to disable WIFI at all as scanning does not cause the wake lock. I have tested this thoroughly and so far I have not had any battery drain since not connecting to SSIDs with multiple APs. I can also back this up as I can create battery drain at will by simply connecting to a WIFI environment with an SSID distributed over multiple AD's.

    My battery life is again fantastic and I am happy now that I know the cause.

    Pretty poor testing by Samsung/Google as I see in past versions of Android Roaming has been an issue.
    2
    39089665568

    Agree with stanley, this is not the only cause.

    Agreed. There are many things that will cause elevated use. But Im talking the rapid drain that occurs when you're not using the phone. Ever since taking the action I describbed my battery life has been excellent. Eg 94% after 14 odd hours with no use. And, I'm still connecting to my home wifi. Beforehand it could be below 60% with no use and this is the real problem people are talking about. Hope that makes sense.
    1
    Actually it's the opposite. If you set up your modem to have a separate AP for the phone and isolate it from the rest of the network, you'll have much better battery life on wifi because you'll stop your phone from waking up by broadcast packets.
    1
    I don't get it. What am I supposed to do exactly? :confused::confused:

    Most modems have a sort of 'guest mode' or allow you to open another access point and isolate it from the rest of the network. If you connect your phone to this guest access point or isolated access point, your phone will reach internet without problems, but will not reach the local network through the router. Nor will any other device on the network reach your phone.

    Most of the problems with Wifi draining battery, like wifi wakelocks, occurs because devices on the network keep sending packets to the phone waking it up. With the method I describe above, you will isolate your phone and the phone will remain in deep sleep, significantly increasing battery life.
    1
    I can confirm the WiFi issue on my N9005 but there's another one.
    1. Wifi: I experienced this at my university, where we have good Wifi coverage on the whole campus. They use Radius for logging in. After using Wifi for about 15min, I had these wakelocks, which didn't stop until I rebooted the phone. Since I knew this, I haven't been using Wifi there any more. But: In the meantime, I did a factory reset and got this little stability update. A few days ago, I gave it a try again. Used Wifi at university for ~25min and hat no issues. Maybe it's gone, I will test again some day.
    2. I had an app called "gentle alarm". On my GNexus, which I used before my Note 3, I also had wakelocks, but couldn't figure out what it was, since wakelock detector, better battery stats etc. didn't show more than PowermanagerService.Wakelocks/Display. So I got my new Note 3 and still had these Wakelocks - I did much Monitoring and: It was this tiny alarm app. Very funny: After having excluded every other possibility and having the wakelocks active I uninstalled the app on my Note 3 and it instantly rebooted!

    Great battery life now.

    Hope this helps someone. BTW: The Wifi issue on larger networks seems to be a problem not only on Samsung phones, many people are experiencing this (e.g. found similar reports for Nexus 5...).