[wifi][Tweak]Change Wi-Fi idle time before wifi sleep (title changed) - Samsung Epic 4G Touch

The information in here is only tested on the ICS (Stock based roms) and (stock or repacked kernels). It's not been tested on any other roms. So, if you want to apply the tweak that I provided in here, do it with your own risk. I'm here to help or share the good and bad things but not responsible for any bricked phones.
Update: Wifi Sleeps well! But you need to understand what's going on here.
We are expecting wifi to sleep when the screen is off and 'Keep Wi-Fi on during sleep' is set to 'Never'.
But wifi does not go to sleep mode even every options are satisfied on ICS stock roms with Stock or Rogue repacked Kernel).
I tried many ways to make it sleep (from settings, from build.prop tweaks and from through the init.d script) but none of those worked. Only the way to make it sleep is turning off the wifi manually before turning off the screen.
There is one workaround that making the wifi sleep during the screen off. The method is using Wifi Fixer app from google market but it does not work 100 %. Sometimes, it makes wifi sleep but other times, nothing happens.
So, anyone who is expecting wifi sleeps by any tweaks or by wifi option changes, don't expect it any more. There's no hope yet. For me, I'm waiting for the next build to test this function out.
There's some additional information at http://forum.xda-developers.com/showthread.php?t=1625299 and check wifi section.
If anyone knows the method to make wifi sleep on stock rom/kernel, please post your info here. There are some tools that we can use to check wifi is sleeping or not during the sleep mode. I'm currently using Battery Widget Pro.
Because I've tested lots of things so far, if you know the methond or if it works on your phone, please show how it works and screenshots if possible.
[Update] Wifi sleeps finally as I wanted!
OK. Here is the story.
One specific app mis-led me to wroing conclusion - Battery Monitor Widget Pro (v2.2.4). This app shows that wifi is always on if wifi is turned on. This app does not exclude the time wifi was turned off during the sleep mode.
Plus, there's some pre-allocated time to make the wifi sleep after the screen turned off. For most of Android phones, it seems like this value is 15 minutes. So, even the screen is off, wifi does not enter to the sleep mode immediately. Phone spend 15 minutes after the screen off, and kill the wifi session if wifi option was set to never (keep wi-fi on during sleep).
How to check whether wifi sleeps or not :
Do NOT use Battery Monitor Widget to check the wifi status.
You can easily check it from the stock Battery app. Settings > Battery > click on the graph > check wi-fi status if there is any gap (means sleep or turned off).
Then, How to change the default 15 minutes value to make the phone sleep early?
Update 5/16/12 - Fixed wifiSleepWait tweak, so it works without any manual database handling. The below is just for informational. Now you don't need to manually create a row into the table.
There were one or two information available on XDA but nothing is correctly applicable to Epic 4G Touch. So, here is the tweak that I made for E4GT.
To do this you will need root explorer -
1. move to the folder, /data/data/com.android.providers.settings/
2. copy the databases folder to your /sdcard
3. Move to /sdcard/databases click settings.db
4. select secure
5. it will ask you which editor you are going to use. If you installed sqlite then select sqlite, otherwise use root explorer (only at first time)
6.Check if there is column name 'wifi_idle_ms'. If there is, then change the value to whatever mili seconds you want. For example, 10000 = 10 seconds, 30000=30seconds. If you want to wait 15 minutes until wifi sleep, then 15*60000 = ?
7.If there is no 'wifi_idle_ms' row, the click long time anywhere on the table. It will show you the actions, select new record. Do not change _id, put the 'wifi_idle_ms' in the name field (without quote sign) and put the value explained above. For me, I just put the 10000 (for 10 seconds). Click save.
8. Now you can see the value changed or row created. Exit editor and move up to /sdcard. Copy (or Move) databases folder to original location (/data/data/com.android.providers.settings/). Sometime, the copy is not successful because database is currently being used. If it's not copied, then try it agaon to copy until it's successful. For me, it was successful on second try.
9. Reboot the phone and click the power button shortly to change to screen off mode(sleep mode).
10. After the time passed defined in above, click the power button again and notice that phone was working on 4G or 3G mode and not wifi mode. Phone will try to reconnect wifi after the screen turned on.
11. That's it. Now you can change the idle time until wifi turned off as much as you want.
The above was the manual way to change the wifi_idle_ms value from database. But there is another way to change this values automatically. The method is using sqlite and of course you need to know the sql query.
In my case, I tried to add this sqlite query statement into my init.d tweak but only update sql command worked and insert was not successful. Maybe I need someone's help to get this insert statement successful.
In here, I'm adding only the update tweak which can be added into init.d. What this mean is, at first time you have to insert the database row manually but once it's created, you can update the idle value during the boot thru init.d script.
Because you don't need to run this init.d script everytime on boot, once you update the value, change the permission to 644 and it won't run again until you change it back to 755.
To run this init.d script, you will need sqlite3 - http://chensun.net/android-development/install-sqlite3-on-google-nexus-one/54/
Download it and simply move to /system/xbin foler. Assign the same permission like other files on the same folder.
Of course, you also need root access and busybox.
The init.d script will be found at http://forum.xda-developers.com/showthread.php?t=1625299
70wifiSleepWait_kobridge.zip (previous version)
70wifiSleepWait_kobridge.v2.zip (current)

kobridge said:
This info is just for the ICS (Stock based roms) and (stock or repacked kernels) users.
We are expecting wifi to sleep when the screen is off and 'Keep Wi-Fi on during sleep' is set to 'Never'.
But wifi does not go to sleep mode even every options are satisfied on ICS stock roms with Stock or Rogue repacked Kernel).
I tried many ways to make it sleep (from settings, from build.prop tweaks and from through the init.d script) but none of those worked. Only the way to make it sleep is turning off the wifi manually before turning off the screen.
There is one workaround that making the wifi sleep during the screen off. The method is using Wifi Fixer app from google market but it does not work 100 %. Sometimes, it makes wifi sleep but other times, nothing happens.
So, anyone who is expecting wifi sleeps by any tweaks or by wifi option changes, don't expect it any more. There's no hope yet. For me, I'm waiting for the next build to test this function out.
There's some additional information at http://forum.xda-developers.com/showthread.php?t=1625299 and check wifi section.
If anyone knows the method to make wifi sleep on stock rom/kernel, please post your info here. There are some tools that we can use to check wifi is sleeping or not during the sleep mode. I'm currently using Battery Widget Pro.
Because I've tested lots of things so far, if you know the methond or if it works on your phone, please show how it works and screenshots if possible.
Click to expand...
Click to collapse
Maybe it cannot sleep when sync is on?
I imagine that wifi is needed for weather/news/etc updates and clould2device services.

Wait...the options are changed on ICS correct? Meaning its never off during sleep on Gingerbread and always on during sleep on ICS or am I not understanding?

Huh? Mine sleeps just fine unless I set it to never sleep.
That aside - you are aware that you're better off leaving wifi on anyway, right? It uses less battery power than the cell radio does. Just an FYI

Finally figured out everything!
Took whole one day to find out everything!
First, most importantly, WiFi sleeps!
I'm going to explain what happend and how we could make wifi sleeps better in op section.
edit. Partially updated. I'm checking now if I can make a script to change the leading time that is required before wifi actually sleep.

kobridge said:
Finally figured out everything!
Took whole one day to find out everything!
First, most importantly, WiFi sleeps!
I'm going to explain what happend and how we could make wifi sleeps better in op section.
edit. Partially updated. I'm checking now if I can make a script to change the leading time that is required before wifi actually sleep.
Click to expand...
Click to collapse
All updates are done! Enjoy your ability having control over wifi idle time!

You know, upon further testing, idle battery drain on 3g is pretty damn good as well. I am in a lousy signal area during the day and I have been leaving wifi on 24/7 so a lot of battery got wasted from the phone searching and finding wifi to connect to. Tomorrow I will disable wifi while at work but...
Sent from my SPH-D710 using Xparent Blue Tapatalk 2

JohnCorleone said:
You know, upon further testing, idle battery drain on 3g is pretty damn good as well. I am in a lousy signal area during the day and I have been leaving wifi on 24/7 so a lot of battery got wasted from the phone searching and finding wifi to connect to. Tomorrow I will disable wifi while at work but...
Sent from my SPH-D710 using Xparent Blue Tapatalk 2
Click to expand...
Click to collapse
Based on your screenshot, it seems like you are wasting the battery by turned wifi on wifi 24x7.

kobridge said:
Based on your screenshot, it seems like you are wasting the battery by turned wifi on wifi 24x7.
Click to expand...
Click to collapse
I agree. While I am around the house say going to the store its minimal but when going to work in NYC I am picking up wifi i cant connect to every 10 feet so its definitely negatively effecting battery

nabbed said:
Maybe it cannot sleep when sync is on?
I imagine that wifi is needed for weather/news/etc updates and clould2device services.
Click to expand...
Click to collapse
I think there is a little difference of understand about what has the control over other services/fuctions.
Usually weather/news apps are dependent on wifi or 4g services. Those apps usually do not control the wifi or 4G and many times only able to communicate wifi or 4G are turned on. Those services cannot hold the wifi/4G connections even those services are still running.
KCRic said:
That aside - you are aware that you're better off leaving wifi on anyway, right? It uses less battery power than the cell radio does. Just an FYI
Click to expand...
Click to collapse
That's not true. It's totally based on the signal strength. Usually 3G is not fast but do not use battery as much as wifi when the signal is weak on both wifi and 3G.

you on a roll with these threads kobridge! good work and thanks!

70wifiSleepWait_kobridge.v2.zip released
Now you don't need to manually insert the table row to use this tweak.
This tweak file is a complete set by itself. By running the tweak file, you can change or create the wifi idle timer on/into the database.
Related thread and where to download this tweak - http://forum.xda-developers.com/showthread.php?t=1625299

Not to question yiur style kobridge, but I beleive there is a spelling error in the tittle =D
Sent from my SPH-D710 using xda premium

krisI0N said:
Not to question yiur style kobridge, but I beleive there is a spelling error in the tittle =D
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
Looks like he fixed it just for you.
[wifi][Tweak]Chage Wi-Fi idle time before sleep (title changed)
Edit: Well, not ^^^ ALL of it is fixed yet.

krisI0N said:
Not to question yiur style kobridge, but I beleive there is a spelling error in the tittle =D
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
tdunham said:
Looks like he fixed it just for you.
[wifi][Tweak]Chage Wi-Fi idle time before sleep (title changed)
Edit: Well, not ^^^ ALL of it is fixed yet.
Click to expand...
Click to collapse
Thank you both of you! Sometimes, simple mistake is not to catch because it's too simple!

will this tweak work if I set wifi to "only when plugged in"

edlivian said:
will this tweak work if I set wifi to "only when plugged in"
Click to expand...
Click to collapse
I think the right answer is No.
When phone is plugged in - wifi is always connected even after the screen turned off. So, this tweak would not work while phone is plugged in.
When phone is unplugged - wifi will stay offline always. So, this tweak is not applicable.
If you set the option to "Always" - wifi will stay connected during the screen off. So, this tweak does not work.
If you set the option to "Never" - This tweak only works for this option.
The purpose of this tweak is minimizing the waiting(idle) time until wifi moves to sleep mode after the screen turned off.

Kobridge, i came through this topic after some searching for a problem of mine.
I see you know some basics...
If you have some time, take a look at this... that wifi issue is driving me really mad !!!
http://forum.xda-developers.com/showthread.php?t=1673514
thnx in advance

morx said:
Kobridge, i came through this topic after some searching for a problem of mine.
I see you know some basics...
If you have some time, take a look at this... that wifi issue is driving me really mad !!!
http://forum.xda-developers.com/showthread.php?t=1673514
thnx in advance
Click to expand...
Click to collapse
For this, I believe it's related to the value of wifi.supplicant_scan_interval which is normally defined at build.prop.
Check out the value from there.
These days the value 180 (3minutes) are normal for tweaking purpose. But for EPIC 4G Touch's case, it's default is 5seconds (causing lots of battery drain if you are moving around).
For example, if wifi is not available from some location, then your phone will try to searchthe available wifi network after x amount of times. If this value is too big, then it will look like wifi is not connected (so most of you, just try to reconnect the wifi manually before time comes). If the value is too small, again it causes the battery drain.
Once the wifi is connected, it keeps the connection based on the wifi policy. But if the connection is lost, then it will try again to search!

First of all, REALLY REALLY REALLY Really thank you for the reply mate.
My wifi supp value is set at "10"
I know this value only works when there are not any "known" access points in range.
The thing is, that it NEVER connects with screen off or on when i get back in range.
It only does it when i go to wifi settings (refreshes the list and connects without touching anything more!).
(of course, my wifi battery saving policy is set to "never" while screen is off)
Wifi stays on but it freezes AP scanning, while screen is off i guess.
Would a logcat help? Any tips about how to capture a good log about that issue?

Related

rk-Sleep(Location based phone flight mode switcher)

Ok, built a new app phone switcher (flight mode on/off) based on the cell tower location.
System automatically switches the phone OFF based on the time you set when you are at predefined location (Say Home). When you are at home, say from 10:00 PM to morning 6:00 AM no one can call your mobile. But if you are not at home, then phone is ON even at night. This also saves your battery life and privacy too.
It is working on Hermes, and I have tested it on WM5 emulators. Will NOT work on WM2003.
Please check the link to the application under my signature.
I have a question, can it only change to "vibrate" instead of turning off the phone? That would be more appropriate for me. Thanks for your answer
Nice App! How about changing call forwarding (when busy, no answer, etc...) baased on location?
If the phone could forward all calls automatically, or forward when you press "hang up" based on location it would safe battery and reduce radiation using the phone.
szturchen_pl said:
I have a question, can it only change to "vibrate" instead of turning off the phone? That would be more appropriate for me. Thanks for your answer
Click to expand...
Click to collapse
Nice Idea!, I will do my homework to find out what it takes to do that
ahlok_hk said:
Nice App! How about changing call forwarding (when busy, no answer, etc...) baased on location?
If the phone could forward all calls automatically, or forward when you press "hang up" based on location it would safe battery and reduce radiation using the phone.
Click to expand...
Click to collapse
Since the application do not keep polling for location, if it does not know the current location for some reason(reason = In the original post) then there might be problems such as wrongly 'forwarded' calls...
But its a great idea. I keep it in mind
past 21:00 hours
does not seem to work if you go past the apointed hour? radio stays connected
david.dupuis said:
does not seem to work if you go past the apointed hour? radio stays connected
Click to expand...
Click to collapse
Are you saying.. You were not at appointment time at sleeping location... And you came in late... and the phone does not turn off?
If so it is by design.. As i am not keep polling to find out the locaton. Just because then the application has to be running in the background or keep getting activated say for every 5 Minutes.
But let me know if you are saying the samething too.
not shutting off past sleep time
I think we're saying the same thing. Last night I installed the software set the home location and set the sleep time to 21:00 to 6:00. Actual time was 22:00. I expected it to shut down the radio and it did not.
Hi,
does not work for me
Install works fine, Test is OK, device went on Flight Mode and Back.
I set Sleep Location and Times and clicked Enable button.
When I want to save an error occurs lile: "InvalidCastException at Save. Please report this!"
The settings won't be saved then. I tried to manually edit the cnf file with
found cell values and True State, and saved this back to device, but when
time comes, nothing will happen.
I am on Schaps WM6 3.57a german and O2 Germany Provider.
What I was found out is, everytime I start the program it
randomly changes the location behind the dot.
Once it is xxxxx.8311 and the next time it is xxxxx.48311
May this be the culprit?
Any suggestions welcome bc I would really love this tool working
Olioaglio
david.dupuis said:
I think we're saying the same thing. Last night I installed the software set the home location and set the sleep time to 21:00 to 6:00. Actual time was 22:00. I expected it to shut down the radio and it did not.
Click to expand...
Click to collapse
OK for this i have to implement a constant polling mode.. Which i will do it for next release.
Olioaglio said:
Hi,
...The settings won't be saved then. I tried to manually edit the cnf file with
found cell values and True State, and saved this back to device, but when
time comes, nothing will happen.
...Once it is xxxxx.8311 and the next time it is xxxxx.48311
May this be the culprit?
Olioaglio
Click to expand...
Click to collapse
If you don't mind can you send me your cnf file?
Since your Location keep fluctuating... May be its failing to ON/Off
So when you are at home (Sleep Location) and if you keep refreshing the location (Button Refresh Location) you are getting diffent values?
Let me know
Something similar, sort of
I use Teog's CallFilter instead. What I like about it is that I can set the filter to only allow calls through from specific people. This way if there's an emergency in the middle of the night I'll get the call. It doesn't work on a schedule, you have to run it when you want it and disable it when you don't. But it is a simple app that runs with just a click after it's configured and has worked over several different operating systems. Would work well for meetings, movies, etc. too.
tytnguy said:
If you don't mind can you send me your cnf file?
Since your Location keep fluctuating... May be its failing to ON/Off
So when you are at home (Sleep Location) and if you keep refreshing the location (Button Refresh Location) you are getting diffent values?
Let me know
Click to expand...
Click to collapse
Check PM
Olioaglio
Hi tytnguy,
thanks for fast PM. You were abolutely right with the idea of interfering date format. I customized my HTC Home with the SDTe Override string (by HTCustom Proggie) to display the week day, which turned out to be the culprit that your prog did display the error message at Save.
So I deleted this in registry and the app now saves without a glitch. So I set the time (1 minute in the future) again and saved. When the time comes, the turning wheel appears, but nothing happens. I figured out, that the Status page says: "Out of location so NOT switching off the phone", so this is maybe, why the program starts but do not turn to flight mode as suggested.
Since I set the home location and did not even move a meter from this position I cannot imagine, why it does display I am not in the sleep location?!?! Any ideas
Olioaglio
edit: It WORKED now for the first time !!!! Great!!
Just wondering, what happens when I just do the phone in another room in my flat, where maybe it is in another broadcast cell....
Think, it won't work then!! Is it possible to create, let's say, kind of a radius, where the program activates??
So my sleep or home location is maybe a bit more then just one room or even my desk
edit 2: May it work, if I set the SDTe string to override again, after saving correctly? Or will the app then stop working again? Sorry for those dumb questions though.
Thanks anyway!!! Great program!!
tytnguy said:
OK for this i have to implement a constant polling mode.. Which i will do it for next release.
Click to expand...
Click to collapse
Would constant polling mode affect the battery drain significantly?
If yes, I would suggest a check box in your proggy to toggle this option on/off
Just my 2 cents
Olioaglio
Olioaglio said:
...what happens when I just do the phone in another room in my flat, where maybe it is in another broadcast cell....
May it work, if I set the SDTe string to override again, after saving correctly? Or will the app then stop working again? Sorry for those dumb questions though.
Click to expand...
Click to collapse
Olioaglio,
Can you set the home location from the other room?
If you change the date format to someother non standared format it will not work. Since program needs to keep saving the stuff on each try.
Update 1.0.1
Multiple location on the schedule: If you want to set more than one location as you 'Sleep Location' you can do it now. On the sleep location box bring the context menu up, and choose 'Append to location' now add the new location to the list. You can add any number of sleep locations!
Now if you were not at home at set time, system will keep polling based on the poll time you specify. So as soon as you reach home your phone will be switched off.
If you turned on your phone manually after the rk-Sleep set it to flight mode, then your phone remains on till next scheduled sleep session
Olioaglio said:
Would constant polling mode affect the battery drain significantly?
If yes, I would suggest a check box in your proggy to toggle this option on/off
Just my 2 cents
Olioaglio
Click to expand...
Click to collapse
Olioaglio,
No it should not make any significant affect on the battery.
I have programmed it to poll only on sleep time if you are not at home. But since I am not running the program in the background, it is ok.
The new update I release just keeping your problem in mind. So you go to both your rooms where you get different towers. Update both as your sleep location.
tytnguy said:
Olioaglio,
No it should not make any significant affect on the battery.
I have programmed it to poll only on sleep time if you are not at home. But since I am not running the program in the background, it is ok.
The new update I release just keeping your problem in mind. So you go to both your rooms where you get different towers. Update both as your sleep location.
Click to expand...
Click to collapse
Thanks, will monitor it...
Olioaglio
UPDATE:
OK, tested it now... Dude, the 1.0.1 really works like HELL!! I'm totally satisfied for now.
The Append function is very good thing, since I found 8 (!) different cell locations (about 3 with GSM and 4 with 3G) in my 3-room flat. They are always fluctuating even at the same place, so maybe this was the problem of the others, who tested the program with having only one location saved. But with the Append function AND the new Poll function (which also works great), it absolutely ROCKS!! Had no problem with several tests. Battery consumption with poll function really does NOT seem to be more than without poll.
Just some suggestions if you plan to make updated release. The Append function is not easy to find, I had to read your instructions three times to get it. Maybe you'll find another way. Also an extra tab with a list of all appended cells would be appreciated.
I would have another idea for an "extended" flight mode. Maybe you could add some checkboxes for Phone, Bluetooth, Wlan and Beam for - lets say - "Extended Flight Mode" options. So one could save even more battery as with just the phone function off. With the checkboxes you would have the choice what to turn off/on, when rk-Sleep will engage.
Best regards,
Olioaglio
tytnguy what about vibration mode? have you had time to check into that? Regards

[Q] Samsung Epic - Battery drain is horrible! How can I fix this.

Please help....
I have read many threads about this, but I don't understand any of them. My battery life is horrible, I am only using it for the occasional phone call, texting and checking my email. It's very frustrating because when I need to use it, the battery is dead (or almost dead and I can't use the camera).
I don't understand all the lingo on here about what version "this" and "that" everyone is using. Downloading certain apps to fix this.....
I'm not very techy and just use my phone for basic things.
PLEASE HELP!!!!
Suggestions:
Turn off bluetooth until you need it, then turn off when done.
Turn off GPS until you need it, then turn off when done.
Turn screen brightness to automatic or lowest setting (your preference).
Turn off 4G receiver if you are out of range or just don't have 4G coverage in your area.
Turn off synchronization if you don't care for email, Facebook, Twitter, etc updates. (Not really necessary if your update interval isn't set for short intervals.)
Utilize Wifi as much as possible, if that is an option available to you. BUT turn it off when you know you will be out of range for a good bit of time.
Toggle Airplane mode after each phone reboot. (Stupid bug)
Utilize the TouchWiz program manager (long press on home screen and under Samsung widgets).
Kill the OmaDrmConfigService process via Settings > Applications > Running Services. (This appears again with each phone reboot, unless you find a process killer application in the market.)
If you use Wifi a good bit, it's a good idea to set your Wifi sleep policy to "Never". You can access this via Settings > Wireless & Networks > Wifi Settings: Press menu and select Advanced > Wifi Sleep Policy. Setting to never will not revert back to 3G when you turn off your phone's display as long as wifi is still turned on and within that connected wifi signal range.
If you still get **** battery life, then you can download Spare Parts or BatteryHistory from the market. BatteryHistory is a ripped out piece from Spare Parts, which is really all you need to diagnose your issue.
OR if you don't want to install anything you can key in via the dialer: *#4636*1111# to get to the same menu that both programs above display. (The menu is labeled Battery History.)
From another battery thread that pertains to the two aforementioned programs:
musclehead84 said:
What you do is when you notice that it's doubled on the top drop down box that says "other usage" click on that and change it to "partial wake usage" and anything listed under there is keeping your phone awake. See what is continually running.
Click to expand...
Click to collapse
I hope the above helps you out.
Cheers.
Dont ask me to explain this just try it. Use astro and delete the android folder at the root of your sd card and reboot
Sent from my SPH-D700 using Tapatalk
Did deleting the android folder work or anyone else? I'm trying to see how that can help but if it does good find.
I have no ideawhy but after flashing a few times testing themes on dk28 my battery tanks and my gallery gets slow. The album thumb folder inside there is what fixes the gallery so I usually delete it but I got lazy and deleted my whole folder since it regenerates on boot and my battery came back. Ben deleting it since lol but I flash a lot
Sent from my SPH-D700 using Tapatalk
dreamsforgotten said:
I have no ideawhy but after flashing a few times testing themes on dk28 my battery tanks and my gallery gets slow. The album thumb folder inside there is what fixes the gallery so I usually delete it but I got lazy and deleted my whole folder since it regenerates on boot and my battery came back. Ben deleting it since lol but I flash a lot
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
Not certain how it helped your battery issue, but good to have that knowledge. I sifted through my folder and only saw cache files for what looked like thumbnails.
nikon120 said:
Not certain how it helped your battery issue, but good to have that knowledge. I sifted through my folder and only saw cache files for what looked like thumbnails.
Click to expand...
Click to collapse
That's all that's in there that's why I said dont ask me why. I would have posted when I found it but I knew I would get flamed so either it works for you or it dont. It doesn't make since but it works for me
Sent from my SPH-D700 using Tapatalk
http://androidforums.com/epic-4g-tips-tricks/245915-epic-4g-battery-life-extension-another-thread.html
Try this:
-Toggle airplane mode every time you reboot. You probably have a "time without signal" of over 50% if you look in settings. Toggling airplane mode resets the radio and so it doesn't keep looking for signal unnecessarily which kills battery
-Gps on doesn't drain battery, only when its being used by an app
-Turn off background data and auto sync. If you don't have facebook/twitter widgets or care about email push notifications then save some power and switch it off.
-Check for apps that aren't letting the phone sleep. Download "spare parts" and it should show you.
-I'm guessing you have the updated Facebook app with chat. I would suggest going offline in chat because it doesn't let the phone sleep and will drain your battery really fast.
Sent from my SPH-D700 using XDA App
wtf is up with the horrible battery life of this phone? i got it and it is EXTREMELY worse than my Hero ever was. I have had this phone less than a week and I already want to return because of the battery life.
i dont use 4g at all, wifi is only enabled when i need to, gps is enabled but i figured i always had it enabled on the hero and was just fine, my screen brightness is always set at automatic brightness, i dont use bluetooth...
i am stumped.
please help before i destroy this thing
Jonesin 4 The Rush said:
wtf is up with the horrible battery life of this phone? i got it and it is EXTREMELY worse than my Hero ever was. I have had this phone less than a week and I already want to return because of the battery life.
i dont use 4g at all, wifi is only enabled when i need to, gps is enabled but i figured i always had it enabled on the hero and was just fine, my screen brightness is always set at automatic brightness, i dont use bluetooth...
i am stumped.
please help before i destroy this thing
Click to expand...
Click to collapse
Lol gps kills it on this phone the roms greatly improve it
Sent from my SPH-D700 using Tapatalk
dreamsforgotten said:
Lol gps kills it on this phone the roms greatly improve it
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
thx for the advice.
i will try it without gps
also any good advice on any particular rom? i have only had this phone for 6 days and am trying to pinpoint a great rom to use.
My Epic looks pregnant but the battery lasts forever with the extended one

[Q] WiFi off when screen is off?

Anyone notice that when you have the screen off and wifi on your downloads from the browser dont continue to download? I have the same issue with dropbox exporting as well. I have the wifi sleep policy to always on (never turn off) in the settings too. Any idea?
I have noticed that also. It doesn't make sense to have the screen on the whole time you are downloading a large file though. I'm assuming the wifi never sleep setting is not working.
Sent from my Galaxy Nexus using XDA App
I have only noticed this with franco.Kernel when the Hotplug option is enabled.
samizad said:
I have only noticed this with franco.Kernel when the Hotplug option is enabled.
Click to expand...
Click to collapse
ah might be the issue, ill try with hotplug off
Did it work?
heavy power saving kicks in when the screen is off, so transfers pretty much drop dead. You'll have to keep the screen on when transferring large files
spamlucal said:
heavy power saving kicks in when the screen is off, so transfers pretty much drop dead. You'll have to keep the screen on when transferring large files
Click to expand...
Click to collapse
I wish there was a way to stop this from happening. Sometimes I transfer a bunch of music from my NAS over SMB. It takes a little time. It's a pain in the rear to keep touching the screen to make sure the transfer doesn't die. It seems like "Keep wifi on during sleep" policy should fix that but it doesn't. What exactly does that setting do if not that?
My guess is that maybe it would be nice if the file explorer apps had a setting to "Keep phone awake while transferring files". I'll have to start looking into that to see if I'm just missing that setting.
I dont know why the wifi sleep policy setting doesnt work for some people. But mine does, wifi stays on with the screen off for hours. I often download large files and it works just fine leaving it idle with screen off.
sorry to hijack - slightly off topic but i lose signal when the screen is off
any thoughts on that also guys?
RogerPodacter said:
I dont know why the wifi sleep policy setting doesnt work for some people. But mine does, wifi stays on with the screen off for hours. I often download large files and it works just fine leaving it idle with screen off.
Click to expand...
Click to collapse
Me too. Noticed randomly that the WiFi started turning off when the screen was off, and it seems the sleep policy was changed automatically somehow... but I switched it back and I haven't had any issues since.
martonikaj said:
Me too. Noticed randomly that the WiFi started turning off when the screen was off, and it seems the sleep policy was changed automatically somehow... but I switched it back and I haven't had any issues since.
Click to expand...
Click to collapse
Mine was set correctly. It appears changing it, exiting settings, then re-enabling it may have fixed it.
Sent from my GSM Galaxy Nexus on TMoUS using Tapatalk
i also face 3g data off when screen is off issue
Wifi Fixer by Zanshin-g1 once you download this app it will monitor your wifi real time and get rid of any connectivity issues when they are about to strike. I found it to be the perfect app to solve wifi issues. I hope it helps you aswell.
[hfm] said:
I wish there was a way to stop this from happening. Sometimes I transfer a bunch of music from my NAS over SMB. It takes a little time. It's a pain in the rear to keep touching the screen to make sure the transfer doesn't die. It seems like "Keep wifi on during sleep" policy should fix that but it doesn't. What exactly does that setting do if not that?
My guess is that maybe it would be nice if the file explorer apps had a setting to "Keep phone awake while transferring files". I'll have to start looking into that to see if I'm just missing that setting.
Click to expand...
Click to collapse
You could use an app like Tasker to set the display timeout to n hours if your file manager app is on the foreground. Add an exit task to reset it to default timeout if the file manager is no longer on the foreground.

[SOLVED] Wi-Fi won't turn off in sleep [post-JB update]: how to diagnose?

SOLVED: See this follow-up post; it's one of those 7 things!
Hi! After updating to LK3 (the stock 4.1.1 JB update), my Wi-Fi stays on even after I put the phone to sleep (contrary to the setting "Keep Wi-Fi on during sleep: never (increases data usage)." See attached pics.
I have disabled thus far:
1) Google Now
2) Location Services "Use wireless networks" and "Location and Google search"
3) Location reporting: now set to "Location manually selected on the map"
4) Latitude location sharing
5) Location history
6) Automatic check-ins
7) Check-in notifications
Basically, everything I could find related to location. But, alas, that battery screenshot is after I changed all of those! Wi-Fi isn't on constantly, but it stays on way longer than just when I have the screen on.
What are my options here? How should I diagnose this sucker? I ran BetterBatteryStats, but they said it looked fine with my log (some apps, through the ambiguous "Alarms" partial wakelock, were the largest cause, but only accounted for 3.6% of the time).
I'm pretty sure this is a post-update problem, as before, whenever I unlocked my phone, I got the little notification, "Connected to #SSIDName#" and the Wi-Fi icon would obviously, then, be off for the first few seconds (and when I opened my browser too quickly, I'd get a "Page cannot be displayed" error).
Thanks in advance, I'll take any ideas/thoughts/help/sympathy/antipathy you can offer,
Same problem here. Before the update, it was doubletwist air sync forcing wifi on at all times. That's disabled now, so I have not clue. Hopefully somebody figures it out. Mine isn't even intermittent, it's always on, and I have the same setting as you.
So, I left my phone alone for the night and these programs used Wi-Fi while the screen was off:
Do you have any of the same apps? I'm going to uninstall Google+, Facebook, and GroupMe today and run this again tomorrow. But, looking at pure download amount, it's something on the OS....
If you're interested in doing the same, the app is My Data Manager ( https://play.google.com/store/apps/...e&utm_medium=organic&utm_term=my+data+manager).
Basically, install the app, but do not open it. When you're ready for bed (or any extended period of not using it), open it, and then minimize it (runs in the background). Hit your sleep button immediately (we don't want to capture anything of the phone when the screen is on). Then, when you wake up/need to use it, wake it up, immediately disable Wi-Fi (again, no artifacts from when the phone was awake), take a look at My Data Apps (2nd page), Wi-Fi.
I'll let you know how my second attempt goes.
The only one I have is Facebook, but yeah it definitely looks like the os.
Sent from my SAMSUNG-SGH-I747 using xda app-developers app
Well! Maybe I should have given it a little while longer, as it seems to be quite a bit better!
It still stays on longer than the screen, but now at least it shuts off once in a while, haha. It was either uninstalling Facebook, gMail, or GroupMe OR disabling one of those earlier settings...it's still not totally fixed, though. I found the Network Counter app which seems to be a little more specific, so we'll see how it goes tonight,
~Ibrahim~
Hmm this is what mine looks like from today. Wifi didn't go off until I did it manually.
Sent from my SAMSUNG-SGH-I747 using xda app-developers app
Have you disabled the location stuff? Those are what really helped me. I'm off to run the overnight test, with the new app!
i am having the same issues. my wifi since the jelly bean update has been always on.... the wifi bar in battery settings is solid and has never been off.... so frustrating.
Try "Green Power" app.
I use it to disable both wifi and data 20secs after screen off.
There is a Whitelist and a minimum threshold trigger too.
It works PERFECT in ICS.
At bedtime, I get .5% hr battery drain or better.
themadproducer said:
Try "Green Power" app.
I use it to disable both wifi and data 20secs after screen off.
There is a Whitelist and a minimum threshold trigger too.
It works PERFECT in ICS.
At bedtime, I get no less than .5% hr battery drain.
Click to expand...
Click to collapse
Awesome, thanks for the info! Exactly, I don't mind Google Now using the Wi-Fi, but then that opens the door for everything to use the Wi-Fi which will kill the battery when I get back to work.
Network Manager didn't work for some reason, so I tried Data Detective, but the stupid app consumed 90% of the Wi-Fi last night!
The only thing I've heard against battery savers is that they force apps to not use the data, and then they keep asking (creating overhead). I wouldn't have believed it out right except it came from the developer of BetterBatteryStats. But your battery loss isn't bad at all (overnight I average 0.4%/hour with the screen off).
ikjadoon said:
(overnight I average 0.4%/hour with the screen off).
Click to expand...
Click to collapse
I slightly edited my statement. I get .5% hr or better.
Curious...if you average .4%...
- what rom?
- and what is your lowest cpu freq?
- and is that with data and wifi off?
themadproducer said:
I slightly edited my statement. I get .5% hr or better.
Curious...if you average .4%...
- what rom?
- and what is your lowest cpu freq?
- and is that with data and wifi off?
Click to expand...
Click to collapse
Haha, right, I thought that's what you meant!
I'm on stock AT&T. Everything is stock; CPU Spy tells me 384Mhz. WiFi on, data off.
Why don't you guys disable it in settings? Open Wi-Fi in settings. Click menu button. Click advanced. Turn off Wi-Fi during sleep. Ta-da!
Sent from my SAMSUNG-SGH-I747 using xda premium
Ends said:
Why don't you guys disable it in settings? Open Wi-Fi in settings. Click menu button. Click advanced. Turn off Wi-Fi during sleep. Ta-da!
Sent from my SAMSUNG-SGH-I747 using xda premium
Click to expand...
Click to collapse
Yeah, that's an alternative...but if I have a setting that's supposed to turn it off when it goes to sleep, I'd like it to do that.
stbtigerr said:
Yeah, that's an alternative...but if I have a setting that's supposed to turn it off when it goes to sleep, I'd like it to do that.
Click to expand...
Click to collapse
That's right, well said....hence the opening post!
I have the same issue, wi-fi is always on unless I turn it off.
I'm happy. It's one of those location settings in the first post that caused the locks! Let me know if it works for you guys,

Here's my workaround for the annoying WiFi battery drain bug on CM10.1

This is no longer needed! The bug is fixed with the new quattrimus and the Wind kernels... and probably an upcoming official one as well. 3-30-13
This is for those of you on CM10.1 (or ROMs based on it) who use wifi and need a way to work around the Wifi battery draining bug. If you didn't know, the wifi bug will cause your device to lose power at at rate of 6-10% per hour while just sitting idle with wifi turned on. This is aggravating for those of us who use wifi a lot and are used to just leaving it on because normally wifi uses LESS power than other connections!
I was formerly using DS Battery Saver or Green Power to toggle my connections, but I like the following method better because it is a bit smarter (you'll see what I mean). Also, sometimes those connection toggler apps would screw up my autosyncing and messages wouldn't show up for hours.
I tried the wifi timeout hack, which kind of sucked because wifi still stayed on in areas with no wifi.
After trying a ton of apps and combinations of apps, I've found a solution that works pretty well. Here it is:
1) Install the app "Better Wifi On/Off" by Sven Knispel
2) Open it up and hit the settings button. Put a check on "Expert Mode", then back out of the settings and go back in.
3) Place check marks next to the following settings options only:
- Enable when user turns wifi on
- Start on boot
- On when screen unlocked
- On when plugged in
- Only if connected
- If wakelock is held
- If network activity
- If plugged in
- Off when unplugged
- Off when screen off
4) Now find the option marked 'Delay - Time to wait before checking Wifi status' and set it to 10s. 0s may also work well, but I haven't tested it.
5) Profit.
*If you have problems with the program stopping, you can go back into Settings and put a check on 'Run as foreground service'.
**The program has a widget you can add to a homescreen so you can quickly disable/enable it if you have to.
With this setup, Wifi simply turns on when I need it and automatically turns off when I don't. It checks for traffic and won't kill the connection until your download or stream is done. It checks for access points, and if there are none available it turns wifi off... something that DSBS and other similar apps don't do all that well.
I'm getting battery life similar to if I had DSBS, Juice Defender or Green Power running- but I never lose autosync and nothing is ever delayed, because mobile data never turns off. I tested my hotspot function and it worked just fine with no interference.
Hope this helps until (if) we ever get a real fix for the wifi drain bug.
I'm not sure if I had something set wrong or it was an interaction with another program or something else, but I tried it and it locked up my phone hard. Not even the buttons light or feedback goes off but no screen. Had to use the hold power to reset.
I hope they're able to get the power issues taken care of in CM10. With the newer nightlies and the wind kernel it's honestly about as stable as CM9 for me. Power usage is my only major issue now.
SeriousGeorge said:
I'm not sure if I had something set wrong or it was an interaction with another program or something else, but I tried it and it locked up my phone hard. Not even the buttons light or feedback goes off but no screen. Had to use the hold power to reset.
I hope they're able to get the power issues taken care of in CM10. With the newer nightlies and the wind kernel it's honestly about as stable as CM9 for me. Power usage is my only major issue now.
Click to expand...
Click to collapse
Yeah it must have been something else at play- the above app doesn't really do anything unusual that would cause a hang. It's been doing well for me today- I've been using my phone pretty steady since 7am and I'm at 40% battery (now almost 4pm). I'm currently on miroslav_mm's CM10.1 build.

Categories

Resources