yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] mrg666:
New MiRaGe builds are available in the OP with the following changes

- Linux 3.4.108

- BFQ v7r8 update

- Few minor ext4 and block updates

Cheers!
[Nexus 4 Original Android Development] :
new version will be released for the Nexus 4 CM 12.1 ?
[Nexus 4 Original Android Development] jer_ying_fd:
Not likely
[Nexus 4 Original Android Development] :
:crying: :crying: :crying:
[Nexus 4 Original Android Development] mrg666:
I prefer following Google and mainline Linux code as close as possible. CM, on the other hand, prefers following CAF. CAF code is sometimes very unstable and bloated. If you want to try MiRaGe but not with stock ROM, I recommend Cataclysm or Rastapop. Both are very good IMHO.
[Nexus 4 Original Android Development] bdasmith:
http://xdaforums.com/android/software-hacking/adreno-idler-idling-algorithm-devfreq-t3134872

Is this worth looking into?
[Nexus 4 Original Android Development] mrg666:
I had removed thrustzone and used devfreq ondemand governor in kgsl but reverted those changes after flickering issues. I will check this out.
[Nexus 4 Original Android Development] pirigu:
Hello guys a question ... I can not install the kernel on Rom purity! Me error system ui ... You tell me what I have to download and install? Thanks in advance and sorry for my english
[Nexus 4 Original Android Development] HdSht:
Download this (scarica questo):

http://www.mediafire.com/download/u9pe19s0e1v1yc2/MiRaGe_mako_anykernel_LMY_061915.zip
[Nexus 4 Original Android Development] pirigu:
Ok thanks ... I can also download the oc?
[Nexus 4 Original Android Development] HdSht:
You can, flash anykernel oc version and if you face bootloops flash standard anykernel one.
[Nexus 4 Original Android Development] HdSht:
Is it possible to add a .sh file to the anykernel zip like in other kernels to allow renaming files or enable init.d ? For example I'd like to use this so I don't have to rename/delete manually every time I update the rom:

#!/sbin/sh

if [ -d /system/etc/init.d ]; then

busybox run-parts /system/etc/init.d

fi;

if [ -e /system/bin/mpdecision ]; then

busybox mv /system/bin/mpdecision /system/bin/mpdecision.bak

fi;

if [ -e /system/bin/thermald ]; then

busybox mv /system/bin/thermald /system/bin/thermald.bak

fi;

if [ -e /system/lib/hw/power.msm8960.so ]; then

busybox mv /system/lib/hw/power.msm8960.so /system/lib/hw/power.msm8960.so.bak

fi;

if [ -e /system/lib/hw/power.mako.so ]; then

busybox mv /system/lib/hw/power.mako.so /system/lib/hw/power.mako.so.bak

fi;

Ty in advance :).
[Nexus 4 Original Android Development] mrg666:
For these shell commands, system partition must be mounted and modified. Many users try different kernels and, if every kernel package makes their own changes in the system, the system becomes a mess in the end. I have, so far, avoided making changes in /system folder because of this reason.

Instead, I have created a flashable zip package for the changes you wanted. You can keep this zip file in a storage folder and flash it after every time you reflash your ROM. This is only needed after flashing the ROM, not after kernel updates.

The script is /kernel/modsys.sh in the attached zip file. You can open the zip file in 7zip and edit/modify. The first command for /system/etc/init.d is supposed to be in init.rc within ramdisk so that it is executed at every boot.
[Nexus 4 Original Android Development] HdSht:
Thanks a lot sir :angel:.
[Nexus 4 Original Android Development] mrg666:
New MiRaGe builds are available in the OP.

- Fixed the kernel crash while changing the cpufreq governor. I have tested cpufreq governor change many times between ondemand, interactive, and performance.

- Built with Linaro 15.03 toolchaing (gcc 4.9.3) after testing that the kernel has no stability problem with this release. The kernels built with the earlier gcc-4.9 based toolchains had stability problem. I have been building my custom Linux-4.0 kernel for Ubuntu 15.04 with gcc 4.9 and I thought it was time to test the Android kernel as well. It seems that gcc 4.9.3 is now mature enough.

I have also found a workaround for the shared policy problem about the governor change not applied to the offline cores. The workaround is switching initially to performance governor which brings all cores online and the next governor change applies to all cores since all of them will be online during the governor change. I will look into eliminating this workaround next.

Cheers!

PS: Please post if you see any problems/improvements with the new toolchain.
[Nexus 4 Original Android Development] :
PM me if you like, but keep it on topic in here guys :)
[Nexus 4 Original Android Development] mrg666:
A new build of MiRaGe kernel is available in the OP with the following changes

- msm: pm: Fix for race condition of starting cpu1 when cpu0 in PC

- msm: hotplug: wait for hotplug completion event from secondary core

- msm: cpufreq: increase priority of thread that increases frequencies

- crypto: msm: apply latest updates from CAF kk_2.7_rb1.13

and several other changes/updates, please see the repo for details.

Cheers!
[Nexus 4 Original Android Development] mrg666:
Before someone asks, the KRT kernel builds in the OP are working okay with KOT ROM update. I will update the kernel when/if Google updates the kernel source.
[Nexus 4 Original Android Development] mrg666:
I have merged Google's just released msm-mako-3.4-kitkat-mr1 (KOT, kitkat 4.4.1) changes and rebuilt MiRaGe for KOT. The downloads are in the OP.
[Nexus 4 Original Android Development] tvall:
One out of five stars.

I had just downloaded the last build to flash and enjoy the awesome, and the kernel dev has the nerve to continue to improve on his work and release another free and improved update so soon! I can't possibly keep up with all these free changes. These updates and my flashaholism are going to kill my data cap.

I see a lot of comments like the above on apps on the play store, so I felt like putting a more sarcastic one here. Thanks mrg, your kernel rocks! My phone does get kinda hot though. Using the oc kernel at stock settings, and it gets noticeably warm while watching YouTube. But that may be due to using lte...
[Nexus 4 Original Android Development] mrg666:
Lol, I promise there will be no updates for at least a week after this.

Phone can normally warm up but can you post a dmesg right after such a warm up? I want to see the CPU temp and if the CPU is throttling
[Nexus 4 Original Android Development] mrg666:
There is no kernel update in today's KOT49H OTA (Android 4.4.2). The latest KOT build of MiRaGe is working fine with the KOT49H. You don't need to restore the stock kernel for taking the KOT49H OTA since there is no kernel update and it doesn't check which kernel you have.

BTW, if you want to take the KOT49H OTA with stock recovery and you are stuck with a custom recovery, you can restore the KRT16S recovery which still works okay with sideloading the OTA from KOT49E to KOT49H. Since there is no system image released by Google for builds newer than KRT16S, that was the latest stock recovery I had.
[Nexus 4 Original Android Development] mrg666:
New build of MiRaGe kernel is available in the OP with the following changes.

- msm hotplug/pm fixes to eliminate (harmless) warnings in the kernel log

- updates for kernel scheduler backported from mainline Linux

- removed useless media tuner drivers

- several fixes in preparation to remove debugfs (hopefully next build)

Several other changes, details, and credits are in the repo as always. Cheers!
[Nexus 4 Original Android Development] tvall:
Its been less than a week (6 days if I counted right.)

Downloading now :)
[Nexus 4 Original Android Development] mrg666:
121113 is a very nice numerical sequence, I couldn't miss it. :cyclops:
[Nexus 4 Original Android Development] mrg666:
Google finally released the KOT49H system image yesterday. There are some slight differences in the ramdisk relative to the KRT build. The init.mako.rc and init.rc has slight changes in addition to several binaries (charger, adbd, healthd, sepolicy).

I have updated the MiRaGe kernel with the KOT49H ramdisk plus a few other changes.

- More optimizations and fixes for kernel scheduler and cpufreq from CAF and Linux mainline. It seems to me that the recent scheduler/hotplug/idle/cpufreq updates made some improvement in the responsiveness of the kernel. Please post if you have any feedback.

- Built with new Linaro 2013.11 toolchain based on gcc 4.8.3

Enjoy!

PS:

For the curious minds, the changes in the init scripts are as follows

init.mako.rc:

-service conn_init /system/bin/logwrapper /system/bin/conn_init
+service conn_init /system/bin/conn_init

-service diag_mdlog /system/bin/logwrapper /system/bin/diag_mdlog -s 100
+service diag_mdlog /system/bin/diag_mdlog -s 100

init.rc:

- # Create private mountpoint so we can MS_MOVE from staging
- mount tmpfs tmpfs /mnt/secure mode=0700,uid=0,gid=0

- mount tmpfs tmpfs /mnt/secure private rec
[Nexus 4 Original Android Development] RealSlimShadyMC:
Since I'm new to this kernel, can I ask if it has contrast/saturation modding support? I've spent so long tweaking my faux kernel to look rich that I don't wanna mess it up by flashing this and realising it can't do the same
[Nexus 4 Original Android Development] mrg666:
Contrast/saturation modding is not supported in MiRaGe.
[Nexus 4 Original Android Development] RealSlimShadyMC:
Okay, cheers. I'm still gonna test this though
[Nexus 4 Original Android Development] mrg666:
I have removed the PMEM support completely from MiRaGe kernel that required modifications in many of the multimedia/video driver source files. I have deleted even the PMEM source and include files. I have modified Laura Abbott's earlier patches in the CAF repo and it seems to be working here based on my preliminary testing. Before I include these changes in the stable builds, I am posting here test builds to see if you can help me with testing.

http://www.mediafire.com/download/klz45ya7cwmwiyw/MiRaGe_mako_test_kernel_KOT.zip

http://www.mediafire.com/download/57rjvfhhay7y3m3/MiRaGe_mako_oc_test_kernel_KOT.zip

Please let me know if you test especially the video/image playing/recording functions.
[Nexus 4 Original Android Development] RealSlimShadyMC:
First try of this kernel is a test version :D will flash and test in the morning, too tired to even remember how to recovery mode right now
[Nexus 4 Original Android Development] mrg666:
Thank you so much, let me know how it went.
[Nexus 4 Original Android Development] RealSlimShadyMC:
Video playback/recording is fine
[Nexus 4 Original Android Development] mrg666:
Thanks. I didn't see any problems yet either.
[Nexus 4 Original Android Development] tvall:
A new experimental kernel, and I can't flash till tomorrow due to the 2g only signal at home... I hate living on this beautiful island.

Edit: downloaded, flashed, been running for 8 or so hours total. No issues so far.
[Nexus 4 Original Android Development] Utkarsh-ezzo:
AnyKernel standard on SimpleAOSP:

Everything nice but two issues:

UKM + Synapse not working, device incompatible error.

Phone heats up too much on playing game like Hay Day.

Now I will try flashing full kernel package onto this to see if it helps.
[Nexus 4 Original Android Development] jacomail95:
New toolchain release performing excellently here, without too much battery drain also in gaming, underclock to 1350 MHz and -150 mV undervolted, standard MiRaGe release :) thanks to developer for this fast and efficient kernel :D

Inviato dal mio Nexus 4 con Tapatalk 2
[Nexus 4 Original Android Development] HdSht:
1) Try Kernel Adiutor (imho is better and I never faced any problem);

2) Not kernel related, I can assure you that with the stock one things are worse (5 minutes of web browsing with 3g and it burns).
[Nexus 4 Original Android Development] deani77:
Always using Trickster for tweaking this kernel. And it good enough for me...
[Nexus 4 Original Android Development] fr3quency:
Hello. I'm on Chroma ROM and I flashed Mirage kernel for a change as I was on f2fs for months(ofc I went back to ext4 to be able to flash it :p ). I tried opening the Google Camera app and I got an error(in short: it doesn't open). I have now wiped cache and dalvik-cache, but if the problem persists what should I do, oh mighty kernel developer? :p

Edit: I have flashed the UV/OC version.

Edit 2: ok everyone chill. I guess wiping dalvik-cache and cache fixed the problem. :)
[Nexus 4 Original Android Development] dcop7:
Try to use stock chroma kernel and see if the problem continues. If it continues, it is not a kernel problem.
[Nexus 4 Original Android Development] Grazehell:
Just quickly scheme through this thread but I can't seem to find if this kernel supports usb OTG with powered cables.
[Nexus 4 Original Android Development] mrg666:
USB OTG patches are not included.
[Nexus 4 Original Android Development] xenyz:
[MENTION=4203114]mrg666[/MENTION] after a week uptime on Cataclysm, I had my first kernel panic. :)

[552497.463466] L1 / TLB Error detected on CPU 0!
[552497.463527] CESR = 0x00000001
[552497.463619] CPU speed = 1728000
[552497.463680] MIDR = 0x510f06f2
[552497.463741] D-cache tag parity error
[552497.463771] D-side CESYNR = 0x00008288
[552497.463863] Kernel panic - not syncing: L1 cache error detected
[552497.463954] wcnss_8960: crash shutdown : 0
[552501.069906] Rebooting in 5 seconds..
[552506.077780] Going down for restart now

No errors detected
Boot info:
Last boot reason: kernel_panic

It's probably because my CPU bin can't run stable at 1728 MHz, but when using stock thermald, it likes to set max freq instead of set freq when thermal throttle is disengaged.

So my humble request is to remove frequencies higher than 1512 MHz on standard build, and only have them in the OC version.
[Nexus 4 Original Android Development] gabidiesel:
Hi dev.... can you add in your kernel ...gamma profile screen... like ....Obsanity Amoled....thanks....
[Nexus 4 Original Android Development] xenyz:
I found the gamma profile spreadsheet. Use Semaphore kernel manager to set screen gamma in Mirage kernel.
[Nexus 4 Original Android Development] gabidiesel:
Thanks... but I use Kernel Adiutor .....and I can"t setup the gamma profile....
[Nexus 4 Original Android Development] Fenvarien:
/edit: Advanced Color & Gamma Control is not compatible, sorry for the wrong information. But maybe it's possible to set these values with an init.d script?
[Nexus 4 Original Android Development] mrg666:
Thermald is disabled in the ramdisk for this reason; you shouldn't be using thermald. But I can disable overclocking in the standard kernel if the other users have no objections. Everyone, please chime in if it is not okay for you to disable overclocking in the standard kernel.

I am on vacation this week, I will probably not be able to do much/any work on MiRaGe this week.

Please use init.d scripting or a compatible kernel manager to set your gamma profile. This has been discussed several times and we are already set on the gamma control methods for MiRaGe.
[Nexus 4 Original Android Development] voron00:
Nice kernel, but what about read_ahead_kb size? Default 128 kb seems too low, maybe set it to 1024? Just one line in ramdisk: https://github.com/franciscofranco/...b820#diff-b4693c9ef6f47a1695b19e4ffae0c6e3R66
[Nexus 4 Original Android Development] jer_ying_fd:
But I thought it works the fastest set to 128kb
[Nexus 4 Original Android Development] mrg666:
You can do this change by yourself with the following command, either on the command line or in an init.d script.

echo 1024 > /sys/block/mmcblk0/queue/read_ahead_kb

There is about 10-15% increase in the IO performance of Quadrant benchmark compared to the default value of 128. But the performance is not noticeable in my use. This change can only improve the read performance and has no effect on write performance. And, it can cause higher battery drain due to reading ahead some of the data unnecessarily.

Guys, please test and let me know if you see any improvement in your daily use. We know this change improves benchmarks; so please try to report your experience instead of reporting benchmark numbers.
[Nexus 4 Original Android Development] Fenvarien:
After some days with different settings, 1024 seems to be the best value regarding the loading time of image galleries, foto apps and web browsing. In other areas there's no noticeable difference in the performance of the N4. :good: :)
[Nexus 4 Original Android Development] mrg666:
Thanks for testing. I think it makes sense to see the improvement with those particular apps where reading data is intensive. Did you notice any change in battery drain?
[Nexus 4 Original Android Development] Fenvarien:
Battery life was not influenced by 1024 RAB. Only when I tried some exaggerated settings like 2048 or 3072 RAB battery life suffered. 1024 seems to be a reasonable value with a certain performance improvement compared to lower RAB sizes.
[Nexus 4 Original Android Development] mrg666:
This is very useful feedback. Thank you!

I will make 1024 RAB default in the next build.
[Nexus 4 Original Android Development] mrg666:
MiRaGe LMY48I update available

- Ramdisk updated with LMY48I

- kernel source updated to mr1.1

- toolchain updated to 4.9.4 15.06

- read_ahead_kb = 1024

Cheers!
[Nexus 4 Original Android Development] bdasmith:
Thanks so much for a timely update :)

One report - the read ahead is still 128 after installing anykernerl version. As reported by kernel aduitor app.
[Nexus 4 Original Android Development] mrg666:
The read ahead buffer is set in the ramdisk but my anykernel packages do not replace the ramdisk. So my ramdisk changes are not included with anykernel packages for custom roms.
[Nexus 4 Original Android Development] dcop7:
Can you update the OP with a list with the ramdisk changes so that we, that uses anykernel, apply can those changes?
[Nexus 4 Original Android Development] mrg666:
Sure, I have uploaded the diff file of changes to ramdisk. Please see the link at the end of changes list in the OP.
[Nexus 4 Original Android Development] dcop7:
I just had a reboot with the latest version (I'm with Euphoria rom)

Last kmsg

http://pastebin.com/7TEwZXbe
[Nexus 4 Original Android Development] mrg666:
There is no kernel crash reported in your kernel log. But the last boot seems to be triggered by watchdog which means there was a system problem detected by the watchdogd in the ramdisk. This could be a compatibility problem with the custom ROM. The watchdogd in the ramdisk has been updated by Google in LMY48I build; maybe watchdogd needs to be updated in your ramdisk (which is not updated with the anykernel package). After more than 2 days uptime with the stock ROM, I haven't seen such a problem yet. I will post again in a couple of days after making sure.

Edit:

Now I am upset with you.

You have been reporting the same problem with other kernels to Euphoria developer which is clearly a ROM incompatibility issue. And posting the same problem here as if MiRaGe has a problem and wasting my time. Don't do this again here. I would appreciate if you don't post here again. You will be ignored.
[Nexus 4 Original Android Development] dcop7:
I didn't said it was a kernel problem. I just wanted to figure out the problem. The post in Euphoria thread didn't help much. Hope you could figure out the problem. I won't post here anymore as requested.

Thank you for your time.
[Nexus 4 Original Android Development] bdasmith:
Oh! Okay. I'm just curious then why during the anykernel installation one of the messages is that it is modifying the ram disk? Thanks for taking time to answer my questions.
[Nexus 4 Original Android Development] mrg666:
Few limited modification to init scripts are done to shutdown several common services that are contained in the kernel. But more extensive modifications are not done to avoid breaking modifications of custom roms in the ramdisk.
[Nexus 4 Original Android Development] voron00:
You can change it in the kernel, https://github.com/mrg666/android_kernel_mako/blob/master/include/linux/mm.h#L1433 here, but that's proably not the best idea, ramdisk change is better
[Nexus 4 Original Android Development] poondog:
Have you tried AnyKernel 2.0?

It seems good and reliable for my use in ramdisk mods across different ROMs and different devices (obviously though the board check is different)
[Nexus 4 Original Android Development] mrg666:
Thanks! I have not tried yet. But I will.
[Nexus 4 Original Android Development] Aetos7:
Hi Mirage. I've flashed LMY overclock kernel and I noticed that 384 Mhz freq has 850 mV (and so on). So there's no undervolt in this version?
[Nexus 4 Original Android Development] HiM@L:
undervolt is only after overclock frequencies.
[Nexus 4 Original Android Development] Aetos7:
Perfect, thanks.
[Nexus 4 Original Android Development] ihancioglu:
AFAIK the stock voltage values starts 900mV and increase to 1200mV, so it is undervolted a bit. But Mirage knows best.
[Nexus 4 Original Android Development] mrg666:
hlimbu00 and ihancioglu are right. I have done more of the undervolt at higher frequencies. Because most of the power is used (and heat generated) when the cpu is loaded and the cpu frequency is high. There are C states that add to power savings when the cpu is idling at lower frequency and, IMHO, undervolting lower frequencies is not worth the risk of spontaneous reboots while idling or sleeping.
[Nexus 4 Original Android Development] doragasu:
This is the first time I dare to experiment with kernels on my N4, and Mirage is the first one I want to try, it looks great!

I just have a quick question before getting to work: How can I backup the stock kernel before flashing Mirage, to be able to revert it if anything goes wrong? Can it be done using TWRP or Titanium Backup?
[Nexus 4 Original Android Development] xenyz:
You can do a nandroid backup in TWRP; just choose the boot partition. Another good option is Flashify because you don't have to reboot to recovery. It's not as safe as having a nandroid backup though (if the kernel is toast, you can't boot and can't run Flashify). Stick to TWRP for now.
[Nexus 4 Original Android Development] doragasu:
Thanks!, I hope I have time tomorrow to try it!
[Nexus 4 Original Android Development] mrg666:
I have uploaded a flashable zip file for going back to stock boot image in the OP. Please see the the last bullet under Installation heading.
[Nexus 4 Original Android Development] doragasu:
Made the backup and flashed standard kernel. Looking good, thanks!
[Nexus 4 Original Android Development] Italico:
Hello everybody!

Using MiRaGe for the first time... impressive is a reductive word!

Fast and smooth, and with a great battery too! What a piece of art.

Just a question, mrg666: why did you lock the voltages for the lowest quartet of frequencies at 750mV, without the possibility to get lower? I bet a lot of people - running OC UV kernel version - could go down to 700-725mV without ANY trouble ( I usually set 712,5mV [MENTION=1089301]384[/MENTION]mHz)... but at the same time I suspect there's a technical/functional reason!

Would you be so kind to explain?

Thank you in advance!
[Nexus 4 Original Android Development] mrg666:
Hello! and thanks for the comments.

We had recently discussed the lower frequency vdd settings. I did not mean to lock the minimum voltage, just left it alone based on my explanation there. Please take a look at my post in the link.

Welcome to MiRaGe thread.
[Nexus 4 Original Android Development] Cristiano Lira:
Why dt2w don't work? I have actived with Trickster MOD and am using SimpleAOSP.
[Nexus 4 Original Android Development] ilyadan:
I use same ROM, and trickster. It works for me if I tap very fast.
[Nexus 4 Original Android Development] Italico:
​

Ah, OK. Sorry, I did not found that post.

Aldo, is it 'normal' for the battery to reach 42°C only by browsing/chatting? Shouldn't ne at 36°C maximum? Standard kernel, no OC, more UV on some frequencies.

Never happened with other kernels, as far as I remember... Makes me worry about battery life - and its health too!