Some of Our Favorite Features in Android 5.0 Lollipop

Android 5.0 Lollipop is the latest major revision to Google’s mobile operating … more

Sony SmartEyeglass SDK Developer Preview Released

A little over a month ago in Tokyo, Japan, Sony unveiled its new SmartEyeglasstechnology. … more

XDA and Leaseweb: Server Trial/Moto 360 Contest (Winners!)

About a month ago, we held a contest along with XDA’s host, Leaseweb, to … more

Updated Android Lollipop Preview Images – XDA TV

The Android Lollipop Preview Images are now available! That and much more news is … more
Post Reply

Puzzle this: wlan_rx_wake wakelock on SGSII - a collection

OP damnation333

4th February 2013, 06:34 PM   |  #1  
OP Senior Member
Thanks Meter: 68
 
195 posts
Join Date:Joined: Jun 2012
More
Hey guys,

I have been reading around the wlan_rx_wakelock since days now since I cannot get rid of this battery drain and just wanted to collect all the information out there and the solutions that worked for some people.
If you put your phone into airplane mode or just simply turn off WiFi you will see in better battery stats that the wlan_rx_wake wakelock will vanish and a deleted_wakelocks will turn up with a similar up time and battery drain percentage.

Some people wake up with a drained phone in the morning, some have a horrendous battery drain when in work on the work/school/university WiFi. Some people have found solutions, but for most it could be tracked back to a certain WiFi network. The wakelock doesn't appear when signed in on the home WiFi, but is present when at work. This shows it is not a problem of the phone itself, but the WIFI AP is the cause.

This is the basic information from the BBS thread here:

Quote:

wlan_rx

Author(s): sven, credits to Entropy512 @xda-dev
Ranking: n/a
Speaking Name: wlan_rx
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.
Known conditions of occurence:
Related wakelocks: wlan_wake References:


Quote:

wlan_wake

Author(s): sven, credits to Entropy512 @xda-dev
Ranking: n/a
Speaking Name: wlan_wake
Rationale: wifi chip woke the CPU (Usually this fires and leads to a wlan_rx wakelock).
Know actions: Use a sniffer to determine the cause of the traffic.
Known conditions of occurence:
Related wakelocks: wlan_rx References:

To investigate what traffic is causing the constant wifi usage you can use Shark or Network Log to get a better resolution of the actual network traffic (source):
1. Shark for Android - Capture the packets with this. Use wireshark on your PC/MAC to read the captures.
2. Network Log (also in play store) : Will help identify which applications are using your network, on a per packet basis. Note, this is a higher level capture than Shark for Android. (As in, shark will capture every packet that hits the interface. Network log will not.)


Solutions:
  • 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 (source)
  • 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
  • try different kernels: see below

Apps that have been demonstrated to cause the wakelock:
  • Dropbox (October 2012)

Several people have been able to get rid of this problem by using a different kernel:
If your wlan_rx wakelock is caused by the IPv6 problem then switching to Dorimanx 7.4x kernel will get rid of this problem as this kernel disables IPv6 for you.

People with Galaxy Nexus phones got rid of the problem by using the CMplusTuna kernel, which is not available for SGS2 unfortunately.
Another user got rid of the problem using "lean kernel" available for GNex and SGSIII.

i9300 users might get rid of it by using the Perseus Kernel "It's caused by the OS enabling some unwanted network filters, I disabled this now in Perseus 26.1 and it should also remove all drain." Source: here
Following up on network filtering and multicast I found this code project which seems to be merged into CM10.1:
Quote:

bcmdhd: Change packet filter settings to block multicast


A common complaint of users is that battery life on wifi
is very poor, with frequent wlan_rx_wake wakelocks.

It turns out Samsung "opened up" the packet filter
settings from Gingerbread to ICS.

This makes them match the tuna configuration, minus
the filter to allow mDNS through (which lets a bunch
of other stuff through too.)

The original patch reverted to Gingerbread settings,
but it seems like the filter definitions changed
from GB to ICS.

(Source: here)


Several users reported that they only have this problem in their work/school/university network. Many users mentioned a network called "eduroam" which is a worldwide network in universities besides the local network (which normally uses the same equipment). So it seems the WiFi equipment/settings cause our phones to be constantly awake. And many report they don't have good 3G reception in these kind of buildings, so they can't just go without WiFi sadly. I can confirm this as I only have the battery drain here in my university.

Also a very interesting in the common Networking forum: http://forum.xda-developers.com/show....php?t=1738171

Kernel's I have tried without any luck:

Siyah 5.0.1
Dorimanx:7.44
Fluxi kernel: http://fluxi.xda-hosting.de/download...X.03-beta1.zip
N.E.A.K kernel: 2.1.2x http://forum.xda-developers.com/show....php?t=1576355
Shun Andromeda: 2-2-7
Dream Kernel: 2.7.5
Abyss Kernel: 2.0 F4

Maybe something is hidden in those Nexus kernels that would also work for the SGSII. Unfortunately I haven't got a clue about coding, so I am hoping that if we help together we find a solution.

Thanks for any input.

damnation333
Last edited by damnation333; 3rd June 2014 at 11:53 AM.
The Following 3 Users Say Thank You to damnation333 For This Useful Post: [ View ]
4th February 2013, 07:25 PM   |  #2  
Senior Member
Thanks Meter: 1,770
 
5,272 posts
Join Date:Joined: Dec 2012
Re: Puzzle this: wlan_rx_wake wakelock on SGSII - a collection
GB was wifi-awesome, ICS & JB came with that devious wlan wakelock.

Sent from the little guy
Last edited by gastonw; 4th February 2013 at 07:28 PM.
5th February 2013, 11:21 AM   |  #3  
OP Senior Member
Thanks Meter: 68
 
195 posts
Join Date:Joined: Jun 2012
More
Yeah. JB seems to have it, too. Installed CM10.1 to get rid of it, but same problem unfortunately.
23rd May 2013, 09:53 AM   |  #4  
Senior Member
Borlänge
Thanks Meter: 29
 
585 posts
Join Date:Joined: Dec 2009
More
I have the same problem on both my tablet (TF300) and Samsung Galaxy S2.

When WiFi was enabled on my tablet and policy set to "Keep WiFi on during sleep = always) the battery went from 100% to 40 in 8 hours.

The next day I disabled WiFi completely and let the tablet be for 8 hours again, when I got home I still had 99%

Today I'm trying with WiFi enabled but WiFi-policy set to Never instead.

The reason why I've always used always as policy is that I read somewhere (could be a year maybe) that the battery would last longer with that setting. But that doesn't seem to apply to jellybean as it did with ICS.

Sorry for rambling.

I've tried disabling IPv6 and updated my router firmware as well, I'll get back with results later.

Cheers!
23rd May 2013, 10:00 AM   |  #5  
Senior Member
Thanks Meter: 1,770
 
5,272 posts
Join Date:Joined: Dec 2012
Yeah, it seems to respond better to static IP config than dynamic IP.
F&%@ing wifi eats my battery alive.


Sent from the little guy
27th May 2013, 02:50 PM   |  #6  
Member
Thanks Meter: 8
 
31 posts
Join Date:Joined: Feb 2011
More
So i've had the same problem where my galaxy s3's battery has just gone to 0 in ~10 hours and i finally found the fix for it, this is what's causing it for me and might be what's causing it for you to, anyhow i'm gonna go step by step with what i did to find the culprit.

I downloaded an app called Network Log and let it log some of my traffic, i quickly found that packets where beeing sent by 192.168.1.74 wich is not any android device but my main computer and there i found the source of the problem, i was then searching around and stumbled across this post, http://forum.xda-developers.com/show...mp;postcount=3

I found this line in the post,

Quote:

Q: Wakelocks "wlan_rx_wake" wake up my device constantly what I can do about it?
A: The problem is neither Android nor the kernel, but the router and the (Windows7) network. In the network properties, uncheck "IPv6", disable the service "IP Helper", "Shell Hardware Detection" and "Windows Media Player Network Sharing Service", which provide ongoing Traffic. Then they scored again 98% of deep sleep.

and i decided to look in to it, i started the "run" command in windows and wrote "services.msc" wich then boots up you services that's started by windows, after that it's pretty simple.

Find the line called Ip Helper and stop it after that right click it and chose properties and decided the start method as inactive, after that look up the "Windows Media Player Network Sharing Service" and do the exact same thing there, this actually fixed it, my computer for some reason got stuck on sending useless packets over the network and was sending it to my galaxy s3 along with my mothers galaxy note 10.1 (no other android devices where seeing this thou for some reason) and after setting those 2 to disable i now have had my phone at 99% battery for over an hour with wifi active.

I do hope this helps and i'm gonna post this in the other wifi_rx_wake posts i can find.
5th June 2013, 12:42 PM   |  #7  
OP Senior Member
Thanks Meter: 68
 
195 posts
Join Date:Joined: Jun 2012
More
Quote:
Originally Posted by Zlappy

So i've had the same problem where my galaxy s3's battery has just gone to 0 in ~10 hours and i finally found the fix for it, this is what's causing it for me and might be what's causing it for you to, anyhow i'm gonna go step by step with what i did to find the culprit.

...

I do hope this helps and i'm gonna post this in the other wifi_rx_wake posts i can find.

Hey,

Thanks for your input. I had read that before, but unfortunately this problem only occurs for me (and many others) in work/university. So I wonder if there is a way just to block the requests on our phones rather than turning off these services on the computers.

Damnation333
6th June 2013, 07:54 PM   |  #8  
Senior Member
Thanks Meter: 1,770
 
5,272 posts
Join Date:Joined: Dec 2012
It's an IP conflict, dynamic IP will drain your battery faster than Static.

Sent from the little guy
9th June 2013, 07:29 PM   |  #9  
Member
Thanks Meter: 8
 
31 posts
Join Date:Joined: Feb 2011
More
That's where i belive you're wrong, i have static ips on all my machines in my home so an ip conflict i highly doubt. As i said in my previous post, it shows that it's a specific ip that's sending packets to my phone constantly.
@damnation333 i can't really answer that i'm afraid, however you should be able to look up the ip and ask your ip department of the school/university if they could have a talk with the owner of the ip Network log does show what ip it is that's sending the packets .
15th June 2013, 06:40 PM   |  #10  
Junior Member
Thanks Meter: 2
 
18 posts
Join Date:Joined: May 2013
Quote:
Originally Posted by damnation333

Hey,

Thanks for your input. I had read that before, but unfortunately this problem only occurs for me (and many others) in work/university. So I wonder if there is a way just to block the requests on our phones rather than turning off these services on the computers.

Damnation333

Turning off the 5 GHz band on wifi fixed the problem for me.

I really hope that someone can find a more permanent solution so I can still connect to 5 GHz bands

Post Reply Subscribe to Thread
Previous Thread Next Thread