FORUMS
Remove All Ads from XDA

Notifications stop when connected to WiFi 10 minutes after screen is turned off

8 posts
Thanks Meter: 0
 
By zurjskj, Junior Member on 31st May 2018, 04:47 PM
Post Reply Email Thread
While I saw this problem on several other devices (this thread, for example), I haven't seen a post about this problem on this device on XDA, hence starting a new thread. My problem is that I stop receiving notifications from apps that rely on Internet connection. Below are the details:

After 10 minutes of turning off the the phone screen (my device is set to immediately lock after screen turning off), I stop receiving notifications from Messenger, WhatsApp, Gmail and so on. This happens only when the phone is connected to WiFi and NOT charging. On cellular data, notifications arrive timely, as is the case with WiFi when the phone is charging. I discovered this "solution" after months of missing important calls and messages.

The phone came with Android 4.4 Sense, which I didn't use for more than a few days, hence can't really confirm if the problem was present there (it most likely wasn't; those few days I did get timely notifications, as far as I remember). I switched to LineageOS 14.1, Android 7.1.2, and noticed this problem for the first time. After quite some time of thinking it's a bug in LineageOS, I converted the device to GPE, installed stock Android 6.0 (the last version of Android shipped by Google for this device), only to see the problem was worse there. At least in LineageOS 14.1 notifications would stop after 10 minutes. In GPE Marshmallow, it would stop after 2-4 minutes, and the problem persisted even while charging. Now I'm using LineageOS 15.1 from this thread. Notifications STILL stop arriving timely when not charging and connected to WiFi.

To make it clear, I tried pretty much everything suggested by people for similar problems in other devices. I have battery optimization turned off for EVERY app on the list (this DOES seem to be a power management issue, since while charging, notifications work fine). WiFi was set to be active "Always" in Android 6.0 and 7.1.2 (didn't find that option on LineageOS 15.1/Android 8.1). Made unrestricted data access available for all apps. Battery is set to "Performance". All apps allowed to notify. Installed "WiFi Keep Alive" kind of apps. No use!

Yes, every ROM installation was "clean". Yes, the device firmware is the latest one shipped by Google (from here). The device is S-OFF. I only have Google Apps installed, never rooted it. This making me go nuts. If anyone can provide me with a solution, I'll be grateful beyond words.
 
 
31st May 2018, 05:56 PM |#2  
redpoint73's Avatar
Recognized Contributor
Thanks Meter: 6,516
 
More
Please do fastboot getvar all, and post the results (delete IMEI and serial number before posting).

You sure youconverted to GPE using the RUU, and not just flashing the ROM in TWRP?
31st May 2018, 07:37 PM |#3  
OP Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by redpoint73

Please do fastboot getvar all, and post the results (delete IMEI and serial number before posting).

You sure youconverted to GPE using the RUU, and not just flashing the ROM in TWRP?

Thank you for your reply. Here's the output of fastboot getvar all:
Code:
(bootloader) version: 0.5
(bootloader) version-bootloader: 3.19.0.0000
(bootloader) version-baseband: 1.23.213311491.A13G
(bootloader) version-cpld: None
(bootloader) version-microp: None
(bootloader) version-main: 5.07.1700.15
(bootloader) version-misc: PVT SHIP S-OFF
(bootloader) meid: 00000000000000
(bootloader) product: m8_ul
(bootloader) platform: hTCBmsm8974
(bootloader) modelid: 0P6B11000
(bootloader) cidnum: 11111111
(bootloader) battery-status: good
(bootloader) battery-voltage: 0mV
(bootloader) partition-layout: Generic
(bootloader) security: off
(bootloader) build-mode: SHIP
(bootloader) boot-mode: FASTBOOT
(bootloader) commitno-bootloader: 11459804
(bootloader) hbootpreupdate: 11
(bootloader) gencheckpt: 0
all: Done!
finished. total time: 0.017s
And yes, I am sure. First I flashed the firmware, then the RUU. It wiped everything on my phone, and the date on the bootloader changed to Jul 20 2016.
2nd June 2018, 01:28 PM |#4  
Senior Member
Flag Sheffield
Thanks Meter: 13
 
More
i have exactly the same problem but its only with 7.x.x ROMs, in 6 it works fine, i test using WhatsApp web and as soon as the screen goes off it will work for a minute or 2 then say phone not connected, its like it kills all data connection once the screen goes off, i will add it ONLY does it when on wifi and not charging if i turn wifi off it works fine with screen off, i think i did cure it for a while by messing with the WCNSS_qcom_cfg.ini file in the data folder but it caused a huge battery drain.
The Following User Says Thank You to JaffaTB For This Useful Post: [ View ] Gift JaffaTB Ad-Free
2nd June 2018, 02:38 PM |#5  
OP Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by JaffaTB

i have exactly the same problem but its only with 7.x.x ROMs, in 6 it works fine, i test using WhatsApp web and as soon as the screen goes off it will work for a minute or 2 then say phone not connected, its like it kills all data connection once the screen goes off, i will add it ONLY does it when on wifi and not charging if i turn wifi off it works fine with screen off, i think i did cure it for a while by messing with the WCNSS_qcom_cfg.ini file in the data folder but it caused a huge battery drain.

That's exactly the kind of thing I was looking for--if the settings can be applied in a config file to keep the WiFi always active. Can you please tell me which options need to be tweaked to achieve this?
2nd June 2018, 03:11 PM |#6  
Senior Member
Flag Sheffield
Thanks Meter: 13
 
More
Quote:
Originally Posted by zurjskj

That's exactly the kind of thing I was looking for--if the settings can be applied in a config file to keep the WiFi always active. Can you please tell me which options need to be tweaked to achieve this?

Im not sure if it did cure it 100% but this was what i did:

1. Open the file WCNSS_qcom_cfg.ini in text editor.
2. Change the line gEnableBmps = 1 to gEnableBmps = 0
3. Save and reboot

dont know what this setting does but i found it on another forum that fixed it on a different phone.

Edit: also found this which may also work, i would try this if the top one doesnt, then try both together if neither work alone

Make sure your phone is rooted
Remount /system as RW
Make a backup of file /system/etc/wifi/WCNSS_qcom_cfg.ini
Edit the file /system/etc/wifi/WCNSS_qcom_cfg.ini
Change the line "McastBcastFilter=3" to "McastBcastFilter=0"
Save the file and double check file permissions (-rw-r--r-- root root)
Reboot the phone


your config file might be in a different location, i'm on Oreo and mine was in /data/misc/wifi
The Following User Says Thank You to JaffaTB For This Useful Post: [ View ] Gift JaffaTB Ad-Free
2nd June 2018, 04:23 PM |#7  
Senior Member
Flag Sheffield
Thanks Meter: 13
 
More
"McastBcastFilter=0" setting seems to have worked for me, i havent messed with the "gEnableBmps=" setting this time as last time it drained my battery, only a day or so with this new setting changed will tell if this is the same or not, but whatsapp web still connected after 30~ mins
The Following User Says Thank You to JaffaTB For This Useful Post: [ View ] Gift JaffaTB Ad-Free
2nd June 2018, 08:36 PM |#8  
OP Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by JaffaTB

Im not sure if it did cure it 100% but this was what i did:

1. Open the file WCNSS_qcom_cfg.ini in text editor.
2. Change the line gEnableBmps = 1 to gEnableBmps = 0
3. Save and reboot

dont know what this setting does but i found it on another forum that fixed it on a different phone.

Edit: also found this which may also work, i would try this if the top one doesnt, then try both together if neither work alone

Make sure your phone is rooted
Remount /system as RW
Make a backup of file /system/etc/wifi/WCNSS_qcom_cfg.ini
Edit the file /system/etc/wifi/WCNSS_qcom_cfg.ini
Change the line "McastBcastFilter=3" to "McastBcastFilter=0"
Save the file and double check file permissions (-rw-r--r-- root root)
Reboot the phone


your config file might be in a different location, i'm on Oreo and mine was in /data/misc/wifi

Quote:
Originally Posted by JaffaTB

"McastBcastFilter=0" setting seems to have worked for me, i havent messed with the "gEnableBmps=" setting this time as last time it drained my battery, only a day or so with this new setting changed will tell if this is the same or not, but whatsapp web still connected after 30~ mins

That, sir, is pure gold. Also, I couldn't have done it without your elaborate instructions. This problem has bugged me SO much that I couldn't at first believe it was working. But tested with WhatsApp Web for about 40 minutes. It was connected! I changed McastBcastFilter value to 0, and didn't touch gEnableBmps, like you suggested. However, I did make one additional change. I saw here that the option "isAndroidPsEn" is set to 0, i.e. it was disabled. It was said when this option is disabled, the driver controls power saving mechanism on its own, separate from Android's power saving. This, however, was set to 1 (enabled) on my file. It seemed reasonable to change it. I know, like you said, it takes a day or two to realise if the solution really worked, but I am going to mark this post solved nonetheless.

Thank you SO much!
2nd June 2018, 08:56 PM |#9  
Senior Member
Flag Sheffield
Thanks Meter: 13
 
More
Glad I could help, it too has bugged me ever since ive used a 7.x.x ROM, I had given up trying to fix it but your post gave me renewed spirit to try and fix it, also the second option you mentioned was also enabled on mine but I left it as it and battery usage seems normal up to now.
3rd June 2018, 09:52 AM |#10  
OP Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by JaffaTB

Glad I could help, it too has bugged me ever since ive used a 7.x.x ROM, I had given up trying to fix it but your post gave me renewed spirit to try and fix it, also the second option you mentioned was also enabled on mine but I left it as it and battery usage seems normal up to now.

So far, battery usage is quite normal on my end. By the way, I really feel these things should be better documented by AOSP/Google. Quite a lot of people seem to suffer from this issue. People blame battery optimization, bugs in push notification... whatnot.
3rd June 2018, 12:05 PM |#11  
Senior Member
Flag Sheffield
Thanks Meter: 13
 
More
Same here too, it looks like we have finally cured it I know what you mean about it affecting loads of other I tried all sorts to cure it but to no avail.
Post Reply Subscribe to Thread

Tags
htc one m8, sleep, wifi - problem

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes