yashsingh1/xdaforums huggingface dataset:
[HTC EVO 3D] mrg666:
Check the second post for instructions of building the kernel. Several forum members already did that since I posted the instructions. It is very easy and adding a governor can be done in 15 minutes. Take a shot and let me know if you need help with that. Actually, helping others with building the kernel takes much more time and effort than just adding it myself. But the kernel is for everyone to use, if we want to satsify each of us separately, the kernel becomes bloated for everybody. The best solution is meeting at an optimal configuration. And you are free not to believe me but interactive is the best governor out there. Build your kernel and become the king of your device :D
[HTC EVO 3D] TheBootloader:
I doubt I will get serious with an Evo 3D kernel, but you're right that I should try it anyways. This is probably a good time for me to start learning how GitHub and C exactly work. Thanks! :)

With performance yes, but not with battery life, right? (It seems to drain a bit more but I need to run it a few more days first to be sure.) I always thought ondemand was better, but that's only based on other people's opinions. I just sticked to it because it was default on almost all other kernels.
[HTC EVO 3D] dr_jerremy:
Hi,

Im using your kernel last couple days and Can say that is the best kernel out there..Battery life is awsome,whitout any lag etc.... :)
[HTC EVO 3D] mrg666:
No, interactive is better in performance and also battery life. I am not arbitrarily choosing cpu governors. Based on my tests, there is no other cpu governor that beats the latest interactive governor both in performance and battery life. Otherwise that governor would have been included in place of interactive in this kernel. I have no idea which interactive governor those other people talking about since interactive governor is always under development and constantly improved specifically for Android by Google. What I have in the kernel is the very latest code backported from AOSP 3.4/3.10 kernel. Most of the other custom cpu governors are one-shot mods of either interactive, ondemand, or conservative governors and have been abandoned while the original codes received many updates. Here is the development log for Interactive for your reference; what I have in MiRaGe is at the exact same level.

https://android.googlesource.com/ke...id-3.10/drivers/cpufreq/cpufreq_interactive.c

And, here is a recent article about the outdated code of ondemand governor.

http://www.phoronix.com/scan.php?page=news_item&px=MTM3NDQ

But I am open to suggestions based on reason and proven with empirical results. The kind of discussion based on reason and data is very much fun and fulfilling.

Please don't take this as an arrogant reply. I am just trying to explain. Cheers! :highfive:
[HTC EVO 3D] TheBootloader:
Ah you actually did tests, thats awesome! Most developers I saw were like "I need this feature because I *think* its good or dev X uses it too". ;)

Have you have also tested 1.1 GHz vs 1.5 GHz vs 1.7 GHz? Idle and under load? I'll actually test that and some other stuff myself anyway, because it still feels(!) like Mirage drains a little bit more, especially when using the YouTube-App.

Or I'm simply paying too much attention now, or play too much with my phone... It's so damn smooth!! ;)

I didn't know that ondemand is that old or interactive is that well-maintained. And that performance-governor thing from your 2nd link... Wow, I have to try that on my laptop, I definitely did not expect that!

Arrogant? What? I asked a question and you delivered a detailed explanation, which is the best kind of answer! That's definitely not arrogant, it's more like "I know what I'm doing and I'm also willing to share knowledge"! :highfive:

And its a lot better than "isnt ondemand better with battery?" - "no" - "uh okay..."

So, thank you for that!

(Also, I love reading technical stuff in general, so feel free to spam me with information and links at any time! :D )

Another question I have would be: Why not -O3? Is it because of the doubled zImage size or is there a different reason?

This is my last question for now, so this thread won't get more off-topic than this. :D
[HTC EVO 3D] mrg666:
O3 optimization produces more complex and larger binary code while doing "smart" things to generate faster code. So the O3 optimized code generally needs more memory which can actually lead to slower performance rather than speeding up due to small L2 cache and limited RAM in mobile devices.

When the source is too complex, O3 sometimes cannot interpret the code correctly and generates wrong code, especially with the newer compilers which are not well tested yet. Kernel is a very complex code. I have seen several cases that gcc 4.8 could not generate a reliable binary even at O2.

O3 is generally used for heavy computational but relatively straightforward codes where optimizations such as loop unrolling can be done more reliably. Technical computing, numerical simulations significantly benefit from O3 optimization (I have seen almost 15-20% improvement in MD simulations) but kernel does not benefit much and can have disadvantages as explained above.

So I generally avoid O3 and use the standard O2 optimization when building the kernel. I don't think it is worth risking reliability to potentially (if any) gain few percentage improvement in performance.
[HTC EVO 3D] TheBootloader:
Today I encountered weird behavior of the cpu frequency. Right after turning on the screen it was lagging and very slow. So I (slowly :P ) opened kernel tuner and saw CPU0 100% @ 192MHz and CPU1 offline. After some time (15 seconds or so), it went from 100% to ~30%. After that, the frequency-increase (up to 1728MHz) and CPU1 worked properly again.

So, was that a bug in the interactive governor? Looks like it got stuck while trying to change to a higher frequency and then didn't try again, and instead it waited for a lower load.

Things I've changed in Kernel Tuner (about 3 days before this happened):

- Min. freq to 192 MHz

- Max. freq to 1728 MHz

- Governor-setting "hispeed-frequency" to 1728000

In total it took maybe 30-45 seconds until it worked properly again, not a big deal but I still wanted to report it. ;)
[HTC EVO 3D] mrg666:
The problem is 192 MHz min frequency. The minimum should be 384 Mhz which is the default minimum frequency. Plus you don't need to set the hispeed-frequency of governor. It follows the max frequency of CPU. Just use Nofrills to set the maximum CPU frequency. All other tweaks are unnecessary. As I said in the OP, I don't recommend using Kernel Tuner with MiRaGe.
[HTC EVO 3D] tom0769:
Don't know if it's already mentioned, there is an error in updater script (downloaded "MiRaGe_shooter_u_kernel_90_08102013.zip"):

the line

"assert(write_raw_image("/tmp/newboot.img", "boot"));"

should read

"assert(write_raw_image("/tmp/boot.img", "boot"));"

Edit:

Did a quick test, wifi is not working for me (can not be turned on).

I'm on stock rom (3.28.401.1) rooted and s-off with hboot 1.49.0007.

Kernel-Version shows:

3.0.16-ge733189

htc-kernel@u18000-build-144#1

SMP PREEMPT

I think something got wrong:confused:

Logcat says

I/WifiHW ( 236): wifi_load_driver load module
I/WifiHW ( 236): is_wifi_driver_loaded
I/WifiHW ( 236): wifi_load_driver end error 2
I/NetSharing_NSReceiver( 1536): customizedNS:true
E/WifiStateMachine( 236): Failed to load driver!
I/NetSharing_NSReceiver( 1536): sp customizedNS:true
I/NetSharing_NSReceiver( 1536): customizedNS2:truecustomizedML2:false
I/NetSharing_NSReceiver( 1536): LAN Type:false ML Type:true
I/NetSharing_NSReceiver( 1536): IS Type:true IS_ML:false
D/NetSharing_NSReceiver( 1536): onReceive : android.net.wifi.WIFI_STATE_CHANGED
E/WifiStateMachine( 236): DriverFailedState
[HTC EVO 3D] mrg666:
That is not an error in updater scipt; it is supposed to be "newboot.img".

That WiFi error is due to WiFi module not properly copied to /system/lib/modules. Make sure you are flashing the kernel with either the latest 4ext recovery or Flash Image GUI.
[HTC EVO 3D] tom0769:
I use 4ext V1.0.0.5 RC9.

for the updater script

ui_print("Copying files to /tmp...");
package_extract_dir("kernel", "/tmp");
set_perm(0, 0, 0777, "/tmp/dump_image");
set_perm(0, 0, 0777, "/tmp/mkbootimg.sh");
set_perm(0, 0, 0777, "/tmp/mkbootimg");
set_perm(0, 0, 0777, "/tmp/unpackbootimg");
ui_print("Dumping boot image to /tmp...");
run_program("/tmp/dump_image", "boot", "/tmp/boot.img");
ui_print("Updating kernel and making new boot image...");
run_program("/tmp/unpackbootimg", "/tmp/boot.img", "/tmp/");
run_program("/tmp/mkbootimg.sh");
ui_print("Flashing new boot image...");
assert(write_raw_image("/tmp/newboot.img", "boot"));
ui_print("Mounting /system...");
mount("ext4", "EMMC", "/dev/block/mmcblk0p22", "/system");
ui_print("Copying kernel modules...");
package_extract_dir("system", "/system");
set_perm_recursive(0, 0, 0755, 0644, "/system/lib/modules");
ui_print("Deleting /system/bin/mpdecision ...");
delete("/system/bin/mpdecision");
ui_print("Deleting /system/bin/thermald ...");
delete("/system/bin/thermald");
unmount("/system");
ui_print("Done!");

tthe assert(write_raw_image... line fails while flashing in recovery.

It says status 7 error in updater script

seems as "run_program("/tmp/mkbootimg.sh");" does not work
[HTC EVO 3D] mrg666:
I think you are using the stock kernel right now. You must use Flash Image GUI for the initial flash over the stock kernel if that is the case. The reason is explained in the OP.
[HTC EVO 3D] howpathetic:
delete
[HTC EVO 3D] tom0769:
Shame on me, I didn't read what is written in bold:o:o:o...

So excuse me.

I flashed coolexes kernel before, but of course that also didn't succed, though the script said that flashing kernel was successful.

Didn't realize that I was still on stock kernel after that.
[HTC EVO 3D] mrg666:
That is okay. You can flash the kernel in the recovery from now on. Also, as noted in the OP, mpdecision and thermald binaries are not deleted by flashing the kernel via Flash Image GUI. You need to either flash the special package for that purpose (available in the OP) or just reflash the kernel package in the recovery.
[HTC EVO 3D] runeazn:
Any chance u would add sleep2wake?

If it is already added, why cant i enable it xD
[HTC EVO 3D] Z O X:
It was answered before. No support for that ...

But I'm wondering why doesn't assigment of hw buttons to wake work?
[HTC EVO 3D] mrg666:
Kernel only passes the hardware key codes to OS. OS decides what to do with those key codes. If the keys are normally working, kernel is doing its job. Changing the assignments to the keys are not related to the kernel. I also didn't change anything regarding the wake up events.
[HTC EVO 3D] mrg666:
I am posting a question that was PMed to me and my reply here. I am frequently receiving such questions and wanted to have this correspondence in the thread.

No-frills overclocks both cores. Each core will run independently at the highest frequency only when needed. You can check the real-time frequency of CPU cores with System Monitor Lite. I recommend deleting Kernel tuner, that tweaking tool is completely unnecessary with MiRaGe kernel and it interferes with the performance of the system.

It is expected to observe second core as offline when the phone is not doing anything. The benchmark scores fluctuate a lot depending on the background processes. Android is designed to do speculative loading of apps/processes, killing them when unused, and also syncing a lot of data in the background. Because of these, it is hard to get a consistent benchmark score. Keep the phone awake at least for a couple of minutes by using a single app (don't switch several apps), don't use auto task killers and disable heavy background processes (such as facebook client) before running benchmarks to get the best scores. You might still need to try this multiple times. Actually, just ignore the benchmarks and only pay attention to your own user experience.
[HTC EVO 3D] TheBootloader:
This kernel deserves more attention, therefore I shall bump this thread. ;)

Also I donated. If you like his work, his research and his detailed explanations, you should consider donating too.

Anyway, after using (a slightly modified version of) this kernel for a few weeks the battery life got better over time. I guess it was just batterystats.bin which needed a bit time? Or maybe KernelTuner F'd it up? Who knows, but now everything seems works to work flawlessly.

Very good performance and good battery life! :)

Even though quite a few devs say that, I have never encountered problems with 192MHz before. That's why I just tried it anyway.

For KernelTuner: I have read that, but I didn't want it to be true. Learning by doing mistakes, I guess :D

I got a similar(?) problem with 4ext recovery too, when I tried to flash your kernel for the first time. 4ext said there's an error with the newboot-file or something, then I tried to flash the exact same zip-file again - this time without error, even though I did not change anything at all! Looks like there are still bugs in 4ext.
[HTC EVO 3D] mrg666:
Thanks for the comments and the donation:D

4ext fails to flash over the stock boot image since it is encrypted. I wouldn't consider that a bug, maybe a missing feature. But I have also seen 4ext failing in other cases though. Anyway, 4ext is still our best recovery, imo.
[HTC EVO 3D] tom0769:
My problem was the stock kernel.

mrg666 told me that I should use Flash Image GUI for the initial flash over the stock kernel.

After that flashing via 4EXT wasn't a problem anymore.
[HTC EVO 3D] mrto1991:
Can someone help about my wifi not working after flashing the kernel?

It is ok with other kernel except buttertoast n this kernel.

Anyway to fix it.
[HTC EVO 3D] Z O X:
just copy modules from zip to modules folder and set permissions.
[HTC EVO 3D] mrto1991:
Thanks it works.
[HTC EVO 3D] mrto1991:
I can't believe it.My phone last 24 hr long with clock to 1.7mhz max and I can play gangster 4 and asphalt 8 like a smooth new phone.

And my phone not hung anymore.

How did u do it man thanks alot for your contribution.

I am in myanmar so i can't give donation but i am really thankful to u mrg66.
[HTC EVO 3D] mrg666:
There is no magic, everything is in the repo. The OEM kernels are generally so bad anyway.

Thanks for the feedback and I am glad it worked for you.
[HTC EVO 3D] sdeft:
mrg did you have time to look into this issue ?

I noticed that in your kernel you can not wake up the phone by customized camera button via shooteru-keypad.kl file. Does this work on the CDMA version ?
[HTC EVO 3D] mrg666:
Actually, yes.

Can you please check if the test kernel below fixes your keypad problem?

http://www.mediafire.com/download/0s7h1yve4qqrz3y/MiRaGe_shooter_u_kernel_test_951.zip
[HTC EVO 3D] sdeft:
tested successfully! what was it ?

thanks for the fix!
[HTC EVO 3D] mrg666:
Thanks for the confirmation. I have pushed the fix to my repo now. Although this keypad issue hasn't bothered anyone else, I have also replaced the build in the OP to include the fix.
[HTC EVO 3D] wenna.speedy:
swipe2wake in new version?
[HTC EVO 3D] mrg666:
S2W has already been discussed in this thread. The answer is "no".
[HTC EVO 3D] sdeft:
It is just easier for me to wake up the phone like this. Kinda sweep2wake replacement!

got some questions

1. Did you disable ondemand gov due to the compilation errors ?

2. There is a setting in other kernels for CONFIG_MSM_KGSL_ADRENO220=y.

You only use the CONFIG_MSM_KGSL=y. What is the difference ?

3. Do you suggest leaving stock init.qcom.post_boot.sh or shall

we delete it completely ? Anthrax kernel developer was suggesting to delete

it as it interferes with mpdecision etc.

By the way Kernel Tuner does not detect your mpdecision and thermal.

Any other tool which does ?
[HTC EVO 3D] mrg666:
1. No. Ondemand doesn't work as good as interactive, hence it is removed.

2. I don't know the other kernels, please check the related Kconfig and Makefile. I am sure it is just a different label for the same kernel configuration, for the same purpose.

3. I have completely rewrote the mpdecision in MiRaGe, it doesn't have a problem with init scripts. You don't need to do anything with the init scripts.

My mpdecision and thermald are different and available tuners are not able to control them. And you don't need to control them. They run best without user interference. But you can always directly access their sysfs files with your favorite root file explorer.
[HTC EVO 3D] sdeft:
Thanks for the update mrg. By the way how do you manage to patch the kernel before actually released in official kernel repo ?

For ondemand if I re-enable it in the config it doesn't compile due to errors.
[HTC EVO 3D] mrg666:
MiRaGe source code is far ahead of 3.0 base kernel in many areas due to patches i had backported from AOSP 3.4, CAF 3.4, Linux 3.6, Linux 3.10 repos. Since I didn't care about ondemand, I left it behind and it was not patched up properly with the rest of the kernel. I don't know why but If you want ondemand, you will need to bring it up to the same level with the rest of the kernel.
[HTC EVO 3D] sdeft:
nah i am not really bothered about on demand just mentioned cause my compilation fails.

do you download the official kernel patches from https://www.kernel.org/pub/linux/kernel/v3.0/incr/

or from another repo ?
[HTC EVO 3D] mrg666:
The compilation is completely clean and error/warning free with the default configuration using gcc 4.7. As I said, ondemand is not included in the default configuration and needs to be updated if you want to include. I always pick the patches from kernel.org, sometimes as an rc from review section.
[HTC EVO 3D] mrg666:
The following is a kernel built from the jellybean branch of MiRaGe kernel. I am sharing it here as a test kernel, please let me know how it goes if you test with your favorite jellybean flavor.

http://www.mediafire.com/download/jnix74onu4qjfds/MiRaGe_shooter_u_test_kernel_1002_jb.zip Updated: 10152013

Reminders: Don't use this kernel with stock ROM. Don't report problems to ROM developers if you use this kernel with their ROM.

I am switching my phone to Nexus 4 very soon and I have already unactivated my EVO 3D CDMA service. I will keep checking this thread and try to keep the kernel updated as required. I am not expecting any problems based on the feedback in the previous months though. MiRaGe is in a very stable and reliable shape that the development had come to a natural end anyway. I had so much fun developing this kernel with your company. Cheers!

Edit: Updated to include bluetooth and vidc fixes by johnnyslt.

Edit 2: Updated again to include vidc crash fix and the ondemand governor backported from CAF msm-3.4.
[HTC EVO 3D] dr_jerremy:
Testing it whit slimBean..and for now everything works smooth and fast :)...cam,camcorder,bt,wifi..everything is fine...and I think that is smoother then stock kernel from slimbean
[HTC EVO 3D] Arbelzapf:
I just flashed it on LiquidSmooth.

Wifi, camera and sound are working and it's running nice and smooth so far

Now that you're leaving the Evo3D, let me thank you for all your hard work and your fantastic support. I have been using your Rom+Kernel for the Nook Color for ages, so it made me very happy to see you're working for the GSM Evo3D as well. I kept lurking though, since I had no bugs to report or anything substantial to say ;)
[HTC EVO 3D] mrg666:
Thanks for the feedback guys, seems there are no glaring bugs to fix with the JB kernel.

Well, you could just say hi :)
[HTC EVO 3D] johnnyslt:
[MENTION=4203114]mrg666[/MENTION] I think I might start using your kernel in my roms :D

If you don't have a problem...of course.
[HTC EVO 3D] mrg666:
Sure, I would only be happy. I doubt you would need but let me know if I can help in any way.
[HTC EVO 3D] johnnyslt:
Sure !

Thank you !
[HTC EVO 3D] mrg666:
There are two branches in the repo, master and jellybean. The only the difference between the two branches is the following three commits that are only in jellybean.

https://github.com/mrg666/android_kernel_shooter/commit/fb67abd83ef83ec7681fcd24365e69a78a970084

https://github.com/mrg666/android_kernel_shooter/commit/2244f1a3924d51f6691203bbed82ca5c3408741f

https://github.com/mrg666/android_kernel_shooter/commit/d2c25ca0c7a4459a36bc1adf5a590f04dcbcbbab

I wanted to clarify since I haven't merged the master into jellybean and it can be hard to find these three commits. My sloppiness :o
[HTC EVO 3D] MightyBen:
Thanks for your great kernels mrg666. Just what I was always looking for. One note though!

I used your kernel for Coolexes ROM and now with CM10.2 by Johnnyslt. While your test kernel feels very fast and solid I have to say that my Sony SmartWatch has a connect/disconnect problem. This was present with any Sense ROM and any kernel but wasn't present with johnnyslt stock kernel. Johnnyslts Bluetooth support may be a bit more robust.
[HTC EVO 3D] mahg:
+1

I can confirm some erratic issues with Bluetooth. I've experienced the same issue with my SmartWatch.
[HTC EVO 3D] rspillo:
+1 Comfirm issue Bluetooth in LiquidRom, connect/disconnect.

The rest work very very great.

Inviato dal mio Evo 3D GSM con Tapatalk 2
[HTC EVO 3D] mrg666:
Thanks for the bluetooth reports. I will look into it.
[HTC EVO 3D] sdeft:
Not in my case!

I get the following error when I enable ondemand in the config

drivers/cpufreq/cpufreq_ondemand.c: In function ‘get_cpu_idle_time_jiffy’:

drivers/cpufreq/cpufreq_ondemand.c:158:39: error: expected ‘;’ before ‘)’ token

drivers/cpufreq/cpufreq_ondemand.c:158:39: error: expected statement before ‘)’ token

make[2]: *** [drivers/cpufreq/cpufreq_ondemand.o] Error 1

make[1]: *** [drivers/cpufreq] Error 2
[HTC EVO 3D] mrg666:
I already replied your ondemand questions multiple times. Good luck to you.
[HTC EVO 3D] mrg666:
I have hilited above since you have missed.
[HTC EVO 3D] MightyBen:
Just a quick follow up. I noticed a wakelock while the SmartWatch is connected. But the battery drain is surprisingly low.
[HTC EVO 3D] sdeft:
I am aware of your replies. All I am trying to say is that when you enable ondemand in the default shooter_u_config (which is renamed in shooter_u_defconfig) I get those errors.

the line I change is

CONFIG_CPU_FREQ_GOV_ONDEMAND=y

this is what you mean by default config or am I mistaken ?
[HTC EVO 3D] johnnyslt:
board-shooter_u-rfkill (from my kernel) needs to be imported ( probably mmc & wifi )
[HTC EVO 3D] mrg666:
Thanks! I had unified the shooter and shooter_u files in my repo. There is only one extra file for shooter_u and that is the board-shooter_u.c. I have checked the rfkill and mmc board files for shooter_u in your repo and found some extra code related to bluetooth functions. Here is my preliminary fix: https://github.com/mrg666/android_kernel_shooter/commit/9bb543ed1b73db7b05dde66bd47b154829baa516

And here is the MiRaGe JB kernel for shooter_u that will hopefully fix bluetooth connection.

http://www.mediafire.com/download/oe0aeu963kwbk3p/MiRaGe_shooter_u_test_kernel_962_jb.zip

Everyone, can you please test and let me know if bluetooth connection is fixed

in JB ROMs

?
[HTC EVO 3D] rspillo:
No, it do not work.

Connect /disconnect and after break all my audio

Liquid Rom 4.3.

Edit:

Turn off bluetooth rebooting and my audio is ok.

Inviato dal mio Evo 3D GSM con Tapatalk 2
[HTC EVO 3D] mrg666:
Okay, thanks!

How about this if you can do another test.

http://www.mediafire.com/download/y7tkayvxbrghfw0/MiRaGe_shooter_u_test_kernel_963_jb.zip
[HTC EVO 3D] gav83collins:
thanks il give this a whirl
[HTC EVO 3D] rspillo:
Ok, 30 minute because now I am out of the home

Inviato dal mio Evo 3D GSM con Tapatalk 2
[HTC EVO 3D] MightyBen:
One more thing: Sometimes the touch input seems to be a bit unsensitive. If I glide over SwiftKey keyboard it seems to register "finger up" events, even though I'm still gliding. Are there calibration issues? I remember that agrabren needed to do some touchscreen calibration patches because the sense lockscreen cared for touchscreen calibration. Is this still necessary for CM10.2?

BTW: The mediafire links seem to be dead.
[HTC EVO 3D] mrg666:
Can you try with Google keyboard as well? If the problem is consistent I will give it a shot.

refresh the browser for the link.