Tasker setting for battery saving - Nexus S General

Hi,
I thought that I could use Tasker (https://play.google.com/store/apps/...EsIm5ldC5kaW5nbGlzY2guYW5kcm9pZC50YXNrZXJtIl0.) to save battery life. So, what I did was to prepare the following profiles:
a) Disable autosync, enable it to 3 minutes every 30 minutes. Sync only between 6:30 and 23:05.
b) Enable autosync while on AC power, disable when not.
c) Disable wifi, enable it for 15 seconds every 15 minutes so the system would have time to connect to a known wifi if available. Then disable wifi unless its already connected.
d) When a wifi connection starts, do nothing. When it gets disconnected (like when I leave home), disable wifi.
I only use EDGE. I only sync gmail, contacts and calendar.
Before this, I had autosync and wifi on all the time so I believed this setting should conserve battery. Everything works, Tasker app itself is not draining much from the battery (according to Betterbatterystats its really negligible) but still, I have a considerably higher energy loss than with default setting.
Do you know whats the reason for this? Is is caused by the wifi enabling and disabling - taking more power? Is it caused by the fact all sync gets done at the same time? Or why is that?
Im generally happy with the Nexus S battery life but this outcome makes me curious ...
EDIT: My advanced wifi system setting always was "never disable wifi when screen is off". Also, for the purpose of this test, I disabled wifi AP on my router to check just for the outcome of the wifi search.

Check out your Awake time (can find this in BetterBatteryStats), you'll probably notice the phone stays awake for longer than it would normally. Normally the phone would go into a practically permanent "sleep" state, powering nothing but your radio, when the screen is off and doing nothing. It would just wake up every X minutes to autosync or for other alarms (exchange sync, etc) and then go back to sleep. I wouldn't be surprised if it is solely the wifi option.
Depending on the advanced setting in the wifi options, it keeps the connection indefinitely or drops it after a certain amount of time, i think around 15mins - 30 mins. This may need to be changed to fit the circumstances.
Overall though, benefiting from the use of Tasker or similar program for battery life purposes doesn't gain much over what android already does (albeit still with alot of room for improvement).

Well, I should've mentioned this: My advanced wifi system setting always was "never disable wifi when screen is off". So thats not possible reason.
Also, for the purpose of this test, I disabled wifi AP on my router to check just for the outcome of the wifi search.
I basically believed that before, the phone had wifi on and checked around every now and then. And with the new setting, it would check less often, therefore saving battery.
Awake time is about 40 minutes in 7 hours sleep.
EDIT: Maybe it would help to adjust the times better.

Related

Wifi battery drain ?

Will Wifi drain my battery even when in sleep mode ?
I charged my phone last night as I always do right up to 100%. Left it in sleep mode and went to bed.
Received a call this morning and when the phone switched on noticed my battery was on 26% and it was trying to connect to wifi.
Is wifi similar to bluetooth in that I believe bluetooth will still be active and receiving in sleep mode and will so drain the battery ? I could have sworn I have left wifi on before in sleep mode and it didnt drain the battery, but maybe I am wrong.
So will wifi in sleep drain my battery to that extent ie from 100% to 26% from about 10.30 last night to 10am this morning ?
The wierd thing is I was playing with it all day yesterday and the battery only got to 39% or something.
Is something wrong ?
yes, leaving your wifi on will cause battery drain. If there's any traffic, this gets worse
Also activesync may have been running and trying to connect every 10 minutes or so. The activesync problem has been mentioned in another thread.
Just hope its just battery drain and not a fault.
Yes, I second the observation... 2 hours powered off drains 40% battery power...
That sucks, the blueangel didn't do that. It automatically turned wireless off on shutdown and turned it on again on wakeup.
Now I'll have to get used to doing that manually... :?
If you still have the BA, or if somebody else could check, look for this key in the registry:
HKLM\System\CurrentontrolSet\Control\Power\State\Suspend
There will be various values there. Default = 3, means state D3, which is the suspend state.
If there are any other values there, please note the value name, and the value of it.
If there aren't, check whether there are any subkeys.
For example, the Qtek 9100 has subkey {98C5250D-C29A-4985-AE5F-ADE5367E5006} which, if you look under HKLM\System\CurrentontrolSet\Control\Power\State\Interfaces\, you'll see is "Power-manageable NDIS miniports". Its default value is 4 for state D4, which is the -off- state.
Basically, I suspect, or rather expect, that the BA will have another value or subkey there which will refer to the wireless connection, and set its state to 4 as well. If that's not the case, then it's being handled more directly by whatever power manager adjustments they have made - rather than letting Windows CE's power management handle it as above.
kilrah said:
Yes, I second the observation... 2 hours powered off drains 40% battery power...
That sucks, the blueangel didn't do that. It automatically turned wireless off on shutdown and turned it on again on wakeup.
Now I'll have to get used to doing that manually... :?
Click to expand...
Click to collapse
The daft thing is when you switch your device back on, you arnt connected to the wireless network and it has to find a signal again. So its like its keeping the wifi switched on but for no reason whatsoever !
What would be cool is if on putting the device into sleep mode it would automatically put the wifi into low power mode so you could leave it on without it whacking your battery and you could possibly receive msn alerts.
That was sort of what the BA did.. :?
I still have it but with a broken screen
So unfortunately can't check, maybe someone else?
I think I've found the way to deactivate wifi again when the manager doesn't want to. Tap on the OS's connectivity icon at the top of the screen. It may say Enable wifi or disable wifi. If it says activate, tap once to activate and once again to deactivate. If it says deactivate just tap once. Then go into the wireless manager again, it should now be off. Works for mine at least

Wireless on when standby

Was wondering if its possible to keep the wireless still turned on when the phone goes to standby. As in 3G is always on, thus always giving me new emails
Hmm #33 may be able to help you?
http://forum.xda-developers.com/showthread.php?t=583638
PhoTonic said:
Was wondering if its possible to keep the wireless still turned on when the phone goes to standby. As in 3G is always on, thus always giving me new emails
Click to expand...
Click to collapse
Easy....
Download Shap's Advanced Config Tool. There is an option to keep the Wifi on even when the phone goes on standby.
Once Advanced Config Tool installed, launch it, go to Menu/More settings/connections/Enable Wifi on Standby.
also I would recommand you to download a basic freeware named ScreenOff (by Applied PDA software), and use it to turn off the backlight without turning off the Wifi.
I've always having trouble to maintain the WiFi connection whether it's using battery or AC.
I've installed the Advanced Config Tool, the "Enable WiFi on Standby" indicated already enabled. Then I used the ScreenOff. After about 10 seconds, the WiFi connection was lost as I verified it by pinging the HD2 from a PC. It's plug into AC all the time.
However if leave the HD2 just "dim the screen", that seems to be the only way to maintain the WiFi. Obviously set it not to go into standby after 30mins (the default value).
Are you able to maintain the WiFi on HD2?
Yes. No problem here.
when you go into wifi advanced settings you can select power mode. when you set power mode in the medium setting, wifi keeps connected even in standby! and it also doesn't drain your battery while in standby. just try it. first select high power mode and turn phone in standby. wifi connection is lost. when you turn it back in, you will see wifi connecting.
with power in the middle setting, turning phone in standby keeps wifi alive, with very low power consumption. and when you turn phone back on, you will see that wifi is already connected.
i use wifi all the time when at home. my data connection is turned off. and still my push mails are recei ing through wifi!
Not that easy, I tried all power modes and in all occations it whent of after 1 minute (ping timeout). Weird that all roms behave so differently
Speaking of pinging your HD2... when your wifi is enabled and IDLE, what ping results do you get?
My HD2 acts very strange. when my wifi connectivity is on & IDLE (no data activity, device is not in standby mode), my ping results vary from 50ms in average to 200+ and sometimes I'm experiencing even higher spikes of 500ms+.
I have tried to change the wifi's adapter power scheme to "best performance", but it doesn't seem to change something.
However, as long as there is an activity, my ping replies from the HD2 seem to be fine (less than 15/10ms).
Fatherboard said:
Speaking of pinging your HD2... when your wifi is enabled and IDLE, what ping results do you get?
My HD2 acts very strange. when my wifi connectivity is on & IDLE (no data activity, device is not in standby mode), my ping results vary from 50ms in average to 200+ and sometimes I'm experiencing even higher spikes of 500ms+.
I have tried to change the wifi's adapter power scheme to "best performance", but it doesn't seem to change something.
However, as long as there is an activity, my ping replies from the HD2 seem to be fine (less than 15/10ms).
Click to expand...
Click to collapse
seems like some powersaving feature... when idle, why should the wifi chip work at top speed.. just like cpu scaling....
my power saving slider is in the middle and still when the screen goes off and I switch it back on the wifi is reconnecting.
glenner05 said:
when you go into wifi advanced settings you can select power mode. when you set power mode in the medium setting, wifi keeps connected even in standby! and it also doesn't drain your battery while in standby. just try it. first select high power mode and turn phone in standby. wifi connection is lost. when you turn it back in, you will see wifi connecting.
with power in the middle setting, turning phone in standby keeps wifi alive, with very low power consumption. and when you turn phone back on, you will see that wifi is already connected.
i use wifi all the time when at home. my data connection is turned off. and still my push mails are recei ing through wifi!
Click to expand...
Click to collapse
Have you done the ping test from another PC/laptop on your network? Wait for about 1 minute after the screen is off and if you still can ping your HD2, I think it's probably your push mail somehow manage to maintain the wifi connection. I might try that if that's the case as I've tried absolutely everything else and so far abosolutely nothing can keep the wifi constantly on if the screen goes off.
i can still ping it after a few minutes... what you say about push mail and keeping wifi on makes sense... first thing i do when configuring my phone after fresh install is setting up my push mail... maybe that's why my wifi is always on.
You could set up a free gmail push account?
I'm not sure if my problem is related at all but my wifi only seems to connect to my router when it's diconnected from my PC. I'm sure before I upgraded to 1.48 ROM it stayed connected. Any idea guys?
oh, and I've only ever had it in the middle power saving mode and it looks like it does disconnect when it goes into standy.
glenner05 said:
i can still ping it after a few minutes... what you say about push mail and keeping wifi on makes sense... first thing i do when configuring my phone after fresh install is setting up my push mail... maybe that's why my wifi is always on.
You could set up a free gmail push account?
Click to expand...
Click to collapse
I've set up gmail account as well nut as far as I know it's just IMAP or correct meif I'm wrong. if It's not push mail, it'll still kinda polling isn't it? what's your view?
glenner05 said:
i can still ping it after a few minutes... what you say about push mail and keeping wifi on makes sense... first thing i do when configuring my phone after fresh install is setting up my push mail... maybe that's why my wifi is always on.
You could set up a free gmail push account?
Click to expand...
Click to collapse
Good news guys, I've finally managed to get the WiFi to stay on even after the screen is off. Yes the trick is the "push mail". I deleted my original gmail imap account and set up a Microsoft Push Mail based Gmail account. Then did the ping test and it's staying on for sure now. But I did notice that it'll have 1 packet drop occasionally.
wifi disconnecting in standby
my hd2 stayed connected to wifi in standby, then i applied a few tweaks and .cabs, i had a few little issues like the screen freexing and not refreshing so i did a hard reset, since then wifi wont stay connacted when the phone is on standby, it is confusing
Hi I found a solution. Just install this cab. No soft reset needed
Nilee said:
Hi I found a solution. Just install this cab. No soft reset needed
Click to expand...
Click to collapse
Sorry, this does not work.. Goes away after a soft reset

Best way to increase battery life...

This isn't a thread for when your battery drain is excessive on standby, this is a thread dedicated to figuring out how to simply get more power to the phone for extended runtime.
I'm using a 5000 mah external battery pack for extra charge, and it seems to be good enough to last me at least an extra day or two of usage, which is great. It seems like the only other options are cutting up the battery door to fit an extended battery from the evo 3D or just carrying extra batteries...
Best easy change for me was always using wifi instead of the network when at home and work. Made a huge improvement
Hunt3r.j2 said:
This isn't a thread for when your battery drain is excessive on standby, this is a thread dedicated to figuring out how to simply get more power to the phone for extended runtime.
Click to expand...
Click to collapse
So....how to get the most time out of your battery in standby?
As you've allready said:
One of the biggest improvements is possible by using a Sensation or Evo3D battery. With that i get a nice 1% per hour in standby. (It's actually a bit lower than 1%).
While not using the phone it's unnessecary to have 3G activated. Recieving emails and texts via whatsapp, viber etc via 2G is good enough. For everything that is more datahungry you can allways activate 3G manually.
Keep background data turned off. I use K9 Mail which works independently and Whatsapp recieves messages too. But a lot of other stuff doesn't syncronize which means less wakelocks and thus less power consumption.
Same with locations. As long as you don't WANT to tell google your every step you can keep network based location turned off.
If you need a location fix quickly you can allways turn on gps for a moment. After using the FasterFix app (i guess you need root for that), i get a gps lock in 5 seconds, so i can determin my location really fast and share it with others (for intance via whatsapp) without having to keep it on all the time.
And last but not least:
You probably don't need to know the current outside temperature every 5 minutes. So set that to manual update too.
Doing these things doesn't turn my smartphone into an overweight dumbphone with a battery problem and i get a maximum of over 4 days of standby time out of it.
Normally my battery holds for roughly 35 hours (1 day and 11 hours), but it's usually awake for 1/4th of the time serving as my newspaper and video and mp3 player.
/edit:
Totally forgot:
Use llama!
You'll never have to worry about forgetting to set your phone on vibrate while at work and setting it to loud at home.
You can configure it so it only activates wifi at home and turns it off again if you didn't connect to any access point after a set amount of time. I haven't had to activate/deactivate wifi manually for ages without having to worry about it constantly searching for networks and sucking my battery dry!
What he said
Dlog said:
So....how to get the most time out of your battery in standby?
As you've allready said:
One of the biggest improvements is possible by using a Sensation or Evo3D battery. With that i get a nice 1% per hour in standby. (It's actually a bit lower than 1%).
While not using the phone it's unnessecary to have 3G activated. Recieving emails and texts via whatsapp, viber etc via 2G is good enough. For everything that is more datahungry you can allways activate 3G manually.
Keep background data turned off. I use K9 Mail which works independently and Whatsapp recieves messages too. But a lot of other stuff doesn't syncronize which means less wakelocks and thus less power consumption.
Same with locations. As long as you don't WANT to tell google your every step you can keep network based location turned off.
If you need a location fix quickly you can allways turn on gps for a moment. After using the FasterFix app (i guess you need root for that), i get a gps lock in 5 seconds, so i can determin my location really fast and share it with others (for intance via whatsapp) without having to keep it on all the time.
And last but not least:
You probably don't need to know the current outside temperature every 5 minutes. So set that to manual update too.
Doing these things doesn't turn my smartphone into an overweight dumbphone with a battery problem and i get a maximum of over 4 days of standby time out of it.
Normally my battery holds for roughly 35 hours (1 day and 11 hours), but it's usually awake for 1/4th of the time serving as my newspaper and video and mp3 player.
/edit:
Totally forgot:
Use llama!
You'll never have to worry about forgetting to set your phone on vibrate while at work and setting it to loud at home.
You can configure it so it only activates wifi at home and turns it off again if you didn't connect to any access point after a set amount of time. I haven't had to activate/deactivate wifi manually for ages without having to worry about it constantly searching for networks and sucking my battery dry!
Click to expand...
Click to collapse
Exactly what he said, but you can automate a lot of it by using an app called Tasker. I use it to sync all data on my phone for 3 minutes every 4 hours so it's always up to date. It can also automate the GPS on/off depending which app I use so it switches on when I open CoPilot and turns off again when I close it.
Tasker can also replace Llama if you can find 'profiles. to do it. Llama looks pretty good though.
I think the biggest drain is the display. With auto brightness on, the sensor will monitor the changes in your surrounding every second the moment you turn on the screen. Turn that off and manually control the brightness save a lot of battery.
Or just use lower autobrightness script.
I use Invisibright. Long hold on search softkey + slide enables me to set the brightness to whatever I want in a second no matter what apps are running.
Hunt3r.j2 said:
Or just use lower autobrightness script.
Click to expand...
Click to collapse
It is still useless as your sensor is still working every time you turn on your screen. The sensor is draining your battery. Not the brightness value.
Autobrightness sensor drain
So you think that there is a greater drain from the light sensor than from an uncontrolled screen brightness?
Interesting thought. I'll manually set my brightness level a round20% for the next charge cycle and see what effect it has, though I suspect that as my display currently accounts for 20% of battery drain it won't make all that much difference.
I use juice defender and I think its actually working.
Sent from my Inspire 4G using XDA

Wi-Fi Not Allowing Deep Sleep

So I posted this in a different thread but figured I would post it here to see if anyone could duplicate my findings. I have a Note3 from T-Mobile and for whatever reason leaving the Wi-Fi on will not allow the phone to go into deep sleep mode. I noticed when I was down to 40% battery after 10 hours with only one hour of screen on time. After running some tests I had only 2 minutes of deep sleep those entire 10 hours (tested using BetterBatteryStats) I tried setting "Keep Wi-Fi on during sleep" to Never and unchecking "Always allow scanning" under advanced network settings but neither of them fix the issue. In fact, after several tests I concluded that setting never for "Keep Wi-Fi on during sleep" wasn't even functioning as my access points still showed the client connected while the phone was asleep.
Can anyone else confirm this issue is actually a bug and not just my phone being defective?
Here's my original post on the topic regarding how I found the problem and what I have tested so far:
OK so after only 2 days of owning this phone (got it late Monday night, the T-Mobile variant) I finally figured out why I'm getting such bad battery, and I suspect the same thing may be happening for the other people in this thread. Hopefully this information helps at least one person.
My battery stats was almost identical to all the other users in this thread that had bad battery, I would get barely around 10-12 hours on the phone with less than 2 hours of screen on time. After using multiple apps to track down the issue I finally got what it was.
Wireless. Yes, wireless was my cause. But the thing is Wi-Fi didn't show up at all in any of the battery apps so I assumed it was a non issue. I've had other phones and have always kept the wireless turned on the entire time without problems. The basic problem is not that Wi-Fi is using power itself but it's that by default the phone cannot enter deep sleep while connected to Wi-Fi. This is why trying to use apps like BetterBatteryStats will lead you nowhere initially (though they were useful in finding out what was causing the issue) You can discover this by turning on Wi-Fi and connecting the phone to a charger, then disconnecting it so your BBS information will reset. Then power off the screen and power it back on after 10 minutes. You'll notice in the other section that deep sleep will have less than a minute time while awake probably has close to 9 minutes, if not more. This is with everything else turned off, almost no apps, and no special Samsung stuff enabled.
Under Apps > Settings > Wi-Fi > Menu > Advanced there are two options that should help this: "Keep Wi-Fi on during sleep" and "Always allow scanning" I set the "Keep Wi-Fi on during sleep" to Never and unchecked Always allow scanning and rebooted the phone. And low and behold...nothing. Yes, these options don't work (at least not to fix this problem) The phone still won't enter deep sleep mode while the wireless is enabled. Based on my company's wireless devices I can see that even with the screen off for well over 10 minutes it still shows connected as a client meaning the wireless is not turning off properly while it's in sleep mode. Or perhaps it can't go into sleep mode because the wireless is on which stops it from going into sleep mode and turning off the wireless. My guess is that it's a Samsung bug.
The reason why there's so many people here to get good battery usage is because they're either used to turning Wi-Fi on only when needed and keeping it off. You'll also not notice it if you have more than 6 hours of screen on time because you could easily assume that it would make sense that you phone would only last 10 hours total with that much screen on time, even though it should have technically lasted 20+ hours with only 6 hours of screen on time if the phone could have entered deep sleep.
So what's the real fix for this? Unless it's by design my belief is that it's a bug and won't be fixed until Samsung/T-mobile notices. I can't test to see if the same thing happens on other carriers so if someone feels like testing this theory out it would help.
For now, I guess we're just left to manually turning Wi-Fi on only when needed and leaving it off in all other cases. For those that have the T-mobile variant, make sure you also go into Settings > General > Backup and reset > Collect diagnostics and uncheck the "Allow Diagnostics" as that will probably be the highest offender of Partial Wakelocks (it'll show up as com.carrieriq.tmobile.wakelock or System Manager Application)
If anyone wants more information on my testing let me know!
Click to expand...
Click to collapse
That's because the 'Keep WiFi during sleep: Never" setting only disconnects, it doesn't shut down the WiFi radio.
You're going to have to use a manager (Like Deep Sleep Battery Saver).
Or just hit the toggle yourself... If you're going to keep it disconnected in sleep anyway, just swipe down the notification bar and hit the bloody toggle.
ShadowLea said:
That's because the 'Keep WiFi during sleep: Never" setting only disconnects, it doesn't shut down the WiFi radio.
You're going to have to use a manager (Like Deep Sleep Battery Saver).
Or just hit the toggle yourself... If you're going to keep it disconnected in sleep anyway, just swipe down the notification bar and hit the bloody toggle.
Click to expand...
Click to collapse
The problem is that it doesn't disconnect, the access point 100% shows it is connected and transferring data every now and then. But the real issue isn't weather it disconnects or not but it's the fact that Wi-Fi will not allow the phone to go into deep sleep mode. For now I am fine with switching Wi-Fi off and on as needed, but with no other phone have I needed to do this before and definitely seems like a bug.
But regardless, what I'm trying to figure out if this is a legit bug that I should submit to Samsung/T-mobile or if it's just my phone and I should ask for a replacement. If anyone has BetterBatteryStats and could test this with their Note3 that would help.
My stupid phone has just started this same issue!!!! Freaking annoying, after only 8 hrs from 100% charged state, the battery is at 46% with only 26 mins screen ontime, I checked out that the phone never goes into deep sleep. What is going on and what can be causing this? Did you manage to resolve your issue?
PS I checked out wakelock detector but doesn't tell me a thing, as what program is keeping the phone awake all the time. Starting to hate this phone and miss my S3
What is your GPS accuracy setting set to? GPS, Wifi or Networks? Try setting it to GPS only.
GameBoiye said:
So I posted this in a different thread but figured I would post it here to see if anyone could duplicate my findings. I have a Note3 from T-Mobile and for whatever reason leaving the Wi-Fi on will not allow the phone to go into deep sleep mode. I noticed when I was down to 40% battery after 10 hours with only one hour of screen on time. After running some tests I had only 2 minutes of deep sleep those entire 10 hours (tested using BetterBatteryStats) I tried setting "Keep Wi-Fi on during sleep" to Never and unchecking "Always allow scanning" under advanced network settings but neither of them fix the issue. In fact, after several tests I concluded that setting never for "Keep Wi-Fi on during sleep" wasn't even functioning as my access points still showed the client connected while the phone was asleep.
Can anyone else confirm this issue is actually a bug and not just my phone being defective?
Click to expand...
Click to collapse
Well, your issue looks pretty similar to mine, which I solved with this Xposed mod (you could give it a try if you're on KitKat): http://forum.xda-developers.com/xposed/modules/mod-wi-fi-deep-sleep-t2752947. I was experiencing that even when "Keep Wi-Fi on during sleep" is set to Never, Wi-Fi still was awake most of the time according to battery stats.

"Wifi off during sleep" but frequently turns on/off even during sleep?

Noticed in battery settings that my Wifi turns on and off frequently even when my device is sleeping. Doesn't seem to be affecting battery life but I'm wondering why it does this. It happens on both my Nexus 7 (stock rooted) and my Nook HD+ (CM11). I do have the "always scan for networks" settings off.
Attached screenshot is after I didn't really use my Nexus 7 for about a week.
I would imagine this is caused by certain apps requesting data. For example, your Gmail app may be set to refresh every one hour, which means it needs to use the WiFi to search for new data and download it, if needed. Other apps are similar to that as well, depending on your settings.
If it really miffs you, you can always use tasker and create a task that shuts the wifi (I have it put it in airplane mode since it does several things in one shot) off when the display goes off and back on when display comes back on...will need to be rooted.

Categories

Resources