Post Reply

[Kernel][GPL] msm_hsic_host wakelock fix (Now with WiFi notification fix!)

OP thracemerin

16th January 2013, 08:44 PM   |  #1  
thracemerin's Avatar
OP Recognized Contributor
Flag Toronto
Thanks Meter: 5,822
 
5,458 posts
Join Date:Joined: Oct 2011
Donate to Me
More
Hi Folks

I have been trying to solve the msm_hsic_host wake lock problem without introducing the data drop/lockup issues that have been introduced into other kernels by adding the patches from code aurora.

Disclaimer: The usual statements apply, I'm not responsible for your device being bricked, ebola outbreaks, nuclear war, etc... resulting from the use of this kernel, flashing this kernel should be done at your own risk, that being said I have been running various variations of this for the last few days without my phone having any issues.

All Versions now in post 2 below.

What's in this release?
4.2.1 versions: Simply the CM stock kernel pulled from their github here: https://github.com/CyanogenMod/lge-kernel-mako with patches from CAF that I cherry-picked in an attempt to fix the msm_hsic_host wake locks without causing 3G data problems.
4.2.2 versions: Stock AOSP pulled from the android-msm-mako-3.4-jb-mr1.1 repo at https://android.googlesource.com/kernel/msm/ with patches from CAF that I cherry-picked in an attempt to fix the msm_hsic_host wake locks without causing 3G data drops.

What do I do if I get a data drop?
Post here, be as detailed as possible, logs would be extremely helpful so I can see what's going on with your device, because these data drops seem to be somewhat random and don't affect everyone it's very difficult to actually reproduce them on another device on another network, as a result the more information you can give me the better.

My WiFi drops while the screen off resulting in delayed notifications!
To be clear, this is not the same issue, the issue with WiFi disconnecting while the screen off seems to be an Android 4.2.1 issue and exists on all kernels and even different devices running Android 4.2.1, this kernel doesn't do anything to address this issue, whether it fixes it or doesn't is entirely independent of the kernel. A potential fix for this is available from this thread: http://forum.xda-developers.com/show....php?t=2072930 Note: It would appear that this hasn't been fixed in 4.2.2 despite Google claiming that it has been, the fixes outlined in that thread still work however. Possible Fix in Post 2

The wakelock is reduced but my battery life is the same or not significantly improved
Well, without these patches the wakelock keeps the phone awake, but if the screen is off and nothing else is going on the kernel is just waiting for the USB bus to suspend so the CPUs are either offline or at their lowest clock speed so they aren't likely using that much power. That being said there should be some improvement in battery life over a 100-0 drain cycle, how much will depend on factors that are mainly not kernel related (time on WiFi, 3G signal strength, apps syncing in the background, etc...).

Wasn't this fixed in 4.2.2? My msm_hsic_host wakelock is way down.
Yes and no, Google took 2 patches that were included in the set I was using on 4.2.1, these two fixes significantly reduced the msm_hsic_host wakelock while on WiFi but not really while on 3G. So, if you use WiFi primarily your msm_hsic_host wakelock will be reduced but if you use your phone primarily on 3G it will continue to be high, though probably lower than it was on the stock 4.2.1 kernel.

Thanks to:
LG - for making such an awesome device
Google - for providing us with the AOSP sources
CyanogenMod - I used their kernel as a base
Code Aurora Forums - for solving the issue
Harsh - for pointing me in the right direction on which CAF patches I was missing
franciscofranco - additional CAF patches that might help
molesarecoming - for the color calibration halfbreed v4 settings.
Koush - the original anykernel format
_motley - the zip file for the anykernel version for N4
jakejm79 - for testing various builds with various patches for me and giving me good feedback
veyka - for testing this build and confirming that he doesn't have data issues with it
socali - for his testing and research on the WiFi delayed notification issue.
Last edited by thracemerin; 11th May 2013 at 12:07 AM.
The Following 68 Users Say Thank You to thracemerin For This Useful Post: [ View ]
16th January 2013, 08:45 PM   |  #2  
thracemerin's Avatar
OP Recognized Contributor
Flag Toronto
Thanks Meter: 5,822
 
5,458 posts
Join Date:Joined: Oct 2011
Donate to Me
More
4.2.2 Version

Experimental WiFi Fix
Confused about all the fixes floating around? Maybe this will help: http://forum.xda-developers.com/show...&postcount=578
Date: April 15, 2013
Download: hsic_fix_nexus4_wlan_v6.zip
MD5: 8ba0f874efc894c8aaa2e115c5fe2438
See here: http://forum.xda-developers.com/show...&postcount=522

Revert Zip: wlan_revert.zip
MD5: 381013687035626bcb1cbaf609ea431
Note: Flash this if you have flashed any of the WiFi fix versions prior to switching to a different kernel.

Stable Version: (anykernel)
Date: March 04, 2013
Download (any kernel): hsic_fix_nexus4_4.2.2v1.zip
MD5: 17127c1ce03ce0489c49ed7377204a6c
Source: https://github.com/thracemerin/Mako (branch: jb-hsic-rel tag: release-v1)

4.2.1 Version (anykernel)
Date: Feb 04, 2013
Download (any kernel): https://hotfile.com/dl/192620778/4b1...s4_v2.zip.html
MD5: 22be4821f3c16087a04a8084cc0d5703
Source: https://github.com/thracemerin/lge-kernel-mako
Last edited by thracemerin; 19th April 2013 at 02:12 AM.
The Following 25 Users Say Thank You to thracemerin For This Useful Post: [ View ]
16th January 2013, 10:30 PM   |  #3  
spncrmoo's Avatar
Senior Member
Flag Skipton
Thanks Meter: 71
 
115 posts
Join Date:Joined: Nov 2010
Donate to Me
More
Fingers crossed for this, will be testing tomorrow!
16th January 2013, 10:49 PM   |  #4  
veyka's Avatar
Retired Forum Moderator
Flag Norfolk
Thanks Meter: 2,686
 
5,600 posts
Join Date:Joined: Oct 2007
More
With this test kernel I got 11min of hsic wakelock in 11h, which is very simular to what I get on harsh's kernel. (when I was trying it out last night)

I also had no data stuck issue, where as on previous attempts I was always able to reproduce the problem within a few min!

Just to be clear, these patches reduce the hsic wakelock by a lot, while preventing the issue where data would get "stuck", signal would show, but nothing would go in or out.

Edit: as well as fixing the hsic issue, these patches should also reduce power consumption while on mobile data, a general win/win.

Sods law states that the moment we truly have this under control, google will push 4.2.2 with all these fixes anyway

Thanks a lot for bothering todo this!

Sent from my Nexus 4 using Tapatalk 2
Last edited by veyka; 16th January 2013 at 10:56 PM.
The Following User Says Thank You to veyka For This Useful Post: [ View ]
16th January 2013, 10:57 PM   |  #5  
Bluewall's Avatar
Senior Member
Flag Sion
Thanks Meter: 869
 
2,128 posts
Join Date:Joined: Apr 2010
More
Going to give it a try too, thanks for the work mate !

I'm wondering, does the CM team will merge these patches if all work properly ? I don't know the point of view of CM about CAF
16th January 2013, 11:01 PM   |  #6  
thracemerin's Avatar
OP Recognized Contributor
Flag Toronto
Thanks Meter: 5,822
 
5,458 posts
Join Date:Joined: Oct 2011
Donate to Me
More
Quote:
Originally Posted by Bluewall

Going to give it a try too, thanks for the work mate !

I'm wondering, does the CM team will merge these patches if all work properly ? I don't know the point of view of CM about CAF

Well, a bunch of the fixes got pushed initially to the CM kernel, but were reverted because of the 3G data stalls, if this works out and 4.2.2 doesn't drop soon or doesn't fix the problem I'd consider resubmitting them to Gerrit, I would want some solid evidence that this works before I go through the trouble however.
The Following 2 Users Say Thank You to thracemerin For This Useful Post: [ View ]
17th January 2013, 08:53 AM   |  #7  
Junior Member
Thanks Meter: 0
 
18 posts
Join Date:Joined: May 2009
Can you please post a flashable zip?

Sent from my Nexus 4 using xda app-developers app
17th January 2013, 01:35 PM   |  #8  
joaoennes's Avatar
Senior Member
Flag London, United Kingdom
Thanks Meter: 30
 
156 posts
Join Date:Joined: Sep 2010
Donate to Me
More
Hi,

It seems to be working.
I have about 6h on battery, 93% left and the msm_hsic_host used 15 m, 4%. No problems with 3g so far.
17th January 2013, 04:59 PM   |  #9  
thracemerin's Avatar
OP Recognized Contributor
Flag Toronto
Thanks Meter: 5,822
 
5,458 posts
Join Date:Joined: Oct 2011
Donate to Me
More
Quote:
Originally Posted by Firefox17

Can you please post a flashable zip?

Sent from my Nexus 4 using xda app-developers app

I'll get on that later today.

In the mean time I had a few mins to repack it for stock, for the moment it's untested (my device is elsewhere atm), if you're brave feel free to try it, I'll post here later when I confirm it works unless someone beats me to it. Update: Confirmed Working
Last edited by thracemerin; 17th January 2013 at 05:16 PM.
The Following 2 Users Say Thank You to thracemerin For This Useful Post: [ View ]
17th January 2013, 08:04 PM   |  #10  
thracemerin's Avatar
OP Recognized Contributor
Flag Toronto
Thanks Meter: 5,822
 
5,458 posts
Join Date:Joined: Oct 2011
Donate to Me
More
Quote:
Originally Posted by thracemerin

I'll get on that later today.

In the mean time I had a few mins to repack it for stock, for the moment it's untested (my device is elsewhere atm), if you're brave feel free to try it, I'll post here later when I confirm it works unless someone beats me to it. Update: Confirmed Working

Any kernel version is now in post 2, I've confirmed that it works on CM, but I can't see why it wouldn't work on other ROMs. Big thanks to _motley for the zip file I used.
Last edited by thracemerin; 17th January 2013 at 08:08 PM.

The Following User Says Thank You to thracemerin For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Nexus 4 Android Development by ThreadRank