[MI2/MI2S][KERNEL] MiCore 010 for MIUI | Linaro | UV | OC


redmaner

translators.xiaomi.eu maintainer
Staff member
Jan 12, 2013
534
546
182
#1
MiCore is a kernel for Xiaomi MI-2/S(C). This kernel is especially for MIUI (Android Jellybean 4.1.1) works on official AOSP too.
The purpose of this kernel is to implement a few modification to allow wider user adjustments.
It must be flexible to tune on speed, stability, battery and/or average.

This kernel is compiled from sources, which are released by Xiaomi on GitHub
If you seek a kernel for AOSP based roms I suggest to look here or here

Kernel features 010m
- Linux 3.4.82
- Compiled with Linaro 4.8.3 toolchain
- CPU governors: msm-dcvs, ondemand, conservative, intellidemand, interactive (default)
- IO schedulers: cfq, deadline, noop, row, fiops (default)
- GPU simple governor
- Intelligent hotplug driver (intelli-plug replaces MPDesicion)
- Voltage Control (undervolting)
- Dynamic Fsync
- Kernel image compressed with XZ
- init.d support
- fstrim at boot
- other optimizations, updated code and tweaks

Kernel features 010oc
- All of the features from M series
- Overclocking enabled up to 1.7ghz for Mi2
- Overclocking enabled up to 1.9ghz for Mi2S

How to install
- Only works on MIUI (based) 3.11.8 and above. Latest is recommended.
- Make a nandroid backup
- Flash in clockworkmod recovery.
- Flash on the right system
- Lost data? Read this

Known problems / not supported features
- Color temperature / color saturation doesn't work in settings >> display
- Xiaomi Piston ears are not fully supported (buttons not working)
- GPU frequencies double 400mhz
- alarm doesn't work when phone is OFF

Download
Standard disclaimer:
Not responsible for bricking your phone, voiding your warranty, or any other pain or suffering you may feel as a result of using this kernel

Mainline kernels (M series)
MiCore 010m | Release notes

MiCore 009m | Release notes
MiCore 007m | Initial release

Overclock kernels (OC series)
MiCore 010oc | Release notes

MiCore 009oc | Release notes

Credits
Linux Foundation for linux kernel
Linaro for their open source work on Linux for ARM
Xiaomi for releasing sources and helping solving bugs
Faux123 for his kernel, intellidemand and intelli_plug Sources here
FransicoFranco for generic touchboost driver
@M1cha for Wi-Fi driver and battery driver
@zhhwin (from Xiaomi?) for updating kernel sources with Mi2S camera support
@MarkHUK for his connections
@Acid, @linuxx, @Wajk, @.bastian, @aditoma777, @jacov, @tomjoad70 for testing this kernel
All other awesome (kernel) developers[/B]
 
Last edited:

redmaner

translators.xiaomi.eu maintainer
Staff member
Jan 12, 2013
534
546
182
#2
Sources
Kernel: here
Initramfs: here

Features explained
MPDecision
All Qualcomm based phones have Qualcomm prorprietary userspace binary called "mpdecision" aka m(ake)p(oor)decision. Instead of letting the kernel itself to decide what frequencies and how many cores to run, this "mpdecsion" binary polls the kernel run queue statistics and decides for the whole system the "optimal" frequency and the "optimal" number of cores to use. The concept is fine, except the decision making is done in userspace and it's 100% closed source so there's no way to tweak it and there's a latency (because all userspace binaries needs to "poll" the kernel for the latest information which is slightly delayed) - Faux123

Intelli_plug hotplug module let the kernel itself decide what frequencies and how many cores to run.

CPU governors
CPU governors

I/O schedulers
I/O schedulers

Three batteryprofiles from MiCore
Xiaomi has implemented three batteryprofiles in MIUI, these batteryprofiles are optimized to suit MiCore.
Change batteryprofile in settings >> battery >> batterymode

Powersaving
CPU governor: intellidemand
GPU governor: ondemand
Max GPU frequency: 200mhz
Max brightness: 140

Normal
CPU governor: interactive
GPU governor: ondemand
Max GPU frequency: 400mhz
Max brightness: 255

Performance
CPU governor: interactive
GPU governor: simple
Max GPU frequency: 400mhz
Max brightness: 255

Bugreports and feature requests
If you have any bugreports or featurerequests let me know.
For bugs, logs are highly appeciated (dmesg / kmsg / last_kmsg) Logcats are not preffered.
For feature requests, links to examples are fine or a detailed overview.
 
Last edited:

xeGox

Members
Feb 26, 2013
401
58
62
#4
Wondeful news..!
I'm downloading ASAP

Inviato dal mio Xiaomi Mi-5f (f sta per fun,non per fan)...con tapatalk 26°
 

Lepi

Members
Oct 16, 2013
48
12
18
#7
Features explained
Intelli_plug hotplug module let the kernel itself decide what frequencies and how many cores to run.

CPU governors
CPU governors

I/O schedulers
I/O schedulers
Bugreports and feature requests
If you have any bugreports or featurerequests let me know.
For bugs, logs are highly appeciated (dmesg / kmsg / last_kmsg) Logcats are not preffered.
For feature requests, links to examples are fine or a detailed overview.
Thank you. I installed a new kernel on WIUI 3.10.18 . I will watch over his behavior.
 

Acid

Scripting Ninja
Staff member
Aug 20, 2011
2,726
744
247
#8
The best is to flash on miuiandroid MIUI. Wajk uses his own CPU tweaks so flashing MiCore is bad idea.
Also.. read OP. There is a minimal MIUI version you should use to flash MiCore.
 

Lepi

Members
Oct 16, 2013
48
12
18
#9
The best is to flash on miuiandroid MIUI. Wajk uses his own CPU tweaks so flashing MiCore is bad idea.
Also.. read OP. There is a minimal MIUI version you should use to flash MiCore.
Tomorrow will tell their observations . While there is the conclusion that consumption decreased. But this may be a misconception .
 

redmaner

translators.xiaomi.eu maintainer
Staff member
Jan 12, 2013
534
546
182
#11
I recommend the normal battery profile.
Kernel is already optimised for battery and performance
 
Jan 9, 2013
507
96
65
#13
I recommend the normal battery profile.
Kernel is already optimised for battery and performance
i know if is based on faux kernel or on his intellidemand. I would mean if i need to change my personal profile under battery saver when my battery goes under 30% into battery saver (security app of miui rom). Fo sure i don't need to use conservative mode with your kernel.
 

oile

Members
Jul 15, 2013
285
138
67
#15
Something wrong with GPU governor: it stays on 400 mhz and almost never goes down.
Modify laziness at 0 and ramp at 1000 seems helpful.
I'll test it extensively but seems pretty good :) frequencies are now lockable like in WIUI.
I see this Intel plug plugs in the four cores more often. I'll see how much battery will last.
Thanks
 

redmaner

translators.xiaomi.eu maintainer
Staff member
Jan 12, 2013
534
546
182
#17
Great work! Well done guys ;) Would this work on a ROM like WIUI?
Have a look here
http://xiaomi.eu/community/index.php?posts/193127

i know if is based on faux kernel or on his intellidemand. I would mean if i need to change my personal profile under battery saver when my battery goes under 30% into battery saver (security app of miui rom). Fo sure i don't need to use conservative mode with your kernel.
Yes you can, that powersaving mode won't effect this kernel that much

Something wrong with GPU governor: it stays on 400 mhz and almost never goes down.
Modify laziness at 0 and ramp at 1000 seems helpful.
I'll test it extensively but seems pretty good :) frequencies are now lockable like in WIUI.
I see this Intel plug plugs in the four cores more often. I'll see how much battery will last.
Thanks
I assure you that intelli_plug has way better batterylife then MPDecision.
Atleast on my device, curious about your expierence let me know.

For simple GPU governor, yes it's ramping fast to max frequency
The positive side of this governor is that it can be tuned for performance or battery or average.
You discovered that too, maybe I'll add some profiles for it in the future.

If Someone can maybe please explain to me.
How can this kernel improve the Mi2s ? Battery?
Keep it simple lol :D
Simple said, it has better batterylife for me and performance is good.
Try out yourself, if you don't like it then flash MIUI back and you are all good
 
Nov 30, 2013
240
40
52
#18
Well it works on WiUI, BUT WiUi uses some diffrent CPU/GPU frequency tweaks which could have negative results for this kernel.
I assume Wajk can say more about this, but he's on vacation
He just posted a patch with the MiCore kernel, so I guess he already did something about it.
I set default CPU governor to ondemand with init.d script in WiUi.
I made patch, what will disable that settings, and you should use new governors. ;)
 

redmaner

translators.xiaomi.eu maintainer
Staff member
Jan 12, 2013
534
546
182
#20
For those of you who seek extreme batterylife
Download trickstermod >> goto specific tab >> enable eco mode.
This enables only two cores instead of four
 
Nov 30, 2013
240
40
52
#22
If it works all well can WiUi get build on it?
Can you post a pic of battery life?
Thanks
Please read the whole topic:
Great work! Well done guys ;) Would this work on a ROM like WIUI?
He just posted a patch with the MiCore kernel, so I guess he already did something about it.
I set default CPU governor to ondemand with init.d script in WiUi.
I made patch, what will disable that settings, and you should use new governors. ;)
 
Nov 30, 2013
240
40
52
#23
I just installed Trickstermod, went to the Specific Tab and saw this:
____________________________________________


____________________________________________
MP-Decision shouldn't be enabled, right? I also don't see the eco mode. I used Wajk's patch by the way. Going to post this on the WIUI thread too.


Fixed
 
Last edited: