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

Search This thread

RyanCr7

Senior Member
Aug 3, 2018
146
106
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!
 

Attachments

  • Screenshot_20210517-061117-picsay.png
    Screenshot_20210517-061117-picsay.png
    258.2 KB · Views: 258
Last edited:
May 13, 2019
17
7
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.
 
  • Like
Reactions: RyanCr7

Mario3DS

Member
Jul 25, 2013
27
2
Thanks for this, my device was also affected by this (though not as badly as yours) I've just disabled Multicast from my router.
 
  • Like
Reactions: RyanCr7

RyanCr7

Senior Member
Aug 3, 2018
146
106
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.
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?
 

Attachments

  • Screenshot_20210522-090458.png
    Screenshot_20210522-090458.png
    134.6 KB · Views: 84
  • Screenshot_20210522-090618.png
    Screenshot_20210522-090618.png
    134.7 KB · Views: 83
May 13, 2019
17
7
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?
 
  • Love
Reactions: RyanCr7

RyanCr7

Senior Member
Aug 3, 2018
146
106
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?
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.
 
Last edited:

RyanCr7

Senior Member
Aug 3, 2018
146
106
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?
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
 
May 13, 2019
17
7
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.
 
  • Like
Reactions: RyanCr7

seated_singer

Senior Member
Sep 13, 2016
70
6
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.
 

Attachments

  • signal-2021-08-12-181305.png
    signal-2021-08-12-181305.png
    183.4 KB · Views: 59
  • Screenshot 2021-08-13 163832.png
    Screenshot 2021-08-13 163832.png
    89.9 KB · Views: 53
  • Screenshot 2021-08-13 163515.png
    Screenshot 2021-08-13 163515.png
    75.7 KB · Views: 54
Last edited:

RyanCr7

Senior Member
Aug 3, 2018
146
106
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.
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.
 

seated_singer

Senior Member
Sep 13, 2016
70
6
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.
 
Last edited:
  • Like
Reactions: RyanCr7

RyanCr7

Senior Member
Aug 3, 2018
146
106
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.
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.
 

Attachments

  • Screenshot_20210818-033609.png
    Screenshot_20210818-033609.png
    74.7 KB · Views: 47
  • Screenshot_20210818-033613.png
    Screenshot_20210818-033613.png
    95 KB · Views: 47
  • Screenshot_20210818-033852.png
    Screenshot_20210818-033852.png
    520.6 KB · Views: 48
  • Like
Reactions: seated_singer

ugene1980

Senior Member
Dec 18, 2012
140
160
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!


Thanks for sharing, same thing happened to me..

Reading this post and turning off Multicast on both my wifi APs worked!
 
  • Love
Reactions: RyanCr7

KitsuneFoxy

Senior Member
Dec 14, 2014
160
15
Leicester
Google Nexus 4
HTC Desire C
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.
 
  • Love
Reactions: RyanCr7

RyanCr7

Senior Member
Aug 3, 2018
146
106
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.
I'm glad it worked for you.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    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!
    1
    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.
    1
    Thanks for this, my device was also affected by this (though not as badly as yours) I've just disabled Multicast from my router.
    1
    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?
    1
    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.