ezterry/manifest-gingerbread-DS

[Bug] Wifi <disabled> battery Drain

Closed this issue · 11 comments

The new 2.6.36.* kernels appear to solve the battery drain however have some other odd drains one of them is a wifi drain:

Steps to reproduce:

  1. enable wifi module (optionally connect to a network)
  2. disable wifi module
  3. if attatched to a power source remove it
  4. put phone to sleep by pressing end

a review of dmesg will indicate that after the wifi module is unloaded the phone will not fall asleep rather rescan mmc0 frequently. (this is part of the wifi interface but the drivers themselves are unloaded [wlan.ko])

My guess is some task was not properly removed with the unload of the module and is confused by the lack of module.

Does it have anything to do with the sleep policy ? if you recall that patch(the somewhat unneeded since was already overwrited by overlays), i know its an issues on Bravo at least, the policy has to be set to never sleep else bye bye miss battery.

No its a kernel/wlan.ko issue

The only issue is unloading wlan.ko and putting the phone to sleep.. If the module was never loaded there is no problem.. if the module is loaded there is no problem.

Of course if you don't update that setting you will disconnect from the wireless network when the screen turns off.. a feature I find very anoying.. but it won't have extra drain.

worth a look.. given it was reverted in the froyo update... and I don't recall an issue on 2635 I don't think any promises can be made.

Since its an older patch just try running 'git cherry-pick 81729159106dea2b' then building

the source might be of some use even so, not many msm-2.6.36 out there to compare

regarding: http://dl.dropbox.com/u/14294263/tiwlan-patch1.patch:
no change.. still causing the mmc relead

http://code.google.com/p/cyanogenmod/issues/detail?id=2189#c26

Are we sure we have found something new at all?

Could a application be responsible ? I have nothing but min Gapps on the device :)

http://dl.dropbox.com/u/14294263/out
this is w/o touching wifi but putting it on sleep with DATA on
(reboot)
http://dl.dropbox.com/u/14294263/log.log

after enable/disable/sleep

Hopefully not a final fix if we are porting the kernel to newer bases.. but for now it seems to get the job done:
ezterry/kernel-biff-testing@0adb127

(What is most annoying is other slightly hackish patches have been done in the past to fix similar issues.. seems the mmc/sdio driver devs don't like suspend.. of course all the newer phones have other chips so there is not much support for the tiwlan chip set these days.. not helpful for problems like this)