yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Android Development] kalo86:
Hi guys,

Maybe I have to explain better why I advice to flash the zip file.

In my house I have a DSL line @ 10Mbit/s but I cannot reach 4Mbit/s with my Nexus 4.

In the contrary my Galaxy Nexus and other 3 laptops reach the limit of my DSL wifi network.

I was getting very bad when I wanted to watch a video from Youtube with my Nexus 4 and I only see a waiting/loading animation... This is bad.

For this reason I noticed that editing the config file something changed and so I adopted the LG Optimus G ini file, a smartphone which shares the same hardware of the Google Nexus 4.

I am using an AOSP based ROM (compiled from a pure source code by me) and with the stock kernel.

Wifi appears to be fixed and finally the wifi speed is at the same DSL band limit.

This workaround solved my problem with my DSL router but it is not a rule that my fix will solve the world.

Battery life is really great, over 4h 30min screen on and surfing on internet with wifi radio on for about 2 hours, battety is at 21%!

Again: my problem seems to be fixed.
[Nexus 4 Android Development] sigma392:
This + Prima Drivers = Super fast internet.

Had to modify a few things cuz I get delayed notifications. But other than that it works quite good. Grats on these settings ;)
[Nexus 4 Android Development] bleuwave:
What other things? Can you please tell?
[Nexus 4 Android Development] guardian_uk:
I would like to know as well! :D
[Nexus 4 Android Development] sigma392:
Changed the Gsuspend value to default and ARP Offload to 1 . After that I use PNF to deal with the Late notification problem.
[Nexus 4 Android Development] yukarundeng:
would like to try that version of yours :D
[Nexus 4 Android Development] sigma392:
Just manually change the values in WCNSS_qcom_cfg.ini before flashing it. :)

You can locate it at the zip file > System > Etc > WiFi
[Nexus 4 Android Development] bboran:
where can i find the new prima drivers?
[Nexus 4 Android Development] RASTAVIPER:
If the problem exists to stock files, then why this doesn't happen to all nexus?

In my case I get very high speeds in my vdsl network and I only use Franco kernel with stock Rom.

Unleashed by my rooted Nexus 4
[Nexus 4 Android Development] pikachukaki:
Thx kalo....trying to see if it fixes anything!
[Nexus 4 Android Development] casonswag:
Is this same sane as prima kind of? And does this help with the delayed notification on wifi?

---------- Post added at 04:30 PM ---------- Previous post was at 04:26 PM ----------

+1
[Nexus 4 Android Development] ki2luminati:
Will this patch stick if i flash a new kernel on top, or do i need to flash it every time?
[Nexus 4 Android Development] Girn:
What's PNF? So the zip OP posted will result in delayed notifications?
[Nexus 4 Android Development] QUIETLYloud:
I believe this problem is router dependant YOU may be fortunate enough to only connect to routers were you don't have this problem
[Nexus 4 Android Development] DesmoDavid:
This fix works for the "screen off notication delay" ? :)

From Nexus⁴ with Tapatalk 4 ßeta
[Nexus 4 Android Development] kalo86:
This workaround fixes the problems which I listed on the first post.
[Nexus 4 Android Development] sigma392:
Nope. These are merely settings for the driver. In my tests it doesn't help with the delayed notification problem (Although it can be attributed to the router at times, test yours).

Yes. You need to flash it every time.

Push notification fixer. In my tests it does. I notice this with DLink routers.
[Nexus 4 Android Development] DesmoDavid:
[MENTION=3513880]kalo86[/MENTION]: Ok but, are you having these problem too or not?

[MENTION=241814]Sigma[/MENTION]: Can you link me the fix, please? :)

From Nexus⁴ with Tapatalk 4 ßeta
[Nexus 4 Android Development] kalo86:
I solved all my listed problems.

If you want to check if you have problems, please try to load/view this video (the biggest problem was the loading of flashplayer content):

http://www.crazy****.com/cnt/medias/38298-food-really-makes-him-happy

The same video is maybe loaded fastly with your 3G mobile data (again you should have to verify it).

If your Nexus 4 stops playing the video because the buffer is off and on the contrary your laptop/pc is able to reproduce with no interruption the same video, then your Nexus needs the patch!

I solved all wifi-related issues. Delayed notifications may be not a problem due to the checked box for the Wi-Fi optimization.
[Nexus 4 Android Development] Girn:
Post yours please
[Nexus 4 Android Development] DesmoDavid:
I'm just editing it by myself. Doesn't work for delayed notification in wifi. pffff, we need to wait 4.3 release and hope that it fix this annoying issue. :(
[Nexus 4 Android Development] Razer(x):
Was having 3 signal bars, now got 4.

Thank you
[Nexus 4 Android Development] thracemerin:
Did you reboot after editing? Because you need a reboot for the WiFi firmware to pick up the change.
[Nexus 4 Android Development] RASTAVIPER:
It will be interesting to see the results with numbers.

Did anyone use speedtest app before and after applying this patch?

I am curious if my 18mbps speed is good enough for my line. What is the maximum that Nexus can get?
[Nexus 4 Android Development] DesmoDavid:
I edited files on pc, zip them all and flash in cwm. :(

From Nexus⁴ with Tapatalk 4 ßeta
[Nexus 4 Android Development] sigma392:
It's better to compare the speed of the N4 to another device of yours :)

Did you uncheck WiFi Optimizations? Stock or Prima?
[Nexus 4 Android Development] 19deimon90:
With this fix the download speed of whatsapp for android from the website is 150 kb instead 15. Awesome!
[Nexus 4 Android Development] thracemerin:
If you used an editor that doesn't save in Unix format it probably added windows carriage return and spacing characters which cause problems on Unix/Linux based systems like Android.
[Nexus 4 Android Development] DesmoDavid:
Where I will found prima driver?

From Nexus⁴ with Tapatalk 4 ßeta
[Nexus 4 Android Development] tobidashi:
Uh, yeah. This did it.

My test wasn't the most purely scientific experiment, but I went from ~4Mbps down / ~1Mbps up to 10.34Mbps down / 11.27Mbps up. Can't say anything about battery life yet, but it certainly did something magical with my wifi speeds.

Edit: PA 3.60 with Franco #142
[Nexus 4 Android Development] kalo86:
Hello guys,

I compared the two ini files (stock Google VS LG Optimus G) and there are differences:

# Stock Google config file

#Common lines with different values:
gEnableSuspend=3
gNthBeaconFilter=50
gAPMacAddr=000AF58989EF
gEnableApOBSSProt=0
gEnableApUapsd=1
g11dSupportEnabled=1
beaconEarlyTerminationWakeInterval=11
gChannelBondingMode5GHz=0
gStaKeepAlivePeriod = 25
gEnableAutomaticTxPowerControl=1

# Lines only in stock Google config:
gEnableCloseLoop=1
gEnableApRandomBssid=1
gEnableDFSChnlScan=0
gIgnore_Chan165=1

# LG Optimus G config file

#Common lines with different values:
gEnableSuspend=2
gNthBeaconFilter=30
gAPMacAddr=000AF589dcab
gEnableApOBSSProt=1
gEnableApUapsd=0
g11dSupportEnabled=0
beaconEarlyTerminationWakeInterval=10
gChannelBondingMode5GHz=1
gStaKeepAlivePeriod = 30
gEnableAutomaticTxPowerControl=0

# Lines only in LG Optimus G config:
gIgnoreDynamicDtimInP2pMode=1
gSkipDfsChannelInP2pSearch=1
gPassiveMaxChannelTime=120
gPassiveMinChannelTime=60
gActiveMaxChannelTime=50
gActiveMinChannelTime=30
gApKeepAlivePeriod=25
gHeartbeat24=60
gGoKeepAlivePeriod=10
gEnableDFSChnlScan=1
gVhtChannelWidth=2
gEnableCloseLoop=1
gDataInactivityTimeout=200
gVhtRxMCS=2
gVhtTxMCS=2
gPassiveMaxChannelTimeConc=110
gPassiveMinChannelTimeConc=60
gActiveMaxChannelTimeConc=60
gActiveMinChannelTimeConc=30
gRestTimeConc=20
gEnableMCCMode=0
gEnableRXSTBC=0
btcDhcpProtOnSco=1
gNumBuffAdvert=64
gReportMaxLinkSpeed=2

These differences solved my network issues with two different routers (Pirelli and DD-WRT based router).
[Nexus 4 Android Development] DesmoDavid:
Hi, I've solved my issue. Details in my sign. If you want post my link in the first post. ;)

From Nexus⁴ with Tapatalk 4 ßeta
[Nexus 4 Android Development] instinctkiller:
This patch fixed my delayed notification and the Wifi Performances are WAY better !

Thanks a lot !
[Nexus 4 Android Development] llevo3:
+1

I flashed Purity 5.5, than franco r143, than patch :good:
[Nexus 4 Android Development] kalo86:
Hi, thank you for reporting your experience!

Anyway the main goal of this patch is to fix the wifi performances.

Delayed notifications may depend by the energy saving feature in wireless settings.

Regards,

kalo86
[Nexus 4 Android Development] DesmoDavid:
No, they don't. It's a kernel 4.2.x bug. ;)
[Nexus 4 Android Development] alen1901:
I dont get it, on your sig you put app and flashable zip to fix delayed notifications. But why flashable zip? Why we need to flash this, app is suppose to work on its own.

Sent from Sparkling Nexus 4
[Nexus 4 Android Development] DesmoDavid:
Just need to flash the zip file, app is an optional ;)

I use both and the problem is gone. :)
[Nexus 4 Android Development] Slymobi:
But....... Is this your work or have you found it from some other link from xda??? You could link to the original thread and credit the member !!

Sent from my Nexus 4
[Nexus 4 Android Development] DesmoDavid:
I founded it on Google. Was a xda link but I don't remember how. I had literally search over the internet for a couple of fix. This one works. :)

Tomorrow I'll search again and I'll add credit in sign ;)

From Nexus⁴ with Tapatalk 4 ßeta
[Nexus 4 Android Development] sigma392:
If you guys experience bad battery life on busy networks, revert the Gsuspend value back to 3 as it will make your phone respond to EVERY random request.
[Nexus 4 Android Development] thracemerin:
Comes from right here: http://xdaforums.com/showthread.php?t=2072930
[Nexus 4 Android Development] illgodson:
Gave it shot, running latest PA and Franco kernel with FiOS internet. Seems to be pretty much the same for me. I'll try it a few times later, see if anything changes. First one was stock, second with zip flashed.
[Nexus 4 Android Development] Soul_Raider:
Do you have problems during streaming Youtube videos? Yes.

Do you notice a very slow connection with your Nexus 4? YES!!!

Do you notice that your other clients (like notebook, other smarthones, pc, etc etc) are connecting very well with the same router's settings? YES!!!!!!!

After many many reboots i founded string, that directly affect on my Wi-Fi speed:

"gDataInactivityTimeout=200"

This string fixed my very slow Wi-Fi on my Nexus 4 (directly on YouTube). My Xperia Z, Xperia S, Nexus 7 doesn't have this problem.

Router: TP-LINK TL-WR2543ND

Internet speed: 100 Mbit/s

P.S. Sorry for my english, i am russian!
[Nexus 4 Android Development] alen1901:
So this change just extends time when wifi becomes "inactive" or what?

EDIT: im also interested how this all impacts battery life

Sent from Sparkling Nexus 4
[Nexus 4 Android Development] Soul_Raider:
Found on Github:

Summary: The speed of download file via WiFi AP is slower than other DUT when download the larger file.

Do : [Change]
- Add gDataInactivityTimeout into qcom_cfg.ini file.

[Symptom]
- Download file via WiFi AP is slower than other DUT.

[Cause]
- If packets of arrival Time > gDataInactivityTimeout,
DUT will loss packets and need re-receive again.
This action will take a lot of time. And download will slower than other DUT.

[Solution]
- If gDataInactivityTimeout is not set, the default velue is 20ms.
We set gDataInactivityTimeout=100 to avoid loss packets.

[Notes]
- None.

[Expose]
- None.
[Nexus 4 Android Development] alen1901:
Where to change that? Couldnt find it. Tnx

Sent from Sparkling Nexus 4
[Nexus 4 Android Development] Soul_Raider:
Add it manually in /etc/wifi/WCNSS_qcom_cfg.ini before "END"
[Nexus 4 Android Development] doitda:
Absolutely fixed my Wifi.

New speed test on FIOS over my Wifi router.

View attachment 2009806
[Nexus 4 Android Development] amarb70:
Quick question please, do I only need to flash this once/when I flash a new ROM? :)

..sent from space
[Nexus 4 Android Development] kboya:
Hey,

I am much impressed by the initial transformation. Download speeds testing from a single site doubled after flashing. I'll report back if I have any battery issues or changes in performance, but so far, good work:D:thumbup:
[Nexus 4 Android Development] habskilla:
OMG!!!

This WORKED!!

Flashed the zip. Rebooted twice.

My internet connection is 175 Mps down and 30 Mps up.

Went from 4 Mps down and 20 Mps up

to

45 Mps download and 30 Mps upload.

Very nice!!
[Nexus 4 Android Development] sigma392:
Reflash with every kernel or ROM change :)

------------------------------------------------------------------

Oh and phone will fail to sleep when turning of the Mbcast filter... Learned it the hard way lol. (Way before this one came out)
[Nexus 4 Android Development] RASTAVIPER:
How much was your speed test before?

Unleashed by my rooted Nexus 4
[Nexus 4 Android Development] sigma392:
Left stock. Right Modified.
[Nexus 4 Android Development] doitda:
It was maybe 19mb/s download but with huge pauses in the download test that would drop to zero and then pick up again .

User experience was I would disable Wifi at home and use the hspa connection which was ridiculous.

I couldn't even stream an mp3 from my home media center.

Downloading from the Play Store was painful.

On and on...

Now the Wifi works as it should on a high speed connection.
[Nexus 4 Android Development] proper69:
Worked for me as per speed. Im getting 22mbs down and 5 up which is what my cable company has me at!
[Nexus 4 Android Development] illgodson:
After a little more use, I have to say that regardless of my negligible results in actual speed tests both app and browser based...my real world experience seems pretty good in particularly YouTube, it seems to be flying and not getting the buffer for no reason anymore. Anyone else?
[Nexus 4 Android Development] Soul_Raider:
Please, someone try this zip and reply, will be any difference between my zip and fix in this thread? This zip contain stock Wi-Fi settings from Nexus 4 with one added string.

I had problem with Wi-Fi speed for a very long time. I can't see YouTube (only on m.youtube.com with low quality), but other my devices have very high speed. I have 100 Mbts/s internet connection. When i added one string ("gDataInactivityTimeout=200"), i got high speed on my Nexus 4...

Sorry for my bad english ;)
[Nexus 4 Android Development] jiayit:
Woah after I flashed your fix, my YouTube's data is literally FLYING. Compared to previously, it was crawling. Thanks for the fix!
[Nexus 4 Android Development] kalo86:
Hello guys,

I'm trying a nightly CyanogenMod 10.1 and of cource the wireless performances are again bad.

For this reason, before flashing the LG Optimus ini file configuration I was curious to edit the stock cyano file by adding the line:

gDataInactivityTimeout=200

and really the performance are very good again!

So, I can confirm that the most important line of the ini configuration file from the LG is that line gDataInactivityTimeout=200.

So, the patch can be edited adopting the stock Google/Android and adding only one line.

Regards,

kalo86
[Nexus 4 Android Development] darwinwin:
Hello guys. .any possible non root fix for the wifi dropping while screen off?

just bought a n4 for the wife and she wont let me root it after I bricked a galaxy note a year ago
[Nexus 4 Android Development] Slymobi:
When she's asleep........ Pounce !!!

I mean to root the phone of course ;)
[Nexus 4 Android Development] kalo86:
Hi, the only way to apply the patch is to have a rooted phone.

If you cannot root the phone, then my advice is to wait for a while because on 10th June Google will show Android 4.3.

I suppose that Google has fixed the wireless-related bugs with the new Android 4.3 distribution.
[Nexus 4 Android Development] Slymobi:
So recent test suggest that we dont need to flash your fix but just add the 1 line into stock file ?? Is this correct ?

P.s where in the WiFi INI file should it be placed (line number) and all other lines begin with #xxxx is this not needed?
[Nexus 4 Android Development] Soul_Raider:
Anywhere before END. #xxxx not needed
[Nexus 4 Android Development] sammael1069:
Check out the top two
[Nexus 4 Android Development] doitda:
Question I have is, why would the Nexus 4 have a so vastly different .ini file for the driver?

Did Google not pay enough attention to the wifi experience, or was LG responsible for the software in part, knew about the poor performance, made it on their flagship device and purposefully did not fix the Nexus config?

Or something else all-together?

I find it interesting that LG put out both, but only cared about one product experience enough to change.
[Nexus 4 Android Development] em2drvr03:
I have a 80 Mbps speed at home and my photo e with and without the fix are getting around 25 mbps . How are you guys getting such high numbers on the speed test app. It only shows max 30 Mbps on the gauge?
[Nexus 4 Android Development] Shaky156:
Wifi fixed http://db.tt/79L7T71L

Have received notification while device idled/sleep, working fine afaik enjoy
[Nexus 4 Android Development] ckret:
sounds nice, what about sources? will you make them available?
[Nexus 4 Android Development] alen1901:
Some more info about this? What does it do, what are negatives if any etc..

Sent from Sparkling Nexus 4
[Nexus 4 Android Development] Shaky156:
Arp offloading, push notifications, cpu oc upto 1.9ghz, gpu oc upto 533mhz, crypto engine driver enabled both kernel and userspace, gpu optimization/enhancement, etc etc maimly released as ive just fixed wifi push notifications
[Nexus 4 Android Development] alen1901:
Ok tnx, so this is actually a kernel with prima drivers and your tweaks? I see prima folder in there.

Sent from Sparkling Nexus 4
[Nexus 4 Android Development] Shaky156:
This is the kernel i was working on for camera optimization increasing camera quality (i noticed that threads closed mow :( oh well) which was based on motleys kernel, i then modified it heavily in alot of areas, wifi was annoying me so i fixed it. Works fine for me im receiving push notifications within seconds :D

---------- Post added at 11:45 AM ---------- Previous post was at 11:34 AM ----------

Reason i havent opened a thread is cause i dont want to open a thread for it to get closed, but ill clean up the code as i need to push this to gerrit
[Nexus 4 Android Development] alen1901:
So, prima drivers. :p they can cause some other problems i heard. Also about camera, dev who increased FPS for 720p, its that it? You did that succsessfully and you see any difference? Lets continue via PM. :D

Sent from Sparkling Nexus 4
[Nexus 4 Android Development] HamsterHam:
Top one is using the new fix, bottom one is before.
[Nexus 4 Android Development] Slymobi:
Which new fix.??

1. The original flashable zip

2.the manually edited method

3. Just adding the gdatainactivitytimeout to stock.

4.This new kernel flash or

4.your own interpretation

Getting a bit cloudy and unclear in here already as to what people are using.
[Nexus 4 Android Development] HamsterHam:
I used Soul_Raider's Nexus4_Advanced_WiFi_Solutions.zip

"When i added one string ("gDataInactivityTimeout=200"), i got high speed on my Nexus 4."

So I think that zip just added that one string.
[Nexus 4 Android Development] Slymobi:
Whoooops missed that one from the list lol.
[Nexus 4 Android Development] atxbang56:
do you have a link please ?

Carbonized from my pretty cool Nexus 4

Best Antutu : 24258 / Best Quadrant : 8643
[Nexus 4 Android Development] irmantas:
I don't know what zip contains, but today when I updated to newest CM nighly I edited WCNSS_qcom_cfg.ini in /system/etc/wifi/ and added that one line, and it looks like it helped me a lot, WiFi now flying :)

Thanks mate ;)
[Nexus 4 Android Development] Slymobi:
The link is here in this thread !!! Its only up to 6 pages so its not really that hard to find is it ? :)

PS. The line is already in the file inside this zip so no need to add it !!
[Nexus 4 Android Development] irmantas:
Yeah its there, but I added it manualy :)
[Nexus 4 Android Development] Slymobi:
Why lol
[Nexus 4 Android Development] alen1901:
He didnt flash zip, he added manually. :D

Sent from Sparkling Nexus 4
[Nexus 4 Android Development] Slymobi:
Haha confusion over. That makes sense. I thought they meant they flashed and manually added as well lol.
[Nexus 4 Android Development] smartyenrique:
Works! do i have flash it after everytime after flashing a new ROM / Kernel?
[Nexus 4 Android Development] kalo86:
You have to flash this zip fix only ather flashing a ROM (of course) :good:
[Nexus 4 Android Development] FaLCoN.007:
Works! This with a great signal reception and speed. :)

Enviado de meu Nexus 4 usando o Tapatalk 2
[Nexus 4 Android Development] atxbang56:
I tried something and it seems to be pretty good : I flashed Shaky's zip (wich contains a kernel and wifi fix, prima drivers, ...), rebooted and then flashed Trinity t133 and it works perfect on Carbon

Carbonized from my pretty cool Nexus 4

Best Antutu : 24258 / Best Quadrant : 8643
[Nexus 4 Android Development] drose6102:
This fixed my .25 mbps download speed while using a thunderbolt for wifi tethering. Nexus 7 would show mid teens down and laptop high teens so I knew the Nexus 4 was the issue. Flashed this and all is good again. Thank you
[Nexus 4 Android Development] kbeezie:
What's the difference between this and this ? http://xdaforums.com/showthread.php?t=2072930

Been using the ones in that link without much fuss.
[Nexus 4 Android Development] atxbang56:
+1

AXIOMized from my pretty cool Nexus 4
[Nexus 4 Android Development] alen1901:
the link you posted is a fix for notifications delay when you dont get them on time depending on router you have.

this fix on this thread is fix for loading heavy stuff, like youtube videos, without this fix you often get loading, or buffer when watching a video on youtube. dunno if thats implemented in the mod you posted a link to.
[Nexus 4 Android Development] atxbang56:
so can it helps receiving facebook push notifications ? I can't get any of these
[Nexus 4 Android Development] alen1901:
It helps getting all notifications. But keep in mind that it will have impact on your battery life if you have a lot of traffic on your router.

Sent from Sparkling Nexus 4
[Nexus 4 Android Development] kbeezie:
When I compared the .ini file that's provided from both, looks like the one in this thread has the same settings, plus some extra stuff.
[Nexus 4 Android Development] atxbang56:
I made a mix between the zips in the 2 threads : (unzip it, it's not a flashable zip)
[Nexus 4 Android Development] MementoMoriM:
Thanks :)

Enviado por MementoMoriM desde un Nexus 4
[Nexus 4 Android Development] venom_762:
why can't google fix this? I have been testing the N4 for a few weeks and might go back to my sprint Gnex.
[Nexus 4 Android Development] tupac4u:
Works, thanks for sharing...Regards
[Nexus 4 Android Development] gharrrrrr:
The one in OP works well for me. But I wanted to try this one as well. I looked in my file manager for the original to replace and found it in two places. System/etc/WiFi. And data/misc/wifi. The one in data/ looks like the one to change to me but want to double check here.

Edit: Never mind ignore post. Backed up original and moved file to both places, fixed permissions, reboot and seems to be working. Going to compare to zip by kalo (op). Cheers.

Sent from my Nexus 4 using a flounder.
[Nexus 4 Android Development] GreenSGS:
Thanks [MENTION=3513880]kalo86[/MENTION], This simply works. Tested my wifi with deafult and patched consequentially. Big difference, right away. Superb..

NooBs are rare to be seen on XDA, why because are there are lot of noob killers on xda. Don't believe me then just act like a noob.
[Nexus 4 Android Development] CatsAreGods:
You got that right. Just found out the hard way in the Franco thread.
[Nexus 4 Android Development] devang98:
will this also work on the miui rom ?
[Nexus 4 Android Development] kowcop:
that's probably because you restored the Facebook app from Titanium or something. Facebook notifications only work when you install the app.. so try uninstall it and reinstall it