yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] jazzboyrules:
This could be slightly related to this discussion. You guys might already know about this but in case you don't, the Auto Flasher app is a very handy app to have if you flash ROM updates and then your custom kernel ( motley in this case ? ) frequently. In my case I flash 8 zips for each update (the above plus some app zips).

Screenshot
[Nexus 4 Original Android Development] thracemerin:
TWRP lets you do this in the recovery too, up to 10 zips, without the separate app.
[Nexus 4 Original Android Development] jazzboyrules:
Auto Flash supports search strings so that the latest zip (all zips being flashed don't have to be in the same folder) gets picked automatically for flashing. Also you anyways need TWRP to use this app.
[Nexus 4 Original Android Development] thracemerin:
Oh, the search feature is actually pretty cool.
[Nexus 4 Original Android Development] chrone:
awesome finding! this makes my life easier since i only use cwm non-touch version, imagine the hassle. :D
[Nexus 4 Original Android Development] thracemerin:
Can't use it on CWM, CWM doesn't support open recovery scripts.
[Nexus 4 Original Android Development] Kocai:
I wouldn't have gotten 4 hours screen on time if I had bad signal for 2 hours would I? :D

Anyway, I think most people who got 6 hours screen on time use WiFi most of the time.

My own noob observation is that the poor mobile internet connection causes a lot of overhead in reconnecting with the gsf and else.

com.android.phone (): Wakeups: 264
Alarms: 261, Intent: com.android.internal.telephony.gprs-data-stall
com.google.android.gsf (): Wakeups: 184
Alarms: 103, Intent: com.google.android.intent.action.GTALK_RECONNECT
com.whatsapp (): Wakeups: 139
Alarms: 82, Intent: com.whatsapp.MessageService.RECONNECT

I asked about it once at the BBS thread but didn't get a reply so I don't know if my observation is correct or not.

And I got another soft reboot this morning. Here's the last_kmsg: https://www.dropbox.com/s/gdltbtwgbpdajpy/last_kmsg.txt

It seems that I'm the only one experiencing this. Is it possible because I change the colors using these commands?

#!/system/bin/sh
#Spyder4 Elite - visceralpsyche
sleep 5
echo "200 200 200" > /sys/devices/platform/kcal_ctrl.0/kcal
echo "20" > /sys/class/misc/gammacontrol/whites
echo "100" > /sys/class/misc/gammacontrol/mids
echo "255" > /sys/class/misc/gammacontrol/blacks
echo "0" > /sys/class/misc/gammacontrol/contrast
echo "0" > /sys/class/misc/gammacontrol/brightness
echo "200" > /sys/class/misc/gammacontrol/saturation
echo "0" > /sys/class/misc/gammacontrol/greys

Like kernel panic or something? I haven't done anything else on b49 other than changing colors using those commands and viking37's sound settings with System Tuner.
[Nexus 4 Original Android Development] chrone:
Could you try to run this code from terminal and set it the output in your init.d script as post #2 format?

# Show the current configuration and the checksum
echo "Verify that the values are written correctly..\n"
echo "RGB values:"
cat /sys/devices/platform/kcal_ctrl.0/kcal
echo "\nRed gamma values:"
cat /sys/devices/platform/mipi_lgit.1537/kgamma_red
echo "\nGreen gamma values:"
cat /sys/devices/platform/mipi_lgit.1537/kgamma_green
echo "\nBlue gamma values:"
cat /sys/devices/platform/mipi_lgit.1537/kgamma_blue
echo ""

I never got soft reboot using motley, but perhaps my cpu binning is faster and can handle the default undervolting.

Sent from my Nexus 4
[Nexus 4 Original Android Development] Kocai:
Well I don't set my colors using a script in init.d but I'll give it a shot.

I never got soft reboot with the previous version as well (before b48). Don't know why it's started happening. It's not going to make go back to stock kernel though because my phone gets incredibly hot with stock kernel even though I only switch between WhatsApp and XDA and browser (light usage).
[Nexus 4 Original Android Development] chrone:
Oh, xda can consume lots of cpu resources, especially when rendering long posting and scrolling through it. *sigh :/

Sent from my Nexus 4
[Nexus 4 Original Android Development] mundixx:
Yeah. Even the latest and greatest phones will succumb to Tapatalk's bad coding :banghead:

Sent from my AOSPA Nexus 4
[Nexus 4 Original Android Development] superleeds27:
Brilliant results so far!
[Nexus 4 Original Android Development] chrone:
This is me getting 6 hours screen on time using on demand, max 2 cores, and inert powerhal.

Sent from my Nexus 4
[Nexus 4 Original Android Development] Kocai:
If it's on 3G all the time then I'm very impressed. And shows us how good this kernel is.
[Nexus 4 Original Android Development] chrone:
Unfortunately it was on 2G most of the time, as I recall I was on 3G for only more less 1 hour long. bad 3G signal in my room. :/
[Nexus 4 Original Android Development] kszaq:
Would anyone want to test yet another attempt to fix delayed notifications bug? Yesterday Qualcomm released Prima driver v3.2.2.2 on CAF's git, so I decided I would give it a try. The previous fixes we tested relied on merging only one patch from their git and I thought it wasn't enough, so I merged the whole driver. I tested it overnight and got promising results, so I thought you may also want to give it a try.

One thing you need to know is that the driver also needs new firmware which is on ROM side. There are also some new values in WiFi configuration file. Default values from CAF differ from what we have for our N4s, so I copied the ones that we had and left all new parameters to their default values, except for the one that allows controlling Power Saving mode from Android (I switched it on). I also changed McastBcastFilter value to 3.

I provide you a flashable anyKernel zip with new firmware included. All you need to do is to flash this one file (motley_anykernel_422_nexus_4_custom_build_prima_3.2.2.2.zip) over any Motley's kernel and test away. It is based on b49 with some customizations to my taste (sorry, no OC, CIFS and NTFS!). You can find the source code on my GitHub.

If you want to go back to original Motley's kernel, you would need to flash original firmware (it's in prima_original_n4_firmware.zip) and then any kernel of your choice.

Please let me know about your battery life on this and what's your qcom_rx_wakelock, especially on busy networks.

Edit: You can download patched kernel from here.

Edit 2: I noticed that the "reset" zip was badly derped. If you want to go back to original WiFi firmware, please reflash your ROM (no wipe needed!).
[Nexus 4 Original Android Development] AcmE85:
Pinging the device after 5min sleep was successful. So far nobody texted me any whatsapp messages.

I will test further.
[Nexus 4 Original Android Development] thracemerin:
As with my previous test, if you leave the filters on the CAF defaults, qcom_rx_wakelock absolutely destroys the battery on most networks, even my extremely quiet home network it's burning through the battery like there is no tomorrow, 3G battery life is much much better than WiFi. With the filter set to anything but 0, the WiFi notification delay returns almost immediately.

Note: I have a motley 49 build with the CAF prima installed that I used for testing, not this specific build, but the same WLAN stuff is in both.
[Nexus 4 Original Android Development] MotoRaph:
AW: [KERNEL][Mar 10][b49] _motley kernel for the N4 (add faux sound control)

I think it really works. I gott 2 WhatsApp messages instantly! Thanks a Lot!
[Nexus 4 Original Android Development] AcmE85:
Thanks for your insights. I started monitoring with bbs.
[Nexus 4 Original Android Development] kszaq:
In the zip I provided all values are set to N4 defaults, not CAF, except for hostArpOffload, which I set to 1. Thus WiFi filter is set to 3. On my quiet home network I was getting only a few seconds of wakelock per hour and instant notifications working without issues.

Did you use the latest firmware as well in your tests?
[Nexus 4 Original Android Development] thracemerin:
The Issue still comes down to the above flag in WNCSS_qcom_cfg.ini, with the filter off the device responds to every Broadcast and Multicast packet, this of course fixes the delayed notification problem, but on large or busy networks (especially those with a number of Windows machines) Broadcast and Multicast packets are going pretty much 100% of the time, this means that the device is awake quite a bit which drains the battery fairly severely, this same behavior occurred on some of the kernels for the GNex, etc... until the filtering was fixed, problem is that the GNex uses the broadcom driver so the fixes aren't compatible with the N4.

If you set the filter back to 3, you will eventually lose connectivity to Google's C2DM services and you will get delayed notifications again unless you have a static ARP setup on your router or a static IP address for your phone.
[Nexus 4 Original Android Development] Remoteconcern:
How long is the boost pulse duration in this kernel by default? Is it 2 seconds, the same as the stock kernel?
[Nexus 4 Original Android Development] :
Hi,

Yes by default it's set to 200 000 (so 2 seconds) with _motley kernel, if it's the default value for the stock kernel I don't know it, sorry...

:)
[Nexus 4 Original Android Development] IAmAN00bie:
I'm pretty that it is measured in microseconds, so 200,000 microseconds would be 0.2 seconds. Make it 2,000,000 if you want 2 seconds.
[Nexus 4 Original Android Development] Remoteconcern:
Thanks viking37, I did wonder what the units were so I'm still not sure what the time is! Thanks though.
[Nexus 4 Original Android Development] :
Yes I think you're right here, it seems more logical ;)

I was wrong :D, unit convertion is not my thing :D

The thing I'm sure is that it's 200 000 by default :)

Sorry for the false information.

:)

PS: slightly Off-Topic but guys if some of you use AOKP PUB rom, I made a thread for this rom since there is not one in the Nexus 4 forum and if you are interested:

AOKP PUB [unofficial] FAQ & support thread - Last Build March 13th, 2013

;)
[Nexus 4 Original Android Development] kszaq:
I'm sorry, but I still can't see your point. I have set my filter to 3 and don't lose connectivity to Google's servers. The notifications are still there, even after many hours of Deep Sleep.
[Nexus 4 Original Android Development] thracemerin:
This is not impossible, it all depends on how your router handles ARP, there are people who claim to never have this issue regardless of which kernel they use, there are also those who have non-stop issues, the difference is the external network devices and infrastructure involved. Not everyone will have the experience I'm referring to, but some will just as some will have a similar experience to yours.
[Nexus 4 Original Android Development] kszaq:
OK, now I get that. Thanks for thorough explanation. :)

I had that issue and I don't have it now, that's why I posted a soulution for others to test. The drivers are only 48 hours old, I think they're worth a try. I'll do my own tests on very a busy network at work to see how the wakelock behaves.
[Nexus 4 Original Android Development] thracemerin:
It doesn't seem fixed for me, but it's possible the issue is on my network hardware somewhere too.
[Nexus 4 Original Android Development] AcmE85:
It seems that the new prima drivers fixed the issue for me.

Thanks for sharing

Unplugged since 51min, only 6s qcom_rx_wakelock :good:

I will monitor the behaviour and eventually give feedback...
[Nexus 4 Original Android Development] thesebastian:
Thanks for sharing this!

I'm currently using AOSP stock Kernel (paranoid Android kernel). Can I flash the zip keeping my current kernel?

"anyKernel" means any kernel (Google, CM, motley, franco) or its just a kernel name?
[Nexus 4 Original Android Development] thracemerin:
Nope, itll switch you to Motley kernel, anykernel is the format that allows you to put the kernel's zImage into any ramdisk and keep any ROM based ramdisk modifications.
[Nexus 4 Original Android Development] thesebastian:
I see thanks. This fixed my WiFi issue!

Also fixed BT headset calls with strange sounds. (When connected to WiFi hot spot). I can make BT calls from my home now.
[Nexus 4 Original Android Development] thracemerin:
Turns out, it was something else, seems to be working for me now too.
[Nexus 4 Original Android Development] copi:
report : I've tried prima kernel

but qcom_rx_wake is high

and its feel drain more battery than others

:)
[Nexus 4 Original Android Development] kszaq:
How high is it for you exactly? Battery life may be a bit worse than on Motley's kernel due to new prima drivers (there will always be a bit of that wakelock with them) and also some other changes I made to my taste. Sorry about that.

I'm doing my tests on busy network today, will report in a few hours.
[Nexus 4 Original Android Development] copi:
dont be sorry, I should be thankful to u hehe..

high.. number 2 on bbs, 40 %
[Nexus 4 Original Android Development] kszaq:
Do you have WiFi Optimisation turned on? I recommend it to be that way.
[Nexus 4 Original Android Development] Remoteconcern:
Do you know what that setting actually does? I've always wondered but never known.

Thanks for your work with the wifi drivers, I will give it a spin later tonight. I have this problem so here's hoping :)
[Nexus 4 Original Android Development] kszaq:
It (hopefully) tells the WiFi driver to go into Power Saving mode when you turn your screen off.
[Nexus 4 Original Android Development] Kocai:
Using your test kernel so far it seems that the notification delay is fixed. I haven't had any delay receiving WhatsApp messages. And I don't have any qcom_rx WL. But I got deleted_wake_locks but only a little bit.
[Nexus 4 Original Android Development] veyka:
Yeh qcom_rx will change to deleted once you turn off wifi.

Generally it will only be an issue on noisy networks, like ones with lots of widows machines.

Sent via Nexus 4
[Nexus 4 Original Android Development] harlock:
Tried.

It works beautifully. One HUGE problem that his has fixed ( and nothing else did before this ) was the fact that when I start a download, It keeps going even if the phone is sleeping!! Fantastic.

I will report back on battery usage after few days, thanks a lo man
[Nexus 4 Original Android Development] mobilehavoc:
Just out of curiosity before I go flash this. How is this better than just enabling broadcasts on old driver? Seems to be working fine for me and battery drain is non existent, I don't even ever see Rx_wakelock.

Wondering if its worth doing this at all.
[Nexus 4 Original Android Development] kszaq:
Turning hostArpOffload on is what fixes notifications problem and I guess that the new driver fixes that feature, supposedly it wasn't working as intended before. It means that you can have broadcast filters turned on = better battery life of noisy networks.
[Nexus 4 Original Android Development] hachoo:
Using the .49 kernel with rasbean latest and got this battery using YouTube a lot and browsing net.Some with 3g some with WiFi.Using whatever the kernel comes stock at.
[Nexus 4 Original Android Development] Skkip:
Hey kszaq,

Did you enable the Prima WLAN 802.11ac High Throughput option when compiling the kernel?

I'm unsure whether to enable or disable it.

Enable the Prima WLAN 802.11ac High Throughput option (depends upon kernel support) (PRIMA_WLAN_11AC_HIGH_TP) [N/y]

Right now I disabled it and can confirm the wifi issues are fixed and drain does not seem to be that high...
[Nexus 4 Original Android Development] kszaq:
I left it disabled. I don't even know if our radio supports 802.11ac.
[Nexus 4 Original Android Development] whittikins:
Can you provide one that will work on CM based roms? Thanks!
[Nexus 4 Original Android Development] thracemerin:
It should work on CM, it's the same format that _motley usually uses, just flash it over the current motley kernel.

Unless it's a hidden feature like Band 4 LTE, the Nexus 4 only supports 802.11 a/b/g/n.
[Nexus 4 Original Android Development] darkamikaze:
Did you end up leaving your filter to 1 or 3? jw thx

Hmm the fix didn't work for me. pinged after about 15 seconds and it times out. waking it up and re-pinging takes long too.

I just need Airdroid....AirDroid still doesn't work ): sighbeans.

Running CM nightly 3/18/13 with the kernel fix.
[Nexus 4 Original Android Development] MasterJam882:
AW: [KERNEL][Mar 10][b49] _motley kernel for the N4 (add faux sound control)

so this means that mbcastfilter has to be set back to 3 and arp is working?

Hope u cam enlighten me here^^

greetz

Gesendet von meinem Nexus 4 mit Tapatalk 2
[Nexus 4 Original Android Development] thracemerin:
If you flash his fixed kernel, your mbcastfilter will be set to 3 and hostarpoffload will be 1, this should fix notifications without introducing the battery drain that occurred with setting your mbcastfilter to 0 to fix the problem.
[Nexus 4 Original Android Development] :
Thanks for the great kernel!

Could someone please explain why there's a need to flash b37 before flashing the latest version?

Also, does this requirement still apply when compiling from sources?
[Nexus 4 Original Android Development] thracemerin:
It ensures you have the correct ramdisk & powerHAL installed for the kernel. You would need to have a compatible ramdisk & powerHAL installed before flashing a self-compiled zImage as well.
[Nexus 4 Original Android Development] kszaq:
Dear all.

I would like to thank you a lot for testing new WiFi drivers. Thanks to report by harlock I noticed that we don't need to replace the WiFi firmware, as our N4s need to use N4-specific one. We have also got some promising results about fixing notification delay bug without getting excessive wakelocks on busy networks - for example, for me it was only 1% on a very busy network at work.

I'm attaching Motley's b49 with CAF's new WiFi driver, no further modifications.

-> If you didn't use that fix before: you can flash it just as you would b49 (if you're new to this thread, please carefully read instructions in OP).

-> If you flashed my previous version: please flash original Prima drivers from here and then kernel attached to this post.

In case you need/want go back to other kernel with no new WiFi driver, you can find reset files in my previous post.

You should be aware that although the driver works for some of us, it is considered EXPERIMENTAL until Google merge it to their source tree.

My proposition is that I'll be compiling a kernel each time Motley releases a new version for people who want to use the new drivers.

Please, don't post your results with new driver from now.

This should be considered unofficial and OT. :)

Motley, sorry for hijacking your thread and thank you for giving us such a great kernel!

Edit: updated configuration file (2nd time).
[Nexus 4 Original Android Development] thracemerin:
I'm confused about what the difference between your previous version and this version is, did you revert the prima back to the one that ships from Google?
[Nexus 4 Original Android Development] kszaq:
Nope. This version does not include any of the additional (non-prima) patches I merged in my forked kernel tree. This is "pure" Motley's b49 kernel with entire drivers/staging/prima folder copied from CAF's repository = Prima v3.2.2.2 driver. Plus there are 2 configuration files needed by this driver: modified WCNSS_qcom_cfg.ini and WCNSS_cfg.dat.

Another difference from my previous version is that there is no WCNSS_qcom_wlan_nv.bin from CAF, because we need to use the stock one.
[Nexus 4 Original Android Development] thracemerin:
I'll PM you.
[Nexus 4 Original Android Development] m_gl:
Doesn´t work for me, the new and the old one. I`am using CM 10.1 18.3. I flashed first Motley 37, then 49 and then your kernel. But the wifi delay remanins. With thracemerin kernel, wifi delay is fixed for me. But why not with your version ?

Any hints ?
[Nexus 4 Original Android Development] knitler:
Will this kernel work with rooted ASOP 4.2.2?
[Nexus 4 Original Android Development] florichelle:
AW: [KERNEL][Mar 10][b49] _motley kernel for the N4 (add faux sound control)

Had no Problems with your WiFi fixed kernel :) But I changed to matr1x due to the positive reports I have read concerning the battery life.

Are there any known issues about wake locks caused by this wifi fix?

... Nexus 4 in da House
[Nexus 4 Original Android Development] pieces of cake:
Does this kernel support fast charge? If not when? ;)
[Nexus 4 Original Android Development] karanrajpal14:
It does!
[Nexus 4 Original Android Development] pieces of cake:
Hell yeah *****es!
[Nexus 4 Original Android Development] wathefak:
I think so yeah
[Nexus 4 Original Android Development] AcmE85:
@kszaq

Your latest wifi fix kernel does not work for me. Did a clean flash after ROM update.

After flashing your first kernel, messages arrive immediately again.

Edit: unfortunately both do not work now. I do not know the reason, cause it used to work yesterday.

Both were tested after a clean ROM flash.
[Nexus 4 Original Android Development] harlock:
Regarding this I had a problem which was fixed only when I used your modded Kernel with Prima 3.2.2.2 drivers:

When I turned the screen off while I was dowloading a long file ( 100 Mb for example ) the download ALWAYS FAILED.

Like the phone decided to go to sleep and turn the WiFi off. This was pissing me off so much... more than the delayed notfication issue.

Anyway now this problem is fixed.

I m curious to see what it s gonna happen if I enable that flag agin...

I ll give it a try and thanks again for your work
[Nexus 4 Original Android Development] sotong:
-Delete--
[Nexus 4 Original Android Development] JmPTaz09:
B49 working really well for me.... :beer: just thought I'd mention it!
[Nexus 4 Original Android Development] Johnny424:
this kernel is working great for me as well..just got my nexus 4 yesterday..thank you motley
[Nexus 4 Original Android Development] Audioboxer:
Can someone please post the default interactive governor settings? An image is fine!

Thanks in advance.
[Nexus 4 Original Android Development] whittikins:
What do I put in a script to set the target load to 90 for interactive? Thanks!
[Nexus 4 Original Android Development] :
Hi,

Hi,

If you use an app to set different values for the Interactive governor, disable the "set on boot" option (or equal) then reboot and the settings will be back to default.

If you use init.d scripts, rename (with a .back extension) or delete your script then reboot.

:)
[Nexus 4 Original Android Development] :
Re,

I'm playing with different settings for Interactive governor and I found some settings for my goal: smoothess first, remember I don't care about battery life :D

This with 486 Mhz / 1.51 Ghz CPU freqs...

No micro-lags or stutters, absolutely no lags even in XDA app (smoother than my previous Interactive governor settings, wich are many pages back) in opening and scrolling. Switching in recent apps is also smoother and zoom / scrolling in the stock browser too...

But battery life seems to suffer a little :D, with these settings compared to the previous and with almost the same usage (mainly browsing in 3g) I lose almost about 30 - 45 mins of screen on time :eek::p:D. Which is about 3h30 for now, with no undervolt. But when I see the fluidity of the general UI... I don't care.

Some settings like go_hispeed_load and target_loads can be adjusted to 60 or by default to 80. Boostpulse duration can be adjusted to 2 000 000.

With these settings the CPU spend the most of the time (and about equal time) at 486 Mhz / 1.026 Ghz / 1.51 Ghz and not much on the intermediate CPU freqs (normal with these settings).

These settings must be considered as extreme and not battery friendly :D, and it's not scientific or proven settings, it's just my experience and feedbacks ;)

I also tried to play with timer_slack but I can't realy see any changes... :confused:

And thanks to IAmAN00bie for the reminder about seconds / microseconds for the boostpulse_duration, here its in seconds I can check the time spend by the CPU at the 1.026 freq.

:)
[Nexus 4 Original Android Development] ashishv:
If rom reflash necessary when coming from faux kernel?Cos afaik,only franco kernel modifies ramdisk??