Aggressive doze kills GPS (app) - Greenify

Hi,
when using aggressive doze on a rooted Nexus 4 with Android 6.0.1 in my GPS tracking app (I tried several), even though whitelisted, the tracking stops after a few minutes.
The apps still show as tracking thus I suspect the GPS itself gets killed and provides no signal/values anymore.
Is it a bug or a feature?
Thanks for the great work

DarsVaeda said:
Hi,
when using aggressive doze on a rooted Nexus 4 with Android 6.0.1 in my GPS tracking app (I tried several), even though whitelisted, the tracking stops after a few minutes.
The apps still show as tracking thus I suspect the GPS itself gets killed and provides no signal/values anymore.
Is it a bug or a feature?
Thanks for the great work
Click to expand...
Click to collapse
Uninstall Greenify and check.

If I disable aggressive doze it works.
If I uninstall the app too of course.

This is a limitation of the doze mode itself enforced by Android. I'm afraid there's no way to workaround that.
A new Tasker plug-in is added in 2.9.5 beta 1 to toggle Aggressive Doze. Hope this could do some help here.

Ah no problem, I thought it might be something like this. I'll just disable aggressive doze while using the app.
The tasker plugin would do this automatically for me, did I get this right?

oasisfeng said:
This is a limitation of the doze mode itself enforced by Android. I'm afraid there's no way to workaround that.
A new Tasker plug-in is added in 2.9.5 beta 1 to toggle Aggressive Doze. Hope this could do some help here.
Click to expand...
Click to collapse
Shouldn't it be enough to disable "Doze on the go" to maintain the gps sensor on?
I have this same problem, and the only way to allow a foreground sports tracking app to access the gps data is to disable both "Agressive doze" and "Doze on the go"...

daniel.mota said:
Shouldn't it be enough to disable "Doze on the go" to maintain the gps sensor on?
I have this same problem, and the only way to allow a foreground sports tracking app to access the gps data is to disable both "Agressive doze" and "Doze on the go"...
Click to expand...
Click to collapse
No. As someone tested before, the stock Doze also disables GPS.

Hello,
I had the same behaviour. I tested something this morning : added to whitelist my navigation app + LocationServices + FusedLocation.
And while I was on the road, the gps worked till I arrived. In the agressive doze log I see that the device did'nt went in Doze during that time.
Don't know if this is directly related, I'll give it another try tonight.

Didn't work tonight, lost gps signal. Something else prevented doze this morning.
Will give a try to the beta and the toggle.

Any news on the subject? I get GPS signal lost while using maps...

RFrancis said:
Any news on the subject? I get GPS signal lost while using maps...
Click to expand...
Click to collapse
I'm now using the beta + Tasker to prevent doze when my navigation apps are on. Works great.

madxxcow said:
I'm now using the beta + Tasker to prevent doze when my navigation apps are on. Works great.
Click to expand...
Click to collapse
Could you export the profile

Here is an example for Google Maps.

madxxcow said:
Here is an example for Google Maps.
Click to expand...
Click to collapse
You should probably re-enable aggressive doze with an exit task. This does not seem to be one of those system settings that will auto restore when the task terminates. Also note that this profile will not trigger if Maps or your GPS app is in the background. I am debating whether aggressive doze is worth the hassle.

I've been having the same issue for a while. I use Locus Maps to record tracks on airplanes (so it may run for 12hrs) and it turns off GPS. Sometimes its hard to tell if its lost because of Doze or I simply lost the signal.
Also, it is plugged into a power source (charging) so I believe Doze should be disabled while charging.
I see above mention of "Tasker". What is this?

eng3 said:
I've been having the same issue for a while. I use Locus Maps to record tracks on airplanes (so it may run for 12hrs) and it turns off GPS. Sometimes its hard to tell if its lost because of Doze or I simply lost the signal.
Also, it is plugged into a power source (charging) so I believe Doze should be disabled while charging.
I see above mention of "Tasker". What is this?
Click to expand...
Click to collapse
The simple solution is to avoid aggressive doze which is tagged 'experimental' and is known to cause some odd device/radio/app behaviors.

Davey126 said:
The simple solution is to avoid aggressive doze which is tagged 'experimental' and is known to cause some odd device/radio/app behaviors.
Click to expand...
Click to collapse
I'm sorry, I should have clarified. I was broadening to Doze itself as I thought I read that it will also disable GPS (but not as fast or "aggressively").
My behavior has been a little different. I notice that if I run maps navigation at the same time as recording my track, there is no issue. but if I just record my track, then it not be able to prevent GPS from stopping.
Perhaps this should go in another forum, I'm just not sure which

eng3 said:
I'm sorry, I should have clarified. I was broadening to Doze itself as I thought I read that it will also disable GPS (but not as fast or "aggressively").
My behavior has been a little different. I notice that if I run maps navigation at the same time as recording my track, there is no issue. but if I just record my track, then it not be able to prevent GPS from stopping.
Perhaps this should go in another forum, I'm just not sure which
Click to expand...
Click to collapse
Try running a GPS Status app (example) concurrent with your tracking app. Aside from helping to keep the GPS 'awake' most have a variety of useful features and functionality.

I have tried that but it does not seem to work. I'll have to check the GPS status options to see if there's something for keeping it awake.
I have noticed that if I run Navigation (not just Maps) in parallel, then the GPS will stay awake.

eng3 said:
I have tried that but it does not seem to work. I'll have to check the GPS status options to see if there's something for keeping it awake.
I have noticed that if I run Navigation (not just Maps) in parallel, then the GPS will stay awake.
Click to expand...
Click to collapse
- as previously noted make sure Aggressive Doze is disabled as it can break cross-app/component communications
- also add you tracker app to 'white list' of you haven't done so already
- good chance Google Maps (any navigation app) is using wakelocks to keep GPS active
- assume all is well when you disable Greenify
- if true you many need to step away from Greenify or consider another app with similar functionality like Force Doze

Related

Endomondo Could not track my outwork

Anyone using Endomondo has mentioned this App could not track your outwork? Greenify in my device is beta version. I am not adding endomondo in the greenify list. If I put the Endomondo in the aggressive doze whitelist, it could not tracking.
Sent from my Nexus 6P using Tapatalk
this is also happening to me: problem is with sensor being shut off even with the "doze on the go" mode deactivated. There is NO WAY to let Device out of Aggressive Doze with significative motion so basically any tracking app will not working correctly, even if whitelisted (app is working, GPS not).
lparcshinoda said:
this is also happening to me: problem is with sensor being shut off even with the "doze on the go" mode deactivated. There is NO WAY to let Device out of Aggressive Doze with significative motion so basically any tracking app will not working correctly, even if whitelisted (app is working, GPS not).
Click to expand...
Click to collapse
Yes, I have to uninstall them, waiting for something changes.
Sent from Dirty Nexus6P
Houge_Langley said:
Anyone using Endomondo has mentioned this App could not track your outwork? Greenify in my device is beta version. I am not adding endomondo in the greenify list. If I put the Endomondo in the aggressive doze whitelist, it could not tracking.
Sent from my Nexus 6P using Tapatalk
Click to expand...
Click to collapse
I have the exact same issue with RunKeeper. After some 10 minutes Greenify forced my phone into Doze and RunKeeper tracked my bike ride only after I turned on the app, but even then it logged my ride as a straight line from A to B.
NOTHING helped. My phone is an Xperia Z3 running Marshmallow 6.0.1, I used 2.9 stable and some betas, and none of the advanced options helped - whitelisting RunKeeper, disabling Shallow hibernation, Aggresive hibernation, Wakeup coalescing... only after I uninstalled Greenify things went back to normal.
And no, I did not add RunKeeper to be greenified. Nor was Doze on the go enabled.
UPDATE: I went back to 2.8.1 and everything works just fine.
Same thing.. I froze the greenify and endomondo is doing fine on version 3 above
Result:
Revert back to version 2.8 and solve the problem as robogo suggest

[Discussion] - Whitelisting Apps for Doze (Specifically Google Search)

I see many users suggesting to whitelist Google Search if you want "OK Google" always on. However I've never noticed the need to do this. I do occasionally notice OK Google not working, but it continues to fail even when I turn my screen on. David Ruddock is noticing it in his Pixel review as well.
I see many users suggesting to whitelist Google Search for Battery Optimization/Doze, but I always wonder if this is Snake Oil. Why?
1. Because first off hotword detection is a hardware solution using a dedicated audio processing core to then wake up the system to turn on the mic.
2. Also, if we need to whitelist the app, don't you think Google would tell us this? They do it for Android Wear after all and the app prompts you to whitelist it in Doze/Battery Optimization.
3. Has anyone actually tested if Doze is the culprit? Doze doesn't take long (like an hour to kick in right?). If OK Google actually works while your phone is dozing, then it's pretty easy to show that whitelisting the app is not the real solution. Another way is to just basically force your phone to Doze, and if OK Google responds, then this theory is already disproven.

Greenify Automator Device administrator

Hi all,
I did not have this enabled but the standing advice seems to be that it has to be enabled. What does this do exactly?
Loving the app though keep up the good work!
Jeroen1000 said:
Hi all,
I did not have this enabled but the standing advice seems to be that it has to be enabled. What does this do exactly?
Loving the app though keep up the good work!
Click to expand...
Click to collapse
Not needed except w/unrooted device to facilitate screen off operations.
Davey126 said:
Not needed except w/unrooted device to facilitate screen off operations.
Click to expand...
Click to collapse
Thanks Davey126. There was an option in Greenify once to ensure compatibility with finger print readers. It was called "alternative screen off mode". I hoped this option got dubbed the Automator now but it doesn't look that way judging from your reply. I can't find it any more (maybe it got removed for some reason?). Sometimes the fingerprint reader on my OPO5T is a bit slow. I need to lift and touch it twice to get an unlock. Maybe I need to whitelist ...something as I have "Greenify system apps" checked. Amongst the optimised apps is "GFManager" which has a fingerprint icon.
At any rate, do you know what happened to "alternative screen off mode" option?
Jeroen1000 said:
Thanks Davey126. There was an option in Greenify once to ensure compatibility with finger print readers. It was called "alternative screen off mode". I hoped this option got dubbed the Automator now but it doesn't look that way judging from your reply. I can't find it any more (maybe it got removed for some reason?). Sometimes the fingerprint reader on my OPO5T is a bit slow. I need to lift and touch it twice to get an unlock. Maybe I need to whitelist ...something as I have "Greenify system apps" checked. Amongst the optimised apps is "GFManager" which has a fingerprint icon.
At any rate, do you know what happened to "alternative screen off mode" option?
Click to expand...
Click to collapse
Don't know but removal is likely referenced (somewhere) in a change log or forum post. XDA search is your friend.
As for the fingerprint recognition issue why is "GFManager" and likely other benign system apps in Greenify's overt hibernation list? Only demonstrated 'bad actors' should be there; ideally the list will be quite small gravitating to zero.
Do you take 23 aspirin in the morning for the hell of it to protect yourself from some pain that has never materialized? Over greenification (new word!) is just asking for trouble.
Davey126 said:
Don't know but removal is likely referenced (somewhere) in a change log or forum post. XDA search is your friend.
As for the fingerprint recognition issue why is "GFManager" and likely other benign system apps in Greenify's overt hibernation list? Only demonstrated 'bad actors' should be there; ideally the list will be quite small gravitating to zero.
Do you take 23 aspirin in the morning for the hell of it to protect yourself from some pain that has never materialized? Over greenification (new word!) is just asking for trouble.
Click to expand...
Click to collapse
I didn't put GFManager in the Doze optimising list manually. It could just be the management app (judging by its name) for fingerprints for all I know not the actual code that does the detection. I just blame Apple for just having 2% drain per 8 hours idle and then some of us wanting that on an Android phone.
Jeroen1000 said:
I didn't put GFManager in the Doze optimising list manually. It could just be the management app (judging by its name) for fingerprints for all I know not the actual code that does the detection. I just blame Apple for just having 2% drain per 8 hours idle and then some of us wanting that on an Android phone.
Click to expand...
Click to collapse
Android battery optimization (Android 6+) is different from explicitly adding items to Greenify's hibernation list (which I assumed you were doing as some [incorrectly] use the terms interchangeably). Most likely the intermittent touch recognition hesitation you are experiencing is not related to GFManager being "optimized" but rather the time it takes the device to arise from a deep slumber. Are you using Aggressive Doze by chance?
iOS and Android can both idle efficiently on appropriate hardware. I typically see 0.2-0.5%/hr idle drain on my various devices depending on conditions. Apple has the advantage as it controls both hardware and software. Android must accommodate a wide variety of hardware platforms (including crappy kernels) many of which are not well optimized for power savings.
Davey126 said:
Android battery optimization (Android 6+) is different from explicitly adding items to Greenify's hibernation list (which I assumed you were doing as some [incorrectly] use the terms interchangeably). Most likely the intermittent touch recognition hesitation you are experiencing is not related to GFManager being "optimized" but rather the time it takes the device to arise from a deep slumber. Are you using Aggressive Doze by chance?
iOS and Android can both idle efficiently on appropriate hardware. I typically see 0.2-0.5%/hr idle drain on my various devices depending on conditions. Apple has the advantage as it controls both hardware and software. Android must accommodate a wide variety of hardware platforms (including crappy kernels) many of which are not well optimized for power savings.
Click to expand...
Click to collapse
Yes, I am using aggressive doze. Via the whitelist you can access in Greenify, it seems almost everything gets Optimised (dozed).
I would assume the fingerprint scanner would be exempt from doze but the non-optimised apps list doesn't have anything in it that I can connect to the reader. I would likewise assume I'd have to look for something like com.qualcomm... instead of looking for an actual app name. I could use a tip as to what I'm looking for...
So to be clear, I did not add stuff to the hibernation list manually with regards to the fingerprint reader. Just some stuff that by far has nothing to do with it.
For full disclosure: Via a Magisk module, my Google Play Services also get dozed. It is called "Enable Doze for GMS Magisk Module".
a bit off topic:
I can get an idle drain around 0.5% and using HEBF optimiser's "Improve Battery" switch this goes down to 0.4%. What are you doing to get even lower? I'm betting turning off WIFI and nuking play services entirely?
Jeroen1000 said:
Yes, I am using aggressive doze. Via the whitelist you can access in Greenify, it seems almost everything gets Optimised (dozed).
I would assume the fingerprint scanner would be exempt from doze but the non-optimised apps list doesn't have anything in it that I can connect to the reader. I would likewise assume I'd have to look for something like com.qualcomm... instead of looking for an actual app name. I could use a tip as to what I'm looking for...
So to be clear, I did not add stuff to the hibernation list manually with regards to the fingerprint reader. Just some stuff that by far has nothing to do with it.
For full disclosure: Via a Magisk module, my Google Play Services also get dozed. It is called "Enable Doze for GMS Magisk Module".
Click to expand...
Click to collapse
Again, doze and hibernation are different things. I would expect every user app and virtually every system app (with exception to Google Play Services) to be 'battery optimized'. Observations:
- analysis begins with disabling referenced Magisk module as Google Play Services is deeply intertwined with most apps and services (system and user)
- disable aggressive doze; putting your device into a comma isn't helpful when trying to diagnose a responsiveness issue
- multiple deferred tasks often fire-up immediately when exiting aggressive doze temporarily overwhelming device and introducing lag
- nothing should be in Greenify's active hibernation list except apps/services that are demonstrated offenders
Pretty good chance you have created the problem you are trying to solve my over managing your device.
Jeroen1000 said:
a bit off topic:
I can get an idle drain around 0.5% and using HEBF optimiser's "Improve Battery" switch this goes down to 0.4%. What are you doing to get even lower? I'm betting turning off WIFI and nuking play services entirely?
Click to expand...
Click to collapse
Nope. Stock ROM (rooted/unlocked); stock Google Play Services, WiFi and mobile radios on 7x24, location services generally on and set to 'high accuracy', BT and NFC cycled as needed, other than Greenify no 3rd party 'power saving' tools in play. Full believer in lite-touch management with results to back-up religion on multiple devices. YMMV. Choose your apps wisely.
Thanks for the tips. I'll revert my changes one by one and see what turns up. Don't want to loose aggressive doze though... I will report back if I find the culprit.
I understand the difference between doze and hibernation. I was just trying to point out it's not me putting stuff manually on the hibernation list. And yes, I support your observation, using too many apps trying to get even lower drain often works counterproductive. Same goes for apps monitoring battery stats. They too use up some juice.
Jeroen1000 said:
Thanks for the tips. I'll revert my changes one by one and see what turns up. Don't want to loose aggressive doze though... I will report back if I find the culprit.
Click to expand...
Click to collapse
Suggest a reconsideration of position on aggressive doze. While the glossy looks great measurable benefits don't always offset liabilities. With AD active device will likely show reduced drain during extended screen-off operations. A win, right? Possibly - until you factor in higher drain rates as the device races to catch up after exiting doze which is often triggered by an overt wake request (ie: using your device). Several minutes of high CPU utilization at max (and often power inefficient) frequencies can wipe out hours of slow savings while introducing lag and other undesirable side effects. You should disable AD for a few days to see if it improves your situation.
As an aside, brief sprints at high CPU frequencies are not necessarily evil as finishing a task quickly and returning to idle (see "race to idle") can be more efficient than drawing it out over an extended period of time at lower frequencies. That said, servicing multiple tasks over several minutes when the device first wakes is often less efficient than allowing them to complete 'naturally' when the screen goes off (which is why doze doesn't kick in immediately) and/or during normal doze maintenance windows.
Aggressive doze can be beneficial in certain circumstances - but those are few and far between (at least based on my personal work flows and observation of others).

Best settings for Greenify on rooted device?

My android device is rooted with xposed framework installed and greenify xposed module enabled. What Greenify settings i can enable to make it perform at its best?
Peter770 said:
My android device is rooted with xposed framework installed and greenify xposed module enabled. What Greenify settings i can enable to make it perform at its best?
Click to expand...
Click to collapse
There is no right answer as every device and work flow is unique. That said, Aggressive Doze, Doze on the Go and Wakeup Timer Coalescing are popular choices with limited side effects. If you miss notifications or find your device lagging for a few seconds after wake disable Aggressive Doze. Resist the temptation to add every app/service to Greenify's action list; only target apps that demonstrate bad behaviors. If running Android 6+ doze will take care of most background activity w/o help from Greenify. It's a tool to address specific problems.
What is the difference between the three hibernation modes: default, normal hibernation, deep hibernation (by island)?
Peter770 said:
What is the difference between the three hibernation modes: default, normal hibernation, deep hibernation (by island)?
Click to expand...
Click to collapse
Default is whatever you set as the default in Greenify settings. Normal is what Android uses by default and is adequate for the vast majority of work flows. Deep requires an add on product (Island) and seems to be a solution looking for a problem. You could have discovered all this by searching the thread or reading documentation.
Peter770 said:
What is the difference between the three hibernation modes: default, normal hibernation, deep hibernation (by island)?
Click to expand...
Click to collapse
I absolutely concur to @Davey126's correct statement and recommendation, and I'm unable to add anything substantial. However, I like to share my settings (please refer to attached screenshots), and if interested and required I'll provide information, which of my applications are not greenified.
Regarding your question, at least from my point of view all settings are pretty well explained within Greenify but it's also worth to study the threads by @oasisfeng that are pinned to this Greenify forum.
Thanks, for the screenshots. It was helpful.
I have problem with some apps, like Nine email client, which won't hibernate. Why is that?
Peter770 said:
I have problem with some apps, like Nine email client, which won't hibernate. Why is that?
Click to expand...
Click to collapse
They might be woken up by other apps. If so, you can cut off the links using wakeup tracker option in Greenify's settings.
'Wake-up tracking and cut-off' option is enabled.
Peter770 said:
'Wake-up tracking and cut-off' option is enabled.
Click to expand...
Click to collapse
Merely enabling the option is not enough. You have to manually cut off the trigger. When an app which you greenified wakes up automatically and is shown in Greenify as pending hibernation, if you long press the app, it will show some info like which app or process triggered it and whether it is critical etc. Then you can click the three dot menu button at top right and choose to cut off the trigger using the scissor icon or to ignore its running state. Then it will remain hibernated. Be careful while choosing the options since it may have unwanted side effects. Unless you are sure that you don't absolutely want that app to run in the background and be woken only upon your choosing to open it, don't meddle with the options.
EDIT: I am rusty with Greenify since I haven't installed it for my daily driver and hence the instructions are from memory. There may be some slight differences with what I stated and the actual behaviour.
I don't see these Greenify options but my device is running android 4.4.2 and that might be the reason.
Peter770 said:
I don't see these Greenify options but my device is running android 4.4.2 and that might be the reason.
Click to expand...
Click to collapse
Sorry, I have no idea since I never ran Greenify before MM and that was looong ago.
DB126 said:
Default is whatever you set as the default in Greenify settings. Normal is what Android uses by default and is adequate for the vast majority of work flows. Deep requires an add on product (Island) and seems to be a solution looking for a problem. You could have discovered all this by searching the thread or reading documentation.
Click to expand...
Click to collapse
True man, but i am looking for that documentation for a few days (cause i like to read...); so i ended up here... still... no documentation...
So please, if you are kind, give me a link to Greenify documentation.!
Thanks.!
Robotu said:
True man, but i am looking for that documentation for a few days (cause i like to read...); so i ended up here... still... no documentation...
So please, if you are kind, give me a link to Greenify documentation.!
Thanks.!
Click to expand...
Click to collapse
Greenify is obsolete; power management approaches of the past are no longer relevant. Looking forward is a better time investment. Greenify documentation exists somewhere but I'm not going hunting. Good luck, mate.

			
				
DB126 said:
Greenify is obsolete; power management approaches of the past are no longer relevant. Looking forward is a better time investment. Greenify documentation exists somewhere but I'm not going hunting. Good luck, mate.
Click to expand...
Click to collapse
Very true, though it took me a few days to convince myself..., just to remember why i freezed it few years ago...
Thanks...!

Massive Google Play Service and WhatsApp Drain

I'm facing a massive battery drain since yesterday because of Google Play Service and WhatsApp keep running in the background.
I tried to put Google Play Services to Doze Mode using Universal GMS Doze but didn't resolve it.
I noticed that both services are using 'accelerometer' and 'Significant Motion Detector' wakelock. See the screenshot.
Anyone knows how to fix this abomination?
Try restricting permission to those services
IceHotKilla said:
I'm facing a massive battery drain since yesterday because of Google Play Service and WhatsApp keep running in the background.
I tried to put Google Play Services to Doze Mode using Universal GMS Doze but didn't resolve it.
I noticed that both services are using 'accelerometer' and 'Significant Motion Detector' wakelock. See the screenshot.
Anyone knows how to fix this abomination?
Click to expand...
Click to collapse
Do you use location-based phone unlocking or some relevant service? I believe only those things would use these features of the device that you specified. One quick way of reducing battery usage can be restricting permission of using those features to the services but then again, that would disable certain features. Also, try using Aggressive Doze in Greenify and add those system apps to it as if location access is granted to Google Play Services, it would certainly drain your battery even if your GPS is switched off.
ADInfinity1999 said:
Do you use location-based phone unlocking or some relevant service? I believe only those things would use these features of the device that you specified. One quick way of reducing battery usage can be restricting permission of using those features to the services but then again, that would disable certain features. Also, try using Aggressive Doze in Greenify and add those system apps to it as if location access is granted to Google Play Services, it would certainly drain your battery even if your GPS is switched off.
Click to expand...
Click to collapse
I, indeed use location-based phone unlocking which is Smart Lock. I turned off that option and gonna see the results. Thanks for your tips.
IceHotKilla said:
I, indeed use location-based phone unlocking which is Smart Lock. I turned off that option and gonna see the results. Thanks for your tips.
Click to expand...
Click to collapse
You're welcome! Do hit the thanks button on my post if it helped.

Categories

Resources