[Q] wlan_rx_wake keeps device awake! - Asus Transformer TF700

Dear all,
I have been noticing the last few days (since I did a wipe + factory reset) that my TF700 (running latest JB) is draining ~3% of battery/h when completely idle (almost as much as my phone, which is on 3G and wifi!) when connected to Wifi. After installing Better Battery Stats, I see they report 90% of kernel wake lock time due to "wlan_rx_wake", which is not normal.This is (I think) consistent with the fact that I always see the arrows of "download" and "upload" blinking on top of the wifi icon...
I've googled around and it looks like a problem with dynamic IP and Ipv6, but I am worried that an app is actually doing this, because when I first got the tablet (a couple of weeks ago) this was not happening. However, I was getting 2 random reboots per day and I suspected that disabling the ASUS apps was causing it, so I did a complete wipe and I flashed the firmware. I think this problem started since then, but I cannot be 100% sure.
I've tried to check if there is any application that is actually using up the network, but the data usage seems reasonable (just a few KB for the system)...
Is anybody else experiencing this? Any proposed hints/solutions/workarounds?
Thanks!

DjKarras said:
Dear all,
I have been noticing the last few days (since I did a wipe + factory reset) that my TF700 (running latest JB) is draining ~3% of battery/h when completely idle (almost as much as my phone, which is on 3G and wifi!) when connected to Wifi. After installing Better Battery Stats, I see they report 90% of kernel wake lock time due to "wlan_rx_wake", which is not normal.This is (I think) consistent with the fact that I always see the arrows of "download" and "upload" blinking on top of the wifi icon...
I've googled around and it looks like a problem with dynamic IP and Ipv6, but I am worried that an app is actually doing this, because when I first got the tablet (a couple of weeks ago) this was not happening. However, I was getting 2 random reboots per day and I suspected that disabling the ASUS apps was causing it, so I did a complete wipe and I flashed the firmware. I think this problem started since then, but I cannot be 100% sure.
I've tried to check if there is any application that is actually using up the network, but the data usage seems reasonable (just a few KB for the system)...
Is anybody else experiencing this? Any proposed hints/solutions/workarounds?
Thanks!
Click to expand...
Click to collapse
You might try to disable some of the the ASUS bloatware, maybe one by one, to see if it isn't one of them causing the wakelock.

okantomi said:
You might try to disable some of the the ASUS bloatware, maybe one by one, to see if it isn't one of them causing the wakelock.
Click to expand...
Click to collapse
Thanks! OK, I'll try this... Maybe I just root and remove the bloatware...

DjKarras said:
Thanks! OK, I'll try this... Maybe I just root and remove the bloatware...
Click to expand...
Click to collapse
So, one update: at home, where I have a wifi with WPA2-PSK, the wlan_rx_wake goes down to 1% (as per BBS), so now the tablet is at a little less than 1%/hour, which is something more reasonable.
At work, where we have an enterprise network with TTLS authentication and so on, the wlan_rx_wake is around 70-80%. It then looks to be related to this, maybe: http://code.google.com/p/android/issues/detail?id=29804
I'll try to post a logcat tomorrow, will it be useful?

Yes, thanks for the update, and for looking into this. I hope there will be a fix now that the issue has been identified.

okantomi said:
Yes, thanks for the update, and for looking into this. I hope there will be a fix now that the issue has been identified.
Click to expand...
Click to collapse
So I'm JB and my tablet is still not rooted. That means no logcat access I'll need to wait until the weekend, I will root the tablet and then on Monday I do a test at work. BTW, I confirm that with the work network I get ~3% batt/hour with 90% wlan_rx_wake...

DjKarras said:
So I'm JB and my tablet is still not rooted. That means no logcat access I'll need to wait until the weekend, I will root the tablet and then on Monday I do a test at work. BTW, I confirm that with the work network I get ~3% batt/hour with 90% wlan_rx_wake...
Click to expand...
Click to collapse
So I did further tests, and I see that the AlarmManager is scheduling a lot of wake ups, for example
Code:
12-07 11:52:18.444 D/AlarmManager( 412): Triggered Alarm 414a0c90 ELAPSED_REALTIME_WAKEUP IntentSender{419d1c18: PendingIntentRecord{41a69780 android broadcastIntent}}
12-07 11:52:19.174 D/AlarmManager( 412): Added alarm Alarm{41b34b20 type 2 android} type:ELAPSED_REALTIME_WAKEUP when: After 0h:14m:24.0s
12-07 11:52:19.214 D/WifiNative-p2p0( 412): SetWifiConnected false
12-07 11:52:19.214 I/WifiStateBroadcastReceiver(11952): connecting or connected to Wifi
12-07 11:52:19.224 D/WifiNative-p2p0( 412): SetWifiConnected true
12-07 11:52:19.224 D/ConnectivityService( 412): ConnectivityChange for WIFI: CONNECTED/CONNECTED
I see a lot of these SetWifiConnected false... I attach the full log for a couple of hours. Anything suspicious?
Thanks!

DjKarras said:
So I did further tests, and I see that the AlarmManager is scheduling a lot of wake ups, for example
Code:
12-07 11:52:18.444 D/AlarmManager( 412): Triggered Alarm 414a0c90 ELAPSED_REALTIME_WAKEUP IntentSender{419d1c18: PendingIntentRecord{41a69780 android broadcastIntent}}
12-07 11:52:19.174 D/AlarmManager( 412): Added alarm Alarm{41b34b20 type 2 android} type:ELAPSED_REALTIME_WAKEUP when: After 0h:14m:24.0s
12-07 11:52:19.214 D/WifiNative-p2p0( 412): SetWifiConnected false
12-07 11:52:19.214 I/WifiStateBroadcastReceiver(11952): connecting or connected to Wifi
12-07 11:52:19.224 D/WifiNative-p2p0( 412): SetWifiConnected true
12-07 11:52:19.224 D/ConnectivityService( 412): ConnectivityChange for WIFI: CONNECTED/CONNECTED
I see a lot of these SetWifiConnected false... I attach the full log for a couple of hours. Anything suspicious?
Thanks!
Click to expand...
Click to collapse
Hi,
a further update on the matter. I used Shark to capture traffic incoming to the tablet, and I see that mainly there are som DHCPv6Client SOLICIT requests. It looks like IPv6 is not being treated well by the tablet (or maybe it's the routers?). I attach the pcap file from Shark, and I would like to ask for your advice on how to go further towards solving the problem. Is there somebody in the forum that can help with this problem? Can I disable IPv6 (I have not been able to find where)? Is there any further debugging I can do?
Many thanks,
Albert

I have the same problem. Google maps causes it for me. I run on clemsyn and cleanrom and stock before. I did factory reset, full wipe, new google accounts etc. Nothing helps.
The tablet consumes the dock and tablet battery in about 2 days of very very mild usage.
I have to know how to stop it.
I even applied all the battery save options and disable the automatic sync. The problem was before and with the new rom, but only appeared last week.

usern ameisval idandnot said:
I have the same problem. Google maps causes it for me.
I have to know how to stop it.
Click to expand...
Click to collapse
Easy. Just disable Google Maps. I did, when it kept reappearing in my running apps list on its own.

But I need it so much

usern ameisval idandnot said:
But I need it so much
Click to expand...
Click to collapse
I find Gmaps pretty useless, as you need a constant Inet connection . Pretty much only use Navfree these days. If I need satimagery, I use Google Earth or the Maps website. And paper maps
Try checking if 'Google Location Service" is enabled under settings --> Location Services. I can't check the maps app (obviously ) but there might also be a similar setting there. (There was a bug with it, that much I do remember. One where it remained on and kept eating battery, even with Maps not running. May very well be the same thing.)

I will test if that helps. Until then I will drop some bread on the streets to find my way back.

@ ShadowLea
It worked. Google maps still uses 80% of all apps but it just used 3% of the battery in 24h.
Thanks

However, I don't thing this has anything to be with the original post, hasn't it? It looks like a different issue...

DjKarras said:
However, I don't thing this has anything to be with the original post, hasn't it? It looks like a different issue...
Click to expand...
Click to collapse
Don't know. Have you checked it? From the name of the process i'd say something is keeping the wifi awake, and that's exactly what location service does.
Might also be the 'keep WiFi during sleep" setting.

It doesn't say so it battery usage (it's just keep awake, no app is waking the tablet up) and Battery Plus tells me it's a Kernel Wakelock. In addition, this only happens on certain wireless network. I think some packets on the network are keeping the tablet to sleep for a long time, and there are similar reports around.
I think I have been able to isolate the issue quite well with the Shark sniffer, but I just don't know how to follow further

Related

Occasional initial long pause accessing internet

If I run an app that accesses the internet after the phone has been idle for a while it frequently just sits there spinning for 15-30 sec or so before it starts downloading. The download speed itself is quite fast. This initial pause happens with many apps. Once it's working ok things are snappy until it sits idle again for a while. I have it set for never disconnect from wifi, and I'm using a fixed IP address (had it set for DHCP previously and no difference). I have no problems with the 3 computers running on the same router, and my ISP connection speed is very good. I have 4 bars on the wifi strength icon, and little if any death grip issue. Running pure stock, not even rooted.
Anyone else seen this or have any ideas what would cause it?
Edit: Fixed by setting phone and router DNS to Google servers (8.8.8.8 and 8.8.4.4)
Yeah I got too. I just turn data off and on again, that always do the trick.
Tried that trick and it did help, so good to know. But still an annoying bug and hassle to exit app, toggle wifi, and restart app. I guess it gives me something to do instead of just staring at the paused screen.
Hehe, but it will wear off. Mine is kinds stopped right now
So, is this happening to everyone or just a small percentage? Asking because the answer could determine if it's something on my phone or router I need to change, versus a HTC/Android bug. I've submitted a HTC bug report, but from past experience their tech support is less than worthless.
I used set dns from the market and opted for the google servier settings.
I used this app because I was getting pauses when loading up the market. Using the above app pretty much solves the delay issue for me.
kpjimmy said:
I used set dns from the market and opted for the google servier settings.
I used this app because I was getting pauses when loading up the market. Using the above app pretty much solves the delay issue for me.
Click to expand...
Click to collapse
Is Set DNS different than manually setting it under the wifi advanced settings? I have set mine manually to Google DNS and so far it's working better, but will take some time to see if it lasts. I'll update either way.
Thanks for the tip.
Update:
Setting DNS to Google DNS didn't solve the problem. Still getting very long pause on initial internet access after sitting idle for 15 minutes or so. Toggling wifi off/on does fix it, but that should not be necessary.
Is this common or rare? Really would like to know if it's a known phone bug, or my specific phone/router/ISP.
Based on so few responses I concluded it must be something in my setup. Ended up changing both the phone and my router's DNS to Google (8.8.8.8 and 8.8.4.4), which appears to have solved the problem. Oddly setting just the phone's DNS didn't fix it, it took changing the router as well. Also, it's not clear to me why toggling the wifi on the phone resolved the pause issue temporarily each time if the DNS server being used was the issue. But, if it's fixed I'll take it.
Thanks for the advice that did end up leading to a solution.

Wakelock called bam_dmux_wakelock

Hello there, this is almost my first post around here (I hope the first one in the right place)
I had heavy battery draining a couple of days ago and they went away after wipe data and cache. Now I have reinstalled everything I had, I looking to solve an issue that also have before wipes related to battery draining. In BetterBatteryStats shows a wakelock called bam_dmux_wakelock that wakes my phone one time per two seconds. It only appears when phone is using mobile network for the internet (I mean, the way I could make a call and surf the internet only if I'm using wifi).
I've been writing a thread on reddit the last days about that.
The post it's on the MotoG subreddit and it's called "Any solution to idle battery draining?" (I would post the url, but I'm not still able)
Here is a copy of the (I think) more relevant part:
I found some things about the wakelock bam_dmux_wakelock that means nothing to me, but maybe somebody could tell me more about them.
I think is related to Qualcomm hardware, because if you browse to the MotoG kernel you'll found the next folder: kernel/arch/arm/mach-msm, and a fast look for around the web shows that is qualcomm related.
Inside that folder there is two files: bam_dmux.c and inside include folder bam_dmux.h Another file called bam_dmux.txt is in kernel/Documentation/devicetree/bindings/arm/msm, but it isn't in the online kernel repository: link
The content of that file is the following:
Qualcomm BAM Data Multiplexer Driver
Required properties: - compatible : should be "qcom,bam_dmux" - reg : the location and size of the BAM hardware - interrupts : the BAM hardware to apps processor interrupt line
Optional properties: -qcom,satellite-mode: the hardware needs to be configured in satellite mode -qcom,rx-ring-size: the size of the receive ring buffer pool, default is 32
Example:
qcom,[email protected] {
compatible = "qcom,bam_dmux";
reg = <0xfc834000 0x7000>;
interrupts = <0 29 1>;
qcom,satellite-mode;
qcom,rx-ring-size = <64>;
};
BAM seems to mean Bus Access Manager, and of course I don't have a clue about what that means.
In addition I look for files on my MotoG with the string bam_dmux in its name, and two folders came out: /d/bam_dmux and /d/ipc_loggin/bam_dmux In the first one there is three files: * stats * tbl * ul_pkt_cnt
In the second one there is only one file where it keeps the log_cont.
Click to expand...
Click to collapse
In the post in reddit theres links to the log and others contents.
Any idea how could I stop that? Thank you in advance.
P.d.: sorry for my english, maybe there is some glitch in the post
You probably have an app that is causing this. I would factory reset and install one app at a time until I found the one causing the problem. Then just uninstall that app.
For example I found the BBC weather app caused a wakelock which showed up in 'android OS'. Took a while for me to figure out which app caused it.
Does wakelock detector show any user apps with high wakeup triggers. If so you may find one of them is the cause.
Broadband Access Multiplexor.
There's another thread on XDA (going back a year or two) trying to diagnose causes for high incidence of this wakelock, which came to the conclusion it is caused by some other app trying to keep a mobile data server connection open. Your pattern of repeated every couple of seconds wakelock suggests something is trying to sync / ping a server and is failing to do so, but won't give up.
A look at what is showing up as using a lot of mobile date might help in diagnosing the problem app, and also checking what your sync settings are. Try disabling autosync for a while to see if it continues to show up.
Google+ auto backup of photos is something I would expect to cause a high incidence of this wakelock if you you the camera regularly.
Well, it looks like k9-mail and telegram were eating muy battery.
Thank you!
elfio said:
Well, it looks like k9-mail and telegram were eating muy battery.
Thank you!
Click to expand...
Click to collapse
Have been using K9 as well on my XT1032 but I did not have battery drain.
So I can not confirm that K9 will be causing this.
Or did you maybe have setup in your configuration that K9 had to check your mail every 5 minutes.
I had two accounts with IMAP push and refresh idle conection every 60 minutes, and another three with IMAP but without push and check every 6 hours or so.
Now I only have one of the two first ones and draining have decreased, but still there is a bit.
I'm using mainly WiFi (no wakelocks) since right now have a lot of work and I cannot spend enough time with this.
Mickeyvdb said:
Have been using K9 as well on my XT1032 but I did not have battery drain.
So I can not confirm that K9 will be causing this.
Or did you maybe have setup in your configuration that K9 had to check your mail every 5 minutes.
Click to expand...
Click to collapse
I've reconfigured all my accounts with IMAP, two of them with push and anotherone with sync every 24 hours . Now I'll check if still is making some wakelocks. Also I've switched the telegram client: from unofficial to the official one.
I hope it solves my issue with K9 because I really love that email client.
Let's see
Any idea why the wakelock only appears using mobile data and no wifi?
elfio said:
Any idea why the wakelock only appears using mobile data and no wifi?
Click to expand...
Click to collapse
No but I also have this annoying problem. And I don't have k9 or telegram installed.
@elfio: in your case wakelock is caused by k9 when using data right?
So the only way to find out is to uninstall one app at the time and re-install it and test? I have root is there any more sophisticated method to find out app in question?
frojnd said:
No but I also have this annoying problem. And I don't have k9 or telegram installed.
@elfio: in your case wakelock is caused by k9 when using data right?
So the only way to find out is to uninstall one app at the time and re-install it and test? I have root is there any more sophisticated method to find out app in question?
Click to expand...
Click to collapse
K9-mail is not the only app causing this wakelock, but after I disabled the push imap it the wakelock went down a lot. Now I have a power consume around 0.6~1%/hour with 2G on and screen off. I think this is a great consume, and there is still some wakelock and I don't know wich app it is causing it.
I have no rooted the phone and I don't know how it could be solved this issue. I hope the next update solves it.
Anything I can help you, just tell me
I've uploaded a screenshot of my batterystats after a few hours of normal use. I hope you find it useful.

[Q] Wi-Fi won't stay off

I am quite given up with this issue in my phone; my Wi-Fi connection won't stay off. I want to manually activate/deactivate it, but it seems to have a life of its own.
This is apparently a very recurrent issue among Android phones, but the fix that applies to most doesn't apply to my phone. Most phones come with a Smart Wi-Fi, or in Xperia L's case, Location-based Wi-Fi, which you can disable and hopefully never have Wi-Fi respawn against command again.
In other phones you just have to disable notifications of present Wi-Fi networks, and the Wi-Fi can sleep tight until awoken.
However, I have disabled both modes, and my Wi-Fi still goes back on, no matter what. Can somebody shed some light?
wolterh said:
I am quite given up with this issue in my phone; my Wi-Fi connection won't stay off. I want to manually activate/deactivate it, but it seems to have a life of its own.
This is apparently a very recurrent issue among Android phones, but the fix that applies to most doesn't apply to my phone. Most phones come with a Smart Wi-Fi, or in Xperia L's case, Location-based Wi-Fi, which you can disable and hopefully never have Wi-Fi respawn against command again.
In other phones you just have to disable notifications of present Wi-Fi networks, and the Wi-Fi can sleep tight until awoken.
However, I have disabled both modes, and my Wi-Fi still goes back on, no matter what. Can somebody shed some light?
Click to expand...
Click to collapse
You can try set wifi turn on only when charge throu advance setting in wifi tab..
Or use battery doctor app
faizalotai said:
You can try set wifi turn on only when charge throu advance setting in wifi tab..
Or use battery doctor app
Click to expand...
Click to collapse
I was looking for a fix rather than a workaround, but I will follow up on that Battery Doctor app, it may well relieve my headaches with this meanwhile.
However, how can I get some kind of debug log about the Wi-Fi activity (like events that trigger it on)?
I found a way to access debugging messages and these 3 messages appear on separate occasions but repeatedly:
Code:
Start proc com.sonyericsson.android.locationbasedwifi:service for broadcast com.sonyericsson.android.locationbasedwifi/.LbwBroadcastReceiver
Code:
Process com.sonyericsson.android.locationbasedwifi:service has died
Code:
D/WifiService( 776): setWifiEnabled: true pid=991, uid=10133
These are the only messages with relevant information about the wifi business. And 2 of these 3 seem to mention the "Location Based WiFi" service, which needless to say, was set to OFF in the Power Management Settings. However, this process has been rendered quite rebelious.
So, what I am trying now is to disable the "Location Based WiFi" built-in app from the Apps Settings (after having forcefully stopped it, of course) and waiting on to see if this application is the culprit.
Did you tried to disable (in Settings/Applications) wifi display mirroring and throw settings?
I have kicked off SomcWifiDisplay.apk and problem has gone. Of course my phone is rooted, if yours is not try to disable application in apps list.
id202 said:
Did you tried to disable (in Settings/Applications) wifi display mirroring and throw settings?
I have kicked off SomcWifiDisplay.apk and problem has gone. Of course my phone is rooted, if yours is not try to disable application in apps list.
Click to expand...
Click to collapse
Hmm, my phone is not rooted so that last suggestion is not an option, however I have searched for the mirroring and throw settings in the Apps settings and have only found "Screen mirroring", which I disabled as an application.
The problem seems to have become a lot less present. Yesterday I went almost through the whole day without it occurring once, but just as I plugged in the phone to charge it, the Wi-Fi turned on.
I have posted a similar thread to Sony's own forum, and they're telling me to repair my phone software with the PC Companion. I'm going to see how that goes and I'll report back to the community.
wolterh said:
Hmm, my phone is not rooted so that last suggestion is not an option, however I have searched for the mirroring and throw settings in the Apps settings and have only found "Screen mirroring", which I disabled as an application.
The problem seems to have become a lot less present. Yesterday I went almost through the whole day without it occurring once, but just as I plugged in the phone to charge it, the Wi-Fi turned on.
I have posted a similar thread to Sony's own forum, and they're telling me to repair my phone software with the PC Companion. I'm going to see how that goes and I'll report back to the community.
Click to expand...
Click to collapse
Tried that with repair already and problem in original untouched firmware disappeared for ... 2 days
Try to clear data of Smart connect, looks like misbehaving of Smart Connect (or at least this is less hurting decision).
id202 said:
Tried that with repair already and problem in original untouched firmware disappeared for ... 2 days
Try to clear data of Smart connect, looks like misbehaving of Smart Connect (or at least this is less hurting decision).
Click to expand...
Click to collapse
Up to now I've had the problem virtually disappear; I had disabled the applications Location Based Wi-Fi and Screen Mirroring. Since I did it, my Wi-Fi only turned on once against my will when I connected my phone to the charger *—I didn't sweat it.
I am going to try your solution, and to be honest I'm quite offput by Sony's solution suggestion; I don't even use Windows/Mac plus I'd have to install the PC Companion.
Data cleared. Let's wait and see. :cyclops:
wolterh said:
Up to now I've had the problem virtually disappear; I had disabled the applications Location Based Wi-Fi and Screen Mirroring. Since I did it, my Wi-Fi only turned on once against my will when I connected my phone to the charger *—I didn't sweat it.
I am going to try your solution, and to be honest I'm quite offput by Sony's solution suggestion; I don't even use Windows/Mac plus I'd have to install the PC Companion.
Data cleared. Let's wait and see. :cyclops:
Click to expand...
Click to collapse
I am still hoping that your problem has gone. I do not have any more aces in my pockets beyond this. All my suggestions were based on my previous experiments.
Just clearing the Smart Connect's application data did not work for me. I enabled all Sony applications previously disabled and cleared the data of said application, but the problem returned. I have gone back to my workaround of disabling Location Based WiFi, Screen Mirroring and I have also disabled Smart Connect because these autoconnections have been all but smart.

RILJ wakelock (among others) killing my battery.

Ever since the 5.1 OTA (Or Google Services 7.0.99, I'm not sure), I've been experiencing bad battery life.
I downloaded Better Battery Stats and Wakelock Detector to try to find the culprit and this is what I've found.
- Connected to my wifi at home my Nexus 5 sleeps just fine.
- At work (wifi) I'm having a lot of wlan_rx and wlan_wd wakelocks and high awaken times due to this.
- When on mobile data it all gets worse: I'm getting hundreds of instances of RILJ wakelock in a matter of minutes, and sometimes Gmail often appears first on the list with high wakelock counts and times. Google+ and Keep also make frequent appearances I'm Wakelock Detector
- BBS ALWAYS shows bam_dmux_wakelock as the main culprit and sometimes sensor_ind (on mobile data), but I don't know what to make of that, since WD shows other things (RILJ etc).
Regarding RILJ: almost everything I've found online says that it has something to do with network location and that turning off location history removes it, but I rarely have location services on (GPS or network location) and location history is off anyway. I've tried disabled NetworkLocationService and every other service regarding location using disable service to no avail. It doesn't seem to happen when the phone is in 2G only.
Gmail frequently shows up in WD with high counts and times, I've seen Keep and Google+ in there too, first on lists. I've disabled them both for now.
In the battery stats the activity bars doesn't seem to be all that different from the screen on bars, but both WD and BBS show high awake times (sometimes as high as +20%). This is when on mobile data or connected to the wifi at work (wifi at home is just fine).
I tried downgrading to 5.0.1 (there now), installing Google Services 7.3.29, disabling a bunch of services, but nothing helps.
Google Services shows up as using more energy than anything else, sometimes even more than the screen, but only when mobile data is enable, it doesn't use energy when on wifi. There's no high data traffic as some people is experiencing with 7.X versions. The wlan wakelocks are awful at work though. So there are like several, independent problems.
I'd appreciate any insight on this matter. I don't seem to be the only one experiencing this.
I'm leaving a few screen shots. I'll post BBS screenshot by the end of the day.
Did you solve this? Nobody seems to know what really is RILJ.. If I restrict it to "7200" (2 hours) at Amplify it's safe to receive calls/sms ???
Luckzzz said:
Did you solve this? Nobody seems to know what really is RILJ.. If I restrict it to "7200" (2 hours) at Amplify it's safe to receive calls/sms ???
Click to expand...
Click to collapse
Easy way to find out is to test it. Restrict and then phone/text yourself from another phone. Test periodically until you're comfortable with the results.
I've having troubles with this from some months ago now. It dissapeared at some time, but it's back again.
Anyway, in my case, the problem happen when i'm connected to a WIFI network, with mobile data activated. If I deactivate it, everything is just fine. Don't really know what is causing this, but at least I discovered my problem.
Hope this help someone else.
Cheers

[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.

Categories

Resources