• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

''Delay'' function prevents the phone entering in deep sleep

Search This thread

Bcl2

Senior Member
Jul 24, 2015
166
24
I have two profiles that works only when wifi is not connected.
Profile 1: when I turn off the screen, wait 3 minutes, then disabile mobile data. Then, re-enable mobile data for 1 minutes every 10 minutes (for notifications)
Profile 2: enable mobile data when I turn on the screen

I made these profiles to save battery but now I waste even more battery because I saw through Better Battery Stats that Tasker (in particular the ''delay'' tasks in Profile 1) keeps my device awake, preventing it to going into deep sleep.

Is there any option or any workaround to avoid that the phone stays awake? For example, in Automate the ''delay'' block have the option to check the time only when the device is awoken by other applications. Any similar option in Tasker?
 

taisto

Senior Member
Jan 20, 2011
99
39
I have two profiles that works only when wifi is not connected.
Profile 1: when I turn off the screen, wait 3 minutes, then disabile mobile data. Then, re-enable mobile data for 1 minutes every 10 minutes (for notifications)
Profile 2: enable mobile data when I turn on the screen

I made these profiles to save battery but now I waste even more battery because I saw through Better Battery Stats that Tasker (in particular the ''delay'' tasks in Profile 1) keeps my device awake, preventing it to going into deep sleep.

Is there any option or any workaround to avoid that the phone stays awake? For example, in Automate the ''delay'' block have the option to check the time only when the device is awoken by other applications. Any similar option in Tasker?

Divide your profile 1 to 2 separate profiles. 1. event display off, task:wait/mobile data off and 2. time context fom time/repeat/to time, task: mobile data on + wait time, That 1 minute every ten minutes definitely causes extra battery drain! The final result may be the same as if the mobile data would be all the time on.
 
Last edited:

Bcl2

Senior Member
Jul 24, 2015
166
24
Divide your profile 1 to 2 separate profiles. 1. event display off, task:wait/mobile data off and 2. time context fom time/repeat/to time, task: mobile data on + wait time, That 1 minute every ten minutes definitely causes extra battery drain! The final result may be the same as if the mobile data would be all the time on.
First, my apologize for using the wrong term, in fact I meant "wait", not "delay" (I don't use tasker in english).
As you suggested now I have 3 profiles:
1- when screen is turned off, wait 3 minutes and turn off data
2-turn on data, wait 1 minute, turn off data, wait 10 minutes, ping (repeat)
3-when screen is on turn on data (the second profile will not run when the screen is on because of some variables that I set up)

I made some tests disabling/enabling profile 1 or 2. I have found that the "wait" functions of the second profile (1 minute and 10 minutes) wake my device only for a few seconds, and this is acceptable. But the "wait" function of the first profile keep awake my device exactly for 3 minutes every time that I turn off the screen. Can't figure out why.