yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] guimendes:
Which ROM are you using? I use stock and never faced this problem.
[Nexus 4 Original Android Development] xenyz:
Not for me, 5+ days on Terminus ROM with no issues at all.

As you can see, heavy use. :)
[Nexus 4 Original Android Development] mrg666:
[MENTION=4149362]ForMartha[/MENTION]

No memory leak has been reported before and I haven't seen any either. Although I don't think there is a kernel issue, you can post kernel log if you want me to check.
[Nexus 4 Original Android Development] ForMartha:
Quick question,

how do it post the kernel log? and also, should it be during the issue and after restart (means, the kernel log output)?

thanks,

FM
[Nexus 4 Original Android Development] icu64:
I see in the change log that you enabled gamma control but Franco's gama tool doesn't work with it. What tool should I use?
[Nexus 4 Original Android Development] mrg666:
Gamma control is from Semaphore. Stratosk has a tool that controls gamma. There were multiple discussion in this thread. You will find init.d method too.

Here
[Nexus 4 Original Android Development] icu64:
Opps, my bad bro I didn't mean to be a pest. I love your kernel with a passion by the way
[Nexus 4 Original Android Development] mrg666:
That's OK. I am glad to be useful.
[Nexus 4 Original Android Development] Fenvarien:
How to set the gamma values with init.d was described by [MENTION=3118524]xenyz[/MENTION] here: http://xdaforums.com/showthread.php?p=58291647
[Nexus 4 Original Android Development] anupash:
Use something like Trickster Mod to set the gamma value .. save it to apply kernel settings on boot
[Nexus 4 Original Android Development] jer_ying_fd:
Sorry, noob question. Does overclocking the CPU actually have a noticeable impact on performance and battery life? Can the cons outweigh the pros? Thx.
[Nexus 4 Original Android Development] mrg666:
Nexus 4 is not a good overclocker. Even if you can overclock, depending on your cpu and phone, it will not be that much to make noticeable difference. The capability in the kernel is just a geek trophy for me. Otherwise, I wouldn't recommend overclocking.
[Nexus 4 Original Android Development] jer_ying_fd:
What about GPU? I saw some people saying that the energy consumption of GPU at 487 mhz is the same as 400
[Nexus 4 Original Android Development] HdSht:
Hello guys, I'm new to this thread :). Can anybody tell me if this kernel is compatible with Paranoid Android ? It is based on aosp but i don't know if it has stock kernel and ramdisk which mirage requires if i'm not wrong.

Btw PA 5 was released today :).
[Nexus 4 Original Android Development] nibla101:
This kernel will work with PA but themes will not work.
[Nexus 4 Original Android Development] HdSht:
Thx for the reply :)

I obtained the init.d following the link on first page but can't get working my own scripts :( .
[Nexus 4 Original Android Development] xenyz:
You need busybox installed, a /system/etc/init.d dir with permission 755, and a script inside that dir with permission 755 which starts with the following:

#!/system/bin/sh
[Nexus 4 Original Android Development] jer_ying_fd:
Damn... I forgot this doesn't have f2fs anymore....
[Nexus 4 Original Android Development] HdSht:
Ty for answering :). The problem was that I edited the file from windows and it left some blank spaces; once removed them all was fine:).
[Nexus 4 Original Android Development] mrg666:
Try Notepad++. It can edit text files with Unix file format
[Nexus 4 Original Android Development] jer_ying_fd:
Is it better to have two cores online all the time or just one?
[Nexus 4 Original Android Development] mrg666:
Autosmp hotplugs the additional cores when needed. There is no reason to force more than one core online ... That is just waste of battery power.
[Nexus 4 Original Android Development] jer_ying_fd:
Thx, cuz I saw done other kernels doing this and couldn't understand it.
[Nexus 4 Original Android Development] icu64:
Maybe you should try it or talk to the other devs to see why they do it. Honestly the only other kernels I use are Franco a semaphore and both of them do that and the battery is pretty good on semaphore
[Nexus 4 Original Android Development] albundy2010:
It's done because turning cores on and off over and over again is very expensive
[Nexus 4 Original Android Development] icu64:
That's what I remember Franco posting at some point, there's that and the everything does seem more smooth honestly
[Nexus 4 Original Android Development] mrg666:
Yes it is expensive and I have worked on making autosmp as efficient and consistent as possible to minimize unnecessary hotplugs. Please check my repo for autosmp changes.

I have developed kernels for single- and dual-core cpus too and my decisions are based on my own developing experience. Qualcomm has been developing mpdecision starting with dual-core cpus. And I remember the benefit of hotplug driver on the battery life with MiRaGe for EVO3D's msm8660 cpu. Qualcomm wouldn't have developed mpdecision for dual-core msm8660 if it had no benefit. And I had used a kernel-based implementation of it; it was better than the userspace implementation. Autosmp in Nexus4 kernel is even more efficient than the version I had used in EVO3D. Discussing with other devs is fine but I am not changing my experience-based decision.

Still not convinced? That is fine and it is your phone. Just add the following in your init.d script ... done!

echo 2 > /sys/kernel/autosmp/conf/min_cpus

Let's move on :)
[Nexus 4 Original Android Development] albundy2010:
Don't get me wrong. I wasn't making the case for it by any means.

Just answering the question on why some went the route of keeping two cores online. Another even keeps all four online by default.
[Nexus 4 Original Android Development] mrg666:
No problem, albundy. Thanks!

Everyone, new builds are in the OP. The changes are just Linux 3.4.106 patch and a minor code cleanup. Since Linux 3.4.106 is a large patch with many fixes, updating is recommended.

Cheers!
[Nexus 4 Original Android Development] HdSht:
Uuuuuu *o* ...the sound of progress baby. Right on it, Thank you sir. :angel:

1 thing that is always discussed on the other kernel threads is the gpu oc and checking back in this thread I wasn't able to find anything related to it. I was just curious to know your opinion [MENTION=4203114]mrg666[/MENTION] :).
[Nexus 4 Original Android Development] mrg666:
I don't think GPU overclock is useful so MiRaGe hasn't got it.
[Nexus 4 Original Android Development] HdSht:
Straight and clear answer :D.
[Nexus 4 Original Android Development] icu64:
You have a very good point there o.o
[Nexus 4 Original Android Development] jer_ying_fd:
New build runs much cooler and battery life on 3g improved :) Thank you very much for this awesome kernel!
[Nexus 4 Original Android Development] Medel-Silver:
Hello [MENTION=4203114]mrg666[/MENTION] , can you add the sepolicy addition for torch needed for new roms?

Thanks in advance
[Nexus 4 Original Android Development] urim225:
Just want to make sure. So the overclock version has been undervolted to 100mv already or I am wrong and I've read the op but when I open trickster it shows that it isn't undervolted and when I try to undervolt my phone restarts. I have been able to UV with every other kernel.
[Nexus 4 Original Android Development] HdSht:
From what I've seen in trickster, uv is applied to higher freqs but not lowers. Just take the standard and uv from init scripts :).
[Nexus 4 Original Android Development] mrg666:
We have discussed selinux policy and decided to stay with the default settings. Please search the thread, you will see the reasons.
[Nexus 4 Original Android Development] icu64:
Security
[Nexus 4 Original Android Development] RolF2:
My favorite kernel, hope to see N5 version of Mirage one day .

R.
[Nexus 4 Original Android Development] mrg666:
If I buy an N5, for sure :)
[Nexus 4 Original Android Development] paulyz:
on PA LP do not work d2tw, is true or I did something wrong?
[Nexus 4 Original Android Development] HdSht:
I'm on official PA LP and it works :). This is the script:

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

or you can use trickster :).
[Nexus 4 Original Android Development] paulyz:
Very strange. I came from PA KK, kernel worked fine. I did factory reset, flashed LP PA alpha (official), GAPS and kernel. After boot enabled dt2w, but no success. Where can be a problem?
[Nexus 4 Original Android Development] HdSht:
Enabled in which way :) ?
[Nexus 4 Original Android Development] paulyz:
how always, root browser /sys/devices/virtual/input/lge_touch/dt_wake_enabled and 1
[Nexus 4 Original Android Development] bertans:
If you install MiRaGe on PA you automatically lose root privileges... I think you have to manually install "su" again. ;)
[Nexus 4 Original Android Development] paulyz:
I did that, but no success.
[Nexus 4 Original Android Development] Flak:
You have to flash supersu from recovery after flashing mirage.
[Nexus 4 Original Android Development] paulyz:
I did that, I have root, but d2tw do not work
[Nexus 4 Original Android Development] HdSht:
Ehm...did you try other scripts to see if your file is executed ?..rename file to 00nameYouWant to be sure it's executed before any other file...uhm..permissions set to 755..and edited by phone or notepad++ (unix format) on windows. Also try disable ambient display if still enabled :).
[Nexus 4 Original Android Development] paulyz:
this helped! Thanks!
[Nexus 4 Original Android Development] HdSht:
Glad it helped...I finished all my ideas :D.
[Nexus 4 Original Android Development] MtG92:
Is anyone doing anykernel Mirage builds?
[Nexus 4 Original Android Development] HdSht:
[MENTION=4203114]mrg666[/MENTION] is there any particular reason why in the overclock version of the kernel you didn't apply -100mV to all freqs ? :)

Did it cause you problems or instability or something else we should be aware of ?

Thanks.
[Nexus 4 Original Android Development] mrg666:
The power saving with undervolting is not that significant at lower frequencies since CPU load is low and c-states are active. It wasn't worth taking the risk of destabilizing the CPU. I applied the undervolt in increasing magnitude with increasing frequency; it is not 100mv at all frequencies either. In short, you will not see much difference in battery life by undervolting the low frequencies.
[Nexus 4 Original Android Development] HdSht:
First, thanks for the answer.

Second, I know that indeed, in fact I use uv just to get lower temps not as a power saving feature :). I was just curious about your decision because I thought that if the cpu can handle -100mV at higher freqs wouldn't have problems at running at lower aswell. I've also noticed that uv doesn't get under some values even if you increase uv: for example at 384 mHz the lowest possible value is 75000 so I've taken 100mV in uv as optimal value.
[Nexus 4 Original Android Development] mrg666:
CPU requires higher voltage as frequency increases. But the slope of the voltage curve might not be optimal which causes variation of undervolt limit for different frequencies. So it is not necessarily correct that you can apply the same undervolt for low frequencies. Plus, CPU heats up under load at high frequencies. There is no heating problem while idling at the low frequency. Undervolting the idle frequency will not help with heat. But spontaneous reboots without any load can be frustrating.
[Nexus 4 Original Android Development] HdSht:
Hmm...understood..thanks for clarification :)..gonna use the oc version of your wonderful kernel *o*.
[Nexus 4 Original Android Development] ihancioglu:
[MENTION=4203114]mrg666[/MENTION], battery saver function is completely useless with Mirage. Only first core is limited to 1024Mhz and after turn into normal mode cpu speed restored to 1512Mhz. Also only first core is working after back to normal mode. Other cores does not come online.

Thanks,
[Nexus 4 Original Android Development] HdSht:
Is anybody running this kernel on Euphoria rom ?..Reading its changelog I've seen some "selinux policy adjustments" so I'm not sure if it will cause issues.

Ty :).
[Nexus 4 Original Android Development] mrg666:
This was reported before but I haven't fixed yet. It is a feature I don't use and I keep forgetting. The problem is that 1512 is hard coded in battery saver feature; it restores to hard coded value regardless of the previous value. I will remember to take a look at it next build.
[Nexus 4 Original Android Development] urim225:
I don't understand why this kernel won't work with the latest Purity ROM because it worked with the other older builds. Can you please do something to fix it. My phone starts fc, the one I see is system ui fc and I have cleaned flashed and tried other kernels as well
[Nexus 4 Original Android Development] xenyz:
For me, battery saver mode drops the max freq for cpu0 to 1026 MHz, leaving other cores alone. I don't experience any problems with hotplugging other CPUs with battery saver on or off, though.

It's because Purity has its own custom kernel with ramdisk modifications. You'll have to use an anykernel format custom kernel with Purity.

There was a user posting Mirage in anykernel format, but we haven't seen him for a while now. I suppose nobody else bothered or needed it since. Perhaps you or another Purity user will be the next one. :)
[Nexus 4 Original Android Development] icu64:
Ummmm no it has nothing to do with that. Purity has a strange bug with kernels going on right now but to fix it do a clean flash with the gapps you like then flash the kernel right after then start up your phone. Profit
[Nexus 4 Original Android Development] HdSht:
I'd suggest to give a try to SlimLP :). By far the most stable ROM (at least 4 now) and works flawlessly with Mirage. It doesn't even have CM engine (finally) which messes up things.

Btw...avoid also euphoria if want to stick to mirage...same result as purity :).
[Nexus 4 Original Android Development] mrg666:
New builds are available in the OP

- Set the default max frequency 1512MHz to be compatible with Lollipop battery saver feature.

- Switch to XZ compression and ARM-optimized XZ decompression. Kernel package is 30% smaller now. Boot time is about the same.

I have triple-checked the frequency/voltage changes in the code and tested the kernel myself. But please report if you find any stability problems. Also please report how is the battery saver feature working if you can.

Cheers!
[Nexus 4 Original Android Development] bertans:
10 days ago I switched my N4 to a brand new N5... more than one week later

I still miss your kernel

! :(

Do you have any suggestion about which kernel (similar to your) I should install on my N5?

ps. my old N4 is now my mother's new N4 but it still run MiRaGe :cool:
[Nexus 4 Original Android Development] mrg666:
Thanks for the comments and enjoy your N5. If I find a deal, I also want to buy an N5, Who knows there might be MiRaGe for N5 :)
[Nexus 4 Original Android Development] HdSht:
First of all thanks for the update :). Second, you said that boot time is about the same but I can report for sure an improvement :laugh:. And third, I forgot completely battery saver feature when started using your kernel because your changes are much more efficient :angel:.
[Nexus 4 Original Android Development] mrg666:
I also think XZ seems to be booting a little faster than GZIP but I thought it could be just my perception. I have seen comparisons and LZO/LZ4 are faster in decompressing time but their speed is due to weak compression to begin with and some of the time gained during the decompression time is lost during loading the larger size compressed kernel. Since the APQ8064 CPU in Nexus 4 is a quite capable processor, I thought I would go for the best compression of XZ since it is better than the standard GZIP both in loading and decompression time. But there is more to boot time than just decompression of kernel such as executing the init sequence, starting the daemons/services, and loading the GUI components that require considerable time besides decompressing the kernel. When I have a chance, I will check the ramdisk to see if we can do something to make the process a little faster there.

BTW, I am uploading my builds faster too :)
[Nexus 4 Original Android Development] HdSht:
Since you know what you are doing and what you are talking about I'd like to know from you few things (in few words, I don't want to waste your time) :)... Playing around with different kernels and different settings I've seen that the most common settings are FIOPS (scheduler) , Westwood (tcp) , read ahead buffer set to 1024. My questions were:

1) why fiops? Answer: because more points in benchmark...

2) why westwood? Answer: because it's better..

3) why 1024? Answer: because more performance.. and those were the answers received.

Is there any chance to get a more reasonable answer :D:D:D ?
[Nexus 4 Original Android Development] mrg666:
I haven't tried FIOS IO scheduler. I have used ROW IO sheduler which also claims better performance with flash disks. Based on my experience, BFQ has shown good performance and it is a well-maintained code. So I switched to BFQ. I think I will keep BFQ. More about this below.

Network congestion algorithms are mostly useful for routers but a mobile phone's network connectivity is an end point, nothing like a router. I used the simplest and default congestion algorithm. Westwood or anything else will not make much difference on a phone. But I have backported the codel network scheduler and buffer bloat patches from the mainline Linux code just to include the latest developments.

Read ahead buffer helps with increasing the IO performance by speculatively reading data ahead of time into faster buffer in RAM. But it can also waste battery life and even decrease performance if too much data is unnecessarily buffered. And every IO scheduler has different response to read ahead buffer. I am not sure why 1024 is claimed to be the best without knowing the comparison of all IO schedulers for varying sizes of read ahead buffer. BFQ seems to be the most consistent IO scheduler and it doesn't need large read ahead buffer. That is one of the reasons I have chosen BFQ.
[Nexus 4 Original Android Development] HdSht:
Thanks a lot :)...it's exactly what I wanted to know..I've figured later why you have chosen BFQ as scheduler.

And last from my experience westwood gave me "choppy" performance no matter the kernel . Thanks again for your time and patience :good:.
[Nexus 4 Original Android Development] xenyz:
The read-ahead is usually chosen in order to pimp the benchmark scores; in real usage, with flash storage, I doubt the io scheduler even matters at all. I believe franco recently decided to just forget it and set noop as default on all his devices. :)

With that said, BFQ would do better under heavy load, but again I'm not sure how heavy a load Android could produce. I think the only io bound activity is Play Store updates, and even those are scheduled for 'down time' (no user activity and on-charger) in Lollipop.
[Nexus 4 Original Android Development] mrg666:
Yes, BFQ is specifically designed to keep IO uninterrupted even under heavy load. I think it makes a difference during the boot process, when apps are updating in the background, or similar situations when IO bandwidth becomes saturated.
[Nexus 4 Original Android Development] urim225:
i really think you should look at why your kernel doesnt work with roms like SimpleAOSP or Purity. Maybe because it has something to do with layers. They work with any other kernel just not with this one. I like this kernel please consider looking at it
[Nexus 4 Original Android Development] Spiralzz:
Random reboot

I'm on PA ROM, and I've been using Mirage standard kernel for the last few days (default settings). However, I've been experiencing random reboots, and am unable to understand the reason. This is not on the latest kernel, since I've been too busy to keep up with the updates.

I've attached a last_kmsg just in case some expert could point me to the right direction. Thanks :)
[Nexus 4 Original Android Development] mrg666:
I didn't see any kernel errors in the log. My recommendation is testing with pa stock kernel and reporting the problem to pa devs.
[Nexus 4 Original Android Development] HdSht:
I've used the last version of this kernel on PA without any problems..(well just fcs of theme engine when installing or removing apps).
[Nexus 4 Original Android Development] snacs:
Hello [MENTION=4203114]mrg666[/MENTION], I had a lot of sysui using your kernel on latest SimpleAOSP with theme engine :(. Unfortunately I can't get kmsg log because sysui. Reverted to hellscore and everything works fine. I tried both versions, normal and oc with clean flash.
[Nexus 4 Original Android Development] urim225:
Same happened here with SimpleAOSP and Purity. I don't understand how it can not work with those ROMs since both of them are aosp based ROMs
[Nexus 4 Original Android Development] mrg666:
I will post an anykernel package this weekend. There should be something different. If it is ramdisk anykernel updater might help. But, I am sorry, I cannot check those ROMs to find the problem. I simply don't have the time for testing multiple ROMs.
[Nexus 4 Original Android Development] icu64:
Any kernel method=no issues lol ???
[Nexus 4 Original Android Development] Regensburg:
Hi, searching the thread wasn't helpful, what is the maximum screen off frequency in the kernel? As I understood the normal ondemand governor doesn't provide any, right? Is it the same situation here? Actually I still have KitKat on my Nexus, so I use the Mirage kernel from Oct. 2014 - don't know if it makes any difference regarding my question. Thanks.
[Nexus 4 Original Android Development] mrg666:
There is no max cpu frequency limit for screen off.
[Nexus 4 Original Android Development] urim225:
[MENTION=4203114]mrg666[/MENTION] i figured out why your kernel doesnt work with Purity and i think because of the torch tile in QS. When i remove it and then flash mirage kernel it works. Just wanted to tell you so you dont bother making or editing your kernel if you had that planed
[Nexus 4 Original Android Development] mrg666:
Here are the any kernel packages

MiRaGe LRX 022015 OC

MiRaGe LRX 022015

You need to revert back to the stock kernel to restore the original ramdisk and flash anykernel package of MiRaGe after that.

This is not needed in the next anykernel update.
[Nexus 4 Original Android Development] mrg666:
I don't understand why a GUI component would be affected by the kernel. That is strange, but thanks :)
[Nexus 4 Original Android Development] urim225:
With the anykernel package the problem seems to go away. Its really strange but whatever it works now thanks a lot ?
[Nexus 4 Original Android Development] hash87:
I think torch tile in some ROMs requires sepolicy changes. That's why anykernel package fixed the problem.

I also wanted to thank you for providing anykernel package, now i can finally use your kernel with Euphoria ROM! :)
[Nexus 4 Original Android Development] HdSht:
My happiness for your anykernel version of the kernel has been brutally killed by the sudden death of my soft keys (not due to mirage), dammit :silly: !
[Nexus 4 Original Android Development] jer_ying_fd:
Hi mrg666, will you consider adding extra CPU governors like elementalx, conservative etc? Thx.
[Nexus 4 Original Android Development] mrg666:
We had conservative and interactive included originally and they were removed later after testing/experience proved that ondemand is working fine for all purposes. And, as I promised in the OP, I prefer keeping the kernel lean and simple. Sorry :)
[Nexus 4 Original Android Development] Ryanrioz:
haha... well
[Nexus 4 Original Android Development] icu64:
Its actually a change that needed to made in the ramdisk for torch. Because his kernel was made for stock he never made the change (he did warn everyone) but with the any kernel zip it pulls that change from ramdisk.... That's why it doesn't cause an issue now
[Nexus 4 Original Android Development] icu64:
Yo has anyone made any color profiles with scripts I can flash? trying to find one to use as an example