Wifi turning off even after dumpsys deviceidle disable. Android mm (cm13) - Android Q&A, Help & Troubleshooting

I have an LG L90 running cm13.
normally, after the screen turns off, the wifi will cut out after 30 minutes, and start using cellular connection.
I hate this. I want wifi always on.
"Wifi always on during sleep" is enabled, but cm13 ignores this setting.
"global wifi_sleep_policy 2" also confirmed.
So I don't know why wifi keeps cutting off.
Is Doze causing this?
I tried dumpsys deviceidle disable, and pinged my phone every 15 minutes. I got ping replies for ~6 hours before it started to ping timeout, and only when I woke the phone did it start ping reply again.
So disabling doze didn't do much.
Wifilock apps don't solve this either. They will falsely keep the wifi connection logo in the status bar, but if you ping the phone, you get no response.
something is broken about the OS, cuz back in oem stock lollipop, the phone has no problem keeping wifi on all the time.

Related

Apps don't update when I turn my screen off

Hey, I was just wondering if anyone else was having this problem.
When I update or download apps from the play store, the downloading/installing stops when I turn my screen off. It seems to happen on both my wifi and 3g.
I'm running stock TMobile USA.
What could be the problem?
One more thing this only started to happen after I updated to ICS.
Sent from my HTC_Amaze_4G using XDA
Anyone? Nobody else has this problem?
Sent from my HTC_Amaze_4G using XDA
What's your Wifi Sleep Policy on?
I actually think my phone stops "syncing" when my screen is off too.
Because when I turn it back on I get flooded with messages in one my chatting apps.
Anyway, I still think my phone sleeps when the screen is off but I checked my Wifi Sleep Policy anyway.
menu>settings>wifi>menu>advanced>keep wifi on during sleep>always
Hope this helps.
It is set to never. And this happens when I'm using the 3g network as well.
I have the same issue. I can only assume that it is a battery saving feature of ICS.
Sent from my HTC_Amaze_4G using XDA
Is there a way to turn this off? It's annoying.
Sent from my HTC_Amaze_4G using XDA
I did some testing. What I did was I went into Advanced WiFi settings and changed the "Keep WiFi On During Sleep" setting. After that, I connected my device wirelessly with adbwireless. I would set it to ping a network connected device (not my computer)'s IP address through "adb shell ping (ip address here)" I would then observe results with each of 3 settings when I allowed the device to sleep according to its timeout (30 seconds).
First setting: Always [keep wifi on during sleep]- Pinged the network connected device's IP address, and once the device's screen timed out, adb stopped responding approximately 2 seconds after it timed out. It actually just halted the entire process, as when I woke it up, it resumed pinging. Normally it would have a roundtrip time of around 10-30 milliseconds. The moment I woke it up, it resumed the pinging. The first ping when I woke it up had a roundtrip of 300 milliseconds (or the amount of time it was asleep). This shows that it halts the entire process while sleeping.
Strangely, when I use my computer to ping the phone, even during sleep, the device will resume pinging the specific network connected device until I stop pinging the phone. Once stopped, the adb "hangs" until I either wake it up, or ping my phone again.
I repeated this experiment with the 2 other settings, "Only when plugged in", and "Never", and the results were the same. This must be a feature of ICS, I can only presume. I wish someone (or I) could come up with a fix, as it can get annoying. It sucks needing about 20 different apps updating, and then realizing that you can't just start updating it and then put it back in your pocket.
EDIT: Also, when I plug the phone in my computer and use adb (without adbwireless), the device will ping my network connected device continuously until I stop it. I also tested this while charging my phone and using adbwireless. The results were the same, it would continuously ping my network connected device until I stopped it. It shows that it will allow the phone using the network during sleep only when charging. I tested it with the development option "Stay awake" set to on and off. The results for both were the same.
So in other words, if I had it plugged into my charger or my computer, the phone will not suspend data if the screen turns off?
Sent from my HTC_Amaze_4G using XDA
GGWC808 said:
So in other words, if I had it plugged into my charger or my computer, the phone will not suspend data if the screen turns off?
Sent from my HTC_Amaze_4G using XDA
Click to expand...
Click to collapse
Exactly.

What's the WiFi doing

Archos 101 IT + UrukDroid 1.6.4
When the tablet is off (sleeping), my local DHCP server gets DHCP requests from the tablet every minute. The power led briefly lits when it wakes up.
When I switch the tablet on, the first thing it does is drop the WiFi connection and re-establishes it.
This seems higly illogical. Also, when I have networking applications running when I switch the tablet off, these apps crash or malfunction when I switch it on again.
Did I overlook a specific setting to avoid this?
I think that when you turn it on, the WiFi connection has already been dropped, but the indicator hasn't been updated yet. It then notices that the connection is down, updates the indicator, and re-connects. I'm not sure about the DHCP requests every minute. You can check in the System Monitor's Alarms tab what's waking your device that often; my guess is that the system figures it'll try to reconnect now that it's woken up, but it doesn't stay awake long enough to establish a useful connection.
I don't think there's really anything you can do to avoid this in general; it's just the way Android power management works. What you can do if you really want is to install an application that will hold a partial wake lock for you. As long as the wake lock is held, the device will never completely go to sleep; the screen will turn off (for a partial wake lock), but the network connection won't be dropped. Of course, this will consume much more power than letting your device sleep normally. I use this when I know I'm going to be intermittently using my tablet for a while (like when I'm cooking) and don't want to keep waiting for the network connection to come back up.
jfmcbrayer said:
I think that when you turn it on, the WiFi connection has already been dropped, but the indicator hasn't been updated yet. It then notices that the connection is down, updates the indicator, and re-connects.
Click to expand...
Click to collapse
That could very well be the case.
I'm not sure about the DHCP requests every minute. You can check in the System Monitor's Alarms tab what's waking your device that often
Click to expand...
Click to collapse
Whenever I switch it on, there's always an alarm scheduled for Android System for the next minute.

[Q] After JB update, wifi always off in sleep

I like keeping my wifi on while my screen is asleep so that I can receive chat messages or e-mails without being at my computer. I never had this problem while running ICS on an unrooted TF201, but ever since I installed the upgrade to JB my wifi will always disconnect after the screen has been asleep for a few minutes. I've checked every setting I can think of. In the Wifi Advanced menu, I have it set so Wifi is always on, and in the ASUS customized setting I have Disconnect network during sleep to off. Under Power Saver I have Enable low battery settings off, set Low battery level to 0%, and even set Wifi OFF to off. Despite all of this, it seems like the tablet under JB goes into some sort of deep sleep and disconnects the wifi after about 5 minutes of inactivity.
I have noticed that this problem does not occur when the screen is on. I also have the dock, and set the screen to always on during meetings in the event that I don't need to enter any notes for a few minutes so I don't have to fool with any delays from screen wake .
Is there some setting I'm missing? Is it a hidden setting that I could access by rooting? Or am I dealing with something internal to the build that I can't change at all? This may not seem like a huge deal to most, but it has become one of my main uses for the tablet when I'm at home. I'm very disappointed with JB so far even though the wifi does feel more responsive on the Prime after the update (when it's not sleeping, of course!).
EDIT: I noticed this evening that the wifi turns off even when I'm running something that uses it while the screen is off. I was listening to Pandora, and about 5 minutes after the screen went off, my music stopped. When I turned the screen back on, I saw that the wifi had indeed become disconnected.
hey,
I have exactly the same problem with my tablet. I have checked every option, I did a factory reset several time, I have checked it on 2 different routers but it is still disconnecting the wife when it goes in the sleep modus. Did you or anyone else find a solution?

Using Llama App on Marshmallow

I have a question about using Llama on Marshmallow. I wrote a basic script that enables airplane mode every 10 minutes and queues another task called disable airplane mode that has a delayed start of 9 minutes. So basically every 10 minutes my device turns off airplane mode for a minute then turns it back on. I left the script running over night, with my phone plugged in and it worked perfect. When I run the script without the phone plugged in, it only works for about 60 to 90 minutes. Sometimes it says conditions no longer true so repeating event canceled and sometimes I see nothing indicating why the repeating event stopped. My initial thought is that when plugged in, Marshmallow does not use Doze. Could Doze be causing a problem and preventing the task from running? I have whitelisted Llama along with 30 or 40 other apps and I am continuing testing. If you have any thoughts, I would greatly appreciate it!
Llama on Marshmallow
Not sure if anyone else is still trying to use llama on Marshmallow, but I found a work around. Polling wouldn't work at all for me so I started using WiFi connections and deleting out the entering / exiting location conditions. Wifi is everywhere now a days. This seems to work well unless you were trying to turn your WiFi off and on based on location. I'd tried e-robot for the same thing and it worked sometimes but not others. Couldn't figure what was going wrong there. Llama is still way easier to set up and more reliable than the alternatives I've tried.

Screen off vs standby

Since i'm playing with amplify and power nap on my asus ze551ml (lollipop 5.0 with boret's kernel), i faced the following:
When the screen is off, the device doesn't go to sleep mode, or at least i think so.
I'm doing my testing with telegram; i said to amplify to limit his alarms to 1 every 10 minutes, and it is working fine undernight (BBS confirms that)
Now i'm even trying Power Nap, which is supposed to completely stop Telegram (and others).
Anyway, if i put the screen off, and then send a message to my telegram account, the phone still receives it almost instantly (3 seconds delay).
This clearly means that telegram is still active and kicking, it is not using any wakelock, it is alive all the time.
But, i repeat, it works overnight (Better battery stats confirms that amplify is limiting his alarms).
Another strange thing, is that i've configured com.asus.powersave to disable wifi as soon as the device enters sleep state, but when i wakeup my phone in the morning and see the BBS statistics from "screen off" to "screen on", it shows that wifi has been active for more than 18 minutes, so here's the question:
Is there a time/timeout to wait after one tunr off the screen for the phone to enter in standby/sleep mode?
And if yes, is that time configurable?
Thanks.
I made a test that confirmed what BBS said; i turned the screen off and start to ping my android wifi ip.
After about 18 minutes (that's the time BBS said wifi was active after the whole night), it stopped responding to pings and telegram of course wasn't workling anymore.
Is it possible to change that timeout to something lower?

Categories

Resources