[Kernel] (version 014) Mako (UV Control/CPU/GPU OC/Hybrid Linux 3.4+) [Apr-14]
NOTICE: If you come from Franco Kernel, YOU MUST FLASH RESET KERNEL FIRST otherwise it will result in a boot loop due to NON-STOCK ramdisk used in Franco Kernel!
NOTICE: This is COMPATIBLE with ALL Google Rooted Stock and Custom ROMs based on JellyBean 4.2!
Just a statement regarding kernel source: The Kernel Source is of course covered under GPL version 2. Free software does NOT mean no work or time was spent working on it. I have donated a large sum of my free time to hack this kernel. If you use my modified kernel source in parts or in its entirety, I kindly ask you mention its origins and to send me a github pull request or PM whenever you find bugs or think you can help improve my kernel hack further. This way the entire community will truly benefit from the spirit of open source. Thank you !
Hi XDA members and fellow Nexus users:
This is my twenty-third kernel hack. I want to thank T0dbld, Turl and rest of my teammates, and several others I cannot recall for inspiring me to venture into this unfamiliar territory for me.
What is a Kernel? The Kernel is the Foundation in which everything else builds upon in any software system.
[Car Analogy]: Kernel is like the Engine, Electrical system and the Transmission to a car. The Library, Framework and the Apps [AKA ROM] are the body frame and the rest of the Car.
THIS KERNEL is BASED ON Google Source Code. So it is COMPATIBLE WITH ALL AOSP JB 4.2 Builds.
DO NOT use any task killers, they DO NOT improve performance nor battery life. They INTERFERE with your phone's stability (more crashes) and App compatibilities (Forced Close).
So what type of kernel is this? Well, this kernel is based on Linux 3.4.y (says so from the version string) Features in Magenta are identical as the latest Linux 3.4+
Here's a step by step instruction to install this kernel:
1. download the above file (via phone directly or to a PC)
2. copy the downloaded zip file to /sdcard/download/
3. Open ROM Manager and select "Reboot into Recovery" and select "OK"
4. Once in recovery, select "wipe cache partition", select "Yes", then select "advanced", then select "Wipe Dalvik Cache", then select "Yes" again. Once finished, click the back button to go back to the main recovery menu. On that menu, select "Install Zip From SDCad", then select "Choose zip from SDCard", then go to /sdcard/download and select the downloaded zip file and let it run its script.
5. Once the script is done, select "reboot system now"
Note: After FLASHING, the first reboot may take longer than usual, please be patient... After the first reboot, it may lag during initial load (let everything finish loading). Once everything is loaded and phone is ready for use, reboot the phone a 2nd time and the lag will be gone and everything should be silky smooth...
[ Advanced Users: ]
[ Optional: ]
If you encountered any funny / weird / strange issues coming from other than 100% pure stock ROMs or my kernels, the following "Reset Kernel" will restore the kernel to its Original Stock Settings.
After applying the reset kernel, then load my latest kernel again.
*** JellyBean -- RESET KERNEL (FOR STOCK BASED ROM ONLY. FORC CM SIMPLY REFLASH THE LATEST NIGHTLY, then FLASH my KERNEL AFTERWARDS) ***
JellyBean 4.2.x Reset kernel for STOCK ROMs ONLY (Cyanogenmod, simply reflash nightly again to reset)
Please don't hesitate to talk among yourselves and help each other out... The XDA community is what inspired me to hack kernels for everyone since everyone here is nice and helpful to each other... Keep helping each other.... Famous proverb: It's better to give than to receive...
Not All CHIPS ARE CREATED EQUAL
version 0.x.x -- more to come...
See Post below...
Standard Disclaimer: Not responsible for bricking your phone, voiding your warranty, or any other pain or suffering you may feel as result of using this kernel!!!
DUE TO MY EXTREMELY BUSY SCHEDULE BOTH @ WORK AND @ HOME, I WILL ONLY MAKE MAJOR ANNOUNCEMENTS ONCE PER WEEK
Open Beta may not be stable and may cause issues with your phone!
By loading open beta you have agreed to:
1. To report all random reboots with associated /proc/last_kmsg
2. To provide feedback on errors or bugs with detail phone information such as ROM, kernel version, and apps
3. Participate in Forum discussions for the beta software with others without FLAMING each other or post useless information such as:
a) Phone doesn't boot (without providing any additional information, ROM versions etc)
B) phone is too hot (without providing any additional information, ie OC freq, UV etc)
The Open Beta system is designed to have the community help each other and the developers. This way, all potential bugs are flushed out so the final released version will be stable and error free. The more actively you participate in Beta Testing the better the final product will be (you are really helping yourself to create a better community software).
If you do NOT agree with the statements above, DO NOT load my Open Beta software.
2. Why doesn't my Max frequency settings NOT "stick" when using intellidemand governor with FauxClock App?
Intellidemand will AUTOMATICALLY UNDERCLOCK when there's a CONSTANT load for greater than 3 minutes. (Load spikes will NOT trigger the auto underclock, only CONSTANT loads). After the load is gone, it will restore back to original Max Clock. Constant load will drain the battery quite quickly, intellidemand governor will detect this behavior and automatically underclock to save more battery without ANY user intervention at all!
3. Why does the CPU freq slider move when I touch the screen?
Qualcomm's closed source mpdecision is the culprit. mpdecision raise the minimum CPU frequency to 1.026 GHz to "cheat" or increase UI smoothness. While this is a good idea, it is too aggressive and overkill causing unnecessary battery drains. And because it is closed sourced, it is NOT POSSIBLE to tweak its behaviors. I highly recommend turning off mpdecision when using my kernels in combination with intellidemand/intelli_plug
4. What is Intelli_plug? How do I use it?
Intelli_plug is my open source solution to Qualcomm's closed source mpdecision. Intelli_plug is enabled automatically upon boot, so NO need to turn on or off. However, it conflicts with mpdecsion, so I HIGHLY recommend turning off mpdecision when using my kernels! To turn off mpdecision, either use fauxclock app under CPU page or use terminal / init.d script and write "stop mpdecsion"
5. What is Eco Mode in FauxClock App?
Eco Mode is a special power savings mode part of the intelli_plug where the kernel automatically reconfigures its decisions in real time and optimizes to use only 2 out of 4 cores. Cores 3 and 4 are turned off completely.
6. My Gamma/Color settings do NOT stick when I removed FauxClock App from memory!
FauxClock app MUST be running to retain the colors. This is a limitation of the stock kernel and FauxClock app was designed to overcome this issue, so therefore it has to be running and be in memory (Avoid all Task Killers!!!)
7. If FauxClock has to be running all the time, does it CAUSE MORE DRAIN?
NO, FauxClock is a normal behaving app which does NOT HOLD or request ANY wakelocks from Android system. Therefore it does NOT cause any drain at all while running (matter of fact, it's suspended most of the time until it's needed)
8. What is "SnakeCharmer" ?
SnakeCharmer is an extension that I created to tame the Qualcomm Krait CPUs. Due to asynchronous SMP cpu design, each CPU can have its own independent min/max frequencies. SnakeCharmer allows you to set a specific max cpu frequency to all cores at the same time, so if you want to UNDERCLOCK your CPUs to a specific frequency, you should enable it under FauxClock.
9. I enabled "SnakeCharmer" but I occasionally see it still goes to max 1.512 GHz, why?
SnakeCharmer works flawlessly. FauxClock app is a Java app which runs on top of Linux. Sometimes it gets out of sync with the kernel, so it will display a frequency that's higher than the maximum "SnakeCharmer" frequency. This is a PURE DISPLAY issue with FauxClock App. SnakeCharmer works advertised! (Confirmed using CPUSpy by multiple users).
10. I have BOTH FauxClock and FauxDisplay apps but I seemed to lost the Screen Adjustment Tab under FauxClock?
FauxDisplay (aka Advanced Gamma Control has full 27 controls unlocked, it supersedes the basic controls provided by FauxClock
11. What is Turbo Boost and how do I enable it?
Turbo Boost is similar to Intel's Turbo Boost for the x86 CPUs. It increase the clock frequencies when 2 or less cores are active. (TB-U allows up to 1.9.44 GHz, TB-M allows up to 1.836 GHz). To enable turbo boost, simply slide the CPU max frequency slider all the way to the right!
12. Why can't I Undervolt below 800mv?
Ever since I created the UV interface for Qualcomm phones on 2010, 800mv minimum voltage has been chosen for a reason. There are typically 2~4 different "binnnings" for the same CPU chip (each binning has their own voltage tables) and therefore NOT ALL CHIPS are created equal. The 800mv limit was put through many different tests and was found to be stable ACROSS many many different chips/binnings combinations (No crash or sleep-of-death aka SOD) and it has been proven time and time again to be a good value for minimum voltage value.
13. Why is the lowest frequency @ 384 MHz?
The first Snapdragon series had 192 MHz as minimum and most early adopters of Qualcomm devices were used to that minimum frequency. However, when their dual core (Snapdragon S3 series) first surfaced about 2 years ago, the 192 MHz frequency was found to be unstable and was causing sleep of death on some of their lower "binning" chips. Qualcomm via CAF then REMOVED the 192 MHz frequency from their official Open Source center and made 384 MHz as their new minimum for any Snapdragon S3+ chipsets. Since CAF is Qualcomm, no one knows their chipsets better than themselves, therefore I'm agreeing with their decisions and will NOT go below 384 MHz as well.
SOC Sleep States demystified! (Corrected for incorrect information thanks for G+ comments!)
Often times users using many apps like CPU Spy will say post how much time their phone spent in "deep sleep" and thinking that "deep sleep" is only 1 state, unfortunately, it is WRONG. For many modern CPUs there are several C-States (sleep states), and the term "deep sleep" does NOT correctly describe them all.
Just like in real life, there are several stages of "sleep", the shallowest sleep is C0 State. As in real life, C0 state is very easy to wake up from with almost NO latency at all (real life will be like grogginess, so C0 is just like when you first doze off but any little distraction will instantly wake you up). The deeper the sleep, the harder it is to wake up from. It takes longer for CPU to re-initialize itself to a waking state (just like real life where once you enter REM sleep, it's very hard to wake up from it).
For most processors, C3 is the Deepest sleep state. C3 state is ALMOST like turning it off using the absolutely minimum power.
C0 - Shallowest sleep (dozing off) with instant wake up
C1 - slightly deeper sleep with slight latency when waking up
C2 - deeper sleep with longer latency when waking up
C3 - really deep sleep (like REM sleep in real life) with longest latency when waking up
My pyramid (Sensation 4G) kernel has Intellidemand Governor 2.0 (Grand daddy of the Mako's Intellidemand governor) where I disabled ALL hotplugging when screen is on (ie, both cores stays ON the WHOLE TIME) but I enabled C2 state for both processors, so even though at first you think it may draw more battery than hotplugging (turning off the core when not using), many of my users have experienced better battery life than with hotplugging (Hotplugging is VERY expensive, the act of turning cores on/off drains battery as well).
On Nexus 4 (Mako), for some reason, Qualcomm has decided to only allow for C0 state (the shallowest sleep) and so the "deep sleep" isn't really that deep. With my FauxClock app + my kernel, I give you all the "deeper" sleep states so when idling, you phone can experience deeper sleep. There's a hardware bug for Krait processors where the secondary cores, 1~3, cannot achieve deeper sleep state independently, so hotplugging is still necessary to save power for cores 1~3 but for core 0 (and core 0 is the master CPU and it's NEVER hotplugged) being able to go into deeper sleep state will help to conserve more power.
FauxClock is designed with forward compatibility. With the newer Qualcomm Krait 600/800 series, they have fixed a few of the hardware bugs from the Krait processors, and so for those newer SOCs, you can go into deeper sleep with all cores like the like older 8x60 SOCs.
LG Nexus 4
HTC One X (Sold)
Motorola Atrix (Retired)
iPhone 3GS (Cracked)
Samsung Impression (Stolen)
Nokia N75 (Retired)
Sony Ericsson w570 (Cracked)
Motorola RAZR v3xx (Retired)
Motorola v276 (Retired)
Not too long ago, we talked about how Sony was continuing its AOSP efforts on … more
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?