[Samsung Galaxy S8 Guides, News, & Discussion] awionetka:
Hi,

I noticed that my s8 is not really keeping wifi up when screen is off,

despite setting it to "always" in wifi settings menu.

So I did an experiment.

I set screen timeout to 30 seconds and started pinging the phone

every second with a simple bash script (date, ping -c 1; sleep 1).

Before screen went off the ping was stable at about 5 ms.

When screen was off but wifi on the ping was about 850 ms

but no packet loss.

During wifi-off time I was sending myself test emails to check

notification delays - it was very, verry erratic. Sometimes it took

2-3 minutes, sometimes 3 seconds. Wifi was constantly off. This

means that mobile data was used. :(

Notifications were not triggering wifi connection state - it was

constatntly off.

History:

Sun Aug 27 22:42:20 CEST 2017

screen on, wifi on, start monitoring script

stable ping 5 ms

0% packet loss

Sun Aug 27 22:42:50 CEST 2017 screen timeout -> off

ping jumps to 850 ms

0% packet loss

Sun Aug 27 22:48:51 CEST 2017

wifi off

100% packet loss

Sun Aug 27 22:55:38 CEST 2017 wifi up for 1 second

Sun Aug 27 23:07:34 CEST 2017 wifi up for 5 seconds

Mon Aug 28 00:42:31 CEST 2017 wifi up for 30 seconds

Mon Aug 28 01:51:56 CEST 2017

screen on, wifi on

took dump before sleep ;)

put phone on (slow) wireless charger (battery 50%)

went to sleep

Mon Aug 28 03:39:28 CEST 2017 wifi off !!! phone still on wireless charger !!!

Mon Aug 28 04:02:10 CEST 2017 wifi on - phone still on wireless charger !!!

Mon Aug 28 04:08:07 CEST 2017 wifi off !!! phone still on wireless charger !!! tricle charge ?!

Mon Aug 28 04:31:11 CEST 2017 wifi on - phone still on wireless charger !!!

Mon Aug 28 05:21:16 CEST 2017 wifi off !!! phone still on wireless charger !!!

Mon Aug 28 05:40:14 CEST 2017 wifi on

Mon Aug 28 05:48:26 CEST 2017 wifi off

Mon Aug 28 06:20:53 CEST 2017 wifi on

Mon Aug 28 06:24:28 CEST 2017 wifi off

Mon Aug 28 06:59:01 CEST 2017 wifi on

Mon Aug 28 07:20:02 CEST 2017 wifi off

Mon Aug 28 07:37:07 CEST 2017 wifi on

Mon Aug 28 08:05:34 CEST 2017 wifi off

Mon Aug 28 08:25:33 CEST 2017 wifi on

Mon Aug 28 08:25:39 CEST 2017 wifi off

Mon Aug 28 09:05:39 CEST 2017 wifi on wake-up alarm

I did exactly the same with my Sony Xperia Z4 Tablet (SGP712):

Sun Aug 27 23:32:18 CEST 2017 screen off by hand, wifi on

Sun Aug 27 23:37:28 CEST 2017 wifi goes off by itself

Sun Aug 27 23:42:36 CEST 2017 wifi up for 1 sec, then down

Sun Aug 27 23:52:46 CEST 2017 wifi up for 1 sec, then down

Mon Aug 28 00:25:59 CEST 2017 wifi up for 1 sec, then down

Mon Aug 28 01:29:28 CEST 2017 wifi up for 45 sec, then down

Mon Aug 28 01:57:01 CEST 2017 wifi up for 13 minutes, then down

Mon Aug 28 02:14:39 CEST 2017 wifi up for 1 sec, then down

Mon Aug 28 02:24:57 CEST 2017 wifi up for 1 sec, then down

Mon Aug 28 02:40:04 CEST 2017 wifi up for 5 sec, then down

Mon Aug 28 02:58:53 CEST 2017 wifi up for 1 sec, then down

Mon Aug 28 03:55:25 CEST 2017 wifi up for 20 sec, then down

Mon Aug 28 05:41:15 CEST 2017 wifi up for 25 sec, then down

Mon Aug 28 09:29:08 CEST 2017 wifi up for 20 minutes - breakfast, then down

Mon Aug 28 10:38:37 CEST 2017 wifi up for 5 sec, then down

Mon Aug 28 11:48:35 CEST 2017 wifi up for 25 sec, then down

Mon Aug 28 13:47:09 CEST 2017 wifi up for 30 sec, then down

Mon Aug 28 14:14:35 CEST 2017 finished tests with Z4.

AFAIK, every android device shoud send heartbeat to google push servers

every 15 minutes on wifi and 28 minutes on mobile. It looks like mine dont.

Interesting, right? :)

cheers.