{FIX} WIFI Battery drain on standby - Android General

hello android community
i will start straight : i was fighting about 2 years ago with Wifi battery drain since my first android smart phone which will make android os go crazy
the drain cuzed by those kernek wakelocks : wlan_rx_wake , wlan_wake , and new one called waln_ctrl_wake which get add about year go to wifi driver (look here for more info about wlan_ctrl_wake https://android.googlesource.com/kernel/common.git/+/a5fdde7561237e6845e2ba472cf366dae11b55b3 )
i've tried every thing that possible ( wipe data - tried different kernel - use the device without apps disable multicast from modem - buy another modem ) nothing helped :silly:
than about 4 days ago i was searching about wifi Chanel's and which one is better and i found the 40Mhz wifi cuz sucks wifi interference like hell with 2.4Ghz wifi ( i have about 12 wifi network near me :cyclops: )
then now the fix
1- disable 40Mhz if u have modem ( router ) only have 2.4 Ghz wifi
2- i found that channel's 1 - 6 - 11 will not cuz overlapping ( but the didn't work for me very good ) so i'm using channel 8
3- this program will help u to pick best channel for u inssider
4- very weak signal will cuz higher drain
5- try to place router ( modem ) in the center of the house to give better Wifi distribution
i hope this will help every one having battery drain cuzzed by wifi
happy battery without draing

I came here from your link on the Perseus thread, thanks for the tip!
When I get home from work today, I'll get into my router and give it a try and report back.

Be careful changin channels. The channel 11 is very affected by wireless phones and microwaves. If you can do it... go to channels 13 or 14. Not all devices have support for them.

Switched to channel 8 after scanning the wifi in my area, drain is fixed!

add number 5

Related

Getting rid of wlan_rx_wake wakelocks

Hey guys,
have you noticed that your device uses up a lot more battery on certain wifi networks (e.g. at work or university)? It is probably caused by the wlan_rx_wake wakelock.
From the wakelocks database:
Rationale: Wifi chip received a packet from somewhere - On a Galaxy S II, lots of these combined with the fact that the device takes 650 msec to resume from suspend and 150 to go back to sleep means that occasional wifi packets coming in will skyrocket Android OS usage. As an extreme example, run the following from a Linux box when wifi sleep policy is "never" and watch your deep sleep percentages plummet, your battery drain, and Android OS skyrocket: ping -i 5 <wifi IP address of phone>
Know actions: Use a sniffer to determine the cause of the traffic.
Click to expand...
Click to collapse
So apparently some other device in the network keeps waking up the Nexus. If the problem occurs in your home network you can easily find out which device is causing the problem by using Shark and Wireshark. You'll get a log that shows every network activity.
Here are some tips from a similiar thread at the SGSII-forums (thanks!):
use a static IP instead of DHCP (you may have to set a static IP every time you sign up in that particular network)
disable IPv6 protocol on your phone - see below
update your router firmware
buy a gaming adapter for your Wifi network that gets the DHCP IP adress, but gives your phone a static IP
optimise router settings: click
Windows network is causing the problem - solution here: click
Change wireless network encryption method, change wifi channel, instead of using auto baseband use only 2.4 or 5GHz baseband (Wi - Fi - advanced - Wi - Fi frequency band)
turn off uPNP in router/AP
t urn off netbios in windows network ("Go to Network and Sharing Center then change adapter settings. Right click on your wireless and select Properties.
Click on the ipv4 and then the properties button. Select Advanced, go to the Wins tab and disable tcp over netbios.")
Thoravukk FAQ tells you: Q. My device not entering deep sleep if i use Wifi?
A: That's not a Kernel issue! It's a Router and (Windows 7) Network problem. Disable IPv6, IP Helper service, shell hardware detection service and the Windows Media Player Network Sharing Service. Source: here
Other apps and devices that can cause the wakelock:
TP Link routers: disable the print server in USB settings
Asus routers: disable AiCloud
disable Dropbox Lan Sync
disable wireless on (HP) printers
disable Canon network scan utility.
Using another kernel might also help to solve this problem: but I haven't tried that yet.
Try out the Franco kernel: http://forum.xda-developers.com/showthread.php?t=2508284
He has merged some wifi driver patches which should adress this problem. It reduced the wakelocks for me to 1 min in over 8 hours on my home network and to 3 min in one hour ony my university network!
So it should be possible to get rid of this problem in your home network.
But what about work or university networks? There are even more devices connected so the problem gets even worse. In Europe we have the Eduroam wifi network at many universities. If I'm connected to this network I get about 20 min wakeup time in one hour. There are a lot of ARP, DHCP and IPv6 request from different sources. Unfortunately you can't change anything about the configuration on your university/school/work network, so we need to find a solution to block these requests on our phone.
A solution for the IPv6 requests might be to disable IPv6 on your phone if you don't use it. In terminal:
Code:
echo 1 > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6
Change the 1 to a 0 if you want to reactivate IPv6. Android resets this setting every time you connect to a network, so you might try Tasker to do this.
I still haven't found a solution for the ARP and DHCP requests though. Any help or input would be appreciated.
Thanks
edit (05/14/14): updated OP with other tips you mentioned
Thanks, this was a useful post. When I am at work on their wifi my phone doesn't go to sleep and definitely drains the battery quickly. Hopefully a better solution can be found.
laxor said:
Hey guys,
have you noticed that your device uses up a lot more battery on certain wifi networks (e.g. at work or university)? It is probably caused by the wlan_rx_wake wakelock.
From the wakelocks database:
So apparently some other device in the network keeps waking up the Nexus. If the problem occurs in your home network you can easily find out which device is causing the problem by using Shark and Wireshark. You'll get a log that shows every network activity.
Here are some tips from a similiar thread at the URL="http://forum.xda-developers.com/showthread.php?t=2133176"] SGSII-forums[/URL] (thanks!):
use a static IP instead of DHCP (you may have to set a static IP every time you sign up in that particular network)
disable IPv6 protocol on your phone (Dorimanx kernels have an option for this in ST tweaks or you can use "Android Firewall" for this
update your router firmware
buy a gaming adapter for your Wifi network that gets the DHCP IP adress, but gives your phone a static IP
optimise router settings: click
Windows network is causing the problem - solution here: click
Change wireless network encryption method, change wifi channel, instead of using auto baseband use only 2.4 or 5GHz baseband (Wi - Fi - advanced - Wi - Fi frequency band)
turn off uPNP in router/AP
t urn off netbios in windows network
Thoravukk FAQ tells you: Q. My device not entering deep sleep if i use Wifi?
A: That's not a Kernel issue! It's a Router and (Windows 7) Network problem. Disable IPv6, IP Helper service, shell hardware detection service and the Windows Media Player Network Sharing Service. Source: here
Other apps and devices that can cause the wakelock:
Dropbox Lan Sync, (HP) Wireless printer, Canon network scan utility.
Using another kernel might also help to solve this problem, but I haven't tried that yet.
So it should be possible to get rid of this problem in your home network.
But what about work or university networks? There are even more devices connected so the problem gets even worse. In Europe we have the Eduroam wifi network at many universities. If I'm connected to this network I get about 20 min wakeup time in one hour. There are a lot of ARP, DHCP and IPv6 request from different sources. Unfortunately you can't change anything about the configuration on your university/school/work network, so we need to find a solution to block these requests on our phone.
A solution for the IPv6 requests might be to disable IPv6 on your phone if you don't use it. In terminal:
Code:
echo 1 > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6
Change the 1 to a 0 if you want to reactivate IPv6. Android resets this setting every time you connect to a network, so you might try Tasker to do this.
I still haven't found a solution for the ARP and DHCP requests though. Any help or input would be appreciated.
Thanks
___
Use the new BBS beta to check your wakelocks.
Click to expand...
Click to collapse
Been having this wakelock as well. Almost all of the packets being picked up by my phone are being sent by my router to random ports. No idea what is really causing it, but it is pretty annoying. Doesnt seem to drain much battery from the device though.
695886915
Apparently this is a known problem. Franco has already merged two fixes from Google in his kernel which reduce the wakelock, but still don't eliminate it completely. But I'm sure that this issue will soon be resolved with custom kernels or even an update from Google.
I'm hoping for this to be fixed too. My N4 didn't exhibit this wakelock, and my N5 is not deep sleeping at all when I'm at work as a result. I'm just using LTE at work, which is okay, but still not the best solution.
Franco Kernel didn´t help at all, since he seem to include all the google wifi patches as well, the official Google update is unlikely to solve the problem... so pissed off by this, eating up my battery so quickly I have to switch off wifi completely (and I hardly have cell data reception here at my workplace) ... sucks!
Thanks finally contained this problem.
Thanks for a great summary of causes and the info I needed to finally contain it. This problem had been dogging me since I got the N5 on my home network.
I tried static IP, no good.
I tried wifi-off on sleep, no good (never got to sleep i guess!!).
I tried forcing 5 GHz, no good.
Finally I followed the advice to Disable IPv6, IP Helper service, shell hardware detection service and the Windows Media Player Network Sharing Service on each Windows PC, and my stay awake time from Android OS plummeted from hours to minutes which I can deal with.
May not work for everyone, but seems to have done it for me. Thanks again.
Thank you for the post. It makes me nervous that I'm getting this wake lock. I previously got it on my GNex and Nexus7 (2012). I tried every method above to fix but got nowhere. For whatever reason my Nexus 4 didn't suffer from this. Hopefully I can figure something out for my new nexus 5
The update to 4.4.1 does not fix this issue. Still getting this wakelock.
Yes. I found the android OS is still killing the battery after updating to 4.4.1
muyoso said:
The update to 4.4.1 does not fix this issue. Still getting this wakelock.
Click to expand...
Click to collapse
Sunkins said:
Yes. I found the android OS is still killing the battery after updating to 4.4.1
Click to expand...
Click to collapse
Wish this would get fixed, as it's my last remaining wakelock issue and the only thing holding me back from getting fantastic battery life.
Sent from my Nexus 5 using xda app-developers app
laxor said:
Hey guys,
have you noticed that your device uses up a lot more battery on certain wifi networks (e.g. at work or university)? It is probably caused by the wlan_rx_wake wakelock.
From the wakelocks database:
So apparently some other device in the network keeps waking up the Nexus. If the problem occurs in your home network you can easily find out which device is causing the problem by using Shark and Wireshark. You'll get a log that shows every network activity.
Here are some tips from a similiar thread at the SGSII-forums (thanks!):
use a static IP instead of DHCP (you may have to set a static IP every time you sign up in that particular network)
disable IPv6 protocol on your phone - see below
update your router firmware
buy a gaming adapter for your Wifi network that gets the DHCP IP adress, but gives your phone a static IP
optimise router settings: click
Windows network is causing the problem - solution here: click
Change wireless network encryption method, change wifi channel, instead of using auto baseband use only 2.4 or 5GHz baseband (Wi - Fi - advanced - Wi - Fi frequency band)
turn off uPNP in router/AP
t urn off netbios in windows network
Thoravukk FAQ tells you: Q. My device not entering deep sleep if i use Wifi?
A: That's not a Kernel issue! It's a Router and (Windows 7) Network problem. Disable IPv6, IP Helper service, shell hardware detection service and the Windows Media Player Network Sharing Service. Source: here
Other apps and devices that can cause the wakelock:
Dropbox Lan Sync, (HP) Wireless printer, Canon network scan utility.
Using another kernel might also help to solve this problem: but I haven't tried that yet.
Try out the Franco kernel: http://forum.xda-developers.com/showthread.php?t=2508284
He has merged some wifi driver patches which should adress this problem. It reduced the wakelocks for me to 1 min in over 8 hours on my home network and to 3 min in one hour ony my university network!
So it should be possible to get rid of this problem in your home network.
But what about work or university networks? There are even more devices connected so the problem gets even worse. In Europe we have the Eduroam wifi network at many universities. If I'm connected to this network I get about 20 min wakeup time in one hour. There are a lot of ARP, DHCP and IPv6 request from different sources. Unfortunately you can't change anything about the configuration on your university/school/work network, so we need to find a solution to block these requests on our phone.
A solution for the IPv6 requests might be to disable IPv6 on your phone if you don't use it. In terminal:
Code:
echo 1 > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6
Change the 1 to a 0 if you want to reactivate IPv6. Android resets this setting every time you connect to a network, so you might try Tasker to do this.
I still haven't found a solution for the ARP and DHCP requests though. Any help or input would be appreciated.
Thanks
___
Use the new BBS beta to check your wakelocks.
Click to expand...
Click to collapse
Thanks for this thread. Not sure if it will help or not but I have done all the things in the op and will report back. Have to start somewhere I guess. Although this isn't totally killing my battery in home .8% per hour will sleeping at night It by far is the biggest thing waking my phone. In 9 hrs I have 45 minutes of wake and 35 come from this. If I can get this under control I an sure I can get a little better battery performance. :good:
HP wireless printer
Hi, I have done everything you have listed, though I am still experiencing the wakelock. I have an HP wireless printer so I think this is the problem. Though, what could I do to stop it from creating the wakelock on my phone? This doesn't list what you need to do for the HP printer. Thanks in advance.
Any recommendations for a good modem/router that will not cause these wakelocks?
Sent from my Nexus 5 using xda app-developers app
For those who have tp link routers and get this wake lock, disable the print server in USB settings. It stopped almost all the RX_wake..
Before stopping I used to get some regularly spaced packets from 192.168.1.1 (router) to 255.255.255.255 UDP 7437 .. Bite completely stopped..
Hit thanks if I've helped you.
gpkumaran said:
For those who have tp link routers and get this wake lock, disable the print server in USB settings. It stopped almost all the RX_wake..
Before stopping I used to get some regularly spaced packets from 192.168.1.1 (router) to 255.255.255.255 UDP 7437 .. Bite completely stopped..
Hit thanks if I've helped you.
Click to expand...
Click to collapse
I might sound like a noob, but where do you find the USB settings to disable the print server?
grumpyfuzz said:
I might sound like a noob, but where do you find the USB settings to disable the print server?
Click to expand...
Click to collapse
in ur router setup page 192.168.1.1(probably)
Kyle C said:
Thank you for the post. It makes me nervous that I'm getting this wake lock. I previously got it on my GNex and Nexus7 (2012). I tried every method above to fix but got nowhere. For whatever reason my Nexus 4 didn't suffer from this. Hopefully I can figure something out for my new nexus 5
Click to expand...
Click to collapse
Have you figured anything out yet? I have also tried everything and still getting this wakelock also.
grumpyfuzz said:
Have you figured anything out yet? I have also tried everything and still getting this wakelock also.
Click to expand...
Click to collapse
Franco kernel working to fix this?
Momotani-Hitoshi said:
Franco kernel working to fix this?
Click to expand...
Click to collapse
It didn't work for me, but it might work for other people.

[Tips] Wifi Running Wakelock Battery Drain!

Having horrible battery drain with wifi running wakelock, even though the wifi is off..If you have the same problem like me, you can easily save more battery with the step below: ( don't know if it been share by anyone here )
- Settings ---> More ---> Security ----> Security Update Service
Uncheck ( Via Wi-Fi only ) Both ( Auto update security ) if you like..
Manage to get under 0.% per hour. ( wifi running remain )
Addition*
- Settings ---> More ---> Location Services
Uncheck ( Use wireless networks )
Please share any other solution if found
Thank you I will try this.
I greenified all my apps. No i see my wifi shuts off when im on deep sleep. Because when i wake my phone up it shows me that he connected to my wifi.
Sent from my GT-I9500 using Tapatalk
If you are still showing WiFi connected in battery usage, use the following steps
CONNECTIONS - WiFi
ADVANCED OPTIONS -
1. Uncheck 'Scanning Always Available'
2. Keep WiFi on....... - Check 'only when plugged in'
Enjoy longer battery life........
Sent from my Nexus 7 using xda premium
Nice fine..
Option 1, seem to remove the wifi running from bbs.
Thank you. I am now trying these settings. i turned off the security and location settings you mentioned. What exactly will happen if these are off? Will i lose any functionality?
i wonder if certain apps have the ability to turn this feature on? for some reason i just randomly started getting this terrible battery drain from wifi and google services and im thinking this is the cause and i have not done any updates lately... hmmmm
yamaha83 said:
i wonder if certain apps have the ability to turn this feature on? for some reason i just randomly started getting this terrible battery drain from wifi and google services and im thinking this is the cause and i have not done any updates lately... hmmmm
Click to expand...
Click to collapse
Take a look here and my last posts: http://forum.xda-developers.com/showthread.php?t=2684295
Enviado desde mi GT-P7510 usando Tapatalk 2
Wakelock of Google services
Hi all,
I've been fighting with this issue for a while on my I9502 and just recently came to a solution. I use wakelock detector, and it was showing pretty much 95% of the time the phone was awake. I did the Wifi auto scan off thingy, and a few others which did help, but what ultimately helped me with the "google services" caused wakelock was:
Google Play Store -> settings ->
Notifications OFF
Auto update apps OFF
Require password for purchases ALWAYS
My Wifi is still on and running, exchange account (push) and gmail syncing, location services on both wifi and gps. And the phone is in deep sleep when I turn off the screen. Mind you, I have only the following apps on the main screen: Weather Pro, Smooth calendar at the moment. I will try what happens if I put back google now.
I hope it helps some of you.
Off you Wifi when not in use. We tend to forget these things which is why the battery's charge goes down.
use wlan guest mode if ur router supports it and connect only ur phones/tablets in it.
my router does not support it but i bought a second router for 15 euros which is behind my old router now.
like this i almost loose no battery at all over night.
this wlan_rx_wake crap was driving me crazy since i got my first s2 3 years ago. since i got this new router everything is perfect.
if u want to know which router it is please let me know i will post it then
thanks mate you saved my day !!!! i installed greenifiy and i hibernate most of my appsand games expect facebook and telegram, messanger, whatsapp, line , app lock , vault , titanum backup, trickster mod , freedom, device manager, wifikey viewer
any notice you could tell me about my current configuration
chrisknife said:
use wlan guest mode if ur router supports it and connect only ur phones/tablets in it.
my router does not support it but i bought a second router for 15 euros which is behind my old router now.
like this i almost loose no battery at all over night.
this wlan_rx_wake crap was driving me crazy since i got my first s2 3 years ago. since i got this new router everything is perfect.
if u want to know which router it is please let me know i will post it then
Click to expand...
Click to collapse
What is wlan guest mode and how does it help with the wifi connection?
Sent from my GT-I9505 using Tapatalk
---------- Post added at 02:21 PM ---------- Previous post was at 02:17 PM ----------
Quite a handy app, turns off wifi/data when your screen is off, but can be set to periodically switch on and sync. Can also set it not to connect when u just switch your screen on (to check the time say).
https://play.google.com/store/apps/details?id=com.teqtic.leandata
Sent from my GT-I9505 using Tapatalk
gsmyth said:
What is wlan guest mode and how does it help with the wifi connection?
Click to expand...
Click to collapse
wlan guest mode an option some routers have. u can enable it and will have a second wlan network online.
it's not connected to the other network so everyone who will use this network is exlcuded from the primary home network.
mostly it's meant for guests so they can do what they want and u don't have to be scared that ur network will get infected with some sh*t.
but in this case u can use it to exclude ur phone from ur primary network and give it his own network.
on ur pc check ur network traffic with wireshark.
u will get so many arp, ipv6 and multicast traffic... android mostly isn't capable to handle it.
atleast it seems that way because all of this will trigger wlan_rx_wake.
it's even worse when u got a network printer and a samsung smart tv (arp requests like every second)
chrisknife said:
wlan guest mode an option some routers have. u can enable it and will have a second wlan network online.
it's not connected to the other network so everyone who will use this network is exlcuded from the primary home network.
mostly it's meant for guests so they can do what they won't and u don't have to be scared that ur network will get infected with some sh*t.
but in this case u can use it to exclude ur phone from ur primary network and give it his own network.
on ur pc check ur network traffic with wireshark.
u will get so many arp, ipv6 and multicast traffic... android mostly isn't capable to handle it.
atleast it seems that way because all of this will trigger wlan_rx_wake.
it's even worse when u got a network printer and a samsung smart tv (arp requests like every second)
Click to expand...
Click to collapse
Thanks for the explanation, I have checked and my router does have a guest network mode, will set this up and give it a try to see how it goes. As I am connected constantly to Wifi when at home and also at work. I can do a good comparison as I have exactly the same router at work as at home, but I can try out the guest network at home to see what the wakelocks are like.

[BUG]Samsung forgot to include fast dormancy in KitKat (?)

Hello,
as you may or may not know fast dormancy is by now a mature technology implemented by all major networks worldwide. It involves 3G (HSPA) technology only and it allows the phone AND the network to keep the connection on using different levels of state (RRC) so that when you finish transferring data at high speed the state goes to a lower energy one or even idle using much less power, saving battery life significantly.
It has been explained by XDA website 2 years ago, you can also find more info on wikipedia.
What's the point of this topic? With my i9505 International I've always used Google Edition ROMs since the first edition was released. Battery life has always been fine while using 3G data on standby.
When I upgraded to KitKat Google Edition I noticed the battery would drain much, much quicker (when the screen is off mainly). I got used to it that I assumed it was how things worked until I ended up reading about people with much battery life on 3G and KitKat (but CM11 or AOSP) so I started investigating and trying different ROMs/configurations (I asked devs on their respective threads but I have been completely boycotted! ). At the end I concluded fast dormancy was not working (on the phone part) in anyway on KitKat ROMs made by Samsung.
How do you know if FD is active on the device?
- install apps to detect wakelocks like BetterBatteryStats (you don't need root)
- turn on 3G data and disable WiFi
- keep the screen off for about 1 minute (make sure you're not downloading anything)
- turn on the screen on check "kernel wakelocks". If you have "fast_dormancy" anywhere in the list then it's on otherwise it is not active
What ROMs did you test and how?
This is what I did: I made sure to have the same configuration and apps on every test, same location and signal strength.
I charged the phone to 100%, turn on 3G data, unplugged and left it idling with sync on for 4 hours. I noticed (via betterbatterystats logs) that with fast dormancy off I would lose about 2.5%/h, while with fast dormancy on the drop would be about 0.7%/h!!
And let's not talk about when you move around or drive, for instance with FD off with my usual drive to class I've always lost 3-4% in 15 minutes, I mean ALWAYS. With FD on the battery wouldn't move at all! That is a HUGE difference!
The ultimate test for me was a real life test. I went studying for two consecutive days at college in the same spot using the phone the same way (browsing, tapatalk, facebook messenger), with FD off I would come back home after using the screen for 1h30m at about 15% (mainly because I would lose power just on stand-by!) but FD on repeating the same steps the following day with FD on I went home at the same time and after using the screen for 2h20m I still had 45% of battery, WOW!
ROMs where FD works:
- 4.2.2, 4.3 TW
- 4.2.2., 4.3 GE (untouched and customized)
- CM10.2, CM11
- AOSP 4.4.2 ROMs
ROMs where FD doesn't work:
4.4.2 GE (untouched and customized)
4.4.2 TW (leak)
I used only one modem during these tests, the latest from the KITKAT leak.
What have you tried to force it?
Well I can tell you for sure that ro.ril.fast.dormancy.rule has no effect on TW/GE ROMs, I also tried to change the database as described here http://www.androidnz.net/2012/06/at-your-own-risk-how-to-disable-fast.html to set it to ON but you should know that FD on every ROM is on by default. I have no proof of this but with FD off even if your network seems to go to lower energy states on the network side (you can see all this using Samsung Service Mode), on the phone side the radio keeps using a lot of power as if it remains "active" thus draining battery like a b*tch
So has Samsung forgotten to include this feature? What do you think?
Also do you know where I can ask support for this to be fixed? Should I ask Google on the play store (even if I don't technically have a GPE phone!) or via Samsung website even if it's not sold on their site? Even worse KK TW is not even out yet officially.
Mod Edit
Please incorporate this in the KitKat thread HERE
Thank you
Thread closed
malybru
Forum Moderator

[ROOT] A simple guide to block/Reduce qcom_rx_wakelock and some other wifi wakelocks

Two weeks felt like two years when my phone suddenly started acting odd. High CPU usage, 2x battery drain compared to before, phone heating up while doing simple tasks drove me insane. I thought there might be something wrong with the phone but couldn't find anything so I sent it to the customer service center. All they did was factory reset, installed the latest stock OS, and sent it back which didn't solve my issue.
So I rooted the phone, installed a custom ROM and the problem was still there. I lost the tiny bit of hope I had left and concluded that it's a hardware issue and I might have to buy a new device. Two days later I installed the Better Battery Stats app and kept my phone idle overnight with wifi on.
The next day I finally found out what's been eating my battery. In BBS under Kernel wake-locks, I saw qcom_rx_wakelock was on for 8 straight hours, as long as my wifi was on. Checked the CPU states on the FK Kernel manager and found out the phone never went to deep sleep, not for a second! Also, there was that idle wifi usage.
So I downloaded the Network Log app and kept logging on the next night. 9 hours passed, none of my apps used the internet but the kernel used almost 500 mbs in 9 hours! So that's where my wakelock was coming from.
I went to my friend's house and used his wifi for a few hours to identify what's going on and I was surprised to see there was no battery drain, low CPU usage, and zero idle wifi usage. For a moment there everything seemed to went back to normal. When I came back to the school dormitory the nightmare started again.
I started scouring on the internet and I found this which led me to this terrific post!
This comment explains everything!
To summarize, the phone was going crazy because of wifi multicast, and arp flooding. I couldn't do anything about it as I was in the university's public wifi. You can disable multicast by going to the router page and turning off wifi multicast from IGMP snooping setting. But it was impossible for me cause school won't allow me to change anything and even if I complain they won't care.
So I decided to fix it by adding some of the Pixel 3's WCNSS_qcom_cfg.ini properties to my phone's WCNSS_qcom_cfg.ini which I located in the vendor/etc/wifi/ as r/skanadian recommended in the second post which took my qcom_rx wakelock to 19%, way less compared to 86% before.
This is a step-by-step guide to reducing battery drain -
• Backup your phone's WCNSS_qcom_cfg.ini in case something go wrong. I found it in system/vendor/etc/wifi/here
It might be different for you depending on what Rom or device you are using. The filename will be the same but the location might be different.
• Get a text editor. Mixplorer is recommended as it helps to search properties quickly with its find feature.
• Open your devices WCNSS_qcom_cfg.ini using Mixplorer and keep it open. Alternatively, you can copy it to a different folder on your phone. I suggest the second one cause it's better than directly editing the file from the system.
• Go to this page
• Go to your browser option and select find in page to search. Search for the word "offload" on that page.
• Copy all the lines related to offload one by one and replace them on your devices WCNSS_qcom_cfg.ini that you opened using Mixplorer.
• If there isn't anything to replace simply add those lines. Don't forget to hit the save button while doing that.
• After that, search for these properties on your WCNSS_qcom_cfg.ini and set them as I did below
RoamRssiDiff=3
g11dSupportEnabled=0
gEnablePowerSaveOffload=5
gRuntimePM=1
RTSThreshold=1048576
gMCAddrListEnable=1
gActiveMaxChannelTime=40
gActiveMinChannelTime=20
gMaxConcurrentActiveSessions=2
If you don't see one of these to replace in your WCNSS_qcom_cfg.ini you should add it.
• Now reboot your phone, give it some time and see if the battery improves. If everything remains the same then go to WCNSS_qcom_cfg.ini using Mixplorer again, find BandCapability, and set it like this -
BandCapability=1
It will disable 5ghz from your phone. I found out most companies release their phones with bad wifi drivers which don't handle the 5ghz wifi band appropriately. Lack of power-saving and not blocking multicast requests properly leads to higher CPU usage and bad battery life.
Again you can set the BandCapability=2 if you want to use 5ghz mode only. If you have a good wifi driver, the battery drain might come from switching between 2.5 and 5ghz so keeping on one of them helps.
• Why qcom_rx wakelock and what is the best fix?
It can occur for several reasons.
- Wifi multicasting. Multicasting can be disabled from IGMP snooping on router settings. You don't need multicasting in your home network at all. But when you're on office wifi or school wifi, it does improve the speed slightly by reducing data loss and interference. It also can be solved the same way but if your school management is like mine, then they might not care if your laptop or phone burns.
- DHCP timers
- A software bug from server-side
- Band switching
- Even interference, if you have a public network with a lot of phones and PCs
There are some more reasons I can not remember now. The best way to fix it is to build a custom kernel with WLAN and qcom_rx blockers/limiters e.g. Franko Kernel.
But sadly a lot of us will never have that unless we make a kernel for ourselves. So as of now, this is the solution I could come up with.
My knowledge of this sector is very little. It would be great if you all could help me get rid of this problem.
I would love it if there was a feature built-in on Android OS to block some kernel wake-locks.
OnePlus phones allow you to turn off multicasting from Developer Options but that makes little to no difference depending on what wifi you are using.
• Very Important :
Depending on you wifi, you can try setting hostArpOffload=0 and hostNsOffload=0
or you can try setting both to 1. Use whichever improves the battery backup. Don't forget to reboot after changing anything.
If you are an expert, please help us. Cause these wakelocks aren't going anywhere. They will give some of us many more sleepless nights.
Thank you for reading. Have a good day!
For those who don't want to change settings they don't understand:
RoamRssiDiff: The difference in signal strength required before phone will switch to a new Access Point. Measured in -dbs. 3 means it will switch APs if the signal strength is 3dbs better than the one in use.
g11dSupportEnabled: WIFI 802.11d
gEnablePowerSaveOffload: Level of Powersave
gRuntimePM: Runtime Powermanagement
RTSThreshold: How long to wait before asking to send wifi packets. Should be as high as possible, only lowered if you have wifi dropouts.
gMCAddrListEnable=1: Drops all Multicast frames except for ARP. You don't want to disable ARP entirely or your internet will break, so don't lower this to 0.
gActiveMaxChannelTime: Time spent scanning.
gActiveMinChannelTime: Ditto
gMaxConcurrentActiveSessions: Self-explanatory
While looking this up I also found gNeighborLookupThreshold or RoamLowRssiThreshold: The signal strength at which the phone starts looking for a new AP (the step before RoamRssiDiff becomes relevant). Typical values are 65-80. Changing this might help too if your phone is switching AP too often or not often enough.
Thanks for this, my device was also affected by this (though not as badly as yours) I've just disabled Multicast from my router.
TrenchFullOfSlime said:
For those who don't want to change settings they don't understand:
RoamRssiDiff: The difference in signal strength required before phone will switch to a new Access Point. Measured in -dbs. 3 means it will switch APs if the signal strength is 3dbs better than the one in use.
g11dSupportEnabled: WIFI 802.11d
gEnablePowerSaveOffload: Level of Powersave
gRuntimePM: Runtime Powermanagement
RTSThreshold: How long to wait before asking to send wifi packets. Should be as high as possible, only lowered if you have wifi dropouts.
gMCAddrListEnable=1: Drops all Multicast frames except for ARP. You don't want to disable ARP entirely or your internet will break, so don't lower this to 0.
gActiveMaxChannelTime: Time spent scanning.
gActiveMinChannelTime: Ditto
gMaxConcurrentActiveSessions: Self-explanatory
While looking this up I also found gNeighborLookupThreshold or RoamLowRssiThreshold: The signal strength at which the phone starts looking for a new AP (the step before RoamRssiDiff becomes relevant). Typical values are 65-80. Changing this might help too if your phone is switching AP too often or not often enough.
Click to expand...
Click to collapse
Cool!
There are some other wakelocks that's bothering me more than qcom_rx and I have no idea what they are!
Could you please tell?
Mario3DS said:
Thanks for this, my device was also affected by this (though not as badly as yours) I've just disabled Multicast from my router.
Click to expand...
Click to collapse
Sadly I'm on school wifi and can't do anything about it!
lpass is a Qualcomm audio subsystem for things like voice based wakeup, and IPCRTR (inter-process communication router) is just how different processes on your phone communicate with each other.
Others have reported these wakelocks too, almost always when they have a wifi/cell connection. Maybe it has to do with voice assistants communicating with their home servers?
TrenchFullOfSlime said:
lpass is a Qualcomm audio subsystem for things like voice based wakeup, and IPCRTR (inter-process communication router) is just how different processes on your phone communicate with each other.
Others have reported these wakelocks too, almost always when they have a wifi/cell connection. Maybe it has to do with voice assistants communicating with their home servers?
Click to expand...
Click to collapse
Well
I asked a kernel dev and he gave exactly the same explanation you gave me. He also said these are necessary and doesn't drain battery too much.
I am on a custom kernel now and wlan, qcom_rx wls are gone.
Thanks for the help
With the new kernel, I'm not seeing Lpass wakelocks much. They are there but limited.
TrenchFullOfSlime said:
lpass is a Qualcomm audio subsystem for things like voice based wakeup, and IPCRTR (inter-process communication router) is just how different processes on your phone communicate with each other.
Others have reported these wakelocks too, almost always when they have a wifi/cell connection. Maybe it has to do with voice assistants communicating with their home servers?
Click to expand...
Click to collapse
I see you've gained quite some knowledge regarding wakelocks. Your explanation was simple and easy to grasp. Could you please guide me to a thread where I can learn more about it?
Thank you so much
I just googled all the terms. Qualcomm publishes some of its stuff (source code and .ini files) with comments, others were referenced in AOSP sources.
Thanks for posting this, with my pixel 4a setting "hostArpOffload" to 0 solved it. NETLINK wakelok are much less and no battery drain.
Although on onePlus 7 pro which I've rooted few days ago none of this is working and NETLINK wakelok is draining battery at 2-3% per hr.
I'll try flashing a different ROM and If found any fix will post it here.
Device1 : Pixel 4a | LineageOS 18.1 | microG
Device2 : OnePlus 7pro | LineageOS 18.1 | microG
Edit : There are many multicast requests and NETBIOS requests too and looks like NETBIOS requests are coming from all the windows machines which are connected via Access point.
Edit:
Tried packet capture and Router is just flooding network with Multicast and ARP traffic.
I'm in the same situation as you since I live in University Campus so no router access, Have no idea how to solve this now.
A viable option is maybe buy your own router then use it as an extender and block all these garbage requests but no idea in extender mode will you be able to block stuff or not.
seated_singer said:
Thanks for posting this, with my pixel 4a setting "hostArpOffload" to 0 solved it. NETLINK wakelok are much less and no battery drain.
Although on onePlus 7 pro which I've rooted few days ago none of this is working and NETLINK wakelok is draining battery at 2-3% per hr.
I'll try flashing a different ROM and If found any fix will post it here.
Device1 : Pixel 4a | LineageOS 18.1 | microG
Device2 : OnePlus 7pro | LineageOS 18.1 | microG
Edit : There are many multicast requests and NETBIOS requests too and looks like NETBIOS requests are coming from all the windows machines which are connected via Access point.
Edit:
Tried packet capture and Router is just flooding network with Multicast and ARP traffic.
I'm in the same situation as you since I live in University Campus so no router access, Have no idea how to solve this now.
A viable option is maybe buy your own router then use it as an extender and block all these garbage requests but no idea in extender mode will you be able to block stuff or not.
Click to expand...
Click to collapse
OP 7 pro is the device you mentioned? I think it has custom kernels with bult in wakelock blockers that automatically blocks wlan, netlink and qcom rx.
Edit: Netlink can be blocked by using Custom kernel others wakelocks are due to ARP network flood. Turning it off from WCNSS_qcom_cfg or blocking introduces another problem of few seconds delay in connection ( due to ARP Resolving issue ) when switching from one access point to another ( only when automatic ) and since I do it quite often when roaming my University campus it's a hassle.
One way to mitigate this ( if you need to keep ARP offloading off ) is by using static IP, worked for me and my roommate too, but not viable since you need root. Finally I have set up my own router, checked and there were no wakelock.
Few of my friends are also facing this battery drain issue not on all Access points but some maybe after complaining authority will fix this.
Note : Netlink is only showing on Android 11/12 with other versions there are other wakelocks.
seated_singer said:
Netlink can't be blocked nor does it show since It's a part of kernel itself, here now about other two they are due to ARP network flood. Turning it off from WCNSS_qcom_cfg or blocking introduces another problem of few seconds delay in connection ( due to ARP Resolving issue ) when switching from one access point to another ( only when automatic ) and since I do it quite often when roaming my University campus it's a hassle.
One way to mitigate this ( if you need to keep ARP offloading off ) is by using static IP, worked for me and my roommate too, but not viable since you need root. Finally I have set up my own router, checked and there were no wakelock.
Few of my friends are also facing this battery drain issue not on all Access points but some maybe after complaining authority will fix this.
Note : Netlink is only showing on Android 11/12 with other versions there are other wakelocks.
Click to expand...
Click to collapse
I have NetLink blocked from kernel.
Some of this problems are impossible to fix from phone. So I contacted school management. They didn't believe me at first then I went to the head office and showed them with Network Log app that records every single packet.
A week later they fixed it. Contact your authority and see if it helps.
Thanks for the info mate, edited. Never thought I have to deal with this stupid WiFi problem.
RyanCr7 said:
Two weeks felt like two years when my phone suddenly started acting odd. High CPU usage, 2x battery drain compared to before, phone heating up while doing simple tasks drove me insane. I thought there might be something wrong with the phone but couldn't find anything so I sent it to the customer service center. All they did was factory reset, installed the latest stock OS, and sent it back which didn't solve my issue.
Thank you for reading. Have a good day!
Click to expand...
Click to collapse
Thanks for sharing, same thing happened to me..
Reading this post and turning off Multicast on both my wifi APs worked!
Just wanted to say that following this advice with all the Offload parameters, my wifi wakelocks have pretty much vanished so far on my nexus 4, i was getting something like 14000 wakelocks in battery guru. Thank you.
I can't understand why they don't specify what commands work for what Qualcomm chipset, since even though that is a newer phone, they still work on an older WiFi chipset, I've been mixing and matching for years.
KitsuneFoxy said:
Just wanted to say that following this advice with all the Offload parameters, my wifi wakelocks have pretty much vanished so far on my nexus 4, i was getting something like 14000 wakelocks in battery guru. Thank you.
I can't understand why they don't specify what commands work for what Qualcomm chipset, since even though that is a newer phone, they still work on an older WiFi chipset, I've been mixing and matching for years.
Click to expand...
Click to collapse
I'm glad it worked for you.

Question Fix wifi

been having trouble with wifi after updating to 12
this is my second device, first device was on android 11 worked great, wifi hadd to return it because the sim tray broke while under warranty as i tried to insert sim card,
have had 2nd device for about 6 months now and updated software right away , thats when i noticed changes on my wifi . from low signal to wifi disconnecting and displaying a messege that reads,,,, connect when signal is stronger or not connected
any help is apprecited
anyone?
I'm not sure if it is any different since the update but this phone has given me problems for over a year with wifi and devices. I even made a forum post regarding the components/hardware of this phone and it being cheap. People told me "it was the same" as many other phones and it was fine.
I connect to a 360 camera (the camera is the WAP) for work and this phone always has problems with range. My older phone, a Moto Z2 worked just fine. I have came to the conclusion that the 2.4ghz band on this phone sucks. It has no range or weak signal. My internet is 330mbps but if I am standing 5 feet from my router doing a speed test, it is 60mbps with this phone. Phone is also slow, no faster than my much older Moto Z2 I got in 2018. I can't wait to replace it soon.
ospfrat said:
connect when signal is stronger or not connected
Click to expand...
Click to collapse
Given Occam's Razor, my first suggestion is for you to determine if the signal is, indeed, needing to be stronger or not connected... and whether or not there is strong interference nearby.
Those are the first things ANYONE would do, so they're not specific to your problem other than you NEED to do them first, just as anyone would need to do them first - before blaming the phone.
To run that first basic test, the first suggestion always is for you to run a local Wi-Fi survey using any Wi-Fi Analyzer to assess the received signal strength.
For example...
Cellular-Z by JerseyHo
Free, ad free, gsf free, rated 4.0/1.82K reviews @ 100K Downloads
<https://play.google.com/store/apps/details?id=make.more.r2d2.cellular_z>
... and, maybe even set up a snitch in the USB Debugging options (either method will tell you the received signal strength).
Android 12 Settings > Developer options > Networking >
Enable Wi-Fi Verbose Logging = on
In my case, that verbose logging says, for each SSID I'm connected to, something like the following (reading from my phone just now):
mySSID_nomap
Connected
Autoreconnect turned off
f = 2432 DE:AD:BE:EF:CA:FE
standard = 4 rssi = -33 score = 60 tx=2.0
If you put two similar phones side by side, the interference and signal strength readings should be the same, and if they're not, that would be a useful clue in the direction that you seek answers for.

Categories

Resources