yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] Almayce:
I've noticed that people tend to divide into two groups. One swears that there is noticeable difference in performance. The other one doesn't. So far I've read multiple posts saying it's not really that big of a deal(prevailing majority) and that it doesn't outweigh the cons(checking the compatibility, converting everything etc.) Now u say it's "pretty fast" and as a developer I have no reason not to trust you, however, is it really that different? Is the change really notable?
[Nexus 4 Original Android Development] mrg666:
I have checked the benchmarks here. F2FS is making big difference only in certain artificial benchmark conditions. When it comes to real apps like browser, market, camera, camcorder, the difference between the two becomes negligible (look at CF-bench and androbench). Even if it could make "some" difference in the real user experience, it is not worth the trouble of converting the ROM to f2fs. The show stopper is the lack of f2fs support of fsck in many ROMS around. It is too much risk to give up the ability to recover from a file system corruption.

The main reason about removing these two is that I am not able to update, test, and improve them anymore since I don't really use them. I have no idea anymore if they will work with my latest patches in the other parts of the kernel. As I said in the OP, my main goal is keeping the kernel lean and these two are conflicting with my goal now.
[Nexus 4 Original Android Development] Almayce:
Hey, quick question. Are these correct? im asking because the sliders are greyed in synapse before settings are applied and the numbers shown below the sliders are weird. First 97% other 124%.i deleted data and refreshed ukm. Thanks in advance :)

Edit: I forgot to mention the tunable, silly me. I meant cpu up and down :)
[Nexus 4 Original Android Development] mrg666:
CPU frequency up and down are wrong. They should be 80 and 67 respectively by default. In general both should be less than 100 and down should be less than up. Fave fun! ;)
[Nexus 4 Original Android Development] Almayce:
Thanks a ton :)
[Nexus 4 Original Android Development] Fenvarien:
Regarding the ondemand governor, should I set 'io is busy' to 1? I have read that current Android devices should benefit by this setting.
[Nexus 4 Original Android Development] mrg666:
I didn't see any benefit. But you can try and post your experience.
[Nexus 4 Original Android Development] Fenvarien:
I'm not sure if 'io is busy' = 1 is fully compatible with the way autosmp works. You mentioned that tweaking the governor could have negative side effects.

The new build is running great, thanks for your work and all the helpful input :)
[Nexus 4 Original Android Development] pachwald:
Current OC kernel installed without a problem and runs like a charm.

Thanks for your great work!
[Nexus 4 Original Android Development] mrg666:
There shouldn't be any problem with autosmp when you turn io_is_busy on. Whatever the governor is doing, autosmp just follows.
[Nexus 4 Original Android Development] apatal:
This is a request to those who build Mirage from source: I love Mirage. If I have a 100% working device I'd stick with it...but my power/sleep button is shot. I tried using Gravity Screen but I do not like my device to turn on all the time. Sometimes I just want to take it out and don't want to have it turn on. So please: I understand [MENTION=4203114]mrg666[/MENTION] has already said that Semaphore's dt2w is not coming to Mirage but if anyone has the skills and resources to build one, I'd appreciate if you can share it with me, even via PM. Thanks. :)
[Nexus 4 Original Android Development] mrg666:
Here are two builds that include DT2W and T2W patches from semaphore included. I was testing BFQ to replace ROW IO scheduler so that is included as well. And interactive, f2fs removed.

I would appreciate if you can test and post your results here.

http://www.mediafire.com/download/wxa34adjr6y26ga/MiRaGe_mako_test_kernel_KOT_083014.zip

http://www.mediafire.com/download/6e3bwcflndyvy15/MiRaGe_mako_oc_test_kernel_KOT_083014.zip

I am not sure if I will include DT2W in the main build. But since this is apatal asking for it, I felt obliged :)

BTW: It works for me after

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

BTW2: Don't forget thanking to sratosk, I only merged his code and rebuilt.
[Nexus 4 Original Android Development] xenyz:
I'll try it out. Thanks for bfq. It was supposed to be in the mainline Linux kernel by now, wasn't it?

BTW, stratosk made a small patch to the ondemand governor.
[Nexus 4 Original Android Development] mrg666:
That ondemand patch is not applicable to MiRaGe. We are at a little higher patch level regarding cpufreq and ondemand ;)

I don't see it in the mainline kernel. This is the latest code from BFQ source.
[Nexus 4 Original Android Development] apatal:
I am now forever in your debt, especially if you decide to make this a permanent fixture. :)

I will test these experimental builds and let you know how it goes. Thank you SO much.
[Nexus 4 Original Android Development] apatal:
Experimental build here working fantastic on latest rastakat running on ART. DT2W is working great. I can't believe I'm running this now. It's like a dream come true. Lol. Thanks for deciding to "give back" to the community in this simple, but awesome way of yours. :)

Will give more feedback later as I get it through its paces. I'm running the OC (UV?) version BTW.
[Nexus 4 Original Android Development] vampire36:
[MENTION=4203114]mrg666[/MENTION] must say mirage just looks complete now...with dt2w...

Jist as [MENTION=4518806]apatal[/MENTION] said...we are debted...works a treat...using the standard kernel with 75 undervolt :)
[Nexus 4 Original Android Development] Fenvarien:
Yes, DT2W works great here, it's so good to have this option now :good: :) Especially since the power button of my wife's N4 has become quite unreliable.

BFQ is very interesting to test, the current version seems to have improved very much in the handling of solid state devices.
[Nexus 4 Original Android Development] mrg666:
Let's test this until next week. I want to make sure there is no additional battery drain when dt2w is disabled.

BFQ seems like performing good at a comparable level with ROW. Since BFQ is being actively developed, maybe we can switch. Please post your feedback.

Thanks, everyone!
[Nexus 4 Original Android Development] mrg666:
I have updated the test builds after removing touch_wake code since it wasn't necessary for dt2w. If you are testing please update your kernels to evaluate only dt2w's impact on battery life.

http://www.mediafire.com/download/en9hnam7h4h0uqj/MiRaGe_mako_oc_test_kernel_KOT_083114.zip

http://www.mediafire.com/download/wwxc9uuv4qhnu8b/MiRaGe_mako_test_kernel_KOT_083114.zip
[Nexus 4 Original Android Development] apatal:
Will update asap. Thanks for working on this. I'll post my battery stats once I get a full cycle out of it. Been sticking this in the charger every few hours or so since this has been a busy day.

To anyone testing it with a better working power button, if possible test it with one or two cycle with dt2w disabled, just to get a baseline value, and another one or two with it enabled so we have a good comparison. Unfortunately, I can't do it on mine. I'd do it if I can. Thanks.
[Nexus 4 Original Android Development] migueldbr:
[MENTION=4203114]mrg666[/MENTION] dont know what you think about this, but have you considered including a lower cpu frequency like 192mhz step?it is very stable, been using other kernels with 192mhz(currently im even using a lower one, 94mhz) and everything works just fine. And it still saves some battery
[Nexus 4 Original Android Development] Almayce:
Hey mrg, I got reboot during skype calling, multiple actually. heres the last_kmsg if you could take a look. I have had this problem on every single kernel and i dont know what to do. this was on stock voltages i think, the one after that i even upped +20 from stock voltages, still rebooted.maybe the culprit is something else. Thanks in advance :)
[Nexus 4 Original Android Development] xenyz:
Well, I turned off Gravity Screen and have been double tapping all day and I can't find any problems with the new build. It looks good from here.

I didn't notice any change in battery usage with it on. What I did notice is fewer wakeups on the battery graph. So I suppose dt2w saves energy vs Gravity Screen, however little that may be.

I still think I like Gravity Screen more than dt2w though. It really should be a standard option in future ROMs, the automation is just so useful, and going back to even dt2w was awkward.
[Nexus 4 Original Android Development] mrg666:
Migueldbr:

I don't think 192 MHz minimum is a worthwhile change. Based on my experience with earlier msm cpus, going lower with minimum CPU clock creates trouble with background processes when the screen is off. Keeping the default of Qualcomm is better.

Almayce:

There is nothing abnormal in the kernel log. It seems like the kernel rebooted normally. I think you are having a hardware instability on your phone.

Xenyz:

Thanks for the feedback. I agree that the dt2w, s2w kind of things should be implemented in the ROM. Kernel is just for the touchscreen driver. I have always resisted for this reason. But among all implementations, dt2w seems like the simplest and least bloat in the kernel. The battery life doesn't seem to be affected at all. Although I don't use it either, let's keep it for the ones with broken buttons.
[Nexus 4 Original Android Development] Almayce:
Thanks, that basically means i cant do anything about it, right?
[Nexus 4 Original Android Development] mrg666:
I think so. I recommend using the standard build without changing the voltages.
[Nexus 4 Original Android Development] apatal:
Well if you're really desperate and wants to throw in the towel, so to speak, did you consider reflashing your device to stock and seeing if that fixes the reboots? :)
[Nexus 4 Original Android Development] Almayce:
It's not really that big of a deal, honestly. I use Skype once in 14 days or so. It just bugs me that there is something not working properly in my device, that's all :D if I ever feel like doing it I'll report the results:)
[Nexus 4 Original Android Development] Fenvarien:
DT2W is working flawlessly well here with no measurable impact on the battery life. :good:
[Nexus 4 Original Android Development] mrg666:
Thanks go to [MENTION=3750240]stratosk[/MENTION]
[Nexus 4 Original Android Development] ihancioglu:
It looks known bug on hardware camera for nexus4. Most of the people complains that issue with a lot apps (snapchat, skype, camera apps). I think this should be investigate by Google/LG.
[Nexus 4 Original Android Development] Almayce:
Well there is impact for me, I had 4% idle drain in 2 hours, but that seems just about right, isn't it? I don't use it anyway, just wanted to test it, too.
[Nexus 4 Original Android Development] apatal:
Wow. I've been having these reboots a lot when using the camera while inside the fb messenger (chathead) and i always thought it's related to the kernel or ROM, but now I'm not so sure anymore. :)
[Nexus 4 Original Android Development] ihancioglu:
As I read on forums, there was no problem on 4.2.2 but started with 4.3 and continue on 4.4. I am pretty sure that it is kernel related but it is a bit upstream nothing can do with xda devs.
[Nexus 4 Original Android Development] ihancioglu:
Hi [MENTION=4203114]mrg666[/MENTION],

I have found the Stratos's latest ondemand patches on Linux upstream.

https://git.kernel.org/cgit/linux/k.../?id=5b0c0b16d48d20e26859907df4dd449e3b3c7f4c

https://git.kernel.org/cgit/linux/k.../?id=6393d6a1027ec1d69ec6246f6c7c2186f76c2abb

Hopefully it could be applicable with your code in this manner.

Thanks,
[Nexus 4 Original Android Development] mrg666:
I had tried those before and reverted here.
[Nexus 4 Original Android Development] defconoi:
[MENTION=4203114]mrg666[/MENTION] have you tried using the kk_3.5 branch on code aurora? Would love to see a CAF 3.5 kernel, I wonder how much we can merge in without breakage.
[Nexus 4 Original Android Development] Sir_gpm:
[MENTION=4203114]mrg666[/MENTION] are default settings best for battery saving?, I am using OC version. If not, which setting will you advice.
[Nexus 4 Original Android Development] mrg666:
It would be fun for sure but there will probably be modifications needed on the AOSP side as well. Isn't CM using that branch?

You can get performance through brute-force overclocking that increases battery use. Or you can get performance with increasing efficiency which also helps also with battery use. You don't need to change anything for best battery life since I aimed the second.
[Nexus 4 Original Android Development] legolas93:
Hi mrg666, I like your kernel and your way to work.

So i want to share with you some patches I did a few days ago.

[B]Remove CONFIG_MSM_CACHE_DUMP[/B]
Gain 9MB of RAM
legolas93 authored 2 days ago
a585a27

[B]Set new regulator voltages[/B]
legolas93 authored 2 days ago
f54e0ca

[B]Set a lower display voltage[/B]
legolas93 authored 2 days ago
a0af78d

[B]Set a lower vibrator voltage[/B]
legolas93 authored 2 days ago
3e854af

[B]i2c: change clock rate to 5.4 MHz[/B]
This patch change the clock rate to 5.4 MHz to save power
legolas93 authored 2 days ago
00cce85

I tested them for 2 days and I think they can improve battery life without any downsides.

You can find sources there.
[Nexus 4 Original Android Development] mrg666:
I will check them out. Thank you.
[Nexus 4 Original Android Development] migueldbr:
the dt2w has significant impact on my battery life...anyway, i dont really need it since i use volume wake, just saying=p. Great kernel btw

[MENTION=4203114]mrg666[/MENTION] btw some days ago i tried your undervolted kernel and you explained that it didnt boot because my cpu was "faster" bin. But how come i can run your stock kernel with uv-100 (the same uv of your undervolted kernel) and it works fine?is it normal behaviour?does the boot process have to do with it?
[Nexus 4 Original Android Development] defconoi:
thanks I'll check this out and apply them to my kernel, love your work legolas
[Nexus 4 Original Android Development] mrg666:
Based on my testing and other feedback, there seems to be no effect of dt2w on battery life when it is disabled. This is why I will keep dt2w in the kernel since it is disabled by default and it doesn't do any harm when it is not used. If dt2w is using more battery when enabled, then it is up to the user to enable it.

I didn't say your cpu didn't undervolt because it was "faster" bin. I only said that "faster" bin doesn't necessarily handle undervolt better than the other bins since each bin has different voltage settings. I am not sure what is your 100uv undervolt. CPU voltage is an array of values at each possible frequency. Anyway, I really don't want to get into the discussion of undervolt settings. If yours is working, congratulations! :) But if there are problems please revert to default before posting problems.

Thanks for the feedback.
[Nexus 4 Original Android Development] mrg666:
New builds are up!

- Added latest BFQ IO scheduler and set as default.

- DT2W is included, thanks to stratosk

- Removed Interactive governor and ROW IO scheduler since they are not needed anymore

- Removed F2FS since I don't use and I can't update/test it

- Removed MSM_CACHE_DUMP, thanks to legolas93

I have been testing and following the development of the BFQ scheduler since a long time. I think it is overall the best IO scheduler after the latest revisions. I have been using it on my Xubuntu system as well with very good performance. As we have discussed here earlier, I have removed Interactive and F2FS. ROW IO scheduler is also retired now since it is replaced with BFQ.

You need to enable dt2w to use it. Based on the feedback and my experience, dt2w has no noticeable effects on battery life when it is disabled.

I think that is all. Enjoy!
[Nexus 4 Original Android Development] BigDig:
I'm switching from Franco kernel, do I need to flash stock, before I flash mirage?
[Nexus 4 Original Android Development] jimyiak:
Dirty flash your rom first and you can go!!

sent by nexy 4
[Nexus 4 Original Android Development] BigDig:
I'm using stock, so there's no dirty flashing here..
[Nexus 4 Original Android Development] mrg666:
Just flash MiRaGe over if you are sure that the previous custom kernel didn't modify anything in the ROM. MiRaGe doesn't touch anything outside the boot partition and you can revert to stock kernel just by flashing the stock boot image. I suppose your previous kernel does the same.
[Nexus 4 Original Android Development] BigDig:
Flashed over Franco kernel - so far it's noticeably smoother... Good job!
[Nexus 4 Original Android Development] mrg666:
MiRaGe is not necessarily better than any other kernel. I would appreciate if you don't make comparisons here to avoid unnecessary distractions. This thread is for discussing only MiRaGe development and

only good comments are welcome for other kernels

.
[Nexus 4 Original Android Development] bertans:
Ok, can anyone explain me how to enable it? I'm looking for the cleanest, leanest and more simple way to do that!

I think it's a genial feature but I don't know how to try it!

Thank you all :)
[Nexus 4 Original Android Development] mrg666:
CPU voltage, vdd, is an array, not a single value, a function of frequency. See my following post.

http://xdaforums.com/showpost.php?p=46855911&postcount=77

As I posted above, cpu doesn't necessarily crash always at the highest frequency. If the vdd profile has some dips as shown in the plot in my post above, there can be cpu crashes at lower frequencies as well. So discussing a single value of vdd at the highest frequency doesn't mean much without knowing the complete vdd curve. There is no magic to this; it is the same voltage regulator and cpu and the cpu will always be stable at a certain frequency and higher than a critical vdd. It will always be unstable at a lower voltage. Some kernels may become unstable, some of them can run longer. But it doesn't mean that your cpu is stable with a certain kernel. The difference might be due to cpu governor used, hotplug driver, or some other software that is straining the cpu differently. But if a cpu is unstable at a certain vdd and frequency it is always unstable and it will crash sooner or later.
[Nexus 4 Original Android Development] alen1901:
I use -150mv, but, when you take shots with camera, sometimes you will get black photo, like you put hand on camera and take a shot. So thats the only problem i get with that heavy undervolt.

Poslano sa mog Nexus 4 koristeći Tapatalk
[Nexus 4 Original Android Development] C4SCA:
that was the kind of problem that very randomly would happen to me, thats why now i use -137.5mV in general, try it (obviously we talking about doing this change on every frequency step).
[Nexus 4 Original Android Development] mrg666:
Obviously, your CPU is not stable with that voltage.
[Nexus 4 Original Android Development] alen1901:
It is stable, and im using it. But, i guess camera needs more energy, so somtimes it cant capture some photo so it displays it as a blank picture, but im fine with that. Constantly getting 22 hours of uptime and 5 hours screen on time. ;)
[Nexus 4 Original Android Development] mrg666:
Camera voltage is not changed, that is cpu having the trouble with processing the image data due to undervolting. But if you are happy with a glitchy camera, that is your device.

BTW, I also get ~22-24 hours regularly. see below
[Nexus 4 Original Android Development] alen1901:
Well, i dont use camera much this days, but when christmas comes, ill just lower voltages to 137 and it will be fine. ;) you have any plans to buy n5 at all?
[Nexus 4 Original Android Development] mrg666:
LOL, Christmas is coming soon, your starving cpu will thank you for the extra juice.

No plans for N5 soon. I can only buy the N5 when it gets cheaper, i.e. just before or after N6 released.
[Nexus 4 Original Android Development] C4SCA:
[MENTION=4203114]mrg666[/MENTION]

Is fsync off on this kernel? My battery died and then after charging it and booting it up my wallpaper was gone and some icons disappeared.

sent from my NEXUS 4 tasting a revamped cooking recipe of Jellybeans (4.3).
[Nexus 4 Original Android Development] mrg666:
fsync is on, I haven't added the on/off switch.
[Nexus 4 Original Android Development] biron_w:
Tried the latest version with Slim Be an and Wi-Fi doesn't work :confused:
[Nexus 4 Original Android Development] alen1901:
Dont flash this kernel on Slim bean 4.4. Also check which recovery you have, some latest versions had problems with messing up radio when flashing.
[Nexus 4 Original Android Development] biron_w:
It was SlimBean 4.3.
[Nexus 4 Original Android Development] mrg666:
MiRaGe works with ROMs that can use the stock boot image. Apparently, SlimBean is not one of them.

The following is all of the updater script. There is no way radio image can be messed up by flashing MiRaGe unless a horribly screwed up recovery is used.

ui_print("Flashing the MiRaGe kernel ...");
package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
ui_print("Done!");
[Nexus 4 Original Android Development] alen1901:
Its not a kernel fault for radio issues. Its a cwm recovery that has problems when you flash a rom, not sure if its related to flashing a kernel too.

Sent from Pure Nexus⁴
[Nexus 4 Original Android Development] mrg666:
I am running MiRaGe with stock kitkat ROM now. If you want, you can too :) Download links are in the OP. Thank you for the source, Google!
[Nexus 4 Original Android Development] tvall:
And now I can probably run your kernel! Before I download and flash, do you think it'll work on aosp? Since its based on the aosp kernel source, I'm assuming yes.
[Nexus 4 Original Android Development] mrg666:
Should work since stock ROM is working just fine. Let me know how it goes.
[Nexus 4 Original Android Development] tvall:
Took forever for me to download (just moved myself and my new wife to a subtropical island. Unfortunately the downside is half the island only has 2g)

didn't boot to lockscreen. After typing my encryption password, it stayed on the boot animation forever. I'll grab a logcat tomorrow.

Is this a whole boot.img, or just the kernel? Haven't bothered to examine the zip yet.
[Nexus 4 Original Android Development] mrg666:
Those are whole boot images and they come with the stock kitkat ramdisk (with slight modifications to remove user-space mpdecision). I suggest reverting back to the original kernel of your ROM. I think your kitkat ROM has some old binary/firmware files for compatibility with the old kernel source. Or the ramdisks are incompatible. When the developer of the ROM updates the binary files and/or ramdisk suitable for the kitkat kernel source you can try again. Or you can just flash the stock kitkat ROM.
[Nexus 4 Original Android Development] mrg666:
echo 1 > /sys/devices/virtual/input/lge_touch/dt_wake_enabled

or one of the kernel tuners
[Nexus 4 Original Android Development] bertans:
Ok, you got my full attention... just tell me "where and how", please! I'm a rookie, be patient with me! :p
[Nexus 4 Original Android Development] guimendes:
You need to use some kind of console (adb or Terminal Emulator app or similar) and execute this command as root. It's easier if you use some app like Trickster MOD to do this.
[Nexus 4 Original Android Development] bertans:
Thank you! :victory:

If you don't mind... can I ask you the "really stupid how to, for stupid users"? Something like this:

1) enable USB Debug; --> ok

2) connect to your computer and install proper drivers; --> ok

3) open a command window; --> ok

4) type 'adb shell'; --> ok

5) type 'su'; --> nothing appens (I'm on the latest Paranoid Android with proper SU/ADB settings);

6) type 'echo 1 > /sys/devices/virtual/input/lge_touch/dt_wake_enabled' --> can't create /sys/devices/virtual/input/lge_touch/dt_wake_enabled: Permission denied... :eek:

Thank you in advance!

UPDATE 1

Something wrong on my phone... I lost SU even if I can't understand why and when!

In a few hours I'll try again... and I'll keep you informed! :p