NFC Service Battery Drain on 30O - ONE Q&A, Help & Troubleshooting

I am running a 30O and I am experiencing extreme battery drain from NFC Service.
I am able to Force Close the service, however; the option to turn NFC is checked and grayed out so I can't uncheck it.
I wiped data, cache, and dalvik after accepting/installing the official 30O OTA.
I am rooted with stock recovery and I dont believe I have any NFC apps installed.
Anyone else seeing major battery drain from NFC Service ?

Having the same problem. Running latest sabermod slim with AK kernel.

Related

Some issues with CM10

Hi everyone
Lately I switched to CM10 and I'm loving it just have some issues with it
1. Battery life
I removed completely the NFC and Bluetooth (I don't use either). I'm charging the phone to 100%, the phone is in airplane mode with everything tured off - wifi, sync - anything that can be turned off is, and still when I wake up in the morning I see the battery in around 92%.
This had never happened in the original ROM or in CleanRom (I used both for a long time).
2. Whatsapp
Almost every time I don't see the message until I open the device and even sometimes until I open Whatsapp. This as well never happened in other Roms I used.
3. Google Maps & GPS
Crashes, data lost, GPS signal lost. Only way I can work with Google Maps is to turn off the wifi and network locations. Is there any solution for that?
I'm with the latest CM10 nightly, everytime I'm installing it I fully wipe everything - cache, dalvik, factory & system.
Only apps I'm using are Google Maps, Google Voice, Whatsapp, Fancy Widget (with refresh to manual). All sync is turned off for Gmail, Contacts, Calendar. Only Whatsapp is marked to sync.
Thanks to anyone who can help with anything.
battery life and gps issues are known bugs. try disabling location settings to improve battery life, although 8% in one night seems pretty standard. gps has worked pretty well for me, but some people have issues.
Thanks for you answer.
8% during night, with everything turned off (phone is in airplain mode, wifi off, no nfc, no sync) is standard for CM roms? Because with AT&T rom and CleanRom it was far more better than that.
shekel20 said:
Thanks for you answer.
8% during night, with everything turned off (phone is in airplain mode, wifi off, no nfc, no sync) is standard for CM roms? Because with AT&T rom and CleanRom it was far more better than that.
Click to expand...
Click to collapse
sense ROMs are optimized pretty heavily for the hardware on this phone
Last night something happened, something I've never seen before.
Like every other night that I'm putting the phone in airplane mode before going to bed, I just turned off data and then put the phone in airplane mode (something the airplane mode should do by itself).
Went to sleep with 51% battery, woke up with 56% (and of course that the phone wasn't connected to a charger).

[Q] Nexus 5 - Battery usage shows Wi-Fi always on?? (even when manually turned off)

I'm on a 32gb Google Play purchased white Nexus 5, activated on Sprint. I went through a whole charge cycle yesterday with Wi-Fi off, and under battery usage / Wi-Fi / Use Details / Wi-Fi running, it showed "Wi-Fi running" 17 hours. I never even had Wi-Fi turned on once.
I've been playing with it today, turning Wi-Fi on and off, and no matter what, the Wi-Fi usage time matches my phone on time. It seems according to the battery meter my Wi-Fi is always on. Any one else seeing this? What is the deal?
Go into wifi settings, click the menu button in the lower right corner, go to advanced.
Uncheck "Scanning always available". There you go.
Although TBQH the battery impact seems minimal (especially if it's able to use wifi to get a location lock, as that's much more power efficient than turning on the GPS).
that is because even though you have turned WiFi off, its still available to app to get better location. if you want to turn that off, go to settings, wifi, options, advanced and uncheck "scanning always available"
that will turn off wifi completely. hope that helps.
beestea said:
I'm on a 32gb Google Play purchased white Nexus 5, activated on Sprint. I went through a whole charge cycle yesterday with Wi-Fi off, and under battery usage / Wi-Fi / Use Details / Wi-Fi running, it showed "Wi-Fi running" 17 hours. I never even had Wi-Fi turned on once.
I've been playing with it today, turning Wi-Fi on and off, and no matter what, the Wi-Fi usage time matches my phone on time. It seems according to the battery meter my Wi-Fi is always on. Any one else seeing this? What is the deal?
Click to expand...
Click to collapse
Go into WIFI settings and click the menu (three dots menu) for advanced settings. You will find an option that makes the phone to scan for networks even when disabled.
mocoflip said:
Go into WIFI settings and click the menu (three dots menu) for advanced settings. You will find an option that makes the phone to scan for networks even when disabled.
Click to expand...
Click to collapse
Thank you all very much! Will see if it helps my battery life at all!
Thanks folks.
Following my update to 4.4.2 I was experiencing wifi using a lot more battery than normal. I tend to turn wifi off at night, and phone had started using more battery than normal. This fix in advanced settings got things back to normal for me. Battery usage much better. Odd that the update seemed to have set this to on for me.
Thanks a lot guys..this was bugging my head as well..
Hi Guys,
I've just updated to Lollipop by sideloading the OTA.
My battery usage stats say that my WiFi is constantly on and the phone is Awake, even with WiFi turned off AND 'Scanning Always Available' also turned OFF.
What could be going on and does anyone have any suggestions to fix?
Thanks
Same thing happening to me Wifi constantly on Android 5.0 Nexus 5
randommonth said:
Hi Guys,
I've just updated to Lollipop by sideloading the OTA.
My battery usage stats say that my WiFi is constantly on and the phone is Awake, even with WiFi turned off AND 'Scanning Always Available' also turned OFF.
What could be going on and does anyone have any suggestions to fix?
Thanks
Click to expand...
Click to collapse
Same thing is happening to my device. I upgraded to Android 5.0 yesterday using the OTA upgrade and battery life has been horrendous. When I view battery use it shows WiFI as being constantly on...even when I have it manually turned off. I also have "scanning alwaysa available" turned off. Need more insight on this issue.
randommonth said:
Hi Guys,
I've just updated to Lollipop by sideloading the OTA.
My battery usage stats say that my WiFi is constantly on and the phone is Awake, even with WiFi turned off AND 'Scanning Always Available' also turned OFF.
What could be going on and does anyone have any suggestions to fix?
Thanks
Click to expand...
Click to collapse
rebornlol said:
Same thing is happening to my device. I upgraded to Android 5.0 yesterday using the OTA upgrade and battery life has been horrendous. When I view battery use it shows WiFI as being constantly on...even when I have it manually turned off. I also have "scanning alwaysa available" turned off. Need more insight on this issue.
Click to expand...
Click to collapse
I had this same issue. I think I fixed it, check out my thread for a solution: http://forum.xda-developers.com/google-nexus-5/help/fix-lollipop-wifi-off-t2947870
Basically, flash Kitkat factory images, sideload OTA, factory reset, and hopefully that resolves it. Nasty little bug.
Thanks
Thanks for reading my post and suggesting the solution you have written up on your thread. I am going to see if somehow the problem becomes resolved within the next couple of days. Otherwise, I will flash back to clean KitKat image and upgrade to Lollipop as you suggested.
When I upgraded to Lollipop yesterday, it wasn't a clean install. I simply installed over my current KitKat config.
thattypicalnerd said:
I had this same issue. I think I fixed it, check out my thread for a solution: http://forum.xda-developers.com/google-nexus-5/help/fix-lollipop-wifi-off-t2947870
Basically, flash Kitkat factory images, sideload OTA, factory reset, and hopefully that resolves it. Nasty little bug.
Click to expand...
Click to collapse
Thanks for the reply, but what you suggest is basically how I have arrived at this situation...
1. I flashed the KitKat factory images a few months ago to resolve an unrelated issue
2. I sideloaded the Lollipop OTA update earlier this week, then discovered the WiFi Awake issue chewing battery.
3. I performed a factory reset (from the O/S, not from recovery) 2 days ago and then re-setup my phone, making sure to untick the option during setup which turns scanning always available on.
4. Today, with Wifi turned off and scanning always available turned off, my phone battery stats indicate my WiFi to be constantly ON.
That said I will give your method another try, but beyond that I was considering flashing the Lollipop factory images, will this help?
Cheers
randommonth said:
Thanks for the reply, but what you suggest is basically how I have arrived at this situation...
1. I flashed the KitKat factory images a few months ago to resolve an unrelated issue
2. I sideloaded the Lollipop OTA update earlier this week, then discovered the WiFi Awake issue chewing battery.
3. I performed a factory reset (from the O/S, not from recovery) 2 days ago and then re-setup my phone, making sure to untick the option during setup which turns scanning always available on.
4. Today, with Wifi turned off and scanning always available turned off, my phone battery stats indicate my WiFi to be constantly ON.
I was considering flashing the Lollipop factory images, will this help?
Cheers
Click to expand...
Click to collapse
How I arrived at that situation was by clean flashing the Lollipop factory images Maybe try it again? I'm honestly not sure what the difference in doing the two is (flashing factory Lollipop vs flashing factory Kitkat -> OTA -> wipe), but it seems to have done something for me. Also are you rooted? I did not root after following those steps, as all I really used root for was monitoring battery stats.
randommonth said:
Hi Guys,
I've just updated to Lollipop by sideloading the OTA.
My battery usage stats say that my WiFi is constantly on and the phone is Awake, even with WiFi turned off AND 'Scanning Always Available' also turned OFF.
What could be going on and does anyone have any suggestions to fix?
Thanks
Click to expand...
Click to collapse
rebornlol said:
Same thing is happening to my device. I upgraded to Android 5.0 yesterday using the OTA upgrade and battery life has been horrendous. When I view battery use it shows WiFI as being constantly on...even when I have it manually turned off. I also have "scanning alwaysa available" turned off. Need more insight on this issue.
Click to expand...
Click to collapse
thattypicalnerd said:
I had this same issue. I think I fixed it, check out my thread for a solution: http://forum.xda-developers.com/google-nexus-5/help/fix-lollipop-wifi-off-t2947870
Basically, flash Kitkat factory images, sideload OTA, factory reset, and hopefully that resolves it. Nasty little bug.
Click to expand...
Click to collapse
randommonth said:
Thanks for the reply, but what you suggest is basically how I have arrived at this situation...
1. I flashed the KitKat factory images a few months ago to resolve an unrelated issue
2. I sideloaded the Lollipop OTA update earlier this week, then discovered the WiFi Awake issue chewing battery.
3. I performed a factory reset (from the O/S, not from recovery) 2 days ago and then re-setup my phone, making sure to untick the option during setup which turns scanning always available on.
4. Today, with Wifi turned off and scanning always available turned off, my phone battery stats indicate my WiFi to be constantly ON.
That said I will give your method another try, but beyond that I was considering flashing the Lollipop factory images, will this help?
Cheers
Click to expand...
Click to collapse
thattypicalnerd said:
How I arrived at that situation was by clean flashing the Lollipop factory images Maybe try it again? I'm honestly not sure what the difference in doing the two is (flashing factory Lollipop vs flashing factory Kitkat -> OTA -> wipe), but it seems to have done something for me. Also are you rooted? I did not root after following those steps, as all I really used root for was monitoring battery stats.
Click to expand...
Click to collapse
I had the same issue as well and found it was actually caused by viber app. if you have viber app you can got into the app
->settings->general->Wifi-sleep policy and change it to use device's settings.
If that doesn't help try booting into safe mode and check your battery stats, thats how i found out it was actually caused by a 3rd party app.
A question?
My wifi is always on too as a function of Settings>Wifi>Advanced>Keep Wifi on during sleep>Always.
My question is, when I'm at work I have no chance of connecting to any Wifi networks (there aren't any!), is it going to save my battery turning this off?
Regards all,
Paul.
I have a 32 gb nexus 5. My Wifi is always on. Whenever i try to turn it off, it automatically turns right back on. If i restart the phone, wifi will be off for sometime. But as soon as i go to the drop down menu, zap, its on again. Any help on this? And of course this is draining my battery faster.
Working solutions
tejasbr said:
I have a 32 gb nexus 5. My Wifi is always on. Whenever i try to turn it off, it automatically turns right back on. If i restart the phone, wifi will be off for sometime. But as soon as i go to the drop down menu, zap, its on again. Any help on this? And of course this is draining my battery faster.
Click to expand...
Click to collapse
============================================
1. Wiping Cache Partition.
2. An app must be interfering with the android system. Uninstall applications like Clean Master, Ram Boosters, Process Killers ,etc.
Your phone doesn't need these optimizers and they are the source of the problem creating problems with the usage, asking for permissions to interfere with the system.
NOTE : Process killers, ram boosters mostly the problem, you don't need to disable WiFi everytime after use, just go to wifi options -> advanced -> Keep wifi on during sleep -> Never and select WiFi freq band as requied.
After this step you need to clear cache again and then you will never see WiFi on top i.e System will function normally.
============================================

Signal issues

I've flashed different radios and the oxygen firmware, still my signal fluctuates all without me moving the phone on my desk. Ideas?
Signal also drops out for no reason.
I'm having the same issue with mine as well, bumping your thread to get it noticed. I haven't flashed a different radio, but I'm running the stock COS12.1 ROM, never rooted, and always updated via OTA updates. I think this occured with COS12 as well, but I'm noticing it more with 12.1. I've also noticed that it takes the phone quite a while to switch over from WiFI to LTE when I leave the house...not sure if it's related.
I'm looking to avoid doing any modding to my phone at the moment because I really need to have it active at all times to receive calls, but the fact that it randomly loses signal is frustrating.
I logged the network activity last night over the course of several hours at 10 second intervals. [Edit: Phone was stationary on my nightstand the whole time with the occasional picking it up to look at the time.] There are quite a few points where signal is lost. Usually it's only for a few seconds, but it seems like it's enough to miss calls (what prompted me to log the signal is when I received a voicemail but did not have any missed calls).
Does anyone know if there's a fix for this? The app I used for logging is "Network Monitor" from the Play Store.
Still not convinced after flashing 44s didn't help then flashing the updated Oxygen firmware still nothing. My signal will go from to bars to emergency calls only. Deleted all the Unneeded apns.
Rom: Resurrection Remix.
Service Provider: Net10 using AT&T towers.
When did this start happening: As soon as I updated my firmware to the latest Cm 12.1 per RR thread.
I've tried everything i can think of, even using the hidden phone menu to select LTE/GSM. Still no luck. Every once in a while when i am at a place where i get good signal this isn't an issue. Seems to happen when i get 3 bars or less.
Still not convinced after flashing 44s didn't help then flashing the updated Oxygen firmware still nothing. My signal will go from to bars to emergency calls only. Deleted all the Unneeded apns.
Rom: Resurrection Remix.
Service Provider: Net10 using AT&T towers.
When did this start happening: As soon as I updated my firmware to the latest Cm 12.1 per RR thread.
I've tried everything i can think of, even using the hidden phone menu to select LTE/GSM. Still no luck. Every once in a while when i am at a place where i get good signal this isn't an issue. Seems to happen when i get 3 bars or less.
Just confirming this as an issue on Ting, I was on the 12.1 Nightly's, I also tried Exodus. I can be at close to full service and for some reason signal will drop out constantly, yesterday I had a 22% time without signal according to battery stats.
Clicking on network operators and selecting the correct one only temperately fixes the problem.
Solved the same exact issue on my phone
Had the same issue on mine after updating to 12.1 OTA. Selecting my APN didn't work, my connection kept going in and out to my carrier. It was as though the radio would shut off and then turn back on every 15 seconds or so. I reset default APN's, and all is back to normal T-Mobile, for what it's worth.
GlueSniffined said:
Had the same issue on mine after updating to 12.1 OTA. Selecting my APN didn't work, my connection kept going in and out to my carrier. It was as though the radio would shut off and then turn back on every 15 seconds or so. I reset default APN's, and all is back to normal T-Mobile, for what it's worth.
Click to expand...
Click to collapse
I've tried that no luck.
I fixed this on my phone, I reset to default apns, selected the correct one and then deleted all APNs that weren't mine. According to GSam i'm at 57% in 15h 34m
No luck, tried that.
Should I try to fastboot flash the 44s modem?
I've been using Phil's cwm and I don't think it's flashing right. Because I went back to a May 2015 nightly of cm 12.1 then flashed 44s and nuclearslim 1.3 ,bam everything works perfectly.
coolguy71261 said:
Should I try to fastboot flash the 44s modem?
I've been using Phil's cwm and I don't think it's flashing right. Because I went back to a May 2015 nightly of cm 12.1 then flashed 44s and nuclearslim 1.3 ,bam everything works perfectly.
Click to expand...
Click to collapse
You can't use a KitKat modem with a Lollipop ROM or you'll have prox sensor issues.
I have the proximity fix file, should I fastboot flash though.
I think Ill just fastboot flash the 44s, and why isn't Phil's saving my backups. It wiped them when I wiped the user info. Left my other files.
coolguy71261 said:
I think Ill just fastboot flash the 44s, and why isn't Phil's saving my backups. It wiped them when I wiped the user info. Left my other files.
Click to expand...
Click to collapse
i flashed the 44s modem and then the proximity fix which worked however this then breaks the auto rotation and the screen does not rotate at all. is there a fix for that?
lilzad said:
i flashed the 44s modem and then the proximity fix which worked however this then breaks the auto rotation and the screen does not rotate at all. is there a fix for that?
Click to expand...
Click to collapse
Not sure, I never had that issue. switched to the
XNPH05Q modem after my phone for what ever reason was stuck in a bootloop. I had this problem solved before it bootlooped. Here I am back with the same problem, I even followed the steps that i used to fix it last time. Nope not working this time, Some how Using XenonHd, my signal stength is all over whille sitting in the same place. Starting to think that my sim card may be going downhill. Any ideas?

How to solve this

Have this terrible battery drain and i have narrowed it down to this here is screenshot note 5 for sprint is unlocked and used in EU root moar rom running
If you don't have cell service or signal wherever you are you need to turn on airplane mode so the radio stops constantly looking for a signal. If the problem continues on airplane mode then you need to follow the instructions and update through odin to the latest stock sprint ROM. Run it for a day without installing any of your apps from the play store(OR ANYWHERE ELSE EITHER). If everything looks normal then go ahead and flash twrp in odin and then flash MOAR without installing any of your personal apps for a day. If everything is normal again i think you had some apps draining your battery. My bet is its not the kernel or the rom, it's your signal issue and some user apps draining the battery.

WiFi idle drain on custom ROMs [SOLVED]

Solution:
This was first fixed by LOS 16 with their stock kernel. The fix is also in Derp 3.0 kernel ("Rebased over CAF Pie kernel (LA.UM.7.2.r1)"), which can be used with custom ROMs like RR and PE. This kernel can not be used with MIUI, but MIUI did not have this problem, so that does not matter.
So it looks like it was changes/fixes to the WiFi driver in CAF that had to be merged into the kernel. Other custom kernels which also include those fixes would very likely also fix the problem.
-----------------------------------------------------------------------
This is the continuation of the discussion from this thread: https://forum.xda-developers.com/redmi-note-5-pro/development/rom-aosip-8-1-t3804473/page85
I have a problem, together with a few other guys (discussed at LOS, RR and AOSiP threads) and that is WiFi idle drain on custom ROMs.
I tried various Oreo ROMs (LOS, AospEx, AOSiP, PE) and various kernels (stock, NoName, Derp) and various firmwares (9.5.6.0, 9.5.11.0, 9.5.17.0, 8.7.5 and even 8.8.16 non-arb) and always have 3%/hour battery drain on WiFi, while I have only 0.5%/hour on LTE.
There was no problem during my 2 weeks on MIUI global stable 9.5.13.0 and 9.5.17.0.
There are apparently 2 settings that can affect WiFi power saving on clients: DTIM and UAPSD. On my Unifi APs, DTIM was at 1 (default) und UAPSD is off. I tried with 3 and on, but it did not change anything.
This is all while the device is in deep sleep.
Until now, I only had the drain at home (5 GHz, only tested once with 2.4 GHz). At work or in a hotel, everything was OK. But all other devices do not have that problem on my home WiFi and neither did this phone running MIUI.
For example, LOS 15.1 with same apps and same WiFi causes no such drain on Note 4/Mido.
After some searching in the MIUI forums, I also found some guys with WiFi idle drain there. But it seems, this started after MIUI 9.5.6.0 for them.
So, I flashed firmware 9.5.6.0 on my PE 8.1 installation. Still 20% drain over night on idle WiFi. So, this firmware does not help either and it's the oldest Oreo firmware I found.
Answering a question from the other thread:
Normally, I am on airplane mode over night, not charging. This causes only 1% drain total. In the morning, I am charging the device. This is generally enough time to get to 100%. I am not charging over night because this is not so good for the battery.
So, I am experiencing the idle drain during the evening at home and during the weekend at home. On LTE at work, everything is fine, even great.
The only thing left that I can do is to go back to LOS and create a bug report in their Jira. They are the only ones to have a proper bug tracker and also I think the LOS maintainers are the same guys that brought treble support to the device in the first place. I will do that probably on Wednesday, with the new LOS version from this week.
i'm on AOSiP now and i think dont have wifi idle drain (ss from BBS attached).
this device almost always in wifi, and it could easily reach 10h of SOT with 2days + usage
for info, my phone in miui China V9.5.16.0.OEICNFA while waiting 360 hours to unlock. and after unlock i just flash it with:
AOSiP + opengapps pico 20180812 + Magisk V16.0 without flashing any firmware / Miui Global rom before.
and im using LEDE 17.01.4 for router (2.4 Ghz band) if that matters
so many users have wifi idle drain (even on AOSP based rom) and this made me a lil bit curious too, maybe i'll try flash Lineage OS / RR tonight and let it idle until morning.
Aosip here, too. No wifi idle drain observed.
I flashed Havoc today to see if I have any on LOS based ROM.
Sometimes the drain linked with Wifi Location Scanning.
On Oreo go to: Settings > Security & Location > Location > Scanning.
Also this will be affected by what kind of apps you have installed as it will influence how many times this mechanism is used.
Try to disable wifi/bluetooth scanning and see if there is a change in the behaviour.
Hope it helps.
You guys can remember me posting some screenshot about my battery drain overnight, it the aosip thread. Well, here is the day 2 result.
Well I think it isn't much for me, I can live with it. But ofcouse 3% per hour like someone said is not acceptable.
Seems like I also experienced this on the latest Pixel Experience 8.1 ROM on stock kernel with Magisk. I have flashed Derp 2.2., still haven't tested yet.
Sent from my Xiaomi Redmi Note 5 using XDA Labs
peter-k said:
Aosip here, too. No wifi idle drain observed.
I flashed Havoc today to see if I have any on LOS based ROM.
Click to expand...
Click to collapse
6 h on Havoc, Wifi on all the time = 0 % Wifi draw.
It certainly has to do with the WiFi router somehow. I have 2 Unifi APs at home, which are being considered as semi-pro. But others have the same problem for example with TP-Link.
I added info about my WiFi to the 1st post.
For me:
Note 4 on Unifi AP, 5 GHz: 3%/hour
Note 4 on Unifi AP, 2.4 GHz: 3%/hour (<- not 100% sure, tested only one time)
Note 4 on Hotel WiFi, 2.4 GHz: 0.2%/hour
Note 4 on Work WiFi, 2.4 GHz: 0.2%/hour
Note 5 on Unifi AP, 5 GHz: 0.2%/hour
Mi Mix on Unifi AP, 5 GHz: 0.7%/hour
I will try switching off WiFi location scanning this evening.
phiexz said:
i'm on AOSiP now and i think dont have wifi idle drain (ss from BBS attached).
this device almost always in wifi, and it could easily reach 10h of SOT with 2days + usage
for info, my phone in miui China V9.5.16.0.OEICNFA while waiting 360 hours to unlock. and after unlock i just flash it with:
AOSiP + opengapps pico 20180812 + Magisk V16.0 without flashing any firmware / Miui Global rom before.
and im using LEDE 17.01.4 for router (2.4 Ghz band) if that matters
so many users have wifi idle drain (even on AOSP based rom) and this made me a lil bit curious too, maybe i'll try flash Lineage OS / RR tonight and let it idle until morning.
Click to expand...
Click to collapse
This is very good. You only lost 15% and you used the phone for more than an hour actively.
biswassumit25 said:
You guys can remember me posting some screenshot about my battery drain overnight, it the aosip thread. Well, here is the day 2 result.
Well I think it isn't much for me, I can live with it. But ofcouse 3% per hour like someone said is not acceptable.
Click to expand...
Click to collapse
Interesting would be the drain on WiFi in deep sleep. But I guess, you do not have the problem.
Wifi deep sleep drain - Troubleshooting and testing
Prologue
I am using Redmi Note 5 whyred global version 4/64 GB. I get it from 9.5.6.0, UBL and root it from the very first day. Update OTA twice via full recovery zip, to 9.5.13.0 and to 9.5.17.0. During all usage of the MIUI ROM usage, I constantly achieve 10+ hours in 1,5 days; usually around 12-14 hours SOT. If I left the wifi on during night, I only lose about 4-5% after awake, which is about 0,6%/hour.
Then ARP hit the deck and I have decided to switch to custom ROM. I picked RR as it is based on LOS and have much more customization. I followed the instruction to flash firmware 8.7.5 before flashing RR 6.1 20180706 + micro gapps 20180705 + Magisk 16.0 again. Since then, i never achieved SOT more than 10 hours anymore. After quick troubleshooting I realize that the idle drain during sleep when wifi is connected is around 2-3%/hour. I wake up in the morning to find my phone has lost 15-20% just overnight doing nothing.
After knowing that it is the wifi, I test the LTE and found out no massive drain, only around 0,6%/hour, which is quite normal (same as in MIUI). I then install BBS and troubleshoot it.
How to know the wifi deep sleep drain?
The easy way to test this is : just setup any wifi router, hotspot from other phone is also OK, no internet needed. Then just leave your phone connected to the wifi, note the percentage and came back again after several hours. The easiest time to spot it at night when we sleep. I have waken up several times to find out 15% drain in 6 hours, or maybe 24% in 8 hours. Approx 3%/hour. While the same setup in LTE, only take away 4-6%.
Why is it bad?
Because at 3%/hour, if we leave the phone doing nothing only connected to wifi for a day, the battery will drop to 52% (consuming 48%) while giving 0 hour SOT. In 2 day, the battery will be dead, no doing anything. While using standard drain, it should be only 0,6%/hour, which is about 15%/day. We can even leave the phone up to almost a week.
The preset condition as the baseline
1. In MIUI 9.5.6.0 - 9.5.17.0 I can connected to wifi/LTE, all get only about 0,6%/hour idle drain.
2. After using RR 20180706 (to 20180724), connected to wifi, dual SIM active, will give idle drain about 2-2,5%/hour (thus I called wifi deep sleep drain).
3. Same RR, switch to LTE, dual SIM active, only 0,6-0,7%/hour
4. No LTE, only dual SIM, about 0,4%/hour
5. Airplane mode (no wireless at all), almost no drain in 5 hours
6. Wifi on, but forget the password (so it won't connected), almost no drain in 1 hour
7. The sensor, either Google play services is there all the time and doesn't give any difference whether in wifi, LTE, or airplane. So sensor wakeup is not the culprit.
8. All wifi signal level are strong (most of the time within 1-2 metres from router). Most of the wifi AP/router are from Tp-link. And before we say it is the wifi AP, i don't experience the drain using the same wifi when in MIUI.
9. You can the comparison of the same battery life and SOT, Wifi vs LTE on the same preset condition ROM RR 6.1 20180723; but the result is very different.
List of troubleshooting done
I am going to post a very thorough but not exhausting list of the testing I have made (and failed to solve the problem)
01. Turn on wifi and connected, phone lose approx 2%/hour (and later approx 3%/hour)
02. Turn off wifi and switch to LTE, phone lose approx 0,6-0,7%/hour, which is normal drain
03. Check with BBS, google play services always wake up the sensor. Sometimes it is the Lineage OS system or phone. But I quickly rule out this as the culprit. As I can see the same wake up when using LTE, but no massive drain. So even same wake up, only wifi connected will give massive drain
04. Airplane mode, phone almost not lose any percent in 5 hours!!! Even though the BBS is reporting the Play services is waking up the phone for 3+ hours. So sensor wake up is no the culprit. (confirmed)
05. Try different wifi, I have two wifi router at home. I also have connected to 2 different wifi router at office. All give the same drain. But when in MIUI, I am connected to the same wifi, but no such drain
06. Set the wifi as metered connection, same drain. Unmetered, same drain
07. Found the possible culprit about wifi logging by cnss_diag. So I tried to disable the logging by editing the /data/misc/wifi/cnss_diag.conf using the tutorial how to disable the wifi logging. The log is not written anymore, but the drain still there. Result : Same
08. Try another solution by Aqq123 to edit the /vendor/etc/init/hw/init.qcom.rc. Commented out those lines. Reboot and confirmed the cnss_diag is not running anymore from ps -A. Result : Still same
09. Try in unmetered wifi 2,4 GHz, same. Try in metered wifi ac 5,0 or n 2,4 Ghz, same.
10. Try to connect to another separate wifi router 2,4 Ghz with no internet connection and only my RN5 as the sole wifi client (so no possible interference or broadcast from other devices), still the same.
11. Disable various RR configuration, such as double tap to sleep/wake, brightness slider, etc; same drain
12. backup the kernel, flash derp kernel 1.8, same. Restore back to stock kernel. I tried again derp kernel 2.2, same.
13. There is gapps update, so I reflash from micro to nano; still same. Currently updated to nano gapps 20180818, same
14. Disable wifi always scanning in the location setting, same. Disable the bluetooth scanning too, same.
15. Disable location feature (completely off), still the same. Deny all apps for the location permission, and worse, drain become 4%/hour
16. Reset wifi, mobile, bluetooth and reconnect again, still same
17. Change the static IP to DHCP, still the same.
18. Turn off Automagic services, since I have some remote server flow enabled when connected to wifi, same drain
19. Boot to safe mode, with only gapps and system app enabled, same drain
20. Disable Wi-Fi calling (derived from VoLTE), same. I enabled it and choose wifi. Then choose mobile. Then turn it off too. All still same drain.
21. I though it might the modification I made to the VoLTE. I undo the modification, set the VoLTE back to nothing, so the VoLTE completely non active (can't call anymore); same drain
22. Try something else not related, disable the network traffic indicator and seconds in the time. Same, no effect.
23. In the logcat, there are same crashes from LOS thermal engine every few seconds. But the same crash happen on LTE, still not drain. Only at wifi connected, so must not be the crash.
24. Set the wifi sleep policy to never. Seems to solve it, but fake solution, only placebo effect. It came back to 3%/hour drain again.
25. at the system setting, i find any value related to wifi, such as wifi_networks_available_notification_on, wifi_wakeup_available, wifi_wakeup_enable and etc; all set to 0, same drain (I have restarted after setting the value)
26. I compare the battery life of the LTE vs wifi in bugreport, throw them at battery historian. I can't find any difference in relation to the drain. (maybe it is too complex for me to read it)
27. I compare the ps -A, using automagic to capture the command output when connecting to wifi; switch to LTE and capture again. Compared both result and show the line difference. All processes are the same, all exist, only in different PID
28. Using the similar flow, I compare the tcp connection. same result, only different PID and port.
29. Uninstalled several app those probably related to wifi, and still the same
30. I think it maybe caused by the firmware. I am using 8.7.5 firmware. So I flashed back to 9.5.17.0, same dari. Flash to non arb 8.8.16, same drain. So I flashed back to 9.5.17.0 firmware.
31. Tried AOSiP ROM 20180808 build. At first hour after flashed the ROM, haven't enter the google account and haven't restore apps; only stock apps and nano gapps. Connect to the wifi and setup several configuration. leave and no drain in 1 hour. But after I login my google account and restore 98 apps; leave it again for another hour, now suddenly the 3%/hour appear. So I can safely said it was cause by some apps in 98 apps or the google account itself.
32. Because it is caused by the apps/account; I tried to disable/freeze some apps to test. I have froze Google search, Google Text to Speech, Playstore, whatsapp, Mi Fit and several others; still same drain.
33. Tried to disable wifi and data access for Google Play services, still same drain
34. Switch to battery extreme power saver mode, still same drain (seriously?)
What is not the possible culprit anymore?
1. The wifi router. Since they are all the same wifi I connected when using MIUI ROM. This rule out them
2. Kernel and firmware, have changed them and give no effect
3. ROM, I changed to AOSiP, same drain. Sidamos77 also have tested several ROM and the drain persist.
4. Location, wifi scanning, sleep policy etc; no effect
5. Sensor wake up or any wakeup in BBS or GSAM, as the same wake up appear in airplane mode but no drain
6. Not the user app, as safe mode rule them out
7. not the wifi logging (cnss_diag), as disabling it also same drain
8. wifi configuration, have changed it still the same drain
9. VoLTE, wifi calling, not related
10. Logcat show nothing to indicate the drain; same crash in wifi and LTE
11. Running services and TCP connection also almost the same
12. Not the system app/gapps such as Google search, Google text to speech, Playstore
Keypoint of possible culprit
1. vendor partition of all AOSP-ish ROM. But why not everyone experienced the drain
2. the gapps, again, why not everyone
3. hardware problem. This might explained it, but why all got the same problem only after switch to custom ROM
4. user apps, very difficult to trace.
5. Google account. Arrgh, this remove out most of the android usability.
Solution I haven't try
1. Factory reset and restore app backup. But I have tested this in AOSiP, so I won't do it again
2. Remove the google account and try. I am afraid to mess up something, so I need preparation and check before trying this
3. Install pico gapps. But I wonder if it will do anything. I need the text to speech anyway.
4. Switch back to MIUI and try the drain again, to prove it doesn't have drain in MIUI. Too hassle, I fell in love with RR and can't stand MIUI again.
Workaround
I have thought a workaround by using Automagic to turn off the wifi after certain amount the screen goes off. I will set the wifi to be on for 1 minute for every 15 minute. But I occassionally download something using wifi. This will break most of my activities, so it is not acceptable. Beside i also transfer data and remote scrcpy to my phone. Screen off will kill the remote server and makes me need to turn it on again manually (why I use Automagic then, if I still need to do it manually?)
Epilogue
Now, my phone is set at TWRP 3.2.2.0, Magisk 16.0, ROM RR 6.1 20180723, nano gapps 20180818, kernel Derp 2.2, firmware 9.5.17.0 + various user apps such as WA, Chrome, Gmail, Maps, MiXplorer, Automagic, GMD gesture, Gcam Arnova v8.2, etc. And I still experience this 3%/hour wifi deep sleep drain. It has been a month and I have spent quite a lot of hours and energy troubleshooting this.
@Desmanto
Thank you very much for putting together this comprehensive analysis!
I can add: Pico GApps is not the solution, I always use those (when I need GApps).
Did you ever have a day with fully installed RR, where it did not drain on your WiFi? Because I had this once or twice. At least one time on AOSiP.
Today I tested the 2.4 GHz WiFi at work. No drain.
On the way home, I disabled WiFi location scanning (as suggested above), although I know that you already tried it. I also uninstalled a few apps that I do not need often. Some of them have been installed with Titanium Backup.
Now at home, I have a drain of only 1% in 3 hours! Also, my WiFi AP software shows that the phone is using WiFi power saving mode for the very first time. I did not even see that for the Note 4, although I suspect you have to leave the phone untouched for a longer time for that to happen. BTW, I have WiFi location scanning ON for all my Android devices usually.
I will later switch WiFi off and on and see what happens over night. Last night, I lost 20%.
No drain on pie btw
FroZine said:
No drain on pie btw
Click to expand...
Click to collapse
Did you have drain on Oreo?
sidamos77 said:
Did you have drain on Oreo?
Click to expand...
Click to collapse
Yeah. On all ROMs I tested. Even on miui
@FroZine: Which Pie version do you have? PixelExperience?
sidamos77 said:
@FroZine: Which Pie version do you have? PixelExperience?
Click to expand...
Click to collapse
Was on latest GSI image with no drain and now I'm on mcaosp. Found here on xda for whyred.
FroZine said:
Was on latest GSI image with no drain and now I'm on mcaosp. Found here on xda for whyred.
Click to expand...
Click to collapse
This ROM does not have its own "official" thread on XDA?
sidamos77 said:
This ROM does not have its own "official" thread on XDA?
Click to expand...
Click to collapse
https://forum.xda-developers.com/redmi-note-5-pro/how-to/rom-mcaosp-rom-t3831395
Installed derp kernel. Sleeps like a baby.

Categories

Resources