yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] xenyz:
I'm curious if by manipulating the DEF_DOWN_THRESHOLD you can get the best of both ways: lower frequencies for idle tasks, higher frequencies for more responsiveness. Perhaps when you're back at it you can test it out.

It's sort of how it goes, new development is for current releases. I'm not aware of any kernel updated for KK since the Android 5.0 release.
[Nexus 4 Original Android Development] famewolf:
I can see your point but it's still aggravating to have to stay on kitkat to use xposed and yet kitkat is still becoming 'Dated' in other ways such as kernel updates etc.
[Nexus 4 Original Android Development] guimendes:
KK kernels are stable for a long time and newer kernel releases for LP are basically to stabilize it across the new system. Ok, you may point that you'll miss security fixes, but nowadays 3.4 series of kernel are not receiving many mainstream updates anymore. So, I don't see why do you really need KK kernel to be updated, because they're fast and stable enough for daily usage.

All kernel developers here are volunteers and it's very hard to keep two branches of development, because it needs a lot of testing before releasing. So, imagine: You have a really short free time and, in this free time, you decide to create a new kernel for your device. Ok, you can keep it up to date with your free time and improve it constantly. Then, a new version of Android is released. At this time, you'll update your device and your kernel. After the update, your kernel is not compatible with previous Android versions anymore. To keep developing for older version, you'll need to apply the newer patch to both versions of your kernel, so, double work. To test it, you have to downgrade your device to older Android, test, then upgrade again and test newer version, again, double work.

Did you see why this is so hard to keep now?
[Nexus 4 Original Android Development] famewolf:
Yep. makes perfect sense...I suppose I was in hopes somewhere there was one kernel developer who used xposed and was also biding their time....oh well...the non oc version of Mirage continues to do a great job for me.
[Nexus 4 Original Android Development] ihancioglu:
Hi, I am using my device with ignore_nice_load and above init script. But there is no much difference on battery life. It looks same with last cycle. Almost 5hours SOT with 1,5 days on battery with one cycle.
[Nexus 4 Original Android Development] karthi89:
Can you please share your kernel settings?
[Nexus 4 Original Android Development] ihancioglu:
-75mV undervolt

up_threshold 100

That's it
[Nexus 4 Original Android Development] Nicknoxx:
Does anybody know of a guide that describes how to do this? I'm a noob kernel wrangler and have so far compiled the stock kernel and this one from source and am looking to develop my own.

Thanks
[Nexus 4 Original Android Development] mrg666:
.

You can start from here
[Nexus 4 Original Android Development] Tommy-Geenexus:
This is how i got started:

http://xdaforums.com/showthread.php?t=1748297

http://xda-university.com/

http://xda-university.com/as-a-developer/getting-started-building-a-kernel-from-source

http://xda-university.com/as-a-developer/adding-features-to-your-kernel

And a special github guide, very helpful:

http://xdaforums.com/showthread.php?p=31304826#post31304826

btw [MENTION=4203114]mrg666[/MENTION], your hotplug driver is still rocking on my XZ, now almost a 3/4 year without issues.
[Nexus 4 Original Android Development] xenyz:
[MENTION=4203114]mrg666[/MENTION] or anyone else with a decent machine, perhaps try building with Sabermod instead of Linaro? I was comparing Mirage to another kernel and it seems like Mirage can go even faster with a different toolchain.

I would love to be the one to do this but my old Macbook Pro takes an hour and overheats when compiling Linux. :/
[Nexus 4 Original Android Development] famewolf:
Sorry to be slightly OT.....I have both a nexus 4 and a nexus 5..was just wondering if mirage is available for the nexus 5 and if not what the closest match would be? I've been very happy with it's performance on my N4.
[Nexus 4 Original Android Development] mrg666:
Thanks for the comments. But I don't have N5, so there is no MiRaGe kernel for it.

[MENTION=3118524]xenyz[/MENTION], I am skeptical about the benefits. testing a kernel with a new toolchain takes long time. But I will try and post a test build with the next version.
[Nexus 4 Original Android Development] vampire36:
Must agree...would be great if you can give us a test build with sabermod...I too feel mirage can go faster with sabermod :)
[Nexus 4 Original Android Development] jer_ying_fd:
What are the default settings for mirage kernel? I was in a discussion in reddit and someone told me that the up_threshold is 95 but not 25 in semaphore. I am worried my other settings might be messed up if it is true. I am running Frank pre-release 6 with SuperSU 2.42. Thx.
[Nexus 4 Original Android Development] tvall:
ROM I am using is just AOSP with no major changes built a couple days ago using the aosp kernel built from the then unreleased kitkat kernel source. Its using the krt16o binaries. I built it the day the binaries were released. Have there been major changes since then? I'll try building again later today. If it still doesn't boot, I'll just swap out Google's kernel with yours.
[Nexus 4 Original Android Development] mrg666:
I have tried MiRaGe yesterday with KRT16O it worked without any problem. I have updated the stock ROM to KRT16S today and the same kernel was still working fine. The problem could be with radio image and bootloader as well. Did you update your radio image and bootloader? If not I would recommend updating them. You can just flash the latest factory image to get them and reflash your ROM over it or you can edit flash-all.bat in the tar file to flash only radio and bootloader to save time.
[Nexus 4 Original Android Development] tvall:
Already uploaded radio and bootloader. Did that before my krt16o build finished.

Building krt16s now. Will report back when I finish pulling my build off the server sometime next week....
[Nexus 4 Original Android Development] mrg666:
Sure, let me know if I can help.
[Nexus 4 Original Android Development] tvall:
Success. Just replaced the aosp kernel with yours. I'm assuming there is something in the stock ramdisk that breaks aosp.

Did you make any changes other than commenting out the thermald and mpdecision lines?
[Nexus 4 Original Android Development] tvall:
stock boot image, your boot image, and the boot image built from aosp all work on my krt16s build. I guess I broke something on krt16o.

edit: using the oc kernel. runs stable at stock settings. overclocking to 1.647 caused a soft reboot while benchmarking, but appeared stable afterward. i'll be sticking with 1.5

and if xda wants to stay organized, this should be moved back into original development, or they should abandon the idea of separate sections. the mods seem to be having trouble keeping things straight.
[Nexus 4 Original Android Development] jawz101:
Did [MENTION=3038499]tvall[/MENTION] and [MENTION=4203114]mrg666[/MENTION] finally drop their Optimus V's in the toilet?

:sly::D
[Nexus 4 Original Android Development] tvall:
honestly, the last time i turned on my optimus v I was living in a different timezone. finding which box it ended up in is not worth the effort.
[Nexus 4 Original Android Development] mrg666:
I bought an EVO 3D after OV and N4 after EVO. EVO 3D is gone but I am still keeping the OV which I flashed to PagePlus. The uptime was over 2 months on the OV last I checked. I have wrapped up development for OV long time ago. Nice to see you around.
[Nexus 4 Original Android Development] jawz101:
ditto to both of you. I wanted to give you all some street cred in saying you two are definitely ORIGINAL Android Developers in case a moderator every checks the thread out. (example of not original :P)

There was definitely a collaborative effort going on in the P500 & Optimus V androidcentral forums - moreso than anything else I've seen.
[Nexus 4 Original Android Development] mrg666:
New MiRaGe builds are available in the OP with the following changes.

- removed unneeded a2xx and a4xx code from kgsl driver

- backported workqueue improvements from Linux 3.7 (it was already at 3.6 level)

- several other minor changes

I have tested; everything seems to be in order and kernel is little lighter now.

Cheers!

BTW, did anybody notice occasional stuttering in some of the 3D games? This was happening with the stock kitkat kernel, I haven't seen yet with MiRaGe but let me know if you see anything.
[Nexus 4 Original Android Development] zwodziarz:
I've noticed some lags on Interactive, when I changed for performance it stopped lagging, anyway the issue is there for me
[Nexus 4 Original Android Development] mrg666:
I wasn't talking about the performance difference between interactive and performance governors. Performance governor will be smoother than any other governor since it is keeping the cpu at max frequency always. But this is at the expense of battery life. Fortunately, there are c-states that shutdown parts of the cpu circuit when they are not used. Otherwise, battery life would have been much worse with the performance governor. Please let me know how is the battery life after using performance governor for a while.

For the CPU power management, there is cpu governor that scales the cpu frequencies with load, msm cpuidle that governs the c-states, and, finally, asmp (I have developed) that shuts down the idle cores after a certain amount of time. Out of all these, cpuidle's power management has the lowest latency but comes with least power savings, cpu governor's latency is intermediate together with the power savings, asmp has the highest latency but saves the most power. I have done a lot of work on decreasing the latency of asmp and I think it works pretty well now. Let me work on the cpuidle code in the mako kernel. I haven't checked it in detail, maybe updating it can help.

Here is a nice presentation about the c-states and power states in general

https://events.linuxfoundation.org/images/stories/pdf/lf_elc12_guittot.pdf
[Nexus 4 Original Android Development] zwodziarz:
So I was on Semaphore(interactive 384/1512) 2 hours ago and while I was playing ZenPinballHD after 3minutes phone got hot and I assume it decresed the frequency and started lagging a lot like fps dropped to 10 or something, phone wasn't usable so I got a bit angry. Then I flashed Yours 22/11 now (when I noticed those little lags I was on 19/11) and on interactive 384/1242 it doesn't lag at all and the phone's not getting that much hot. Great work on this one, congrats :good: Anyway I think the battery life is a bit worse than on the stock kernel and I can't use OC kernel cause my CPU is a bit moody...Your kernel is the only one that works for me with no glitches or anything.
[Nexus 4 Original Android Development] tnp9008:
Just FYI for anyone searching in the future, I'm running this on the 11/30 nightly of OmniROM with no issues so far. Also I managed to have a "good cpu" as I can run the OC version. Currently have it on the 1.728 setting waiting to see if I have any issues; it did benchmark in AnTuTu at 19330 which is better than I've got before(15xxx). Great kernel so far [MENTION=4203114]mrg666[/MENTION].
[Nexus 4 Original Android Development] DnickDominic:
KRT not KTR . :)
[Nexus 4 Original Android Development] mrg666:
Yep :o
[Nexus 4 Original Android Development] dunda92:
In my opinion AK kernels, are better.
[Nexus 4 Original Android Development] DontPushButtons:
There's a difference between constructive criticism and criticism. You are entitled to your opinion. However, it was not asked for.
[Nexus 4 Original Android Development] Nil253259:
Semaphore default up threshold is 25
[Nexus 4 Original Android Development] ihancioglu:
Both are correct but diffent modules. Up threshold is 25 for dynamic hotplug and 95 for ondemand governor..
[Nexus 4 Original Android Development] jer_ying_fd:
Thx guys
[Nexus 4 Original Android Development] ap1618:
does the 5.0 version work with 4.4.4?

thanks,
[Nexus 4 Original Android Development] mrg666:
I haven't tried. But you can reflash the kitkat kernel via recovery or bootloader if lollipop kernel doesn't work.
[Nexus 4 Original Android Development] ap1618:
Hi,

I wonder, would it be ok to turn off SOC temperature throttling?

the reason is when I play games, when it starts throttling when hot, everything just lags and comes to standstill.

would this adversely affect CPU/battery?
[Nexus 4 Original Android Development] mrg666:
Thermal throttling is necessary and it is not ok to turn it off. But I am surprised that your phone gets that hot. I have never seen such drastic throttling on my device. Can you please specify exactly how it is happening?
[Nexus 4 Original Android Development] ap1618:
when i play Ingress and charge at the same time, shiz goes downhill real fast :o

it happened even at night... If its daytime in the sun, I'm so screwed....
[Nexus 4 Original Android Development] mrg666:
Battery warms up during charging and it adds on top of the cpu temperature. It is normal that cpu is throttling under those conditions. If you disable throttling, phone will crash or reboot. I would try a slower charger or avoid charging during gaming. If your battery is worn out, replacing it might help with heat too.
[Nexus 4 Original Android Development] yantz:
SimpleAOSP Build 9

1. SimpleAOSP stock kernel

2. Mirage 1.566ghz max, ondemand, bfq

3. Mirage 1.728ghz max, ondemand, bfq

Ultra stable, no lag, no freezes, no stutters, no random reboot. Easy freq control via no-frills. :good:

yantz
[Nexus 4 Original Android Development] Ryanrioz:
nice kernel :) and here is mine cropped batt. stat and sot
[Nexus 4 Original Android Development] mrg666:
New builds are available in the OP with updated BFQ scheduler (v7r6 -> v7r7). Please check the details in the repo.

Enjoy!
[Nexus 4 Original Android Development] ForMartha:
Hello gents,

I'm having the same heat issue and throttling down (while playing FIFA 15 without using charger) - BTW, other Kernels dosnet got the same issue.
[Nexus 4 Original Android Development] mrg666:
You had so many problems with heat, battery life, GPS, 3G, etc. when using MiRaGe. Thank you for still trying but if I were you I would just use the other kernels.
[Nexus 4 Original Android Development] ForMartha:
Sorry that Iv'e caused you inconvenience, that wasn't my intention.

the bottom line is that I LOVE YOUR KERNEL - it is stable, fast, efficient and one of the best that iv'e ever used.

it has improved a lot (as you can see, I'm using it for a long time now as my daily driver and i will sure like to see that it's improving - this is why I make those comments.

to be much more productive, can you please tell me what I need to sent for you to analysis so It could evolve ?

thanks once again for your hard work, it's not obvious.
[Nexus 4 Original Android Development] mrg666:
I am glad MiRaGe works well for you other than the game you mentioned. If your phone is rebooting spontaneously or crashing, those are problems I would definitely act on. Please post last_kmsg. There are no general heating problems to address in my testing/use. But I really can't go out of my way to test a game you play since I simply don't have time for that. Since I can't give such kind of support my recommendation would be either using whichever kernel works for you or just delete that game.
[Nexus 4 Original Android Development] xenyz:
I'm going to take a guess and say it's the thermal throttle kicking in at lower temperatures than other kernels causing issues with the game. I've noticed this as well, but I consider it a feature as I don't want to cook my device, and don't play many games.
[Nexus 4 Original Android Development] ForMartha:
thanks once again.

Iv'e did some testing after the post Iv'e made - and it comes out that indeed the throttling kicks a bit sooner then other kernels.

Today we had a serious drop of temperature in my country and Iv'e been almost 6 hours in 0 degrees Celsius. Iv'e played the game for about 20 min using 3 kernels and it seems that I was right (I guess this game is just a kick off to say that our 2.5 years old N4 is indeed becoming older for playing games).

BTW - those aren't lab testing, therefore i'm not sure in 100% that this is the real manor of slowness that I came across, but than again, this is a strating point for something :)

[MENTION=4203114]mrg666[/MENTION] - another thing, Iv'e searched a bit about the new lollipop and how to speed things up. it seems that lollipop running over Nexus 6 has some forced encryption method. by disabling it, the phone can go faster... we can do it to our phone?
[Nexus 4 Original Android Development] mrg666:
We have discussed this earlier and permissive mode wasn't favored among the users. Nexus 4 is able to handle selinux feature without any noticeable slow down anyway. Thanks!
[Nexus 4 Original Android Development] mrg666:
New builds are available in the OP.

- backported few optimizations for block, tcp, and fs/buffer from mainline Linux

- minor tweak for autosmp to keep idle cores offline longer

- enabled NEON accelerated sha1 and sha512

Enjoy!
[Nexus 4 Original Android Development] Hoochie_Coochie:
I think he means full encryption on the phone, which the nexus 6 and 9 have as default, but the nexus 4 has as an option but is off by default, nothing to do with the kernel.

https://support.google.com/nexus/answer/2844831?hl=en-GB
[Nexus 4 Original Android Development] arjunv:
nav bar issue

hi when i flash mirage on velocity, my Nav bar behaves strangely. the center button and the recent button goes blank whenever i flash mirage. while this is not the case with any other rom i flash.
[Nexus 4 Original Android Development] HiM@L:
just sent you pm... can you check.
[Nexus 4 Original Android Development] mrg666:
What is velocity?
[Nexus 4 Original Android Development] jimyiak:
A rom made by psx team..but it's closed now..it stopped on v2 lollipop..

sent by nexy 4
[Nexus 4 Original Android Development] arjunv:
Here is the link to the v2

https://www.androidfilehost.com/?fid=95832962473395728
[Nexus 4 Original Android Development] vampire36:
[MENTION=4203114]mrg666[/MENTION] : I think its more to do with format...

Euphoria rom and some other roms might be affected....anykernel format would be needed for this...:)

Semaphore and Hellscore like format...for reference :)
[Nexus 4 Original Android Development] mrg666:
Let me see what I can do. But, as indicated in the OP, I only support the stock ROM. So no promises.
[Nexus 4 Original Android Development] vampire36:
If am not wrong I remember [MENTION=4056635]ChaosChris[/MENTION] was building kernels in anyformat for mirage till sometime back :)
[Nexus 4 Original Android Development] icu64:
I play ingress while charging all the time, I don't have that issue
[Nexus 4 Original Android Development] mrg666:
Thanks! This is good to know
[Nexus 4 Original Android Development] xenyz:
[MENTION=4203114]mrg666[/MENTION] have you considered increasing the DEF_DOWN_THRESHOLD a bit and maybe removing the 432 MHz step? Have a look at my stats:

Other than that, battery life is better on latest, might just be the best yet.
[Nexus 4 Original Android Development] HiM@L:
this is really good kernel...used with purity during KitKat and now using it with Cataclysm....but i have wondered something...is the color profile default or custom? what can i use to change the color?
[Nexus 4 Original Android Development] xenyz:
Gamma is default; you can use Trickster MOD, Semaphore kernel manager, or init.d script (with busybox from play store installed):

/etc/init.d/00mirage

#!/system/bin/sh

# bundi gamma
echo "0 39 119 1 6 0 2 0 1" > /sys/devices/virtual/misc/gamma_control/gamma_b
echo "0 39 119 1 6 0 2 0 1" > /sys/devices/virtual/misc/gamma_control/gamma_g
echo "0 39 119 1 6 0 2 0 1" > /sys/devices/virtual/misc/gamma_control/gamma_r

# lg gamma
echo "114 21 118 0 0 0 80 48 2" > /sys/devices/virtual/misc/gamma_control/gamma_b
echo "114 21 118 0 0 0 80 48 2" > /sys/devices/virtual/misc/gamma_control/gamma_g
echo "114 21 118 0 0 0 80 48 2" > /sys/devices/virtual/misc/gamma_control/gamma_r

# voltage
echo "-50000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels

# wake
echo 1 > /sys/devices/virtual/input/lge_touch/dt_wake_enabled

Pick bundi or lg and delete the other. Personally I'm liking LG lately, but I used to use bundi.

Edit: fixed LG gamma values
[Nexus 4 Original Android Development] HiM@L:
do i need to do this in terminal?

sorry, little low knowledge in script thing.
[Nexus 4 Original Android Development] xenyz:
Grab Semaphore Kernel Manager from the Play Store and plug in those numbers instead, it'll be easier then. There is a spreadsheet in Nexus 4 general section with a lot of users' gamma settings as well.
[Nexus 4 Original Android Development] HiM@L:
used trickster instead...thanks.
[Nexus 4 Original Android Development] jer_ying_fd:
Just to confirm, the GPU is not really stuck at 320 mhz right?
[Nexus 4 Original Android Development] mrg666:
I will test the idea. Thanks!

Just checked, GPU is not stuck.
[Nexus 4 Original Android Development] jer_ying_fd:
Ty, extremely smooth kernel! :good:
[Nexus 4 Original Android Development] xenyz:
This was just in the semaphore thread too, @hellsgod has the 'fix'
[Nexus 4 Original Android Development] vampire36:
Also anykernel format like semaphore would be good...if you can consider so that would work with all roms :)
[Nexus 4 Original Android Development] mrg666:
The changes I make in the ramdisk are done assuming the stock ROM configuration. I need to make sure they work for all ROMs. Plus, expanding the existing boot image and repacking after modifications on the fly is not as fail-safe as only flashing the new boot image. Last, I also don't like potentially messing up other devs' work. So it is not my preferred packaging method. But I have done anykernel updaters before with other phones. I will work on it and post here if I find it safe and satisfactory, probably in the coming weekend.
[Nexus 4 Original Android Development] nibla101:
How do i disable enforcing SElinux on this kernel, ive tried

setenforce 0

in init.d and the app from playstore but it keeps changing back which makes viper4android useless because it need permissive to work
[Nexus 4 Original Android Development] vampire36:
Nice thanx a lot :)
[Nexus 4 Original Android Development] nycelitemaster:
Fellas have the kernel a shot but my screen is flickering. All default latest stock ROM. 5.0.1

Sent from my Nexus 4
[Nexus 4 Original Android Development] xenyz:
Are you certain it's all defaults? Do you happen to have any kernel tweaking apps applying settings on boot? Also, look in /etc/init.d/ for any startup scripts.

The usual suspect for screen flickering is C1 (retention) sleep state being enabled.
[Nexus 4 Original Android Development] mrg666:
There is no flickering at default settings.
[Nexus 4 Original Android Development] nycelitemaster:
Ah had fauxkernel app that had c1 retention on... Asap I turned it off all is normal.. I cleared the settings but it stayed.. Weird.

Now all well.

Sent from my Nexus 4
[Nexus 4 Original Android Development] haplo39:
dt2w

is it possible to activate the "double touch to wake" without root?
[Nexus 4 Original Android Development] xenyz:
Technically, yes.

- recompile kernel with dt2w enabled

- create a flashable zip with busybox installed to /system/xbin/busybox and a script with the following installed to /system/etc/00mirage with permission 755

#!/system/bin/sh

echo 1 > /sys/devices/virtual/input/lge_touch/dt_wake_enabled

It is a lot easier to just use a root manager and something like this, though.
[Nexus 4 Original Android Development] ForMartha:
possibly memory leak,

Hi [MENTION=4203114]mrg666[/MENTION],

It seems that the kernel may have an issue with memory leaks. after 3-4 days of heavily using the phone, it seems that it get stuck (dailer, launcher etc. are FC or hangs forever). the only way to solve it is by restarting the phone. Can I assist with providing logs that may be helpful to us?

thanks for everything youv'e done so far.