[Q] Partial WakeLock GPSLocationProvider - HTC Incredible S

I'm currently using Nik's Codename Jellybean ROM and am getting excellent battery life for the last week or so. I have used the kernel that has come along with it.
However, yesterday when I went out - I turned on GPS (turned on for a short period and then off) for the first time since flashing the ROM and since then, the GPSLocationProvider has been providing partial wakelocks every second whenever the phone is not on airplane mode and preventing deep sleep, killing my battery in the process.
I have attached a screenshot from BetterBatteryStats.
I have looked about in the forum and the only solution from a couple of old threads seem to be rebooting the phone so that the phone can go back into deep sleep mode, which is really not the best solution is it?
If there is any solution or a compatible kernel that prevents this, I'm happy to hear from you.

It may also due to your Google location services which is active. Take the dump again with all location, GPS turned off!!
Edit: Location wake lock dump shows its active for long time. Seems like its due to location service not GPS, which you turned on only for a short duration.

Cool - that may help isolate the problem. I will toggle Maps, Location Services, GPS and see what is causing the issue.
Many thanks

Happens to me also on other ROM and device. But only if i start some app, which is using GPS, but its not enabled yet.
In case I enable GPS, than start the app, use it, close app, disable GPS, then GpsLocationProvider is not running in background.

Related

Battery savings guide

Hello, i use Dalingrin's kernel (6/30) and CM7 nightlies (121 currently).
Sometimes deep sleep is nice for my battery, sometimes it doesn't save energy.
It's life but i need a few days between battery charging.
so i decided to add a few workarounds, here they are:
1. Airplane mode everytime + wifi on/off when i need it. Only ten seconds to activate/deactivate with CM7 status bar.
2. Battery widget monitor: it enables history of battery consuming. Very good to act that deep sleep is effective or not.
3. uninstall applications which sychronize when nook should be sleeping: K9, DSPmanager, hotapps, appbrainz.
3. Advanced task killer pro: Crazy mode when screen is off. Very nice for last applications.
Of course, you are welcome to comment those tricks and to add some
I guess it depends on use, but I'm on day 3 on a charge, running at 47%. I just have the screen at 15% most of the time, and I don't disable sync. I mostly do reader, email, internet, so that might be part of my success.
sebanoel said:
Hello, i use Dalingrin's kernel (6/30) and CM7 nightlies (121 currently).
Sometimes deep sleep is nice for my battery, sometimes it doesn't save energy.
It's life but i need a few days between battery charging.
so i decided to add a few workarounds, here they are:
1. Airplane mode everytime + wifi on/off when i need it. Only ten seconds to activate/deactivate with CM7 status bar.
2. Battery widget monitor: it enables history of battery consuming. Very good to act that deep sleep is effective or not.
3. uninstall applications which sychronize when nook should be sleeping: K9, DSPmanager, hotapps, appbrainz.
3. Advanced task killer pro: Crazy mode when screen is off. Very nice for last applications.
Of course, you are welcome to comment those tricks and to add some
Click to expand...
Click to collapse
1 is probably not a good idea, since sometimes Airplane mode sticks.
2 has nothing to do with saving battery, but okay..
3a does nothing if there is no network connection (assuming sanely written programs)
3b is stupid and shouldn't ever be used.
You want to save battery? Turn off wifi when the screen goes off. You can do this automatically with Setting Profile Lite or Tasker, probably some others. I've found that the wifi sleep setting doesn't do anything for me, I can continue to ping the NC for 10+ minutes after the screen goes off so clearly the wifi is still up.
And watch Spare Parts partial wake locks and see if you have any misbehaving apps. I find that Maps with Latitude enabled misbehaves without a network connection and constantly is trying to update or something, so I cleared data on Maps to get out of Latitude on that device. CPUSpy will also show you how much deep sleep is ongoing.
The NC is going to use at least 10%/hr at low backlight doing simple tasks, I've seen it use up to 25% overclocked playing games.
While asleep it uses about 1% every 3-4 hours. Could probably do even better if you don't have a boatload of apps and widgets like I do.
Grab "Where's my Droid's Power" or whatever the application is called, and see where all the power is going.
khaytsus said:
1 is probably not a good idea, since sometimes Airplane mode sticks.
2 has nothing to do with saving battery, but okay..
3a does nothing if there is no network connection (assuming sanely written programs)
3b is stupid and shouldn't ever be used.
You want to save battery? Turn off wifi when the screen goes off. You can do this automatically with Setting Profile Lite or Tasker, probably some others. I've found that the wifi sleep setting doesn't do anything for me, I can continue to ping the NC for 10+ minutes after the screen goes off so clearly the wifi is still up.
And watch Spare Parts partial wake locks and see if you have any misbehaving apps. I find that Maps with Latitude enabled misbehaves without a network connection and constantly is trying to update or something, so I cleared data on Maps to get out of Latitude on that device. CPUSpy will also show you how much deep sleep is ongoing.
The NC is going to use at least 10%/hr at low backlight doing simple tasks, I've seen it use up to 25% overclocked playing games.
While asleep it uses about 1% every 3-4 hours. Could probably do even better if you don't have a boatload of apps and widgets like I do.
Click to expand...
Click to collapse
He said the battery widget is to see if it is asleep, and see what the consumption is like.
Hello,
You are right about battery logging.
i have to test the two applications you mention both:
1. "And watch Spare Parts partial wake locks and see if you have any misbehaving app"
2. "Where's my droid power".

[Q] Google Play Services/Now Battery drain observations

So since the latest Google Play Services update, I have been suffering some serious battery drain issues. There are various mentions all around the internet and most point to the issue being 4.2.1, which, we aren't running.
I spent some time over the last few days trying to figure out what the issue is and have some observations. But, for some background, last few days I have been getting no more than 10 hours battery with no more than an hour or two screen time.
Google Play Services is listed as the biggest battery drainer with 49%, so I started looking into that.
First off, I noticed in battery stats that if Wifi is on, the device doesn't deep sleep, even though wifi is set to never on when sleeping, the wifi never turns off and the phone never deep sleeps.
First thing to try was turning off wifi, so, I turned off wifi, straight away, phone deep sleeps again.
Next I began messing with Google related things, first of all I "uninstall updates" on GPlayS, tested with Wifi on, great, no more battery drain, phone sleeps, BUT, phone keeps bugging me with notifications to update.
Next was to update, battery drain returns. So, disable Google Now in its own settings, battery drain remains when on Wifi, however, if I kill "Google Search" after disabling Google Now, the battery drain stops.
Various mention on the internet has attributed it to location history and location services in the "Google Settings" however I have had those disabled for a few days now and they seem not to be the issue in this case.
My conclusion so far is that the link between the latest GPlayS and Google Now is the real killer.
At present, I have Google Now disabled, and no battery drain, Wifi turns itself off as it should and the phone sleeps. This isn't a great solution since I use Google Now regularly.
I'm hoping that unless someone has come up with a realistic solution that doesn't involve disabling services, Google will release an update to fix the issue.
Currently without access to another device other than my N10, I'm unable to test whether this particular version of the issue is specific to the XZ or the GoogleNow/GPlayS versions.
My next test is to install Network Info from F-Droid and Better Battery stats, and see if I can attribute the thing preventing wifi from turning off during sleep, and hence the failure for the device to deep sleep, to a particular activity going on.
Further, I have already tested the GPlayS related services by disabling everything such as Calendar and Contact Sync, disabled all of books, movies, photo sync, disabled Google Plus, none of these had any effect on the issue, which all but rule them out of the equation.
Has anyone else got observations on this, is anyone else suffering the issue, or has anyone got a real solution?
I'm off on Holiday on Saturday and would really like to have access to Google Now back, but not have the battery drain that's going to kill my battery while roaming the streets of Rome without access to a charger.
alias_neo said:
So since the latest Google Play Services update, I have been suffering some serious battery drain issues. There are various mentions all around the internet and most point to the issue being 4.2.1, which, we aren't running.
I spent some time over the last few days trying to figure out what the issue is and have some observations. But, for some background, last few days I have been getting no more than 10 hours battery with no more than an hour or two screen time.
Google Play Services is listed as the biggest battery drainer with 49%, so I started looking into that.
First off, I noticed in battery stats that if Wifi is on, the device doesn't deep sleep, even though wifi is set to never on when sleeping, the wifi never turns off and the phone never deep sleeps.
First thing to try was turning off wifi, so, I turned off wifi, straight away, phone deep sleeps again.
Next I began messing with Google related things, first of all I "uninstall updates" on GPlayS, tested with Wifi on, great, no more battery drain, phone sleeps, BUT, phone keeps bugging me with notifications to update.
Next was to update, battery drain returns. So, disable Google Now in its own settings, battery drain remains when on Wifi, however, if I kill "Google Search" after disabling Google Now, the battery drain stops.
Various mention on the internet has attributed it to location history and location services in the "Google Settings" however I have had those disabled for a few days now and they seem not to be the issue in this case.
My conclusion so far is that the link between the latest GPlayS and Google Now is the real killer.
At present, I have Google Now disabled, and no battery drain, Wifi turns itself off as it should and the phone sleeps. This isn't a great solution since I use Google Now regularly.
I'm hoping that unless someone has come up with a realistic solution that doesn't involve disabling services, Google will release an update to fix the issue.
Currently without access to another device other than my N10, I'm unable to test whether this particular version of the issue is specific to the XZ or the GoogleNow/GPlayS versions.
My next test is to install Network Info from F-Droid and Better Battery stats, and see if I can attribute the thing preventing wifi from turning off during sleep, and hence the failure for the device to deep sleep, to a particular activity going on.
Further, I have already tested the GPlayS related services by disabling everything such as Calendar and Contact Sync, disabled all of books, movies, photo sync, disabled Google Plus, none of these had any effect on the issue, which all but rule them out of the equation.
Has anyone else got observations on this, is anyone else suffering the issue, or has anyone got a real solution?
I'm off on Holiday on Saturday and would really like to have access to Google Now back, but not have the battery drain that's going to kill my battery while roaming the streets of Rome without access to a charger.
Click to expand...
Click to collapse
I shut it off it was draining my battery!
I had the same problem.
And here's a solution for you: Factory data reset
After that there will be no problems with battery drain.
NXT3 said:
I had the same problem.
And here's a solution for you: Factory data reset
After that there will be no problems with battery drain.
Click to expand...
Click to collapse
I did a factory reset and have the problem.
So the amount of battery drain has lowered significantly, but it is still there. I attached a screenshot from before the change and a screenshot from after.
use link 2 sd ( root required ) search at playstore
open it and seacrh google play service
option and sleep it..and u done
echopark15 said:
use link 2 sd ( root required ) search at playstore
open it and seacrh google play service
option and sleep it..and u done
Click to expand...
Click to collapse
it must be a way without root
Update Google play Service to version 5.x

Battery drains on Maclaws CM11

I'm opening this thread to clean up the Dev thread, since the most probable cause of battery drains are software/configuration related.
Here's my own experience with this matter.
Most of the drains I've seen are related to Location settings and Google Now. It seems Google's Location Reporting and Location History keep pinging WiFi for the location at a fairly high rate, so keeping the phone Awake and/or the WiFi running all the time. An usual indication of this is that in BetterBatteryStats you get:
1) Screen On % very low
2) WiFi On 100% of the time
3) WiFi Running 100% of the time.
4) Awake with moderate-to-high %.
To test it, here's what should be done:
1) Get BetterBatteryStats (BBS), enable Root, install it as system app (in advanced settings). Reboot.
2) Disable WiFi and GPS completely, preferably leaving Data Network also off. You may go all the way and just turn on airplane mode.
3) Leave the phone idle for at least 1h and check that there is no battery drain.
If you get any considerable drain (more than 5%/h), check Kernel Wakelocks and Partial wakelocks, or try again with 2G networks only. You may have a baseband problem. Consider this step as your "control group" as it ensures nothing in the hardware or in the ROM is wrong.
If there is no drain, enable WiFi and GPS again, but make sure all this settings are UNCHECKED:
1) Settings->WiFi-> Advanced: "Network notification", "Keep wifi on during sleep" set to "Never", "Scanning always available".
2) Settings->Location->Google Location Reporting: "Location Reporting" set to off and "Location History" set to off. Or just disable Location completely.
3) Check Settings->Security -> Device Administrators -> Disable at least Android Device Manager. If you can, disable everything else in this screen, such as Airdroid, Cerberus, etc
4) App drawer -> Google Settings -> Search -> Set Google Now to Off. You can also configure Android Device Manager here.
Leave the phone idle again for 1h and check BBS. In theory you shouldn't need to recharge completely, just enable the watchdog in BBS. Always check the wakelocks too.
You should get this on BBS:
1) Screen On % very low
2) WiFi On 100% of the time
3) WiFi Running with low % (anything less than 50% is ok, depending on Sync settings and background apps)
4) Awake with low %.
5) Deep Sleep with almost 100%
Go back enabling stuff as needed, one by one, leave the phone idle and check BBS. Rinse and repeat until you find the culprit.
One thing, make sure you do this after letting the phone sync some of the stuff. Don't do this immediately after a setting up a Google account.
Some people also reported that doing a factory reset solves the drains. It's always recommended anyway.
Any other hints are also appreciated.
For people with trouble making BBS work, Try getting the latest version, enable Root in Settings->Advanced and them System App, also in Settings-> Advanced.
Also:
1) When the phone is charging it WILL BE AWAKE WITH BOTH CORES, ALL THE TIME. Depending on the governor used, both cores may even stay at full speed (aka 1GHz). This is BY DESIGN and stock ROMs does that too. So any measurement while the phone is charging is useless.
2) Most "calibration" procedures are myths and don't have any effect. Erasing batterystats.bin also does nothing to increse battery life or remove drains (but may solve some charging issues, still unclear).
Very interesting.. Good thread and good options to test our battery drain ! thanks for the post.
I'll try this when I get home from school, thanks.
Weird thing happened last night, I thought the battery drain was gone when I recalibrated, but my phone discharged over night, weird thing is my settings show the phone didn't go to sleep once during the entire night, even though it was on airplane mode and I had already used it for like 3 or 4 hours with no apparent brain
There is a lot of battery drain only when WiFi in on. Even if the phone is idle.
I'm on:
Maclaw CM 11.0 [20131210]
I8190XXAMJ2
I'll do the exact tests and post my results.
Do you get notifications with wifi set to never during sleep?
RodHQ said:
I'll try this when I get home from school, thanks.
Weird thing happened last night, I thought the battery drain was gone when I recalibrated, but my phone discharged over night, weird thing is my settings show the phone didn't go to sleep once during the entire night, even though it was on airplane mode and I had already used it for like 3 or 4 hours with no apparent brain
Click to expand...
Click to collapse
Use the 1st step I wrote above with BBS. Check Kernel Wakelocks and Partial Wakelocks. You will be able to pinpoint exaclty what is keeping your phone awake.
I was about to start a thread on the same topic but my problem is with Carbon Rom 4.4.2 . The phone never goes into deep sleep and is awake 100% of the time. I'm attaching what I see as the culprit in B.B.S. I already disabled sync and yet the wakeclocks are sync related I hope anyone can help me with this.
i just changed to peagusq everything is fine
BBS How-to
ArtCar said:
I was about to start a thread on the same topic but my problem is with Carbon Rom 4.4.2 . The phone never goes into deep sleep and is awake 100% of the time. I'm attaching what I see as the culprit in B.B.S. I already disabled sync and yet the wakeclocks are sync related I hope anyone can help me with this.
Click to expand...
Click to collapse
Maybe BBS How-to will help you
http://forum.xda-developers.com/showpost.php?p=15869904&postcount=3
If not than post screens and collected dumps on BBS thread
gimme link to maclaw 4.4.2 for s advance
Sent from my GT-I9070 using xda app-developers app
Link
Here you are
http://maclaw.pl/downloads/
same here
eswarvf said:
i just changed to peagusq everything is fine
Click to expand...
Click to collapse
+1
ArtCar said:
I was about to start a thread on the same topic but my problem is with Carbon Rom 4.4.2 . The phone never goes into deep sleep and is awake 100% of the time. I'm attaching what I see as the culprit in B.B.S. I already disabled sync and yet the wakeclocks are sync related I hope anyone can help me with this.
Click to expand...
Click to collapse
Notice that the Count is 0 on both GoogleServices related wakelocks. To me this seems that Chrome and something else (maybe G+?) are trying to sync (perhaps the first one?) but are not getting enough network time/bandwidth to do so. I suggest you connect to an wifi, turn on the sync, and leave the phone awake for a while (try not to use the network very much). See if that solves. If not, backup and factory reset are your friends.
rcoacci said:
Notice that the Count is 0 on both GoogleServices related wakelocks. To me this seems that Chrome and something else (maybe G+?) are trying to sync (perhaps the first one?) but are not getting enough network time/bandwidth to do so. I suggest you connect to an wifi, turn on the sync, and leave the phone awake for a while (try not to use the network very much). See if that solves. If not, backup and factory reset are your friends.
Click to expand...
Click to collapse
I fixed my problem by switching back to dalvik and now my phone only looses about 5% battery overnight.

[Q] Location always running

Hi fellows,
Whenever I look into AppOps, Location is ALWAYS running for Android System and Google Play Services.
It doesn't matter if GPS is on or off, neither running in Safe Mode helps - always running. If I force-kill Google Play Services then it stops running Location, but starts again as soon as any app triggers it (Maps or anything else). I'm using Location in 'device only' mode. To be honest for some reason I cannot select any other option.
I'm running my Z3c on Stock MM .575, rooted, manually debloated (maybe too hard?), with some Xposed modules. (Just to make it clear, I turned off every possible syncing, scanning, location reporting, location history, google now, what have you)
Is there a way to see what process/app triggers Location constantly? I know that probably factory reset is a good thing to try, but I'd rather like to avoid that I'm attaching some screens with battery stats and wakelocks. They were taken after a night, unplugged and idle. The battery drain is not a problem, GSam is also not reporting GPS usage. However it shows that the phone is 'active' quite often, two times even woke up from Doze. I don't know how that corresponds to the data from Wakelock Detector (attached as well).
Any ideas?
(fixed images)

Multiple Wifi issues.

For sometimes MI 5 battery was acting a bit weird time to time.
Clean flashing to LOS seemed to solve the battery issue, but I discovered another issue while checking up with ampere.
When wifi is on, battery drain is abnormally high. (-870 ma on average in ampere). Even in idle time, there can be 20-30% drain when the phone is virtually nothing. And in addition to that, the heating was a bit high too, with wifi on.
I tried everything I could to solve these. Tested different roms (Xiaomi.eu, LOS, RR, Paranoid), firmwares, tried wavelock blocking and all that.
Of course, I tested the battery drain on a fresh rom - and the issue persisted. So it's not some rouge 3rd party app, unless one of the Gapps is the culprit. But, of course, I even tried disabling some of the gapps like gp service and play store, just to be sure. Yes, the problem exists even with synch and location off, and those wifi scanning and other settings doesn't do anything either.
However, with wifi off, battery was quite good (-100 ma drain on average in ampere)
Recently the issue started escalating. Not only was there the abnormal high drain with wifi on, but toggling wifi crashed the device and started a reboot, after which the device connected.
The only major thing I had remaining to be done - is fastboot. I did even that. Fastbooted into official roms, older 6.0 Xiaomi.eu roms which worked fine in the past ....but the issue persisted. In fact it started to escalate further. More reboots when I try to switch on wifi. Sometimes got stuck in a reboot loop ...and so on.
Right now, wifi is not even connecting. It just stays at 'saved'. Oddly enough, enabling bluetooth and trying to reconnect seems to allow the connection to take place. The drain is still here. (The solutions in this thread: https://forum.xda-developers.com/mi-5/help/wifi-connectivity-problem-t3517777 isn't helping me either)
I don't think this is a router issue either. I did tweak router settings, channels, and all that. I rebooted it and all. No help. And, other devices are working fine with the same router. But, the most definitive evidence that it's not a router problem is that I faced the same issues when trying to connect (with wifi) to a hotspot created from a mobile network from another device.
Do you think it's the worst case scenario: a hardware malfunction?
JRC1995 said:
For sometimes MI 5 battery was acting a bit weird time to time.
Clean flashing to LOS seemed to solve the battery issue, but I discovered another issue while checking up with ampere.
When wifi is on, battery drain is abnormally high. (-870 ma on average in ampere). Even in idle time, there can be 20-30% drain when the phone is virtually nothing. And in addition to that, the heating was a bit high too, with wifi on.
I tried everything I could to solve these. Tested different roms (Xiaomi.eu, LOS, RR, Paranoid), firmwares, tried wavelock blocking and all that.
Of course, I tested the battery drain on a fresh rom - and the issue persisted. So it's not some rouge 3rd party app, unless one of the Gapps is the culprit. But, of course, I even tried disabling some of the gapps like gp service and play store, just to be sure. Yes, the problem exists even with synch and location off, and those wifi scanning and other settings doesn't do anything either.
However, with wifi off, battery was quite good (-100 ma drain on average in ampere)
Recently the issue started escalating. Not only was there the abnormal high drain with wifi on, but toggling wifi crashed the device and started a reboot, after which the device connected.
The only major thing I had remaining to be done - is fastboot. I did even that. Fastbooted into official roms, older 6.0 Xiaomi.eu roms which worked fine in the past ....but the issue persisted. In fact it started to escalate further. More reboots when I try to switch on wifi. Sometimes got stuck in a reboot loop ...and so on.
Right now, wifi is not even connecting. It just stays at 'saved'. Oddly enough, enabling bluetooth and trying to reconnect seems to allow the connection to take place. The drain is still here. (The solutions in this thread: https://forum.xda-developers.com/mi-5/help/wifi-connectivity-problem-t3517777 isn't helping me either)
I don't think this is a router issue either. I did tweak router settings, channels, and all that. I rebooted it and all. No help. And, other devices are working fine with the same router. But, the most definitive evidence that it's not a router problem is that I faced the same issues when trying to connect (with wifi) to a hotspot created from a mobile network from another device.
Do you think it's the worst case scenario: a hardware malfunction?
Click to expand...
Click to collapse
Could you provide battery apps and hardware usage stats and graph?
My prediction it caused by Google location service that try to lock location but was unable to get GPS lock, so it tried to used WIFI scanning to get location lock.
Try to disable WiFi and Bluetooth scanning option on Location - Tri dot menu on top right - scanning
Sent from my MI 5 using Tapatalk
masruri03 said:
Could you provide battery apps and hardware usage stats and graph?
My prediction it caused by Google location service that try to lock location but was unable to get GPS lock, so it tried to used WIFI scanning to get location lock.
Try to disable WiFi and Bluetooth scanning option on Location - Tri dot menu on top right - scanning
Sent from my MI 5 using Tapatalk
Click to expand...
Click to collapse
I can provide the stats later. My device has been offline (normal condition) for quite a while...so there's not much stat to share as of now. I will collect and share them later.
However, I have checked them before. There wasn't anything too interesting. The graph very vividly showed how it fell only when wifi is on...but other than that, most battery was taken by device, idle state or something like that. I didn't find anything interesting in betterbatterystats either. Other than that I did checked the frequencies with kernel auditor too. It seemed normal overall. Though once, I did notice high spike in CPU usage. IIRC, the phone was in deep sleep for most of the time too. Not sure, what the current state is, because new issues are coming up now. So I have to recheck the condition.
I always keep wifi scanning, bluetooth scanning off anyway. So that's not the issue. 'I will again check in the china rom (no gapps), this time more rigorously,....that should clear gapps out of suspicion, if they are innocent.
masruri03 said:
Could you provide battery apps and hardware usage stats and graph?
My prediction it caused by Google location service that try to lock location but was unable to get GPS lock, so it tried to used WIFI scanning to get location lock.
Try to disable WiFi and Bluetooth scanning option on Location - Tri dot menu on top right - scanning
Sent from my MI 5 using Tapatalk
Click to expand...
Click to collapse
Check the screenshot
In a freshly fastbooted MIUI global stable rom (with wifi scanning off, and wifi always on off), I got 1% battery drain (100% -> 99%) overnight (6 hours approx)
But, only in a few minutes battery went down to 91% when wifi was on.
The device was idle in both cases.
In past I have assured that it was in deep sleep. Similar rate drain in chinese rom (so no rouge Gapps), and same drain in custom roms.
The hardware usage was taken after I used the device for a while, which is why drain due to screen on is high. Anyway, even before using the device, the maximum drainage was attributed to 'idle phone' so there isn't really any interesting info. One thing to note, that the hardware battery drain states doesn't consider wifi to be the cause of high drain, however the drain is still clearly correlated with active wifi.

Categories

Resources