yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Android Development] thracemerin:
There's more work that can be done, sadly that work has to be done by Google and LG since they don't distribute the code for the baseband. The slightly lower clock and voltage would make a difference, but to see just how much you'd have to test it from full to empty under all the same conditions which basically means you'd never be able to use your phone. The stock kernel is far less efficient than both the kernels you tested, so it probably makes a bigger difference for stock vs this kernel.

What I can say is that in my testing on the CM stock kernel on 3G (no WiFi) I dropped 1.5-1.7% per hour and with these changes it's dropped to around 1.0-1.2% per hour under the same conditions on different days, so we're talking about 0.5% per hour difference. So the difference would be 83hrs (1.2/hr) vs 59hrs (1.7/hr) of battery life if I extrapolated those tests for a 100-0 test. So that would mean the battery lasts about 29% longer.
[Nexus 4 Android Development] dwang:
That's interesting since in my testing, with both kernels, I get 1.6% drain per hour, with 2 bars of 3g.

It would be nice if you could do a similar test that I did, but with your kernel (cm + hsic fix) vs stock cm and document it with screenshots.
[Nexus 4 Android Development] thracemerin:
I'll re-run the tests and see what I come up with, I had shots of my previous test, but when i was testing the pure stock boot.img the other day I accidentally wiped my /sdcard. I'll have some new results tomorrow.
[Nexus 4 Android Development] thracemerin:
Re: [Kernel][GPL][anykernel][WIP] msm_hsic_host wakelock fix

Couple of quick shots from a quick 3G test I did on this kernel with 3G data only, sync on, etc...

As you can see I didn't use the phone during this time, so it's an idle test only, 5% in ~4hours 15mins.

This is roughly what I always get in my area, it also had just dropped to 84% so it could easily have lasted another 30+ mins before it dropped again.

You can also see that my signal isn't the best, these shots were taken seconds apart and 1 has 2 bars while the other has 3, this is also typical for my provider in this area.

I'll try to get some longer term data when I have a chance where my phone can be idle for a long period of time.
[Nexus 4 Android Development] Euler MD:
Let's say I want to undo this fix, do I just restore using CWM?
[Nexus 4 Android Development] giajp:
R: [Kernel][GPL][anykernel] msm_hsic_host wakelock fix (Now with WiFi notification fi

But one version with the PDA colors is possible, not? Simple to add at sources and absolutly more cool

Sent from my Google Nexus 4 using CyanogenMod 10.1
[Nexus 4 Android Development] thracemerin:
Of course it's possible, but it requires building another version of the kernel, I didn't say I can't do it, I said for the moment I won't.

There are those who prefer the stock colors, those who prefer halfbreed, those who prefer contrasty, those who prefer franco's stock colors, those who prefer motley's stock colors, if I build with colors, I am going to end up building one for everyone who has a different idea of what the best colors are, that's not the point of a test kernel, the point is to test whether or not the WiFi works properly or not. At the moment, there is 1 version with 1 set of colors, people are welcome to fork my sources and add the various versions if they want.
[Nexus 4 Android Development] m_gl:
Same for me, i works perfect.

I`am also on CM nightly.

Maybe a rom problem ?
[Nexus 4 Android Development] renna1992:
Hello thracemerin,

just to make sure that I understand everything correct. You mentioned in the OP that your kernel is "just" a stock kernel with added hsic/3g fixes and now the wifi fix, is that right?

The other kernel floating aroung with the wifi fix was not your work but based on motleys kernel, your work and kszaq's work?

Oh and one last thing (sorry to bother you with such questions): if I want to go back to another custom kernel i just reflash the rom + kernel or your wlan-revert zip?

thank you :)
[Nexus 4 Android Development] mobilehavoc:
Re: [Kernel][GPL][anykernel] msm_hsic_host wakelock fix (Now with WiFi notification f

I am running stock 4.2.2 unrooted with your kernel and it unfortunately doesn't seem to work. I want to test thoroughly over next few days though since I have both a stock Cisco router and a Ddwrt router to play with. Will report back. Enabling broadcasts works perfectly on a completely stock phone though.
[Nexus 4 Android Development] thracemerin:
This version is stock AOSP with the msm_hsic_host wakelock fix, and a test fix for the delayed WiFi notification issue.

The version kszaq posted in _motley's thread is motley kernel + the same fix, _motley's kernel also includes the msm_hsic_host patches.

None of it is really my work, given that all I did was pull the appropriate patches from Codeaurora and Qualcomm.

If you are flashing a full ROM, you should be able to do this and not flash the wlan_revert.zip. If all you are doing is changing the kernel, then you will need to flash the revert to get the right WiFi binaries back.
[Nexus 4 Android Development] thracemerin:
It could be a network hardware issue outside the N4, some people never had issues with this problem in the first place while running the stock firmware because their router hardware handled it differently.
[Nexus 4 Android Development] mobilehavoc:
Re: [Kernel][GPL][anykernel] msm_hsic_host wakelock fix (Now with WiFi notification f

Agree so I will try on both routers and test. I can set the ARP timeout on the ddwrt so makes testing on it better.
[Nexus 4 Android Development] thracemerin:
Yeah, thanks for testing it :)

I guess if the behavior is unchanged for some and solved for others, that's a partial win.
[Nexus 4 Android Development] meanwhile:
Re: [Kernel][GPL][anykernel] msm_hsic_host wakelock fix (Now with WiFi notification f

Testing kernel since last night, have to say was a bit sceptical, but it freaking awesome - works!

Since last night on home wifi haven't lost gtalk connection at all, never grey bars waking up phone from deep sleep. So yeah done trick for me. Not sure about battery yet as rebooted couple of times. Will report later about it.

Thanks anyway for your work.

Sent from microwave
[Nexus 4 Android Development] chrisgtl:
Re: [Kernel][GPL][anykernel] msm_hsic_host wakelock fix (Now with WiFi notification f

also fully working here! I have a phone with wifi that works for the first time ever.. thanks
[Nexus 4 Android Development] keyra74:
finally a fix that really works!

i'm pinging phone since 2 minutes screenoff and it's still alive
[Nexus 4 Android Development] thesebastian:
Re: [Kernel][GPL][anykernel] msm_hsic_host wakelock fix (Now with WiFi notification f

I really want to use this kernel. The only reason I don't flash it....is Google Stock color.

I tried halfbreed...Franco recommended and a few more....and I'm OK with any of them! The only one I can't stand is the Google one! :(
[Nexus 4 Android Development] thracemerin:
I'm not against changing them, but you have to see this from my perspective, this is just a test to ensure that the WiFi fix works (or works for most without breaking anything), if I decide to make changes to it in an attempt to fix some of the issues people have I have to build one version with the stock colors and another with the decided upon color choice (which if I were to pick one, not everyone will be happy with it, just as not everyone is happy with the stock colors) and while there is little chance that changing the gamma settings will actually cause a problem with anything else I've done, the potential exists, this is why I try not to add multiple features at the same time, so that I can test them in isolation. If this works, it's very likely that all custom kernels will have these fixes within a few weeks and you'll be able to have your color setting back the way you like them.
[Nexus 4 Android Development] DvTonder:
Don't give in! Stick to your guns and dont set a precedent.

There will always be 'just one more request, ...' and 'it would be perfect if ..." and "why don't you add ..." and "but it is only a few lines of code ..." posts. It is never ending and there is no way humanly possible to satisfy everyone. I gave up a long time ago.

Its just not worth the effort to maintain the multitude of versions for the few users that will just jump to the next shiny new bauble of a kernel that shows up.
[Nexus 4 Android Development] darkamikaze:
Hmm maybe it's the combination of PA (March 18) and the implemented WiFi fix that causes my wifi drop issues?

Anyone else running PA? Trying to avoid reflashing another ROM tonight :/
[Nexus 4 Android Development] thracemerin:
It might be a network hardware issue too, interestingly enough this afternoon for a bit my Windows machines would tell me that the destination host was unreachable when I tried to ping the phone, even when i turned the screen on, and when i did an 'arp -a' the phone wasn't listed on those machines, but I was still getting my notifications on time without issue, AirDroid quit working though, so I'm not sure what's up with that. :confused:

I'm looking into this particular situation further.
[Nexus 4 Android Development] reddv1:
Re: [Kernel][GPL][anykernel] msm_hsic_host wakelock fix (Now with WiFi notification f

I never had the notification problem over WiFi, but when I use AirDroid and the screen turns off, transferring files slows to a crawl. This happens both on my Nexus 4 and 7. Hope this info help.

Sent from my Nexus 4
[Nexus 4 Android Development] thracemerin:
Well, looking into it a little more, for some reason on my Windows 8 PCs when I look at the PCs arp table it shows the phone's MAC address incorrectly, which would explain the 'Destination Host Unreachable', but the router shows the correct MAC address on it's ARP table so I'm not sure where my Windows PC is getting it's erroneous information.

Anyway, for those of you having strange troubles with AirDroid, etc... from the PC that you are trying to connect to, do the following:

1) open a command prompt (linux terminal will work also)

2) type arp -a

3) check that the ARP table shows the correct IP address and MAC address for the phone

If you aren't sure how to see your phone's MAC address, go to WiFi, click the 3 dot menu, go to advanced, it's down near the bottom of that screen.

If your PCs ARP table shows an incorrect MAC address, let me know here so I can see if I can track down the source of the problem.
[Nexus 4 Android Development] darkamikaze:
I noticed that too and I want to blame AirDroid. However, it has happened even when the app is not on. Perhaps running it once affects it.

Is the mac address scrambled? cause when I look at my router my phone would be x.x.1.69 with right mac address and then when i run airDroid another thing pops up (which I assume is the AirDroid server) with x.x.1.69 same ip but scrambled mac.

I'll try to see if the same behavior occurs when running stock kernel tomorrow

Yep. I can confirm that the stock kernel does not inhibit a scrambled mac address with the same ip address. Cleared my device list and the scrambled mac version didn't show up. The right ip/mac address combo showed up which is good. Had AirDroid running and not running, still no scrambled mac address version :x

Not sure if that helps.
[Nexus 4 Android Development] thracemerin:
Yeah, I don't get it, I can't see anywhere in the code for the WiFi driver where it would do anything to the MAC address, especially since MAC addresses are supposed to be unique to the device it would be odd for it to be manipulating it anyway. I'll continue to dig, but for the moment I can't explain the problem at all.
[Nexus 4 Android Development] k1lonbo:
Those drivers are the same that are used in motley kernel right?

So i can use this with any kernel right?
[Nexus 4 Android Development] thracemerin:
They're the same as the ones in kszaq's version of motley, yes.

No, this only works with this kernel. Anykernel refers to the type of zip packing method I used, to eliminate confusion I removed that from the topic of this thread.
[Nexus 4 Android Development] chrone:
I guess you should name this kernel as "thracemerin" kernel.

cooler and simpler than msm_hsic_host wakelock fix.

the changelog could explain the fix on msm_hsic_host

love your work here. hehe :good:

*just my two cents :)
[Nexus 4 Android Development] ogrillion:
thank you for your continued effort with this kernel.

Couple things: I flashed it tonight for the first time and to my surprise it worked amazingly well. For the first time ever I could turn my screen off let the phone sit for awhile, and then have someone call me (using VOIP over wifi) and the phone actually rang!!

Maybe what I am about to write is not that helpful, but maybe it is so I will write it anyway. Before I flashed your kernel I was using this setup: matrix kernel 8.0 - it supposedly has fixes for dropped data from Faux (still had wifi notification delay), and then March 18th PA rom. When I flashed your kernel I was surprised that in faux clock I could set snakecharmer on (this may seem unrelated but hear me out). Now at this point I have no wifi delay.

Now PA has an update, so I dirty flash that, then flash your kernel. I load into android and go into faux clock and to my surprise now I don't have snakecharmer? And also my notifications are delayed, and VOIP won't ring my phone when in deepsleep.

So I nanoid back to before I updated PA and flashed your kernel, no more delayed notifcations and voip rings correctly and I can set snakecharmer.

Is it possible that I had some kind of leftover fix from matrix kernel, that in combination with flashing your kernel fixed my wifi issues? And maybe dirty flashed PA overwrote said fix? I just won't update PA rom for a bit because its so nice to have working VOIP lol.

**Quick followup** - decided to do more testing.

So I did some more flashing, update of PA

flashed wakelock fix kernel. = wifi delays and no snake charmer.

flashed matrix 8.0 data drop kernel = wifi delays and no snake charmer.

flashed faux kernel 11m (newest beta) = wifi delay and obviously snake charmer.

flashed wakelock fix kernel = NO wifi delay and snake charmer..

So I guess for me at least if I flash faux then this kernel I have no wifi delays and voip incoming calls work normally..

Oh and I did clear cache and dalvak between all flashes. Also I did confirm the phone is entering deep sleep correctly, so its not just sitting awake.

**shrug**
[Nexus 4 Android Development] AcmE85:
Do you have wifi optimization enabled?
[Nexus 4 Android Development] ogrillion:
I do have optimization enabled.
[Nexus 4 Android Development] nguyen47:
This fix does work ( on CM). Thank you so much
[Nexus 4 Android Development] k1lonbo:
Ok. Anyway brilliant work you have done!

Thanks :)
[Nexus 4 Android Development] thracemerin:
I'm beginning to suspect network hardware or something else external is the culprit for this problem because since I had it that one day and cleared my PCs ARP table it hasn't happened again nor have I been able to force it to happen, and it doesn't appear to have happened on the other networks I regularly use. I'll keep looking...
[Nexus 4 Android Development] mobilehavoc:
This just didn't work at all for me so I'm back to enabling broadcasts only and it works fine. Battery drain isn't bad and it works reliably without messing with wifi driver. Hope a fix is found soon that works for sure.
[Nexus 4 Android Development] gho8t:
Interesting. I've always been able to connect to the PEAP network on my campus. No matter the ROM or kernel. But my campus network is without encryption, the one in the link is PEAP and WEP.

And that link is about 4.0.4, you would think Google would have addressed the issue with the release of jellybean.
[Nexus 4 Android Development] Nark.GA60:
Should we start collecting data?

ROM

Kernel

Router

Encryption

That sort of thing.
[Nexus 4 Android Development] darkamikaze:
ROM: PA nightlies.

Kernel: Stock PA (tried thracemerin's, but had issues)

Router: AT&T provided 2Wire 3800HGV-B

Encryption: WPA-PSK(TKIP) & WPA2-PSK(AES)
[Nexus 4 Android Development] atulalvenkar:
Wifi fix works perfectly for me. If it's possible can you please add Franco's patch to increase autosuspend timer on hsic driver? This patch reduces the data drops by a lot.
[Nexus 4 Android Development] thracemerin:
Based upon my testing on this kernel with that patch all it did was increase the msm_hsic_host wake lock.
[Nexus 4 Android Development] k1lonbo:
If you see all post's you will see that not only about jellybean...

Some guy has the same problem i had... With a nexus 4 too, and some google guy, admit a faulty driver... Post 33

Read if you are interested and begin at post 33!!
[Nexus 4 Android Development] itsita:
Thanks for all the hard work Th' !

I really enjoy this kernel.

Did you ever consider updating the Linux kernel version to 3.4.36 ? (I think this is the newest)

I just wonder why stock cm always stays on the same kernel version, while it seems that there are some benefits for updating it...

Thanks!
[Nexus 4 Android Development] thracemerin:
Google stock is based on 3.4.0, CAF is based on 3.4.0, I see no reason to push forward when neither of the source bases for the improvements I've made have, not to say that there couldn't/wouldn't be some benefit, but any improvement would likely be small vs the potential for any number of issues with updating from korg, keep in mind that korg Linux and android are not 100% compatible.
[Nexus 4 Android Development] lowrider262:
Been running this for 2 days, no drops or gray bars. Finally a fix that works! Thanks
[Nexus 4 Android Development] thracemerin:
Testing a new wifi fixed version with the very latest prima drivers (v3.2.3.90), assuming I can't find anything wrong I will post this version later today for comparison with the older version of the wifi fix.
[Nexus 4 Android Development] thesebastian:
QQ....you know what im going to say......(about stock gamma) hahaha
[Nexus 4 Android Development] thracemerin:
Ok, since my phone hasn't spontaneously caught fire or any other such thing, I am going to post these here, all the things in this post http://xdaforums.com/showpost.php?p=39266617&postcount=333 continue to apply.

This kernel is built with prima v3.2.3.90 which is the head of the master branch so they consider it the bleeding edge of experimental, so I strongly caution anyone who flashes it, your wifi may stop working, there is also the possibility that your ROM won't boot or your data may get wiped, this didn't happen to me, but do a nandroid or some other form of backup before you flash this and be sure you have a way to recover your phone if something goes wrong.

Builds Now in Post 2!
[Nexus 4 Android Development] mobilehavoc:
Nvm. I see it. Will flash and test. V1 didn't work for me so will be interesting to see if V2 does.
[Nexus 4 Android Development] thracemerin:
Hmmm...so the weird MAC address bug I had with the v1 build still seems to exist on the v2 build, but it only happens on Windows 8, my Windows 7 box doesn't have this problem, nor do my linux boxes, so I have no idea what the hell is up with that, either way my router has the correct information and notifications are not delayed, only seems to have problems when I try to ping my phone from my Windows 8 PC when it doesn't already have the correct ARP information, or try to use any services (AirDroid, etc...) if the phone doesn't exist on the ARP table, strange but I think it might be a Windows problem now.
[Nexus 4 Android Development] mobilehavoc:
Doesn't work for me, oh well. Allowing broadcast packets works reliably so will just go with that for now
[Nexus 4 Android Development] :
You sir are awesome. This completely fixes the delayed notifications on wifi.

Will report further.

Thanks for this amazing kernel.
[Nexus 4 Android Development] BlueFlame4:
Hi,

I tried v1 for a couple of days and it works unless I disable all networks (at night) and set my phone to deep sleep. I need to reenter my PIN every time I unlock the screen :/

A reboot solves this but I don't want to reboot every morning, lol. Will try v2 now and investigate further if there are issues with this new version.

ROM: PA 28MAR

Best regards and thanks for your great work! :)
[Nexus 4 Android Development] phositadc:
For Slim Bean ROM, would I use the CM version or the Stock version of this kernel?

CM, I assume...?
[Nexus 4 Android Development] BlueFlame4:
Since it's not a CM based ROM, I'd flash the stock version ;) Slim Bean is based on AOSP.
[Nexus 4 Android Development] phositadc:
Thanks for some reason I thought it was cm based!

Sent from my SAMSUNG-SGH-I747
[Nexus 4 Android Development] thracemerin:
New Build :victory:

Prima v3.2.3.92a because v3.2.3.93 wouldn't build because of changes they made for 802.11ac which isn't supported by our device, I'll have to squash the build errors for that later.

Anyway, this one is anykernel again, so you don't have to figure out which version to flash, all the previous comments about highly experimental, make a backup, etc... still apply. If you used my previous stock versions and your ROM supported init.d you probably noticed it was disabled, reflash your ROM first to fix this, it shouldn't happen again now that we're back to anykernel.

Date: April 1, 2013

Download: hsic_fix_nexus4_wlan_v3.zip

MD5: 8cfe92dc2ddb1e8e506d5017c4fe0a2b

Note: If you were on v1, you probably didn't notice if you didn't go to my github, but it wasn't actually v3.2.2.2 so I removed the links earlier, I would strongly recommend either v2 or v3 if you are still on v1, sorry for the confusion about that.

A super special thanks to all the folks over at Code Aurora Forums for all the superb work they do, without them there would be no fix available.

Happy flashing!
[Nexus 4 Android Development] MotoRaph:
Wifi works fine! Thanks! :good:

Does anyone else have the issue, that the phone is very slow after unlocking for about 10 sec? This happens only with this kernels.

Im on SlimBean as an information...
[Nexus 4 Android Development] thracemerin:
I don't have this problem, but try reflashing your ROM, then flash v3 only and see if it helps.
[Nexus 4 Android Development] MotoRaph:
That helped! Thanks!
[Nexus 4 Android Development] OrrPenn18:
theracemin, any changes? Does it completely fix wifi delay?
[Nexus 4 Android Development] Mileno:
Hi,

Thanks for your work too!

One question: When you said "I would strongly recommend either v2 or v3 if you are still on v1", I understand that although on the second post you differentiate between "stable version" and "experimental wifi fix" they are the same? Because I'm on v1 and have 0 problems...would you recommend to update?

thanks again!
[Nexus 4 Android Development] thracemerin:
https://github.com/thracemerin/prima/compare/3.2.3.90...3.2.3.92a

I haven't had any issues with wifi delay on either version, but some depends on your network hardware, etc...

I was referring to experimental v1, the stable version in post 2 is unchanged and still perfectly alright to use. :D
[Nexus 4 Android Development] meangreenie:
Loving this Thx.

Hope one of the other kernel devs step up and give us a nice stock enhanced WiFi fixed kernel too.

Cough.. Faux :)
[Nexus 4 Android Development] tylercarter:
Could we see a change log of sorts in the op? :):D

Edit: nm I'm stupid :p
[Nexus 4 Android Development] Hyflex:
Hey,

I'd just like to post with something, I was using franco's 116 kernel and on one of my wireless access points I had no wifi after 2-3 seconds I just flashed your experimental version and it has fixed my issue, I'm not sure if its an issue with his kernels or the fact it wasn't patched/fixed by google.