[Kernel]Froyo/Sense[2.6.32.21]MaxOC~1.84GHz,SmartAss/UV/BFS/SLQB/BFQ/Youtube[Apr-24] - myTouch 4G Android Development

Announcement:
For ORANGE Glacier and ORANGE Sense USERS, GO TO your respective ROM threads to download the PATCH for your ROMs FIRST before coming back here for new kernel. ALL OTHER USERS DO NOT DOWNLOAD the ORANGE PATCHES you will screw up the file systems.
All other users (Rooted Stock, RoyalGlacier, RoyalThunder, Evil D's Desire Z/HD and Gr8Gorilla's Desire HD), ONLY if you experienced boot loops, download the updated "first time kernel v2", then apply the "first time kernel". Once rebooted, you can then update to newer kernels afterwards.
NOTICE: I am changing the title of my kernel thread to be clearer. ALL FROYO Sense ROMS:
All Sense/Expresso ROMs:
Rooted Stock, Ice Glacier,
Desire HD/Z, Orange Sense,
Orange Glacier, Thunderbolt​
All Gingerbread ROMs should use my Gingerbread Kernel
All Froyo AOSP ROMs should use my Froyo AOSP Kernel
Evil D's SENSE ROMs and KERNEL users ONLY: You MUST download my "First Time Kernel" below to RESET the Kernel Incompatibility coming from using his ROMs/Kernels. WITHOUT my using "First Time Kernel" will experience SEVERE LAG and VERY LOW QUANDRANT SCORES!!!
Hi XDA members and fellow MT4G users:
This is my FIRST kernel hack. I want to thank Grankin, Gr8Gorilla, Erasmux, dumfuq, Cyanogen, Zinx, Snq, Pershoot 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.
​
My goal for this Sense Based Kernel is to provide maximum Sense ROM compatibility, and only apply updates/patches/enhancements once I understand how they work and their cost/benefit to the kernel as a whole...
Please 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).
My kernel is based on the HTC source code directly from developer.htc.com.
MinMax Governor (Battery Saver)
This governor will try to minimize the frequency jumps/changes which cause voltage spikes/changes which supposedly drains more battery life... Supposedly designed to work with SetCPU... so give it a whirl...
SmartAss Governor (Balanced)
This governor has a built-in "profile" similar to SetCPU, so screen off will use lower clock rate thus conserve more battery, but it also has a fast wake up feature so that user interaction will not see the lag when switching from Sleep to Wake state.... (So SetCPU Profiles are sorta redundant when using this governor, you can still use SetCPU to OC to higher than default Clock frequency).
Interactive Governor (Performance)
This governor is designed to put more priority to User Interface (UI aka Apps) tasks, therefore appears more responsive then the traditional OnDemand governor. So if you want the smoothest UI interaction, this governor is for you...
Brain F*ck Scheduler - (BFS)
This scheduler is designed to be simple and speedy tailor specifically for user interface type systems such as desktop/smart phone devices where user interaction is MORE important than serving 1 million web requests at the same time (think of nimble desktop workstations vs large corporate servers). CM7 main line is using this as its default scheduler, now I bring you the same performance as CM7 with compatibility to Sense Series ROMs.
SLQB - (SLAB allocator with Queue)
This memory allocator is designed for small number of CPUs system (such as desktop or smart phone devices). This allocator is design to be simple and it is optimized for using order-0 pages as much as possible (order-0 pages are the simplest therefore quickest type of memory in a Linux system to allocate). Not all kernels are using SLQB including CM7 main line...
Fair Budget Queue (BFQ I/O scheduler)
This I/O scheduler is an improvement on top of Completely Fair Queue (CFQ). CFQ is fair in terms of time but not in terms of throughput / bandwidth, so BFQ make sure that both time and throughput / bandwidth are balanced across all requests.
Installation Instructions:
FIRST TIME STOCK USERS (or People who Experienced Boot Loops) ONLY:
If this is your FIRST TIME loading my KERNEL. You MUST LOAD THE FOLLOWING FILE FIRST:
First Time Kernel v2
Before you can update to my other kernels or any other kernels. YOU ONLY NEED TO DO THIS EXACTLY 1 TIME
Here's a step by step instruction to install this kernel to work with Froyo based ROMs:
[ Aurum Edition ]
[ CFS-Smartass ] (Mainline)
The File ==> Version 1.0.0-RC3 CFS Low Voltage #152 <==
The File ==> Version 1.0.0-RC3 CFS Stock Voltage #153 <==
[ BFS-Interactive ] (Enthusiasts Version)
The File ==> Version 1.0.0-RC3 BFS Low Voltage #154 <==
The File ==> Version 1.0.0-RC3 BFS Stock Voltage #155 <==
Post your problem IN DETAIL:
A [good example] of error reporting... (from vinsane)
Here's a template to use if you don't know how to report your issue
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"
After FLASHING, the first reboot may take longer than usual, please be patient (rebuilding cache structures)... 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...[more detail]
I am currently running this kernel myself on my daily MT4G. I love android
NEWS BULLETIN:
Version 1.0.0 RC3 is OUT!
Added Zinx's latest fix for Glacier's light sensor values
I have SPLIT AOSP based ROMs (LiquidMetal ports, MIUI ports, G2 ports and CM6) away from Sense based ROMs (rooted Stock, Ice/Royal Glacier, Desire HD / Z, Thunderbolt)
Thanks to the following dedicated Beta Testers for all their efforts often taken for granted:
se1000, shlongwoodian, Elloco305, koshtaru, daprince047, nlarge, electronicrice, eliasadrian, kyokyle, rojoe, brwnohno
Remember NOT ALL CHIPS are created EQUAL... Especially for Low Voltage Version, it is specifically designed to balance between Performance and Battery Life. If you want to ultimate performance and stability, use the STOCK VOLTAGE version. Also remember NEW DMA Engine is more efficient, so it is putting MORE STRESS to the MEMORY SUBSYSTEMS than the old DMA Engine... Therefore, it MAY CAUSE more INSTABILITY than before when OVERCLOCKED to high frequencies!
Ultimate Final version 1.0.0 is coming soon
Geek Talk Below:
[HAVS]Tried to hack HAVS to work with MT4G...
(Sigh... I can't find any documentation specific to MSM8255 chipset from Qualcomm... This lack of documentation is very frustrating because I don't have enough information on the AVSSCR registers and their meanings. Yes, I have written my own AVS based on existing HAVS, not just a copy and paste but until I can figure out all the "undocumented" registers for MSM8255, I can't get it work...)
Working on other things to reduce power consumption instead, until I can get more documentation on this chipset...
[Google Microbes Live Wallpaper]
I am humbled by a simple Google Microbes Live Wallpaper... Google is very very clever. They developed this live wallpaper as a bug/compatibility checker in disguise... I scoured the forum only to find out how many custom kernels experience all sorts of issues with this "live wallpaper". If you can run this wallpaper without any issues, you have a pretty stable ROM/Kernel combination...
[Android I/O scheduler Findings]
The more I found more how Android works, the more I realize that Android is a collection of hacks (for better or for worse)... The I/O scheduler is supremely important to Android... Any hiccups in the I/O scheduler greatly affects the Android presentation as a whole...
Users with lots of APP2SD Apps (Apps running from SD card) are most susceptible to lag issues from version 0.3.0 beta using simple NOOP I/O scheduler... Due to how kernel use loop backs to trick Apps running from SD, there can exist a condition where multiple SD Apps can access the SD card simultaneously and overwhelm a simple NOOP scheduler... I am switching back to CFQ because it is designed to address multi-tasking intensive servers which helps the above situation with multiple SD card accesses... Anyways, this should resolve the lag issue
[DMA Engine Upgrade. For Enthusiasts ONLY]
Upgraded the Direct Memory Access (DMA) code / engine to a new updated version from the Google Chrome (AKA Aurora) project. DMA is designed to off-load CPU from involving directly in data transfer, relieving it from the nitty gritty details of memory transferring, giving CPU more time to perform other more important tasks, thus increase overall system performance.. So a better DMA engine == better performance.
Unfortunately, the performance gained by this upgrade comes at a dear COST to battery life... You have been warned
[Voltage issues]
I made a coding error where I switched between Low Voltage and Stock Voltage builds... So those of you who've downloaded my old normal version were actually using STOCK VOLTAGES and those of you downloaded my old HV versions were using lower voltages.... Huge Thanks to XDD for making me double check my code... I've updated all my downloads and files again to correct the mistake...
[Touch Driver]
Touch Driver for Glacier sux (HTC should use the touch driver from their Shift 4G line for all their phones. period!)... Touch Driver for EVO Shift 4G is silky smooth... I completely transitioned to use Shift 4G's driver from now on...
[XCHG_ADD vs Generic Spin Lock]
It seemed pure HTC Sense ROMs (Desire HD/Z, Thunderbolt) are optimized for Generic Spin Lock Semaphores, so when I replaced the Generic Spin Locks with more advanced Exchange Add Algorithm Semaphores (specially optimized and written for use with ARM processors), it seemed to make these ROM to choke randomly (what appears to be lag). I decided to keep to my promise of making my Kernel 100% Sense Compatible, I REVERT back to Generic Spin Lock versions for the sake of Compatibility...
Replaced highly optimized RWSEM_XCHGADD_ALGORITHM specially written for ARM processors with RWSEM_GENERIC_SPINLOCK code...
[Optimization]
Read this post for Optimization in general...
[Expresso Issues]
Previous version 0.8.x were failures because I couldn't isolate the errors experienced (upside down lock screen) by a few STOCK/ICE GLACIER ROM users. Of course the most obvious area to look for the error was the Video driver. I have looked over the video driver at least 10x times, but the error is NOT there. I then look through the Touch Panel Driver and still the errors were not there either. What I forgot to mention in my change log was that I re-enabled a few compiler switches I have accidentally left out from since version 0.1.0 that were causing some errors shown in the LogCat captures. I went through all the changes I made step by step and the errors made NO SENSE at all (no pun intended). This whole experience has indicated to me that Expresso is NOT a copy and paste of Pure Sense framework... They are quite different internally... I am not sure if T-mobile or some neglected Dev team from HTC were responsible for Expresso framework. All I can say is Expresso is a HACK JOB of a framework. It's a shame that T-mobile didn't use a pure Sense UI for MT4G...
[BFS issues]
Revert back to CFS for scheduling... The more I play with HTC Sense (pure versions, excluding Expresso such as Stock and Iced), the more I realized that HTC has done extensive optimization in their Sense Framework... This is all good but it comes at a cost... Optimization is usually attained by taking advantage of certain behaviors of the Kernel, and since the AOSP kernel is using CFS as its default scheduler, so HTC has optimized Sense specifically for CFS scheduler. When I introduced BFS to my kernel, it seemed to cause some random slow downs in CFS-optimized Framework... From now on until version 1.0.0, I will use CFS as the default scheduler.
[Youtube Issues/Problems]
The "Real Problem" with youtube/Camera/Video players on MT4G is that the HTC Framework (closed proprietary code) DOES NOT refresh the video playback automatically, therefore, it will appear to be extremely laggy... What Zinx did was to HACK the kernel to FORCED UPDATE video playback to remove the lagginess from all video players such as Youtube/Camera/Video players (2D/3D Gallery Apps).
Most Apps exits gracefully such as Video players and Camera Apps, but the latest version of Youtube is doing something different from everyone else when EXITING in landscape mode WITHOUT notifying the kernel it's NO LONGER playing VIDEO, so the FORCED UPDATES from the kernel is unaware that Youtube has exited from LANDSCAPE MODE and continues to FORCE UPDATE the VIDEO, this will SOMETIMES result in fast Flipping/Scrolling and random Garbage on screen because the Youtube App is not notifying the kernel properly... Youtube DOES exit gracefully in Portrait mode, the problem WILL NOT OCCUR in portrait mode.
TL;DR: Exit Youtube in Portrait Mode to avoid any issues with the latest Youtube App.
[New HTC Kernel Sources]
HTC has release a NEW KERNEL SOURCE CODE for MT4G AKA GLACIER... UNFORTUNATELY, ONLY FM HeadPhone, DMA Engine and DOCK ACCESSORY parts were UPDATED, rest of the CODE are the SAME as ORIGINAL KERNEL SOURCE... FORTUNATELY for us, I've already incorporated all the NEW CODE from EVO SHIFT 4G... So we are actually ahead of HTC's own RELEASE CYCLE for MT4G AKA GLACIER
[CIFS + UTF-8 support]
I was notified via Twitter from user "snxat" regarding an awesome technology called CIFS, I will add CIFS as a kernel loadable module and enable its features so you can stream movies and music from anywhere (provided you have 3G/4G or Wifi) without downloading the files first...
Here's a CIFS front end developed by a fellow XDA Dev:
CIFS Manager
Which makes it quite simple on the Android side to set up.
Added UTF-8 kernel module to support many foreign languages or special characters used by PC share servers so CIFS mounts can read those characters properly.
[WiFi Hand-off Issue]
Many Sense Ports DO NOT HAVE NATIVE WiFi Calling support at ALL (T-Mobile ONLY FEATURE), so the FRAMEWORK (part of ROM) does NOT KNOW how to hand off between WiFi and Cell Network properly, when I added Universal WiFi Calling support to my Kernel.
THIS IS NOT A KERNEL ISSUE, this is Framework/ROM issue. I am keeping my promise to keep my Froyo/Sense Kernel as compatible as possible, so I have created a SOLUTION for EVERYONE. I made Universal Wifi Calling as an OPTIONAL kernel module (gan-eth.ko).
For Stock/Ice/RoyalGlacier users you do NOT have to do ANYTHING when loading my kernel.
For Pure Sense ROMs (Desire HD/Z, Thunderbolt, RoyalThunder), after you installed my kernel, simply use file manager of your choice with ROOT ACCESS and go to:
/system/lib/modules and DELETE the file gan-eth.ko
Once you deleted the file, you should have no issue with WiFi/Cell Network hand off at the COST of Universal WiFi Calling Support (WiFi calling might still work, just NOT as UNIVERSAL as before).
Better Solution is to MANUALLY turn ON/OFF WiFi to switch back and forth between WiFi and Cell network for Pure Sense Users.
THIS IS A KERNEL PATCH for a FRAMEWORK/ROM Issue... NOT A KERNEL PROBLEM.
[0.9.7.6]
MAJOR PROPs to user MADWOLF27!!!! Through his detailed investigative work, everyone of my kernel users (including myself ) benefited from it. He has found an obscure bug involving G-sensor and Sound in my kernel which may FREEZE the G-Sensor thus preventing the phone from rotating the screen properly.
[0.9.7.5]
Reverted back from 2.6.32.35 to 2.6.32.21 (using version 0.8.5 as base)
Note: My kernel was designed for performance and battery life, but as you can see above, some users have achieved amazing synthetic scores...
Benchmark Screens from users of this Kernel
Screen shot for Version 0.3.0 Beta BFS-SLQB
Screen shot for Version 0.3.0 Beta BFS-SLAB running rooted Stock @ 1.70 GHz
Screen shot for Version 0.3.0 Beta BFS-SLAB running Evil Desire Z @ 1.84 GHz
Screen shot for Version 0.5.0 Preview BFS-SLQB-BFQ-nDMA
BUGS:
None so far...
Resolved Issues / Bugs
v0.1 - Interactive Governor will FREEZE when updating frequency using SetCPU (Faux123)
v0.1 - Youtube/Camera/Camcorder/Gallery Video playback are choppy/laggy (Faux123)
v0.2 - SmartAss Governor not behaving as described (Faux123)
(pulled) v0.3 - Google Microbes Live Wallpaper freezes (ckisgen)
v0.3.0 Beta BFS-SLQN - lagging with rooted stock ROM (reported by jriv, vinsane)
v0.5.0 - upgrade DMA engine to newer version
v0.5.1 - upgrade Bluetooth stack to newer version (need dedicated beta testers)
v0.6.x - upgrade WiFi Driver (extremely risky for breaking Sense compatibility)
v0.7.0 - upgrade Video Driver (extremely risky for breaking Sense compatibility, HTC stock video driver is a HACK... Code is so ugly)
v0.7.x - Re-visit Youtube issue
v0.7.x - Re-visit DMA engine upgrade (finding root cause for battery drain)
v0.7.1b - "Smarter" SmartAss cannot handle too large of a frequency swing (reported by ckisgen & vw671). Problem exist only when overclocked above default frequency...
v0.7.9 - General UI lag (experienced by pure Sense Users), solved by switching from BFS back to CFS
v0.7.9.2 - Web Browser Lag (experienced by pure Sense Users), solved by switching from XCHG_ADD back to Generic Spin Lock
v0.8.0 - Broken WiFi for Stock/Ice (Expresso users)
v0.8.5 - Lock screen active when call > max screen off/sleep policy
v0.8.0~v0.8.6 - rare lock screen issues for Stock/Ice Glacier Users.
v0.9.x - Final kernel Optimizations
v0.9.9 - Clean up all loose ends...
TO DO:
v1.0.0 - DONE with Froyo (2.2.1). Moving on to AOSP Gingerbread (2.3.2) or AOSP MIUI ports maybe, or wait for Sense 2.1 (Gingerbread Sense UI)...
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!!!
Follow me on Twiiter :
My Github in compliance with GPL
If you find this Kernel useful, feel free to hit the [Thanks] button below

History:
Version 0.1: (deprecated)
Baseline from HTC T-Mobile myTouch 4G - 2.6.32 kernel source code
Added OC all the way to 1.8 GHz (drawing Max VDD @ 1400)
Added SmartAss, MinMax and Interactive Governors
Applied Cache clear routine from HTC Incredible line
Under volt (battery savings) frequencies below 902400 Hz (up to -250 mVolts)
Version 0.2: (deprecated)
Removed Interactive Governor (will try to add it back in later versions... but lower priority)
Fixed Video Choppiness/Lag with video buffer overlay fix from Zinx (major kudos)
Set default CPU freq to 1113600 instead of 902400 right now
Set default I/O sched from deadline method to CFQ method (supposedly better than deadline for android.... based on a few back-and-forth I read from other android developers)
Version 0.2.1: (deprecated)
Added more intermediate Overclock frequencies (all the way to 1.85 GHz for you brave souls )
Added High Voltage version for those who experience boot loops and freezes
Set default I/O sched from CFQ back to deadline (to check performance differences)
Increased Bluetooth Volume Gains and Handset Volume Gains
Version 0.2.2: (deprecated)
Patched USB/AC charging bug
Updated Battery Thermo Reading
Version 0.2.3: (deprecated)
Changed I/O Scheduler to "No op" from "deadline" ("No op" has fastest performance for FLASH file system)
Added back interactive governor
Tweaked SmartAss governor slightly to use smaller frequency jumps (conserve more power)
Applied patches to High Resolution Timer, Memory Manager, MSM GPIO, MSM clock
Version 0.3.0b: (deprecated)
Added BFS and SLQB technology
Tweaked SmartAss governor slightly (again)
Boosted Handset and Bluetooth Volume gain from version 0.2.1
Version 0.3.1b: (deprecated)
Switched default I/O scheduler from NOOP to CFQ (completely fair queue)
Version 0.4.0b: (deprecated)
Added new BFQ I/O scheduler and set as default
Version 0.5.0b: (deprecated)
Updated DMA engine from Google Aurora Project
Version 0.5.1b: (deprecated)
Revert back to OLD HTC Stock DMA Engine
Updated bluetooth driver to the latest version
Version 0.6.0b: (deprecated)
Major Driver Upgrades for:
Updated GPIO drivers
Updated LED Driver
Updated Wifi Driver
Updated Touch Screen Driver
Updated Sound Driver
Updated DMA engine
Switched from BFS scheduler back to CFS scheduler due to incompatibility with the above updates (Will try to add back later)
Version 0.7.0b: (deprecated)
Updated MDP and MDDI drivers (Youtube is fixed)
Version 0.7.1b: (deprecated)
Added a new intermediate frequency 537600 Hz to help conserve battery
Adjusted SmartAss Governor to allow frequency all the way down to 245760 Hz during use to save battery (Sleep frequency is still locked between 368640~245760 Hz)
Version 0.7.2b: (deprecated)
Adjusted "Smarter" SmartAss Governor and CPU Voltage to be less aggressive
Version 0.7.6b: (deprecated)
Updated Headphone FM Driver from Latest HTC Kernel for MT4G
Updated Dock Accessory Driver from Latest HTC Kernel for MT4G
Version 0.7.7b: (deprecated)
Added back BFS scheduler (should improve performance from CFS version)
Tweaked SmartAss again, made the 537600 Hz the Max Sleep frequency from 368640
Added back cpu_relax() code to MMC driver (in hope to reduce battery drain when accessing internal FLASH and SD card)
Fixed a slight error from 0.6.0 update in video driver (may improve video performance just a bit)
Version 0.7.8.1: (deprecated)
Removed 8064000 KHz Frequency (not really needed)
Tweaked SmartAss again, adjusted sampling frequency to 33 ms for super smooth response
Fixed another slight error from 0.6.0 update in video driver (may improve video performance just a bit)
Version 0.7.8.2: (deprecated)
Code clean up in GPIO Driver
Code clean up in Video Driver
Code clean up in Touch Panel Driver
Version 0.7.9.0: (deprecated)
Revert RWSEM_XCHGADD_ALGORITHM back to RWSEM_GENERIC_SPINLOCK for pure HTC Sense ROMs (Desire HD/Z, Thunderbolt)
Version 0.7.9.2: (deprecated)
Switched Completely to use Shift 4G's Touch Driver
Revert back to CFS from BFS for pure Sense ROMs (Desire HD/Z, Thunderbolt)
Version 0.8.0: (deprecated)
Updated Camera Driver from ATT Inspire 4G Kernel (back camera ONLY)
File System Writeback patch from ATT Inspire 4G Kernel
Updated LED Driver from ATT Inspire 4G Kernel
Video Encoder / Decoder Updates from ATT Inspire 4G Kernel
Wireless Driver Updates from ATT Inspire 4G Kernel (mainly for Bluetooth Co-exist Mode) (buggy)
Bug fix for HTC Battery Driver
Added back VPN tun.ko support that was missing since 0.1.0
Version 0.8.1.1: (deprecated)
Revert back to old GPIO code to fix "deep sleep" not waking up issue
Re-enabled compiler flags left out since version 0.1.0 to fix up all LogCat errors
Version 0.8.2: (deprecated)
Compiler Optimization for Neon FPU and overall Kernel (should see some performance improvements)
Added CIFS (read Bulletin above for details)
Version 0.8.3: (deprecated)
More Compiler Optimization for Neon FPU in Glacier Board Specific drivers.
Added UTF-8 module to work with CIFS (able to read foreign language or special characters).
Version 0.8.5:[2nd edition] (deprecated)
Added universal WiFi calling compatibility to the kernel (Original Froyo WiFi calling support is very picky as to specific WiFi router setup )
Now with version 0.8.5, as long as you have connection to a WiFi, you have WiFi calling capability ​Updated Video driver (this should resolve ALL remaining video related issues from the kernel)
Accidentally re-enabled XCHG_ADD_ALGORITHM
Version 0.9.1 (deprecated)
Updated Core Kernel Components from 2.6.32.21 to 2.6.32.32
Switched back to GENERIC_SPIN_LOCk from XCHG_ADD_ALGORITHM
Updated Video driver
Version 0.9.2 (deprecated)
Added CM6 compatibility (LOL, who still use CM6?)
Version 0.9.3 (deprecated)
Updated core Linux Kernel version from 2.6.32.32 to 2.6.32.33
Updated bunzip2 again
Updated G-Sensor Driver
Updated Compass Driver
Updated KeyReset Code for Inputs
Updated SDCard Driver
Officially Split with AOSP ROMS (Optimized specifically for Sense ROMs ONLY)..
Version 0.9.4 (deprecated)
Made Universal WiFi Calling Module Optional
Version 0.9.5 (deprecated)
Updated Core Linux from 2.6.32.33 to 2.6.32.35
Corrected Frequency mismatch in Kernel GPU Driver
Updated WiFi driver from Incredible S Kernel (New WiFi driver is INCOMPATIBLE with Stock users, so removed to keep compatibility)
Version 0.9.7.5 (deprecated)
[Revenge of the Microbes Edition]
Tweaked CPU Voltage Table for Low Voltage Edition ONLY
[MAJOR EFFORTS Below]
Reverted back from 2.6.32.35 to 2.6.32.21 (using version 0.8.5 as base)
Back ported CIFS, UTF-8 from .32.35 to .32.21
Back ported EXT2/3/4 from .32.35 to .32.21
Back ported all previous APPLIED Drivers to .32.21 (while keeping .32.21 core kernel structure intact for HTC Expresso/Sense Framework compatibility)
Added Latest HTC Thunderbolt Kernel (.32.21) patches
Updated to Latest HTC Thunderbolt Headphone driver
Updated to Latest HTC Thunderbolt GPIO driver
Updated to Latest HTC Thunderbolt USB Gadget driver
Updated to Latest HTC Thunderbolt Power/Battery drivers (Allows 9V wireless charging, Wireless Chargepad support )
Updated to Latest HTC Thunderbolt LED driver
Version 0.9.7.6 (deprecated)
Fixed bugs in Speaker Amp and G-Sensor Drivers which could cause screen rotation issues. This bug was detailed by user [MadWolf27]. Major Kudos to him...
Version 0.9.8 (deprecated)
Updated SPI Master Driver from HTC Thunderbolt kernel
Adjusted CPU Freq Table changed 536 MHz to 576 Mhz from using PLL_2 to PLL_3
Adjusted Smartass Governor's Max_Sleep_Freq to reflect CPU Freq Table change 536->576MHz
Fixed bug in I2C driver related to Wireless Charging update
BFS is BACK! [Enthusiast Edition]
Compiled with a newer version of toolchain from 4.4.0 to 4.4.3 [more optimizations = better performance]
Version 0.9.9 (deprecated)
Fixed minor Bluetooth driver error
Fixed minor Touch Screen driver error related to wireless charging update from before
Fixed minor issues in Camera Drivers (front and back)
Fixed minor issues in LED drivers
Fixed minor issue in Voice Processor Driver
Removed unnecessary / unused drivers
Made sure Microbes LWP runs without freezes (had to do with compilation options)
Version 1.0.0 RC1 (Short Term Release)
The File ==> Version 1.0.0 CFS Low Voltage #143 <==
The File ==> Version 1.0.0 CFS Stock Voltage #144 <==
The File ==> Version 1.0.0 BFS Low Voltage #141 <==
The File ==> Version 1.0.0 BFS Stock Voltage #142 <==
Patched BFS from version 3.3.0 to 3.6.3
Patched core Linux to be compatible with BFS 3.6.3
Version 1.0.0 RC2 (Short Term Release)
The File ==> Version 1.0.0-RC2 CFS Low Voltage #145 <==
The File ==> Version 1.0.0-RC2 CFS Stock Voltage #146 <==
The File ==> Version 1.0.0-RC2 BFS Low Voltage #150 <==
The File ==> Version 1.0.0-RC2 BFS Stock Voltage #151 <==
Updated with Zinx's latest Video Frame Buffer Fix specifically for Glacier (should fix video playing while screen is off, hard lockup issue)
Version 1.0.0 RC3 (Current)
Updated Light Sensor Values from Zinx
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!!!
If you find this Kernel useful, feel free to hit the [Thanks] button below

reserved 2 just in case...

Think I may try this out.
Never used the Minmax governor before. What does it do?
I use SetCPU profiles for when the battery gets low, the smartass governor does not work well for that, and I have the screen off profile disabled now. The CPU probably does not use that much power to matter that I cant just use smartass all the time.
Gonna hit up the dev of setCPU to add multiple conditions for profiles. Like battery level and screen off in one profile.

out-f*ing-standing, I was about to give up and switch from Gr8Gorilla's DHD port with tiger13's Gorilla Red theme to CM6 or to eVil D's DHD port just to get the 1.8GHz and Smartass governor. this works perfectly for me... Wi-Fi, Wi-Fi Hotspot and Wi-Fi calling work perfect first time every time. Thanks much
Edit : so far so good, is grabbing mobile data without issue, ALL of my wi-fi is working without issue, not getting boot loops or random reboots.
I must say very well played for your first kernel hack.

Flashing now, exactly what I was looking for! I'll be sure to let you know the results
Sent from my HTC Glacier using XDA App

How should I set up setCpu? It doesn't need a screen off profile? Thanks! Working great so far w/ no issues!
Sent from my HTC Glacier using XDA App

I dug this up on the minmax governor...not sure of it's accuracy but sounds about right? lol
minmax governor - I have been investigating the behaviour of different governors (ondemand, conservative, interactive) very heavily during the last couple of weeks. It seems that they tend to jump frequencies a lot. This is why ninpo now releases his kernel with a very small frequency table (and requires him to provide different versions for each speed you want).
My idea was very simple, the 'minmax' governor will only jump between the min frequency and max frequency! It will select which frequency according to the current cpu load. This is great because you can set the min and max frequency easily with SetCPU.
This seems to also improve responsiveness and not to hinder the battery life. It is true that your phone will now spend most of its "working" time at the max frequency but this is great it gives you performance and from what I tested does not drain the battery too much. The heavy battery drainers are things like wifi, etc. and when the phone goes to sleep, its sleeping anyway.

see, this is why I keep directing the guys over on Android Forums over here. I was getting ready to take a pic of my new Golden Bushy-nose Pleco to show my buddy, when I noticed the "camera bug" I log in to give faux the heads up about it and BAMM he has already discovered it and put out v0.2 with the fix. Man do I love our dedicated developers and hackers, y'all are the ****!!!

flashed this kernel over about an hour ago. I'm currently running Ice Glacier 1.1.6 and was missing the smartass kernel from eVil's DHD ROMs but wasn't ready to leave Ice yet. I really like this kernel so far. no issues, everything seems to work. it's snappy and I love that faux has already released v0.2 (same day as v0.1?)
I snagged a 61.4 linpack oc'ed to 1.8ghz with this kernel. That was with v0.1 For whatever reason it's a couple points lower on v0.2 but I don't really put a whole lot of stock into those benchmarks. Just kind of fun to toy around with.
Great job, Faux! Everyone remember to hit your thanks button!

ckisgen said:
flashed this kernel over about an hour ago. I'm currently running Ice Glacier 1.1.6 and was missing the smartass kernel from eVil's DHD ROMs but wasn't ready to leave Ice yet. I really like this kernel so far. no issues, everything seems to work. it's snappy and I love that faux has already released v0.2 (same day as v0.1?)
I snagged a 61.4 linpack oc'ed to 1.8ghz with this kernel. That was with v0.1 For whatever reason it's a couple points lower on v0.2 but I don't really put a whole lot of stock into those benchmarks. Just kind of fun to toy around with.
Great job, Faux! Everyone remember to hit your thanks button!
Click to expand...
Click to collapse
seriously awesome job on the kernel, bro flashing the 0.2 now, and eagerly awaiting whatever you have in store for 0.3 that youre working on now. good luck!

For whatever reason I can't get this kernel to boot. I'm running Ice Glacier 1.1.6, I've installed grankin's kernel in the past with no issues, but this one gets stuck at the Ice Glacier "Android" screen after about 15 seconds and just sits forever. I go back, clear cache and dalvik again, install grankin with no issues. Very weird.

negreenfield said:
For whatever reason I can't get this kernel to boot. I'm running Ice Glacier 1.1.6, I've installed grankin's kernel in the past with no issues, but this one gets stuck at the Ice Glacier "Android" screen after about 15 seconds and just sits forever. I go back, clear cache and dalvik again, install grankin with no issues. Very weird.
Click to expand...
Click to collapse
I'm also running Iced Glacier 1.1. 6
I have no problems what so ever when flashing faux kernel.

negreenfield said:
For whatever reason I can't get this kernel to boot. I'm running Ice Glacier 1.1.6, I've installed grankin's kernel in the past with no issues, but this one gets stuck at the Ice Glacier "Android" screen after about 15 seconds and just sits forever. I go back, clear cache and dalvik again, install grankin with no issues. Very weird.
Click to expand...
Click to collapse
mine did that at first on on 0.1. Try flashing the kernel a second time (no wipe at all). For some reason, that worked for me. And it DOES take a while to boot on first install, so give it plenty of time.

Just installed without cache or dalvik wipe and booted fine. We'll see how it runs.

negreenfield said:
Just installed without cache or dalvik wipe and booted fine. We'll see how it runs.
Click to expand...
Click to collapse
glad it worked

jmwils3 said:
glad it worked
Click to expand...
Click to collapse
Thanks for the suggestion. Seems to run really well.

negreenfield said:
Thanks for the suggestion. Seems to run really well.
Click to expand...
Click to collapse
well dont forget the thanks button though faux deserves it more, he's the one who gave us this awesome kernel.

What does the Feb 14th mean in the title?

bobsbbq said:
What does the Feb 14th mean in the title?
Click to expand...
Click to collapse
bob, your wife is gonna cut your marbles off...
Sent from my HTC Glacier using XDA App

Related

[Kernel] Flykernel-13 "Back from the Grave"

FlyKernel is an overclockable kernel for the Hero GSM, aimed to improve stability, battery life and performance (generally in that order).
The Hero GSM now also has a newer .35 kernel "Las Venturas" you should also check that one out. At the time of writing these lines, the newest version of Las Venturax is found on the second post of the above thread (my post ) - you should check which post is more up-to-date on that thread.
Download and instructions are on this post.
FAQ and advanced subjects are on the second post.
Change log and previous versions are on the third post.
WARNING: Please make sure to have an up-to-date backup before you flash this kernel!
FlyKernel-13 (#253)
FlyKernel 13 - Desean
FlyKernel 13 - Mediafire
FlyKernel 13 - Multiupload
This is a post-LasVenturas update for FlyKernel, after quite some time without any updates.
Although I currently have a bit of a personal preference for Las Venturas, I believe that it is even better to have two excellent kernels for the hero (internally totally different ), so that the users can choose whichever works best for them. Possibly, on some of the older ROMs this kernel might work better. This should also help isolate kernel issues vs. ROM issues.
SmartassV2 (informal description and comparison with the first smartass)
SmartassV2 is a governor (controls the frequency of the CPU at each give moment) which like the first smartass is generally based on the implementation of interactive with some major changes and the addition of a built in sleep profile (behaves a bit differently when screen is off vs. on).
The smartassV2 improves the very naive scheme which the first smartass had: The first smartass (with the values I set for the hero), would cap the max frequency at 352Mhz for sleep and when screen is on, would do the opposite and keep the frequency at 518Mhz or above. For sleep this was very effective but a bit crude and unclean, and there could be some cases where you would need processing power even when screen is off (something is updating and music is playing and etc.). For screen on, smartass1 was too quick to jump to the max available frequency and again would never go below the 518Mhz, so in a nutshell its was using "too high" frequencies.
SmartassV2, introduce (internally) an "ideal" frequency which is the frequency we are "aiming" for, in some sense. The way I see it is that the "ideal" frequency is a hint to the governor what is a good balance between performance and battery life. Now when screen is on, I set (on the hero) the ideal frequency to 518Mhz which will ensure nice responsiveness but limit unnecessary use of higher frequencies when they are not needed. When screen is off, I set the ideal frequency to 352Mhz (0 will disable the screen state tracking all together). From my testing this will "convince" the governor to spend most of the its time during sleep at the lowest available frequencies. Note, that both during sleep and when awake the entire frequency range (as defined by the "user" - i.e. selected with SetCPU) is used by smartassV2. For example, when the CPU is loaded heavily, the highest available frequency will be used regardless if screen is on or off.
Boot OC and optional tweaks
Optionally, you can rename the update file before you flash to change bootup frequencies and other options.
If you don't rename the file and flash "FlyKernel-13.zip" you will get the default tweaks and the min/max frequencies will remain as they where before.
For example, to set the max/min frequencies on boot to 614/176, rename "FlyKernel-13.zip" to "FlyKernel-13-M614-m176.zip".
Supported "flags" are:
Notice, all flags are case sensitive.
-MXXX - set max frequency to XXX
-mYYY - set min frequency to YYY
Supported max frequencies:
518 576 614 633 652 672 691 710 729 748
Supported min frequencies:
19 176 264 352 518 576 614 633 652 672 691 710 729 748
Default behavior, if these flags aren't given, is not to change your current settings.
For frequency recommendations and more info see FAQ #5.
Technical details: max/min frequencies are set in the kernel's ramdisk init.hero.rc file. Previous settings will be replaced. Furthermore, if one of your init.d script sets the max/min frequencies, these lines will be removed.
If you have SetCPU or other program changing the speed at boot, their change will take effect and overwrite this setting as soon as the ROM completes to boot.
-nologo - Don't show boot animation.
-logo - Show boot animation.
Default behaviour, if no flag is given, is not to change your current settings.
-noatime - Mount all partitions with -noatime to improve IO.
-atime - Mount no partition with -noatime.
Assuming, your ROM did not mount any partition with noatime, then the -atime option should undo the -noatime option perfectly. Unfortunately, it seems some ROMs (i.e. VR12) mount only some of the partitions with -noatime. It seems that in some cases, changing the noatime configuration causes boot problems.
Therefore, I highly recommend you make a backup before trying the -noatime flag - this is the only full proof way to go back if it messes something up.
Notice, this does not effect the ext partition as it is not mounted in the ramdisk init.rc. As far as I know, all ROMs mount the ext partition with noatime.
-notweak
By default, the updater will remove scheduler tweaks which exists in the ramdisk init.rc script, in order for the scheduler default compiled into the kernel to apply. This flag will disable this behavior.
More techinical information for developers about the smart update package has been updated in my github wiki.
Limitations and known bugs:
- This kernel will not make you coffee (I hope)!
Integrating kernel in a custom ROM (for ROM developers)
You can use my from above:
http://floyo.desean.net/FlyKernel-13-Floyo.zip
This file has a regular boot.img with a ramdisk compatible with Floyo 1.4, boots at 576/352 (smartassV2) and has all the kernel modules unpacked.
If you need to edit the ramdisk, you can either unpack the above boot.img as explained here. Or you can get the kernel binary file from my smart update package, under tmp/flykernel/kernel. The kernel modules are package in the smart update package under tmp/flykernel/syslibs.tar.
Kernel Sources
My sources with all my updates and changes are found on github:
http://github.com/erasmux/hero-2.6.29-flykernel
Use hero_defconfig for the regular version and hero-bfs_defconfig for the BFS version.
See the wiki for more information about building the kernel and more.
Please feel free to contact me regarding my sources and kernel development.
Using my Kernel Sources
Feel free to use my kernel sources, fully or partially in any (legal) way you see fit.
If you modify the sources, I urge you to share your changes with the community (as GPL obliges you to do), preferably using github. You can fork my sources on github, and this will make it easier for you to grab new changes from me and also allow you to fill pull requests so I can pull your changes back to my kernel.
GPL
Yes I am GPL complaint, all is included inside the sources, including the GPL license itself.
Thanks
Huge thanks to Desean for giving me file hosting that makes my life easier
Many thanks to all the Kernel/ROM developers here, especially those with open source kernels on github - LoxK, Cyanogen, Ninpo, Radu and especially Decad3nce.
Big thanks to all those who helped test the pre versions and reported bugs, specifically also to my long time testers (moonshield and floomat)
Donations are always welcome and accepted but are in no way required.
FAQ and Advanced Subjects
FAQ
0. When reporting a problem, do I need to include the ROM and exact kernel version I am using?
YES!
1. How do I flash the kernel update file?
You flash it from recovery, like any other custom ROM. If you are not familiar with recovery and/or haven't rooted your phone, start here.
2. Do I need to wipe anything when installing the kernel?
No you don't need to do any wipes. Just install the kernel through recovery and reboot
3. The update from recovery failed with errors/warning?
Please, in the same recovery session which you tried to apply the update and failed, select the "Move recovery.log to SD" from the "Other" menu and post in this thread with the recovery.log attached (for example in a .zip file).
4. After flashing the kernel my ROM does not boot
A logcat of the boot process might help me understand the problem. Using adb you can generate one with the following command and attach it to your report:
Code:
adb logcat > logcat.txt
You need to run this command relatively close to the start of the boot. Close the window after the phone is stuck for few minutes (say 2 mins with no change should do). You can start by running "adb logcat" and seeing if you get any output at all. If so, reboot once more and run the above command from the start of the boot (approximately).
Please also clearly state which ROM you are using and which kernel did work for you (which one did you use before).
To recover from such a scenario, boot into recovery and restore a backup of your working state. If you do not have a backup, and its the kernel fault, flashing your old kernel should solve the problem.
5. What min/max frequencies should I choose?
The short answer: min 176, max 614, if you have wake up issues up the min speed to 264 and then to 352.
To play with the speeds I suggest you install SetCPU (or similar app), so you can view and change your settings interactively. To change it permanently from the bootup see instructions on first post. You also use options like "Set on boot" in SetCPU if you prefer that.
The long answer:
The max frequency will effect the speed and responsiveness of your phone when screen is on. Note, that any speed above 528Mhz is above the specification of the manufacturer, hence is overclocking and could, in theory, shorten the life of your device. At high enough frequencies all devices will stop functioning, the exact threshold depends on your luck with your specific device. From my experience and knowledge, running at stable frequencies (or say one or two steps down to be on the safe side), should not harm your device - of course all overclocking is done at your sole responsibility.
As far as I know, almost all device can handle 652Mhz, most can reach the 691/710 area and some can even reach higher than the 748Mhz cap of this kernel. To find out which speed your phone supports, use SetCPU (or similar app), start from 614 for example and up the speed one tick a time. Don't select "Set on boot". At each step play with the phone a minute or two. If the phone gets stuck, reboot it (take out battery if necessary) and go one tick down.
Additionally, note the higher your max frequency the higher the battery drain will be when the screen is on. It is true that the display, data, wifi, gps, etc. should drain much more than the cpu. Still, I recommend staying in the sane frequencies range, no more than say 691Mhz (even if you phone can handle it).
Finally the min speed will effect standby battery life (when screen is off). From my experience there is a difference in battery life between 19Mhz and 352Mhz min frequencies but it is relatively small (much less than I expected). 19Mhz is not stable for me, almost stable, but over a period of weeks you will probably experience weird and possibly very rare instabilities. For me this was the when playing music with screen off the phone got stuck at 19Mhz (very hard to find this out), and became totally unresponsive until I rebooted it. Therefore, I recommend starting from 176Mhz, and if you have wakeup issues to bring it up. With 352Mhz you should have no wake up issues at all.
6. I am having wakeup issues (such as unresponsiveness to wakeup, weird coloring after wakeup, screen inversion, caller id not working on wakeup)
Up the min speed to 264 and then to 352. With a min frequency of 352 you should not have any wake issues.
See the FAQ #5 above for more information.
7. I am experiencing bad battery life with FlyKernel
First, please make sure to reboot the ROM at least one time after you flash the kernel. There have been reports that ROM/kernels behave badly on the first boot.
Personally, I do not do battery calibration, but if it makes you happy go for it. I do recommend at least charging the battery overnight, or a couple of hours after it has reached 100% to be sure it is full. Then use it, your regular usage for a few days and only then judge the battery life.
The battery percent indicator, over short periods of time seems extremely inaccurate and its very hard to reach any correct conclusions based on it.
If you do want to report bad battery life, please state your settings (kernel version, min/max speeds, governor, etc.), over which period you have been testing the battery, under what usage, what is the battery life you are used to having with which kernel and what is the battery life you are experiencing now.
Note, that roughly speaking, I lose less than 1%/hour when screen is off (wifi, data, gps, etc. also off), and about 10%/hours when just screen is on but phone does nothing at all (again wifi, gps, etc. off). About 20%+/hour when stressing my phone (although I have no data plan so can't test that). I am using the latest FlyKernel @ smartass 614/176.
8. What size should I give the swap partition?
short answer: 0.
long answer: I do not recommend using swap on the hero, hence 0. If you have a very fast SD card, and want to try it, give it say 64Mb. Note that I know of no ROM for the hero which activates swap automatically - you'll need to add a init.d script or something to activate it (see a bit more info here). Let me know if you find a scenario where the swap gives substantial improvement over no swap.
Finally note that FlyKernel versions before 12 do not support swap.
9. Should I use ext2, ext3 or ext4 for my ext partition?
Short answer: ext4. Note that FlyKernel versions before 12 did not support ext4, ext3 is supported since version 10.
Long answer:
Previously, I was under the impression that a journaling file system is a very bad idea for flashable storage. I still think its not ideal but better than the other alternative:
I have been using dual booting, placing an entire development ROM on an ext2/4 partition and using it for development. And when using ext2 it would get errors almost every boot and every couple of days get corrupted to the point I needed to manually restore damaged files to get it working....
It seems that if you only use it for app2sd, there are very infrequent changes to this volume (only when you install a new app), hence it does not get corrupted. But this also means that ext4, in this scenario, will not pay much overhead because there are very few changes. And in the case there are many changes, if I have to choose between a slightly shorter SD life with ext4 (and then I can finally get a faster one ) or risking my data getting corrupted on a daily basis with ext2 - I prefer the first (ext4).
Questions 10-13 are now obsolete with smartassV2 - see the first post for details about it
10. Do I need a SetCPU (or similar) screen off profile with smartass?
No, smartass automatically limits the screen on frequency to >= 518Mhz to ensure responsiveness, and screen off frequency to <= 352Mhz to keep standby battery life under control. Much like HTC's perfllock, it does this at the kernel level so it is much better than app level screen off profiles.
11. Using smartass the CPU frequency does not drop below 518Mhz (with screen on)
Intentional to ensure responsiveness. From my testing, when screen is on battery drain difference of speeds < 518Mhz is not significant relative to the drain by the screen itself.
12. Using smartass the CPU frequency does go above 352Mhz (with screen off)
Intentional to keep standby battery life under control.
13. Using smartass the CPU frequency is always at its max (or always at 352Mhz when screen is off)
See "Monitoring the CPU frequency" in the "Advanced subjects".
14. I am experiencing spontaneous reboots
Please post, in this thread, with as much detail as possible about the problem.
Please also attach the last_kmsg, which you can get from example using:
Code:
adb pull /proc/last_kmsg
15. What happend to the BFS version?
With the FlyKernel-12 scheduler tweaks (CFS scheduler), it surpasses the BFS version in every way. I tried to compile a BFS from the FlyKernel-12 code but even in neocore, in which the BFS was always much better, the new tweaked CFS leaves the BFS in the dust. Hence, I see no reason to continue and build/support a BFS version. The hero-bfs_defconfig is still up to date in my sources if anyone wants to build it themselves.
*. I am experiencing an issue not covered in the FAQ which I believe is kernel related
Please post, in this thread, with as much detail as possible about the problem.
Please also detail why you believe this kernel related. The best "proof" that it is the kernel's fault, is to flash back your old kernel and verify the problem is solved, then reflash the new kernel and verify the problem reappears. In any case please detail the kernel and version(s) on which your are experiencing the problem and those on which you do not.
Advanced Subjects
* Monitoring the CPU frequency
Will rewrite this more clearly. In the meantime:
http://forum.xda-developers.com/showpost.php?p=9925116&postcount=903
http://forum.xda-developers.com/showpost.php?p=9929325&postcount=919 <-- Mainly this one!!!
http://forum.xda-developers.com/showpost.php?p=9989996&postcount=970
http://forum.xda-developers.com/showpost.php?p=10010110&postcount=990
Change log and previous versions
FlyKernel-13
- Scheduler tweaks: use the scheduler settings that worked well on flykernel-11c and 12pre6 (tweaked them very very little), responsiveness should now be better than on the FlyKernel-12 release
- Backported the new smartassV2 - now the default
- Added interactiveX governor also
- A few config changes and compiler optimizations
FlyKernel 12a (mediafire)
- Fix wake up issues with new scheduler tweaks
- Smart update script: make noatime tweak option to (hopefully) solve boot problems
FlyKernel 12
- Smart update script
- Optimized scheduler parameters
- Fix Usb mass storage after usb tethering (at least on CM ROMs)
FlyKernel-12pre6
- Align ext2/3/4 config options
- Merge small fixes to lowmemorykiller module.
FlyKernel-12pre5
- Backport of smd rpcrouter to avs333 request.
FlyKernel-12pre4
- Partial fix for the lockscreen flickering when locked/unlocked rapidly (with smartass).
- Very small tweak to other smartass parameters.
FlyKernel-12pre3
- Fixed frequency table according to Radu's comments. Frequencies which are not on PLL2 have been removed!
- Tweaked smartass to spend more time at the lower frequencies to improve battery life. Also smartass's allergy to 19Mhz has been cured!
- Some configuration tweaks, mostly sleep related.
- 528Mhz frequency does not work well with OC, so it has been replaced with 518Mhz which does work fine.
FlyKernel-12pre2
FlyKernel-12pre2 optimized for CM based ROMs (default speed 576/352)
- Added compcache support
- Added 19Mhz and 264Mhz frequencies
FlyKernel-12pre1
- Lower voltages of high frequencies (>= 528Mhz)
- Added ext4 support (I currently use it for dual booting)
- Interactive updated (does anyone find it better than smartass? in what scenario?)
- Smartass fixes and optimizations - should be more responsive now and battery life should (hopefully) still be excellent.
- Camera backport from .32 (12pre1-cam32)
FlyKernel-11c
FlyKernel-11c #66 (Generic)
FlyKernel-11c-BFS #67 (Generic)
- Smartass: now wakeups up from sleep first at 528Mhz (no OC), to hopefully help with wake up issues.
- Bunch of fixes/optimization from CM espresso kernel and from Decad3nce (see github)
- BFS version
"Optimized Kernel Packages" (only for CM6 based ROMs: Floyo, Elelinux, Froyd):
Find the appropriate kernel for you by its name in the FlyKernel-11c directory
The naming conversion is:
flykernel-11c-CM-<min>-<max>.zip (with boot animation)
flykernel-11c-CM-<min>-<max>-nologo.zip (no boot animation)
flykernel-11c-BFS-... (BFS version)
FlyKernel-11
- New smartass governor (see technical detail below). Previous governors still supported.
- Added IPv6 (only for Google Googles?!)
- Fixes camera freezing CM6-based ROMs (thanks Ninpo for a "code cleanup" which fixed this )
- Fixes detection of USB connection during boot on CM6-based ROMs.
- Various squash-sets imported (see github)
- NORMALIZED_SLEEPER disabled.
FlyKernel-10a (rapidshare megaupload)
- Optimize some sleep/idle code (thanks to ninpo)
- Add module for IP header compression - hopefully this helps google apps (inspired by ninpo).
FlyKernel-10a-BFS (rapidshare megaupload)
- BFS version of 10a.
- Whats is BFS? see wikipedia and more details here.
FlyKernel-10
- Fixes for Froyo ROMs (FroydVillain and Elelinux)
- Added some more modules inside the kernel (notably using VPN should now work). I am now more aligned with the modules included in other kernels (well mainly ninpo's kernels), so hopefully you should not run into any missing modules.
I even added support for ext3.
- Generic update for all ROMs.
Flykernel-09:
FlyKernel-09 for VR12,RCMix,ChoclateEclair,Modaco and SuperHero
FlyKernel-09 for Kimera and Sensehero
FlyKernel-09 for MMod 1.2.3
FlyKernel-09 for FroydVillain and elelinux - Beware there are problems with 09 and Froyo ROMs.
FlyKernel-09 for CM6
- Added the excellent minmax governor.
- Removed interactive as it does not behave well at all - just use minmax
- added version which supports the 288M data partition - removed now since MAX appears to be fading out - just use dalvik2SD instead.
FlyKernel-08
FlyKernel-08 for Froyo and ASOP
Added Mike Chan's interactive governor, adaptation to Hero by Nadlabak and Ninpo. Added some tweaks of my own - now works well also with big frequency table.
Tweaked conservative governor for better performance.
Fixed/cleaned kernel co/nfig and modules - among other things iptables should work fine now.
Bigger frequency table.
FlyKernel-05 (BFS)
BFS version of the FlyKernel-04
FlyKernel-04
Based on HTC 2.6.29 official kernel source.
Includes patchset 2.6.29.6 and various fixes
Boot OC - Only for Sense based ROMs (The smart update script added in FlyKernel-12 provides a cleaner and better solution for all ROMs)
Boots very quickly by setting the OC speed right from the start. Also sets the original HTC boot animation which is quicker for most ROMs. Finally, replaces the 09zipalign with 09betterzipalign (again thanks ninpo).
Please have a backup before you try this, as there is no other easy way to undo this.
Select the update file according to the speed your phone can handle:
boot @ 653/160: http://www.multiupload.com/5RAXNJ7AWY (rapidshare megaupload)
boot @ 672/160: http://www.multiupload.com/RRQ0HYI8O8 (rapidshare megaupload)
boot @ 691/160: http://www.multiupload.com/20AJV7FLQI (rapidshare megaupload)
boot @ 710/160: http://www.multiupload.com/WHROUYNGQ6 (rapidshare megaupload)
Theoretically, this should now work on any ROM and any OC kernel. I have tested the 691 update on VR12 and Froyd 1.4 with my kernel and it works fine. Above files (now with "_" at end of name) updated to also work on ChocolateEclair and hopefully other ROMs on 31/8.
Note that in my recent kernel versions the lowest frequency is 176, so it will boot with a min frequency of 176.
cool.. will try. like the idea of overclocking before boot
can you post a diff file of what you modified?
diffs of which change?
there are a lot of changes and fixes, which range from fixes by me in the source code, to just copying/applying files from others.
I think it would be better to keep this thread open for issues and questions about the usage of these fixes. Still I will be more than happy to share anything I have done - please contact me with the exact change you are interested, either by PM or open a new thread if you think it is of general interest for developers.
There are literaly dozens of different kernels floating arround, all of which are always "brand new super fast ultra optimized". From a user perspective it's hard to tell which one is the best. I think this community needs more openness in the developpement. I think it would be a good habit if developpers posted their diff files (of everything) instead of just saying that they made "optimizations".
thanks for your work
zorxd said:
There are literaly dozens of different kernels floating arround, all of which are always "brand new super fast ultra optimized". From a user perspective it's hard to tell which one is the best. I think this community needs more openness in the developpement. I think it would be a good habit if developpers posted their diff files (of everything) instead of just saying that they made "optimizations".
thanks for your work
Click to expand...
Click to collapse
Trying it out might help in deciding which is the best for you. There is no such thing as an absolute best, sorry. To each his needs and his preferences. I also included a convenient undo update script which restores the original kernel.
Personally, I am not aware of any other kernels for the VillainROM (except the original one by ninpo) and for me my kernel works better. Additionally, I have gotten very good feedbacks for my kernel and fixes on iandroid (using HebVillain which is very tightly based on VR12). So I thought others here might want to try it and maybe would also like it. Please also feel free to bash it, but please try it first and then reply with comments which I can relate too.
Finally, I am all for complete openness: If you are really interested in the kernel sources, you can find them along with all my changes here which could be of great to help to you especially if you want to compile the hero kernel yourself. In such a case I would recommend starting from here. The biggest other change is the RTL fix, for which you find the diffs here (it is verses the eclair branch of the android source code). As for the other files & changes I did, I have tried to detail as much as possible in my original post.
Feel free to contact me (also by PM) if you want more info or help.
I just installed your Kernel and the Boot Optimization and brother my phone is flying!!!! GREAT JOB!!!
100% recommended flash for your VR12
THANKS!!!
yep!
all great! you are the MAN =)
good work erasmux, does it work with Arabic language with Arabic fonts installed ? I mean connected letters
Thanks a lot
I hope it does. I don't use Arabic, but if there are problems, report them and I'll do my best to fix them.
Good job erasmux!
Problems for me.....
Installed Kernel & Optimization and Boot time optimization
Made all my icons go to pot,
"problem loading gadget" on powerbar,
"problem loading gadget" on Battery Meter Widget
Game Icons, CoPilot live, System Widget all showing default app icon.
Lost a WHOLE LOAD of installed apps, simply not there listed any longer. So many gone I can't recall what I have lost.
Tried the undo file Original VR12 Kernel:
Got my apps back but still probs with some widgets, boot screen remained the HTC one (didn't revert to the villian screen)
First, I have fixed the kernel restore file in the original post to also restore the original villain boot animation, note that the new file is called: V12-RestoreKernel_.zip (with additional _ at end)
Thanks, for the remark.
Regarding the apps, that is very weird. Did you get these "problem loading gadget" on the screen or where? A logcat from the start of the boot would be very helpful (although I can understand if you don't want to flash it again just to help me debug...).
Regarding the widgets (when the apps do appear) ,try clearing the HTC Sense data (unfortunately this will reset your desktop but it should restore your widgets and its better than having to reinstall everything).
I'll have to have a go later.. tied up at the mo..
Prob loading gadget appeared on the screen (still does).
Will try clearing sense and post back later.
EDIT: Clearing Sense worked. Thanks.
made battery callibration (http://www.villainrom.co.uk/viewtopic.php?f=97&t=1789&start=20#p19769).. full charge (~17:15).. after 5 hours using phone.. 5-7 calls (1-5min each), 30 min wifi and playing =) and now ( 22:40) 99% battery!!! blja, im very happy!!!!!!!!!!
cpu always 245-576mhz
only like with original VR12 kernel after few hours of use at 576mhz linpack score down from 2.5 to 1.8 , but after installed autokiller ( preset 60mb) it's always 2.45-2.57
now i think VR12 the best!
Thank you one more time! will write back tomorrow eve =)
is this included stuff really usefull or it can be disabled?
ipv6 (lot of different options)
LZO and ARC4 crypto stuff
extra PPP stuff (MPPE, PPPOLAC, PPOPNS)
DSCP and TCPOPTSTRIP
INET_TUNNEL
XFRM_IPCOMP
CPU_FREQ_GOV_CONSERVATIVE
the /proc/config.gz (kernel .config support)
Also, I noticed that the device boot with mem=64M. Does it mean that the rest of the RAM isn't used?
AFAIK the only way to change this is to recompile the kernel.
Many of what you said I saw requests here on XDA that kernel developers add (there applications which use it). Please note that many of those modules do not automatically load and need to be manually loaded so they should not have any effect.
Others stuff, mainly the IPv6 stuff i doubt anyone uses - must have "inherited" it from the config i used as a base. I will look into it for future release if I can remove that stuff.
About the mem=64 I am not sure what that is, my phone is definitively using the full memory. I will also try to understand and possibly adjust that for future releases.
Thanks for the input.
An other question, is a kernel really tied to a specific ROM? I have VR12 right now so I could try it, but I was also thinking of upgrading to a 2.2 ROM.
About the modules, I think that most of the stuff that I noticed was compiled in (=y) and not as modules (=m). If they are only used by 1% of the users, I think it would be better to have them as modules and make sure that they don't load automatically at boot.
Also, do you know if it is better to have a small frequency table (with, let say, only 3 choices) to avoid excessive frequency switching?
Is the dalvik to SD trick included worth it for those of us with the original 2GB SD card?

[ROM][08-06-2012] ~×~ EliteMod & Kernel CM7 ~×~ [sd-ext/swap] (ics has own thread)

[ROM][08-06-2012] ~×~ EliteMod & Kernel CM7 ~×~ [sd-ext/swap] (ics has own thread)
EliteMod 120316 + EliteKernel 120319
Turbo just got a new meaning.
This mod is a custom ROM based on CyanogenMod7 nightly and modified CM7 Kernel.
The primary aim is to dramatically increase device speed without requiring frequencies above 1GHz in daily use.
The secondary aim is to improve battery consumption where possible by fine-tuning system settings.
The bonus is getting rid of some annoying post-flash steps and settings.
To achieve this required highly experimental steps outside of the scope of Android's security system and direct intervention in userspace.
Be aware that I made this mod primarily for myself, I went to extremes to squeeze the last bit of performance out of my device. Expect no flashy stuff, just raw power and great base for your customization. I guarantee no support whatsoever and any modifications you make to your device are solely your responsibility. It's a good idea to nandroid backup first!
Warnings - must read:
1) Do a nandroid backup, this ROM is not for everyone.
2) Full /data /cache wipe is mandatory before moving to EliteMod, even from CM7! Not kidding!
3) This ROM relies heavily on the bundled EliteKernel. Flashing any other kernel unless I explicitly put a link in download area is probably a bad idea.
4) Flashing gApps or any performance-boosting packages is not recommended. Latest gApps are already included and tweak scripts may in some extreme cases break sd-ext support.
The ROM requires a manual reboot after account setup, you will see REBOOT REQUIRED on screen. Tap it and reboot the device as usual to apply additional tweaks. Any settings done before this reboot may be lost.
6) If you want to do a "Factory Reset" of this ROM, wiping /data /cache /sd-ext wipe is not enough. You must re-flash the zip to really start clean.
The usual: Do not use TitaniumBackup to restore System components unless you know what you're doing. Restoring LauncherPro user data will forfeit fine-tuned launcher settings. Wipe deletes battery stats and recalibration is necessary to see real battery usage. You can backup your battery stats first before wiping - just use my tool - EliteMod will automatically restore the backup and save you the need to recalibrate. If you really want LWP or ADW, mv them yourself from /data/local/ as well as live walpapers and other useless garbage.
Some screenshots of the default launcher + my customized homescreen:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Changes from stock CM7 nightly:
- moarrr speeeed (optimized for lower frequency range to save power)
- kernel tweaks for better snappiness/battery balance
- more battery 100% guaranteed
- replaced ADW with LP (it crashes once after boot but still the damn fastest out there) and Go Ex
- replaced gallery with QuickPic
- Opera with performance tweaks
- added some MIUI stuff
- extra sounds and bootanim for my convenience
- removed LWP
- more in changelogs
Credits:
Big thanks to all the amazing devs who made this compilation possible.
Cyanogen and crew for his amazing ROM base
Federico Carnales for the smoothest launcher
Nanling Zheng for the best gallery app
SparksCo for the original sd-ext mounting script
JaeKar99 for the boot anim
Sybregunne for his OC daemon
nhnt11 for the gorgeous NTSense themes
MIUI team
Virtuous team
And many others I'm sure I forgot to mention - thank you and keep it up.
Download Link
Download from my high speed server:
High speed download:
http://elite-force.eu/elitemod/EliteMod120316.zip (see THIS for sd-ext and ext4 migration)
Mirror (slower):
http://www.mediafire.com/?3k5bvbk5uinn4no (see THIS for sd-ext and ext4 migration)
Standalone CM7 Kernel:
http://elite-force.eu/elitemod/MOD_EliteKernel_120319.zip (for any CM7 nightly based ROM, including EliteMod specifics)
Standalone ICS Kernel:
http://elite-force.eu/elitemod/MOD_EliteKernelICS_120608-79.zip (for any CM9 or AOKP based ROM = do not use with CM7 based EliteMod)
(SEE THIS if you have sd-ext or swap partition on your SD card)
Old versions:
Old versions:
I will be trimming old versions soon, here are most mirrors http://www.mediafire.com/?613ufmrzd2ovt
Click to expand...
Click to collapse
Undervolting tools (Windows only):
http://elite-force.eu/elitemod/UV_TOOLS.zip
Click to expand...
Click to collapse
Mods, fixes and tools:
http://elite-force.eu/elitemod/TOOL_BackupBattStats.zip (flash to save battery stats to SD)
http://elite-force.eu/elitemod/MOD_OldVending2.zip (flashable/default)
http://elite-force.eu/elitemod/MOD_NewVending3.zip (flashable)
http://elite-force.eu/elitemod/MOD_GTalk2.zip (flashable)
http://elite-force.eu/elitemod/MOD_OriginalDockIcons.zip (flashable, restores LauncherPro dock icons to EM default)
http://elite-force.eu/elitemod/MOD_GPS_Stock.zip (flashable/default)
http://elite-force.eu/elitemod/MOD_GPS_CM7.zip (flashable)
Click to expand...
Click to collapse
Old mods only up to #244:
http://elite-force.eu/elitemod/MOD_UmaroKernel_106.zip (flashable/default)
http://elite-force.eu/elitemod/MOD_TiamatKernel_114.zip (flashable)
Click to expand...
Click to collapse
Kernel source:
http://elite-force.eu/elitemod/elite_kernel_vision_source_120122.rar
Click to expand...
Click to collapse
Frequently Answered Questions:
- if the phone is not smooth, make sure you only have ONE app that controls CPU active at a time. Daemon OR SetCPU OR System Tuner etc. You can disable other apps by not giving them superuser access.
- changing your locale to english-us fixes the new market issue if you have problems but don't want to flash the old market.
- to save even more battery, undervolt your CPU by following the guide below and my easy to use UV TOOLS package. Alternatively use this program to modify your voltages https://market.android.com/details?id=com.incredicontrol .
- please include your ROM and kernel name if you ask an undervolting question in this thread and you are not running EliteMod
Click to expand...
Click to collapse
Recommended SetCPU settings (daily driver - EliteKernel only):
P7 (Temp > 46C) @ 122-768 smartassV2
P6 (Charging) @ 768-1248 smartassV2 (do not set too high, it can get hot if you use navigation in a car)
P5 (Screen Off) @ 122-768 smartassV2
P4 (B < 15%) @ 122-864 smartassV2
P3 (B < 30%) @ 122-902 smartassV2
P2 (B < 50%) @ 122-940 smartassV2
P1 (B < 101%) @ 122-1036 smartassV2
Click to expand...
Click to collapse
These settings implement my own "Final Fortress"(tm) philosphy of battery management. The speed will decrease progressively with battery discharge - basically this will make your battery last longer the longer you are not charging. The goal is to save that precious last drop of power you might need in a tight situation at the end of a long day. All that without sacrificing speed when you have plenty of charge left. You should not notice significant speed decrease until you hit the reserve @ 15%.
UV hint: If you've built your own stable undervolting table, you can maximize speed with no impact on battery by aligning the max frequencies to your specific voltage peaks. (example: if there are 3 different frequencies stable on the same voltage, always use only the fastest of the group)
~CHANGELOG:
(changes with ! require full wipe)
120319 (kernel only)
+ allowed undervolting all the way down to 700mV
120316
+ updated to latest kang
+ updated apks
+ much more resilient sd-ext mounting
+ verbose mounting script (see logcat for debugging)
+ tiny sd-ext performance increase
120315
+ latest kang
+ updated apks
+ new performance tweaks
+ optional sd-ext and/or swap support
+ relaxed swap priorities compared to experimental build
+ tweaked sd-ext I/O speed (ext4 only)
+ tweaked internal storage I/O speed (need ext4 on /data and /cache)
+ fixed Opera settings transfer
+ new set of Opera tweaks for sick performance
+ removed ROM Manager, recommend using 4EXT recovery from now on to take advantage of ext4 I/O tweaks
+ forcing dalvik-cache to internal memory for performance reasons
120310
+ latest kang
+ updated all apks
+ Scary not used by default (screen-off is now @ smartassV2 /w 768MHz max)
+ OC Daemon disabled by default, use control app to enable
+ default UV not applied by script (it is built into the kernel anyway)
+ new boot anim
+ different default theme
+ speedy postsetup script on update (second boot no longer takes eternity)
+ enabled swap support in kernel
+ improved kernel performance
120122
+ 22-01-2012 Kang build
+ added freqs below 245MHz with heavier UV
+ switched to andrev_oc and daemon
+ changed default wake frequency settings to 122-1036, SmartassV2
+ reverted ondemand gov to CM7 defaults
+ updated all apks
+ greatly improved ROM update speed (second boot)
!+ lockscreen clock not centered by default (weird in landscape)
+ changed default data mode to auto instead of preferred
+ updated default UV table in userinit.sh to match kernel internals
+ updated UV_TOOLS package to match EliteKernel
+ added tweaked Go Launcher Ex + most widgets + Sense theme
+ added 2 Sense themes to CM7 theme manager
120107
+ Updated to 05-01-2012 kang
+ Fixed garbage collection bug
+ Tweaked garbage collection and hardcoded defaults to standalone
+ Tweaked SmartassV2 for better scaling (EM + standalone)
+ Tweaked Scary for better battery to do better what it's supposed to do (EM + standalone)
+ Tweaked SIO scheduler for better I/O speed and battery (EM + standalone)
+ raised default frequency from 940MHz to 1GHz
+ lowered default frequency from 768MHz to 245MHz (raise back for more smoothness if you don't care about battery)
+ Tweaked storage subsystems for better I/O performance (EM + standalone)
+ moved hard-coded kernel settings from ROM to Kernel config (better maintainability)
+ updated all bundled APKs
+ updated SU
+ if you're using SetCPU, I recommend to update your profiles
111227
+ improved kernel performance
+ fixed undervolting support
+ released a standalone kernel
+ Important: Use the 111224 to 111227 patch instead of standalone kernel to improve stability above 1200MHz
111224
+ changed versioning to a date string until nightlies resume
+ updated all apks
+ updated to latest kang build 111222
+ faster new market as default
- dropped support for Umaro and Tiamat Kernel
+ EliteKernel 111224
+ major performance improvements
+ SmartassV2 governor
244
!+ new Opera tweaks
!+ wifi sleep fix
!+ updated settings template for 2.3.7
+ new GPS driver
+ camera fixes
+ performance and battery tweaks
+ updated all bundled apks
+ fixed goggles and youtube
+ new superuser + binary
227
+ loads more speed
+ dramatically reduced stuttering under heavy load
+ highly optimized Opera for butter-smooth browsing (tweaks for full wipe only)
+ QuickPic is now default gallery
+ set K9 mail as default email app
+ re-based on latest nightly, obviously
+ more
209
+ fixed camera effects
+ updated DSP speaker profile
+ some performance tweaks
+ support for Virtuous OC daemon (install SetCPU to disable it, uninstall to enable)
+ default undervolting profile (for people who don't care, the tailored real deal is far better)
+ default market is now the old one to prevent problems on non-us locales
186
+ first public release (CM7 nightly #186 + Umaro 1.0.6)
Click to expand...
Click to collapse
Changelog
NIKER's UnderVolting Tools Manual
Friendly warning: If you use this guide with any ROM or Kernel other than EliteMod and need to ask a question here - mention your ROM and Kernel in your post or I can't help you.
Be aware: This guide and the default voltage file assume you are using EliteKernel, other kernels will require different starting point voltage table.
Introduction:
By undervolting I mean decreasing voltages at which your CPU operates on specific frequencies.
If done properly, this can lead to dramatic increase of battery life with no performance loss, it also decreases CPU temperatures.
If done wrong, this can lead to freezes, graphic stuttering under heavy load or unability to boot without reflashing. Do a nandroid backup NOW!
I take no responsibility for your modifications, burned CPUs due to too high voltage and/or frequency, data loss, nuclear explosions, your girlfriend breaking up with you etc. You know the drill.
You should know this takes time - a lot of time. I spent 3 long evenings optimizing my table but I didn't have these tools to help.
You should also know this has to be done just once and you can reap the benefits of insane battery life with any ROM or kernel that supports undervolting - forever.
Essentials:
I am assuming you have a Windows PC at hand. SetCPU installed (disable profiles and on boot for safety), YouTube installed and Angry Birds or similar graphically intensive game of your liking for stability testing.
Next download the UV_TOOLS package I provided above, extract it somewhere and let me explain what each file does:
tools folder just contains ADB essentials and a simple free unix-capable text editor
voltages.txt - this is THE file you are going to edit and consequently THE file you never want to lose after you are done.
voltages.default.txt - this is a copy of the starting point for your convenience
start_edit.bat - this will open the voltages.txt file in an improved text editor capable of unix line endings, we are going to use this editor to make modifications to the voltage table within voltages.txt. Windows notepad is not sufficient for this task!
undervolt_temp.bat, undervolt_temp_periodic.bat - these two files are your best friends, they will push the voltages.txt to your device and apply it temporarily. It's effects will be lost after reboot. Periodic variation will push the file every 10 seconds, allowing you to always have the latest saved version of your voltage table on your device. Some may prefer the normal variant that will only re-push on a keystroke.
undervolt_persistent.bat - be careful with this baby, it does the same job as undervolt_temp.bat, but permanently so, simple reboot will no longer save your ass after you use this. You don't need to wait until you have all 4548648 frequencies optimized but do not use this unless you are pretty sure you have a stable voltage table.
remove_screwup.bat - did you just use undervolt_persistent.bat and your vision threw it back in your face and wouldn't boot? This will save you - 100% guaranteed.
Step by step guide:
First send your girlfriend to sleep, get a huge cup of tea, kick back, run a movie and connect your device, this is gonna be a long night and a lot of reboots.
Do a nandroid backup. Copy it to your PC, **** happens and we don't want that.
Run start_edit.bat - voltages.txt will open, this is not the stock voltage table, it is my own table with +25 overvolt added to every entry. Let's take a look:
Code:
echo '245760 900' > ./vdd_levels
...this says that for frequency of 245MHz the voltage will be 900mV. Valid voltages for vision are ranging from 750 to 1525.
Our objective is to find the LOWEST stable voltage for each frequency (yes - I know there's a lot of them). If you set it too low, your device will freeze and you will need to pull the battery and reboot (suggest removing your battery cover now). Too high frequency should not freeze your device but they will increase operational temperatures slightly and of course battery drain.
As I said the provided voltages.txt is specific for my device with slight overvolt, so let's see if your device can handle it or not - run undervolt_temp.bat to push and activate the default table. SetCPU to 122-1036 ondemand. Now if by now the device haven't froze, it's a good sign.
Next step we will test stability - connect to wifi and disconnect charger. Run youtube app, run a demanding test video with high quality - in high quality mode. The video should not stutter weirdly and the device should not freeze. Actually everyting should be pretty much normal. After 30s try to run your game instead for a half minute. After that hit the power button, let the device sleep for 30s and then try to wake it from standby. Should any of these steps fail, edit the voltages.txt, increase all the voltages by 25, push the changes and try the stabily test again.
Everything went smoothly? Well congratulation, you have taken the first step towards awesomeness. These settings should already improve your battery life compared to stock.
But we want moar battery! There's never enough when it comes to battery life. Well here it comes.
Take frequency 122880, it is the lowest ever used by your device out of standby. We currently have it set to 825, so let's try 800. Save the file and push the voltages to the device if you're not using periodic updater. Now SetCPU to 122-192 ondemand- it will be slow and tedious, frequencies below 768 can't run videos well so just play with your device a bit and watch for a total freeze. Short freezes that fix themselves are to be expected at those speeds. The good thing is, if your device starts suffering from sleep of death - the culprit is most likely one of these two frequencies - remember that.
Everything went well? Set all frequencies below 122880 to 800 as well. If not, leave them all at 825. Going any lower than 775 is asking for a sleep of death - just don't
Don't forget to always save voltages (floppy button) and then push them using the bat or use the periodic update - otherwise your changes have no effect, obviously.
Now move to the next frequency 192000 and set it -25 to 850. Leave SetCPU at 122-192 ondemand- we always want two adjacent frequencies switching while testing - it is during this frequency change when the device is most likely to freeze. It also triangulates the problem to these two frequencies, making it easy to fix a problem. Test stability by whatever means - no videos yet. If everything works you can try for 825.
Do this for every frequency up to 768.
Undervolt 122-192 then 245-368 then 768-806.
By now you have the sleep frequencies covered and your device should last incredibly long on standby.
Now optimize each and every frequency up to the maximum you want to use on daily basis. For 768MHz and more use additional video stress test.
Hints:
Never lower voltage more than 25 at a time between tests.
Always test with ondemand between previous and current frequency to ensure stability.
Consequently never lower more than two adjacent frequencies in one step - and even that is unsafe (but twice as fast, obviously), missing one unstable frequency means long and tedious testing process to find the culprit - you have been warned so don't try to cheat
Best tests for stability are streaming movies, they stress every component to the limits much more than any synthetic test. Even when SetCPU stability tests succeed, video streams tend to have much lower tolerance for low voltages - the video will stutter before it's even low enough to freeze whole device, do not underestimate this. Also do not mistake buffer stuttering for a CPU problem, the device would eventually freeze if it's CPU, stay close to your wifi AP.
Secondary test could be a game that doesn't stress the device as much - that will test frequency switching. Angry birds worked well for me and its fun
SetCPU profiles:
when you've finally built your own stable undervolting table up to your maximum desired frequency, you can maximize the impact of your hard work on battery by aligning the max frequencies to your specific voltage peaks. (example: if there are 3 different frequencies stable on the same voltage, always use only the fastest of the group)
Does your table look like this?
Code:
echo '368640 875' > ./vdd_levels
echo '768000 875' > ./vdd_levels
In this case always use 768 instead of 368 in setCPU where possible!
Higher frequency will do same work much faster
and in turn the CPU can sleep longer - saving battery.
kewl thanks bud
Isn't umaro an older kernel? Why not use a newer kernel. Just curious
Sent from my HTC Vision using XDA Premium App
A month old kernel is not enough to justify one that is not tried and tested unless it offers something extraordinary. Besides it offers all features one could ever dream of. Smartass, greaselightning, undervolting, very granular OC steps and mainly great stability. If you have a better candidate I will gladly take a look
I've used tiamat kernel it's pretty good and should have vipermod now so you can control voltage
Sent from my HTC Vision using XDA Premium App
If we can't flash the Gapps over the ROM, then how are we supposed to use it properly? Are they included in the ROM itself?
Mardenator said:
If we can't flash the Gapps over the ROM, then how are we supposed to use it properly? Are they included in the ROM itself?
Click to expand...
Click to collapse
Probably prepacked already
Sent from my HTC Vision using XDA Premium App
Any type of screenshots?
nik3r said:
A month old kernel is not enough to justify one that is not tried and tested unless it offers something extraordinary. Besides it offers all features one could ever dream of. Smartass, greaselightning, undervolting, very granular OC steps and mainly great stability. If you have a better candidate I will gladly take a look
Click to expand...
Click to collapse
**** the haters. Bleeding edge is not always the best edge to have.
I'll check into this in the next day or two.
This is really fast, so far no problems except market. I had to replace the new market with old one because it was force closing within 15 seconds whenever I opened it. Anyone else having similar issue with new market? I seem to have it on ILWT cm7 too.
Other than that, I think I'll keep this rom for awhile. Will see about battery life..
Sent from my HTC Vision using xda premium
miksa666 said:
This is really fast, so far no problems except market. I had to replace the new market with old one because it was force closing within 15 seconds whenever I opened it. Anyone else having similar issue with new market? I seem to have it on ILWT cm7 too.
Other than that, I think I'll keep this rom for awhile. Will see about battery life..
Sent from my HTC Vision using xda premium
Click to expand...
Click to collapse
same market issue here, anyway the new market has never worked for me on cm7.
the rest is quite flawless, ill see how my battery does later and report back.
That is an old issue and it had an easy fix. If I remember correctly all you had to do was change the language of the system to "English US" in Settings->Language&Keyboard. It happened to some people on CM based roms, not sure about other roms.
tsubus said:
That is an old issue and it had an easy fix. If I remember correctly all you had to do was change the language of the system to "English US" in Settings->Language&Keyboard. It happened to some people on CM based roms, not sure about other roms.
Click to expand...
Click to collapse
go it working right away. thanks for the tip!
Does any body have a quadrant score for this rom yet? just curious.
Quadrant is not the best way to determine anything else than gaming performance but just fyi I reached 3000 points at 1440MHz @ performance, didn't bother to try more.
EDIT: Curiosity got the better of me - 3591 points at 1.9GHz.
The market issue is weird, I am not EN-us myself and it never acted up. I can provide old Vending.apk in flashable form if you want.
As for the screenshots argument - its your regular CM7, nothing special visually except LP.
AWESOME!
This is by far the SMOOTHEST, FASTEST, SEXIEST rom i have ever flashed and i have been lurking for a really long time. Thank you so much for this ROM.
Will try your rom.
would quake3 (kwaak3) timedemo benchmark be a decent way to test gains? I know it's mostly video but still, how to tell between roms?
Sometimes I want to be able to see an actual speed difference from the roms than just placebo effect but it seems hard to find the right benchmark..
Thanks
eagerly waiting for the next CM7 nightly to play some more with it but looks like the automatic compiler has some problems.
kaijura:
Graphic benchmarks will not tell you much about day to day performance.
You need to take storage and sdcard r/w speeds, governor's ability to scale the CPU properly and garbage collecting efficiency into account to tell the difference - they have all been tweaked for better experience in this ROM. Synthetic benchmarks just can't test all of that.

[KERNEL][04 APR] GLaDOS V2.11

Aperture Laboratories presents​
GLaDOS V2.11​
The latest innovation in human-smartphone interaction. Our scientist have shown in extensive tests that humans operating our kernel on their devices experience 67% more joy in life while simultaneously the likelihood of being maimed or killed by falling space debris is significantly reduced. Also preliminary human trials indicate that it might offer some protection against lethal dosages of gamma radiation and blows to the head with a rod-like object.
Features:
Based on stock Android kernel 3.0.8 IMM76D
CPUfreq governor 'lazy'
Live OC version 1
Custom Voltage version 1
Battery Life eXtender (BLX) version 1
Power saving state DEEP IDLE version 2
Touch Wake version 1
Backlight Dimmer (BLD) version 3
Backlight Notification (BLN) version 9
Brain **** Scheduler (BFS) version 0.357
SLQB memory allocator
Voodoo Color version 2
Voodoo Sound version 10
CIFS
TUN
Bigmem (+20 MB more available RAM)
USB OTG build 5
Download:
http://goo-inside.me/devs/aperture/GLaDOS-NexusS (thanks to goo-inside.me for hosting)
Always make a backup of your /efs/ directory (http://forum.xda-developers.com/showthread.php?t=1138873) before installing custom kernels or ROMs.
During installation the cache partition, Dalvik-cache and modules, init.d scripts and bootsounds from previously installed kernels are cleaned.
Source code:
https://github.com/Ezekeel/GLaDOS-nexus-s/tree/glados
Do not use profiles, they are unnecessary and only lead to instabilities.
If you experience any problems and are on a nightly or kanged ROM, try the latest stable version of that ROM first. I will not give support or answer any questions if you do not try this before reporting a problem with the kernel.
If you experience stability problems like reboots, freezes, FCs and SoDs and you did OC or UV, first try changing back to the stock settings. If this solves the problems, your OC/UV configuration is not stable. There are some indications that OC/UV settings which run fine at high battery charges might still cause problems at lower battery charges. So to be safe always check that your OC/UV configuration runs fine at low battery like 5%.
I do not offer support/help/recommendations on OC/UV. If you decide to do so and your device is unstable you are on your own. Check http://forum.xda-developers.com/showthread.php?t=1335429 for help.
If you experience the problem that the DEEP IDLE state is not properly used (according to the idle_stats), read the last section of http://forum.xda-developers.com/showpost.php?p=18299324&postcount=1.
When reporting a bug always include information about your ROM and hardware model. Also be as precise as possible when describing the problem. Just because a single person is experiencing a problem, it does not mean there actually is a problem with the kernel. I always wait until at least one other person can confirm the issue before I look into it. So if you see someone posting a bug report, do not be shy and feel free to confirm the issue or if you do not have the problem let me know that too.
When asking for a feature you would like to see implemented in GLaDOS always provide a link with information about this tweak and preferably also a link to the source code.
Aperture bootanimation courtesy of rascarlo (www.twitter.com/rascarlo)
For users unfamiliar with init.d scripts I recommend NSTools by arifhn (http://forum.xda-developers.com/showthread.php?t=1333696) for managing the various tweaks.
Changelog
GLaDOS-V2.11
Added kernel patches for Android 4.0.4 update.
Fixed bug with Touch Wake.
The kernel installer no longer modifies the ramdisk for adding init.d support.
GLaDOS-V2.10
Added USB OTG build 5 by sztupy.
Fixed small bug in Custom Voltage.
Fixed bug in Live OC.
Changed to new bootanimation by Rascarlo (many thanks!).
Changed default V1 gamma values for Voodoo Color to stock settings.
GLaDOS-V2.9
Fixed two small bugs in LiveOC.
Fixed small bug in Lazy.
Reduced display frequency back to stock settings.
GLaDOS-V2.8
Fixed a bug in LiveOC.
Fixed optimized compiler flags.
GLaDOS-V2.7
Fixed TouchWake issue of long powerkey presses causing the touch controls to be disabled without delay on next screen off.
For BLN the blink interval and blink time can now be adjusted in the sysfs interface. Also BLN is disabled by default.
For lazy the sampling rate is initialized to a default of 15000.
GLaDOS-V2.6
Fixed the problem of the CAM module being active all the time preventing DEEP IDLE from being used.
GLaDOS-V2.5
Fixed bug.
Removed several unnecessary kernel drivers and features.
Removed kernel debug and logging features.
Included logger as a module.
GLaDOS-V2.4
Fixed bugs in Live OC.
GLaDOS-V2.3
Fixed the freeze/reboot problems when changing the frequency limits.
GLaDOS-V2.2
Removed the limit of the minimum frequency to 200 when the GPU is active.
Preliminary bandaid to DEEP IDLE compensating for various bugs in ROMs.
GLaDOS-V2.1
Added Voodoo Color version 2 and Voodoo Sound version 10.
GLaDOS-V2.0
Update to Android kernel 3.0.8 for ICS 4.0.3 IML74K.
GLaDOS-V1.12
Fixed the camera problems caused by Bigmem (increases available RAM by 21MB now).
GLaDOS-V1.11
Added Bigmem option (increases RAM available for the system by 26MB).
GLaDOS-V1.10
Added DRAM scaling to Live OC.
Flash memory I/O tweaks.
Added Tiny Preemptive RCU.
Updated the optimized CRC32 algorithm.
Removed CFQ I/O scheduler.
GLaDOS-V1.9
Added OC frequency states 1.4GHz and 1.2GHz.
GLaDOS-V1.8
Fixed the problem of the touchkey backlight lighting up when touched while the screen is off.
Increased display frequency to 72Hz necessary to achieve 65fps.
GLaDOS-V1.7
Fixed the increased battery drain while in SLEEP when DEEP IDLE is enabled.
Fixed the problem on the NS4G of DEEP IDLE not being used while 4G is enabled.
GLaDOS-V1.6
Disabled most logging and debugging kernel config options.
Included logger and TUN as modules.
During installation the cache partition, Dalvik-cache and modules, init.d scripts and bootsounds from previously installed kernels are cleaned.
Removed '98touchscreen' init.d script.
Aperture bootanimation and -sound courtesy of Euphorie (http://forum.xda-developers.com/showthread.php?t=1061627).
GLaDOS-V1.5
Fixed problems with setting voltages and min/max frequency with SetCPU.
Fixed problems with the vibrator and DEEP IDLE.
Improved stability of wireless connection.
GLaDOS-V1.4
Updated to latest toolchain arm-2011.03-41
Optimized compiler flags
Added optimized RWSEM
Fixed BLD bug for i9023 of the touchkey backlights not getting re-activated on touch
Changed to advanced TCP congestion scheduler VENO
GLaDOS-V1.3
Improvements to JHash.
Improvements to CRC32.
Fix memory leak in CPUfreq stats module.
Removed PMEM. I do see any improvement regarding the available RAM, but removing unused code is never a bad idea.
GLaDOS-V1.2
Fixed 'Screen v1 gamma hack' not working for Voodoo Color.
GLaDOS-V1.1
Fixed BLN problems for i9023.
GLaDOS-V1.0
Initial release.
The kernel is working flawlessly on the i9020/i9023, so it is time to see how it does on the NS4G. Expect some trouble with wimax and DEEP IDLE.
Ezekeel said:
Expect some trouble with wimax and DEEP IDLE.
Click to expand...
Click to collapse
In that case I'll wait till these are fixed.....
kbshowtyme said:
In that case I'll wait till these are fixed.....
Click to expand...
Click to collapse
You are a funny guy. Since I do not own a NS4G myself (see sig), I have to rely on your feedback to get it fixed.
Ezekeel said:
You are a funny guy. Since I do not own a NS4G myself (see sig), I have to rely on your feedback to get it fixed.
Click to expand...
Click to collapse
LOL actually Im trying it out and so far its fine running like a champ.....thanks for the post
kbshowtyme said:
LOL actually Im trying it out and so far its fine running like a champ.....thanks for the post
Click to expand...
Click to collapse
Hmm. I read one report about problems with wimax and DEEP IDLE. Can you please check the idle stats with NSTools and see if the DEEP IDLE state is used when screen-off and not connected to USB.
I have run this kernel off and on and even with the latest I have never had a issue with either
Sent from my neXus s 4G
I have used this kernel pretty much since release date and it works great for me.
Thanks E
And the DEEP IDLE state is properly used (see idle stats in NSTools) even with 4G enabled?
can we charge to 100?
That's what battery life extender(blx) is, so yes.
Follow the leader @corythug
I set it to 100 in ns tools and it looks like it takes but when I go back into ns tools its back at 96.
Sent from my Nexus S 4G using Tapatalk
It only charges to 96 like your phone does by default. 100% is cosmetic and not added to this kernel.
Sent from my neXus s 4G
On the Nstools, (ns4g), it shows that Deep idle (TOP ON/OFF) is at 0 while Idle is at 166754.
So i assume it doesnt work?`
Can I use this kernel with miui brainmaster rom?
Sent from my Nexus S 4G using XDA App
joebarkho said:
On the Nstools, (ns4g), it shows that Deep idle (TOP ON/OFF) is at 0 while Idle is at 166754.
So i assume it doesnt work?`
Click to expand...
Click to collapse
What a comment. You would assume wrong. Please do a search about DeepIdle, what it does, how to activate it if you are having problems, etc. Works fine for most.
Sent from my neXus s 4G
FL0OD said:
What a comment. You would assume wrong. Please do a search about DeepIdle, what it does, how to activate it if you are having problems, etc. Works fine for most.
Sent from my neXus s 4G
Click to expand...
Click to collapse
I Activated it through the echo 1 command on terminal emulator and through NS tools, and still I get no numbers under the stats.. So what else could there be that I missed?
---------- Post added at 04:16 AM ---------- Previous post was at 04:10 AM ----------
btw, you really dont need to be a **** about it.
Ezekeel said:
And the DEEP IDLE state is properly used (see idle stats in NSTools) even with 4G enabled?
Click to expand...
Click to collapse
NS4G here, don't have the 4G enabled, just on wifi at the moment, but NSTools does not show any deep idle usage. It shows and updates the Idle, but neither of the Deep Idle indicators budges from 0.
joebarkho said:
I Activated it through the echo 1 command on terminal emulator and through NS tools, and still I get no numbers under the stats.. So what else could there be that I missed?
---------- Post added at 04:16 AM ---------- Previous post was at 04:10 AM ----------
btw, you really dont need to be a **** about it.
Click to expand...
Click to collapse
I appreciate you adding that little extra to the end of comment. I thought that it was rude of you to instead of asking for some help your comment was "guess it doesn't work". This gentleman created Deep Idle. So yah, it works. You may want to ask for help instead of making assumptions, and possibly being rude yourself and maybe some one will help you. Devs usually don't respond to comments like that, just FYI.
Sent from my neXus s 4G

[KERNEL][E6553/E6503/E6533] Zach's Kernel Playground for Z4/Z3+, WIP

Final notice: Since my Z5 died (it's broken into pieces, glass shattered) - development is effectively halted - NO more updates - sorry
This is a Stock (Sony) ROM Kernel and WILL NOT work on AOSP, CM, etc.
aka SunKernel for Z4/Z3+ & Z4/Z3+ Dual - Stock ROM (for now only stock)
This is an extension of the Xperia Z5/Z5 Dual "sumire" main thread over at: https://forum.xda-developers.com/xp...und-z5-wip-t3340725/post65936553#post65936553
Finally !
So the kernel is now also available for the (somewhat forgotten) Z4/Z3+ series
Please understand that I can't test whether it works due to lack of that very device - Enjoy !
Keep in mind that building for the Z5 "Stock" ROMs and "Stock" Kernels, you're constantly facing the following tradeoff:
compatibility with pre-built "core" kernel modules (e.g. texfat [proprietary exfat microSD fs driver])
compatibility with pre-built "goodies" kernel modules (e.g. video and other acceleration, hwcodecs, ...)
losing features that can NOT be replaced by similar ones (e.g. ecryptfs, wlan, exfat, etc.)
when going too far the device doesn't boot or simply hangs on bootanimation
this resulted in a couple branches (at least several dozen) that are partially or totally broken :silly:
[snip]
...
[snip]
More info on the Latest Kernel can be usually found at:
AT the end of the thread
( I KNOW - I should have reserved a few posts for better overview )
---------------------------------------------------------------------------------
[Download] How to get the current ("corona", 5.11) Kernel(s) - Step by Step:
1)
Choose your device from one of the 4 folders
Z5 + Z5 Dual: https://drive.google.com/open?id=0BykGGWB96CBQQy05VURLbzJTZlU
Z5 Compact: https://drive.google.com/open?id=0BykGGWB96CBQVE0tb2dieTZMXzg
Z5 Prem + Z5 Prem Dual: https://drive.google.com/open?id=0BykGGWB96CBQaVZTdnF5QnVTMU0
Z4/Z3+ + Z4/Z3+ Dual: https://drive.google.com/open?id=0BykGGWB96CBQa2xBdHR5TzlrNUE
2)
At the upper right, click on "List View"
3)
At the top of the table, there are 3 labels (name, owner, [last] modified, File size)
click on "Last modified", the newest Kernels should be shown either at the top, or at the bottom
4)
Download the latest Kernel
5)
???
6)
Profit !
Click to expand...
Click to collapse
Before starting to test/use keep in mind that this is WIP (work in progress),
that means - NO guarantees,
backups before flashing are a MUST (especially your microSD card content !)
stability, speed, improved battery and satisfaction are a great side-effect to have.
You have been WARNED !
Enjoy !
Obligatory Source:
(according to the rules in single commits no giant blobs, authorship kept)
https://github.com/zachariasmaladroit/android_kernel_sony_msm8994_kitakami_r2/branches
Features:
(will add more later if I forgot anything)
Features said:
@AndroPlus for build-scripts, kernel patches
@Tommy-Geenexus for kernel patches, fixes
pstore
LPM (low power mode, battery efficiency)
fix high load average (lower battery consumption)
microSD, internal SD reliability improvements
cpuidle improvements (battery efficiency)
fix page thrashing in case of low memory situation (when you disable zram)
vmalloc improvements (less memory fragmentation, better reliability of camera, wifi, etc. drivers with long runtime)
FauxSound
KCAL
WLAN: disable memdesc and ramdumps (thanks to @Tommy-Geenexus )
notification LED changes to green+blue (cyan), when battery is really full (thanks to @Tommy-Geenexus )
Powersuspend, QuickWakeup, Power Efficient Workqueues,
improved vibrator, faster/more reliable interactivity
bluetooth hidp, fix disconnect on idle timeout
a few general stability fixes & reliability improvements
added wakelock switches (only use, if you observe high drain with specific functions; might cause instabilities or higher battery drain !)
big.LITTLE optimization flags; aggressive compiler optimization flags
disabled KSM, it's a battery drainer and magically gets enabled by Sony's ROM so remove it
added BFQ i/o scheduler (now YOU show me where it's smoother ! )
improved noop i/o scheduler - now it's more bare, previously it was similar to simple i/o scheduler - now it should be optimum for bare metal SSD/microSD access
GPU default set to 180 MHz
cpu governors: added ZZMoove, elementalX
added vibrator intensity switch support
added a bunch touchpad (screen) and fingerprint scanner fixes & improvements
support for Sumire DSDS (dual sim) (testing, used single SIM ramdisk)
kudos to all devs working on android, whether at Linux Foundation (Linux Kernel), Android (Google), Codeaurora, XDA or elsewhere - YOU ROCK !
this one looks to be more battery friendly
WIP branch
NEW features
sys-fs interface to control vibrator intensity (some kernel tools might support it)
lowered init value of screen during bootup: now you shouldn't get 100% BLINDED when rebooting :cyclops:
core 0 and 4 are now always on (per default, unless you play around with core_ctl) - allows changing governor settings for the big cores
mmc crc checksum is disabled by default (?) - 30% or more higher performance, re-enable if you favor integrity
KEXEC support - give @Myself5 's MultiROM a test-drive if you're curious (http://forum.xda-developers.com/xperia-z5/orig-development/mod-multirom-v33x-t3374763)
added Alucard cpufreq governor, if it's too laggy, unstable, etc. - I'm throwing it out the airlock
added a few additional changes thanks to @AndroPlus
.
224 version bump (224 ROMs ONLY)
RAM (working memory) energy efficiency improvements, thanks to @AndroPlus to spot it
overclocking support "big" core ~ 2.1 GHz, "little" core ~ 1.7 GHz (the "little" core is less tolerant for OC, less stable)
changed optimization flags (evaluation), should now be more stable but also faster, efficient
.
Z4/Z3+ support
Click to expand...
Click to collapse
Notes:
Trilliard said:
If you have systemless root and systemless xposed on your system, you have to flash latest betaSU and latest systemless xposed framework immediatly after flashing a new Kernel. If you dont do this you will get a bootloop.
Click to expand...
Click to collapse
Overclocking:
The following threads are for the Z5 - so naturally the thermal engine needs to be adapted to work on the Z4/Z3+
http://forum.xda-developers.com/xperia-z5/general/tweak-improve-performance-reduce-t3387879
http://forum.xda-developers.com/showpost.php?p=67444047&postcount=150 ( @_LLJY 's thermal-engine modifications are attached )
Source:
https://github.com/zachariasmaladro...i_r2/commits/Sun-Kernel_32.2.A.0.224_vI.1_2_8
Download: AndroidFileHost :
SunKernel_for_Z4_Z3Plus 224_I.1_2_8
224_I.1_2_8 Changelog said:
Changelog:
- 224 version bump (224 ROMs ONLY)
- RAM (working memory) energy efficiency improvements, thanks to @AndroPlus to spot it
- overclocking support "big" core ~ 2.1 GHz, "little" core ~ 1.7 GHz (the "little" core is less tolerant for OC, less stable)
- changed optimization flags (evaluation), should now be more stable but also faster, efficient
- "ivy" support (Z4/Z3+)
Click to expand...
Click to collapse
Thanks
it is coming thx very much
twrp can not mount mtp
works great
Flashed your Kernel Today, no problems with Systemless Root, flashed Systemless Xposed - no problems here. Everything works fine... Now lets have a look at what we can do
If you don't mind a small request to @zacharias.maladroit, I want to use your kernel and features are good, but can you make a kernel build with default clock of CPU and GPU reduced to 50% before boot (it should be same in recovery also) and i want to manually change its default clock through kernel auditor if i want later. Reason is my phone gets heated during boot due to its running at max frequencies.
Thanks for your work and I hope you wont mind giving me this option.
EDIT: Faux sound is not working and it does nothing when i change it from kernel auditor.
GryTEcHoG said:
If you don't mind a small request to @zacharias.maladroit, I want to use your kernel and features are good, but can you make a kernel build with default clock of CPU and GPU reduced to 50% before boot (it should be same in recovery also) and i want to manually change its default clock through kernel auditor if i want later. Reason is my phone gets heated during boot due to its running at max frequencies.
Thanks for your work and I hope you wont mind giving me this option.
EDIT: Faux sound is not working and it does nothing when i change it from kernel auditor.
Click to expand...
Click to collapse
use ex kernel
death_note7 said:
use ex kernel
Click to expand...
Click to collapse
What you mean ? Which kernel you are referring to ? Does that kernel have all the features of Zach's ? If so give me link as I can't find it. I liked Zach's kernel but during boot my phone gets hot due to default max freq and also faux sound is not working (which does nothing when i change sliders from kernel auditor app).
Flashed this kernel working well, systemless root, xposed and ex kernel manager. Letting it sit in till I start messing with settings.
GryTEcHoG said:
What you mean ? Which kernel you are referring to ? Does that kernel have all the features of Zach's ? If so give me link as I can't find it. I liked Zach's kernel but during boot my phone gets hot due to default max freq and also faux sound is not working (which does nothing when i change sliders from kernel auditor app).
Click to expand...
Click to collapse
Kernel Adiutor Sound controls are broken,
please use Faux Sound Control instead, that works;
I'll see what I can find on that CPU + GPU reduction during bootup,
but this will take some time, focusing on several projects (Android + non-Android) at the same time, so need to triage
zacharias.maladroit said:
Kernel Adiutor Sound controls are broken,
please use Faux Sound Control instead, that works;
I'll see what I can find on that CPU + GPU reduction during bootup,
but this will take some time, focusing on several projects (Android + non-Android) at the same time, so need to triage
Click to expand...
Click to collapse
cool enjoy your works
zacharias.maladroit said:
Kernel Adiutor Sound controls are broken,
please use Faux Sound Control instead, that works;
I'll see what I can find on that CPU + GPU reduction during bootup,
but this will take some time, focusing on several projects (Android + non-Android) at the same time, so need to triage
Click to expand...
Click to collapse
I've tried that also but seems to me only Headphones are working and speakers does nothing. Can you please try again and let me know ?
For the GPU/CPU, It would be better if you down clock them by 50% default and clock it higher after OS is loaded using init.d or something else.
Thanks
same problem here
please do a fix with the broken sound using audio output.. Only headset working flawlessly. thank
please add a touch boost swich in the next update,and fix twrp mtp mode,can not link with computer.thx
I used kernel Andro v31 and now i flash and use Zachs kernel, but SuperSu automatic updated and now i can't install binary for it. Anyone can help me?
i use this kernel i want to know how to flash supersu2.76 and how to shut cpu 4..please
renkahinkaru said:
i used kernel andro v31 and now i flash and use zachs kernel, but supersu automatic updated and now i can't install binary for it. Anyone can help me?
Click to expand...
Click to collapse
??????
RenkaHinkaru said:
I used kernel Andro v31 and now i flash and use Zachs kernel, but SuperSu automatic updated and now i can't install binary for it. Anyone can help me?
Click to expand...
Click to collapse
Dont let it update then...
---------- Post added at 03:27 AM ---------- Previous post was at 03:26 AM ----------
death_note7 said:
same too,abandoned this kernel itâ??is overheat than stock kernel
Click to expand...
Click to collapse
Its hot, its not overheating. Temps should only be considered as overheating when >80
Features:
(will add more later if I forgot anything)
Features said:
@AndroPlus for build-scripts, kernel patches
@Tommy-Geenexus for kernel patches, fixes
pstore
LPM (low power mode, battery efficiency)
fix high load average (lower battery consumption)
microSD, internal SD reliability improvements
cpuidle improvements (battery efficiency)
fix page thrashing in case of low memory situation (when you disable zram)
vmalloc improvements (less memory fragmentation, better reliability of camera, wifi, etc. drivers with long runtime)
FauxSound
KCAL
WLAN: disable memdesc and ramdumps (thanks to @Tommy-Geenexus )
notification LED changes to green+blue (cyan), when battery is really full (thanks to @Tommy-Geenexus )
Powersuspend, QuickWakeup, Power Efficient Workqueues,
improved vibrator, faster/more reliable interactivity
bluetooth hidp, fix disconnect on idle timeout
a few general stability fixes & reliability improvements
added wakelock switches (only use, if you observe high drain with specific functions; might cause instabilities or higher battery drain !)
big.LITTLE optimization flags; aggressive compiler optimization flags
disabled KSM, it's a battery drainer and magically gets enabled by Sony's ROM so remove it
added BFQ i/o scheduler (now YOU show me where it's smoother ! )
improved noop i/o scheduler - now it's more bare, previously it was similar to simple i/o scheduler - now it should be optimum for bare metal SSD/microSD access
GPU default set to 180 MHz
cpu governors: added ZZMoove, elementalX
added vibrator intensity switch support
added a bunch touchpad (screen) and fingerprint scanner fixes & improvements
support for Sumire DSDS (dual sim) (testing, used single SIM ramdisk)
kudos to all devs working on android, whether at Linux Foundation (Linux Kernel), Android (Google), Codeaurora, XDA or elsewhere - YOU ROCK !
this one looks to be more battery friendly
WIP branch
NEW features
sys-fs interface to control vibrator intensity (some kernel tools might support it)
lowered init value of screen during bootup: now you shouldn't get 100% BLINDED when rebooting :cyclops:
core 0 and 4 are now always on (per default, unless you play around with core_ctl) - allows changing governor settings for the big cores
mmc crc checksum is disabled by default (?) - 30% or more higher performance, re-enable if you favor integrity
KEXEC support - give @Myself5 's MultiROM a test-drive if you're curious (http://forum.xda-developers.com/xperia-z5/orig-development/mod-multirom-v33x-t3374763)
added Alucard cpufreq governor, if it's too laggy, unstable, etc. - I'm throwing it out the airlock
added a few additional changes thanks to @AndroPlus
.
224 version bump (224 ROMs ONLY)
RAM (working memory) energy efficiency improvements, thanks to @AndroPlus to spot it
overclocking support "big" core ~ 2.1 GHz, "little" core ~ 1.7 GHz (the "little" core is less tolerant for OC, less stable)
changed optimization flags (evaluation), should now be more stable but also faster, efficient
.
Z4/Z3+ support
224_I.1_2_9:
during bootup ony the small core cluster is active == cooler bootup, but potentially also slower (it should however be fast enough)
Overclocking: active after Boot, BIG core @2.2 GHz, adjust with Kernel Adiutor, etc.
Click to expand...
Click to collapse
Overclocking:
The following threads are for the Z5 - so naturally the thermal engine needs to be adapted to work on the Z4/Z3+
http://forum.xda-developers.com/xperia-z5/general/tweak-improve-performance-reduce-t3387879
http://forum.xda-developers.com/showpost.php?p=67444047&postcount=150 ( @_LLJY 's thermal-engine modifications (for Z5) are attached )
Source:
https://github.com/zachariasmaladro...i_r2/commits/Sun-Kernel_32.2.A.0.224_vI.1_2_9
Download: AndroidFileHost :
SunKernel_for_Z4_Z3Plus 224_I.1_2_9
224_I.1_2_9 Changelog said:
Changelog:
during bootup ony the small core cluster is active == cooler bootup, but potentially also slower (it should however be fast enough)
Overclocking: active after Boot, BIG core @2.2 GHz, adjust with Kernel Adiutor, etc.
Click to expand...
Click to collapse
Thanks

Red Magic 5G MOD Kernel GPUOC 900/940mhz +battery 1.4 STABLE!

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
*** NOTE THAT 3.16 NA OR 4.13 Red Magic 5G SPECIFIC ROMS SHOULD BE USED WITH THIS KERNEL! THE COMBINED ROM (WITH RM5S) HAS UPDATED KERNEL CODE THAT IS NOT FULLY COMPATIBLE AND NUBIA HAS NOT UPDATED THEIR SOURCE CODE ***
*** Please click Thanks (Thumbs up icon) on my post here if you like my kernel and rate the thread 5 stars, then just use it and enjoy - if you want to send me a beer or two feel free - you don't have to use PayPal - Revolut and Amazon.com (USA) gift cards avoid fees. I like to hear from happy users I hope you are glad that you have the fastest phone in the world currently. The active cooling in this device is utilized to the extreme with MOD kernel, meanwhile your battery usage will be much improved at the same time. How? Well, that's all in the source code, free for all to fork it on GitHub and modify to your liking. Just don't forget to credit me and the many great devs that made the improvements possible... without them, there would be no MOD kernel. This is just a hobby of mine and I like to produce a nice product that all can enjoy. I'm also quite friendly and although I may tell you no I won't add that feature (such as network hacking tools), I won't hold anything against you for asking. I have not been compensated other than by some generous folks on my Telegram channel, so this whole project is basically self funded. Red Magic will not support it, unfortunately, but you can if you feel the improvements are worth it. I believe they are, but I come from a biased point of view as the sole developer for RM5G ***
********************************************************************************************************************************************************************************************************************************
NOTICE: YOU ASSUME FULL LIABILITY FOR ANYTHING THAT MAY HAPPEN TO YOUR PHONE USING THIS KERNEL. ALTHOUGH IT WORKS 100% ON MY PHONE, IT MAY NOT WORK THE SAME ON YOURS. THE PROCESS OF ROOTING A PHONE AND INSTALLING A CUSTOM KERNEL ALWAYS HAS RISKS, SO IF YOU ARE NOT COMFORTABLE ASSUMING THOSE RISKS, DON'T INSTALL THE KERNEL! THIS IS A TYPICAL DISCLAIMER FOR CUSTOM KERNELS I HAVE FOUND NO BUGS WITH IT AT ALL. USERS ON CN, GLOBAL, AND NA ALSO HAVE NOT FOUND ANY PERFORMANCE ISSUES OR BUGS (DO NOT USE V7.14 or V8.11) IF YOU DON'T KNOW WHAT YOU ARE DOING, IT'S BEST TO REMAIN STOCK. OR JOIN THE TELEGRAM GROUP, AND GET SOME REAL HELP.
********************************************************************************************************************************************************************************************************************************
Easy root method: https://forum.xda-developers.com/nu...nner-tutorial-unlock-bootloader-t4131585/amp/ although I suggest still using Magisk 20.4 for root.
Note: if you've already rooted and want to upgrade, people have had success saving the kernel as boot.img and TWRP as recovery.img in SmartPack, vbmeta skip as vbmeta.img and placing into the ROM update.zip using MT Manager (a root browser) and saving the updated file. Then do a Settings / System Update / click the 3 dots / local update and select your modified file. In fact I upgraded from 3.13 to 3.16 NA ROM without losing anything this way. Now for normal installation:
Custom kernels require root and Magisk to be installed. This is due to the signature not being signed by Red Magic (the company) itself. Following the above method you will still pass SafetyNet and most apps will work without trouble. If you have a specific app that detects root, well, Magisk Hide the app from Magisk Manager and see if that fixes it. You should also Hide Magisk Manager from various forms of detection (under Settings). Last case is to move the installation of Magisk under a random directory (which I have not had to do and all my banking apps still work), only if the root detection methods used by your app providers are more picky.
MOD KERNEL 1.4 STABLE:
RELEASE NOTES:
Block mode I/O has been changed to Multi-Queue from Single-Queue so your default scheduler is now MQ-deadline (credits to PappaSmurf, excellent kernel dev). You can choose between mq-deadline, kyber, and none in a kernel manager under I/O scheduler. From my benching with Androbench, it doesn't make much difference which one you use. Some have parameters you can tweak. None literally means no scheduler which is fine on an SSD, and has no overhead if you want to select it in a kernel manager. I always recommend SmartPack. To get settings to stick you Toggle "Apply on Boot" and it will go to what you've selected after 5-10 seconds on the next boot.
All debugging has been turned off completely on BBRv2 - thanks to PappaSmurf (I missed a few spots), and debug can't be turned back on from the userspace now. BBRv2 is selected as the default TCP algorithm which users have explained as a "no-lag" algorithm while gaming. It's just generally a fast algorithm all around. For me it works great, but you can still choose from many different algorithms in a kernel manager if you want to.
In SmartPack / Misc / TCP Congestion Algorithm, you have many choices: reno / bbr / bbr2 / bic / cdg / cubic / dctcp / westwood / highspeed / hybla / htcp / vegas / veno / scalable / lp / yeah / illinois. A SmartPack script is included below you can add in SmartPack to show the true TCP algorithm as it will always show Reno (a bug also shared by FK kernel manager). Below it's called Check_TCP.sh just go to SmartPack / Script Manager / Import / Check_TCP.sh. Afterwards, click Execute to see the active algorithm. If you set it on boot, this is the algorithm that will run, despite what the field says in Misc.
Battery is running very well on normal usage I'm getting around 7.5% active screen on drain over 7 hours and <0.7% screen off drain over 13 hours at 90hz screen setting. This is with actively using the phone for multiple "normal" purposes, reading emails, browsing websites with Chrome, reading news, streaming videos, etc. various shopping (Amazon/eBay) and tracking, Reddit feeds and live video, and other random "daily" tasks, up to 10 apps open at a time. Gaming of course will drain more, as will 144hz. I also have dark mode enabled in Settings. To get idle drain down I disabled 3 additional wakelocks that were causing high screen off drain, and so far I haven't seen an issue with blocking them. I also removed wakelocks that no longer exist since the Boeffla WL Blocker default list was created (it was quite old) so it now should be relevant for this device, with no interaction on the users part to disable anything via a kernel manager. Still, in SmartPack you will see a Wakelocks menu in case you install an app that causes idle drain to rise, this can be used to find and block wakelocks causing the problems. It can sort by wakeups and also by time. As it states though, you should be very careful what you disable. There can be unintended consequences and most wakelocks are not well documented as to what they actually control.
Dynamic Stune Boost is entirely removed from the kernel code now, as I didn't see any benefit from using it with this kernel.
Don't forget Dynamic Fsync is hidden under Misc in SmartPack which if you turn on will speed up your SQLite speeds. AnTuTu will penalize you for this, ignore it, your phone will be faster - but I leave it off by default. Androbench will show the true memory benefit. It is significant if an app does a lot of operations on databases. Journaling for the database is held in memory until the screen is off, then it is written. Although there is a chance of a data loss or corruption with this on if the device were to crash, it is safer than just turning off fsync. If you have any unstable apps, just leave it off - better to be safe. On a solid system though, you may notice better performance.
Also remember under SmartPack / GPU there is AdrenoBoost - it is set to low. You can alter to medium or high to get faster transfer between GPU frequencies, although it has worked great for me the way I use the phone. For you another setting may suit you better. Recall RedMagic OS only allows several frequencies which I spaced out as well as possible at 305mhz, 400mhz, 525mhz, 670mhz, 800mhz, and either 900 or 940mhz depending on the version you installed.
Overall I'm very satisfied with this kernel build and don't plan on adding or subtracting anything from it for the time being. It does what it should do, gives solid performance, and good battery life. My last score on AnTuTu setup with defaults 12GB/256GB was 682K which currently is still the top performing phone out there - running at 940mhz GPU. Not all phones can handle 940mhz so use 900mhz if yours cannot. If there are enough requests for an intermediate build (say 925mhz) I can add one later off the same code base. Also note in releases there are "gaming" builds that don't keep track of CPU times at each frequency, which was a request by users to remove any potential lag while gaming. I run the non gaming version, useful if you want to tweak battery usage, but nonetheless, both versions are there for you to use.
I'm on Telegram t.me/NubiaRedMagic5G_Mods as long as I have the phone. Which will be quite a while if Red Magic / Nubia decides to fix N41 5G in the USA.
Also note that all the features of this kernel (besides ones specifically added by me) are the creation of other developers whose contributions are all notated in the kernel source code. Some of the developers that have contributions here or helped me in some fashion: Resurrect88, DD3Boh, PappaSmurf, kdrag0n, Ayrton990, Flar2, Lord Boeffla, plus many more across the globe. Without them, I wouldn't be making any kernels! And I'm sure there are many other devs I've forgotten to mention, I thank all you guys for your help and support.
MOD 1.4 Download Link:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.4
PRIOR RELEASES BELOW:
8th Release:
MOD KERNEL 1.35-BBRv2 STABLE:
RELEASE NOTES:
This is an intermediate release - I realized that the prior release was draining far more battery than it should, and I found the source was debug related code in BBRv2 from Google. So this is the updated kernel that gives you battery life like before this TCP algorithm was added.
CONFIG_CPU_FREQ_TIMES=y has also been added so you can see in a kernel manager how much time is spent in each mhz block for each set of processors. This can be useful if you set in a kernel manager (like SmartPack) a minimum CPU mhz to see how much time is actually spent at each level.
The code base also has Dynamic Stune Boost, but I haven't had time to optimize it for the device, so it's just on default settings. So there are 2 versions of this 1.35-bbr2 release. At some point it will be enabled as part of a regular release (some 17 commits squashed together into 1, Stune Assist was causing issues so I turned it off). The main idea of that set of code additions is to run the device at lower frequencies, saving battery, while still achieving the same performance level to the user of the phone. If you want to try different options for it in SmartPack or FK Kernel Manager you can.
Downloads:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.35-bbr2
7th Release:
MOD KERNEL 1.3-BBRv2 STABLE:
RELEASE NOTES:
Added the 31+ commits for BBRv2 from Google. Squashed the commits down to 6 by author from Google (for easy code maintenance). It's said to be the best TCP (internet congestion) algorithm so this sets it by default. You can still select from the others added in 1.3, as mentioned only EX Kernel manager properly shows them. But SmartPack if you choose the one you want under Misc, then click Apply on Boot, it actually will load the TCP algo you selected. It's just a visual defect. I also made a script for SmartPack uploaded to show you the TCP algo that's selected in my repo you can install so you can verify for yourself. Give it 10 seconds (default on boot setting) before you check.
Downloads:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.3-bbr2
6th Release:
MOD KERNEL 1.3 STABLE
RELEASE NOTES:
All this release adds is TCP congestion algorithms. The only kernel manager which correctly shows the algo set correctly is EX Kernel Manager. Using SmartPack or FK Kernel Manager will tell you that you're always on Reno, when in fact, you aren't. I'm not quite sure if this is bug related to 865 kernels as a fellow dev had the same experience (on an Op8 Pro). Now the default is set to BBR. Why? No reason specifically, although it is one of the better algorithms for internet usage. You can easily change in any kernel manager and set on boot which one you'd like to use (see above RELEASE NOTES if using SmartPack). But this gives you plenty of options:
BBR, BIC, CDG, CUBIC, DCTCP, WESTWOOD, HSTCP, HYBLA, HTCP, VEGAS, RENO, VENO, SCALABLE, LP, YEAH, ILLINOIS
You can Google the benefits of each and pick what you like. Or just leave it alone. The prime idea of MOD kernel is that you don't need to adjust anything it just works optimally without any intervention. Read the release notes for prior features that have been added. There are many just not summarized in a single place at the moment. All the optimization has been done for Red Magic OS.
Downloads:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.3
5th Release:
MOD KERNEL 1.25BETA
RELEASE NOTES:
This release is mostly about battery savings. I'm averaging around 6.5% active drain on normal tasks with this version (90hz setting), and around 0.5% screen off drain. A big improvement over the stock kernel. So I ended up with about 13 hours SOT + 24 hours screen off on 1 charge! See the picture, I stopped at 11% left. Now I didn't say anything about gaming. If you want to game and have power saving benefits, don't enable any of the built in boosting modes in the game launcher - the Red Magic OS will override everything. Let the kernel do the work for you. And if you're seeing any graphics lag, go into SmartPack kernel manager (free) and go under GPU, Adreno Boost is enabled on low, you can set it to medium or high. That will increase the speed at which the GPU throttles up and down.
1) Switch to the Energy Model for CPUs: Several subsystems (thermal and/or the task scheduler for example) can leverage information about the energy consumed by CPUs to make smarter decisions. This config option enables the framework from which subsystems can access the energy models.
2) Added CPUMASKS for the Little, Big, and Prime cores from Sultan Alsawaf Sultan: SultanXDA, prime added by Danny Lin: kdrag0n.
3) Added kernel control of the minimum frequencies for the little and big clusters by Danny Lin kdrag0n. They are set to run at their minimum running frequencies when idle 691mhz (little) and 710mhz (big) which results in nice power savings when web browsing or just under low load in general. Prime cluster min is not set as it makes the CPU scheduler function poorly.
4) Added AdrenoBoost by Aaron Segaert: Flar2, with all its changes squashed into 1 commit. Defaults to low setting. As mentioned before, you can change in SmartPack, and set on boot if you need a higher value than low: https://github.com/SmartPack/SmartPack-Kernel-Manager/releases
5) Uploaded the various GPU OC files to the repo, It still will just build off the default one, but they are here to be complete. 940mhz version again is posted, Building direct from the repo will give you 900mhz max GPU.
Downloads:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.25BETA
4th Release:
MOD KERNEL 1.2 BETA
RELEASE NOTES: (Note a 940mhz GPU clock edition is available, if you want to try it, a few of us have had good results on it. Likely the max an 865 GPU can run. You'll sacrifice the power savings, however):
1) Enable Power-efficient workqueues by default, add a toggle that can turn this off via a kernel manager (under CPU in SmartPack). Enabling this makes the per-cpu workqueues which were observed to contribute significantly to power consumption unbound, leading to measurably lower power usage at the cost of small performance overhead. Have also added many other power saving features to the defconfig. The phone is a beast, power savings is a good thing to implement.
2) Update the LZ4 decompressor algorithm with a much faster variant for the ZRAM swap, now version 1.8.3-9 credits Gao Xiang [email protected] and many others (check commits). Speed improvement below (should help on 8GB devices):
Compressor name Compress. Decompress. Compr. size Ratio Filename
lz4hc 1.7.3 -9 12 MB/s 653 MB/s 42203253 42.20 enwik8
lz4hc 1.8.3 -9 11 MB/s 965 MB/s 42203094 42.20 enwik8
3) Default scheduler is set to SQ deadline. Should see minimal improvements in speed until I get a MQ variant working. On the task list ahead.
Download Link:
1.2BETA: https://github.com/mrslezak/NX659J_Q_kernel/releases/download/1.2BETA/MOD-RM5G-GPUOC-Beta1.2.zip
940mhz GPU release here, it's still 1.2BETA, just with the max clock a few of us have been able to use. That doesn't mean your device can for sure handle it, but give it a try if you'd like! Note the power savings will likely not be there vs the other release at 900mhz:
https://github.com/mrslezak/NX659J_...oad/1.2BETA/MOD-RM5G-GPUOC-940mhz-Beta1.2.zip
3rd Release:
1.15BETA: https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.15BETA
This is a HEAVILY updated release of the MOD kernel 1.10BETA - I realized the phone's software will allow 6 frequency clocks, although 1 did not have a regulator defined (now patched). NOW I VERY HIGHLY suggest installing SmartPack Kernel manager. It will give you insights into the kernel and how it's performing and it's free. It also will let you adjust added options now in the kernel. Just root your phone and flash from TWRP. If you haven't already installed Magisk, then install that too. There's a guide I posted on XDA about that. Use the experimental method there is no reason to unlock your bootloader. https://forum.xda-developers.com/nu...how-to-unlock-bootloader-redmagic-5g-t4081743
RELEASE NOTES:
1) Bugfix: there was 1 missing 800mhz GPU frequency regulator clock on the prior version. This has been set to TURBO, 1 level under the 900mhz regulator of TURBO_L1.
2) Boeffla WakeLock blocker (v1.10 + tweaks) has been added to reduce battery drain when the phone is not being used, using the latest version and all patches. A default block list is included. You can access in SmartPack Kernel Manager under the new menu that will appear "Wakelocks" - especially investigate if your phone has high idle drain, you can experiment with blocking other wakelocks (which don't allow your phone to sleep). Or you can leave as is. I get just under 1% drain (screen off) and the phone sleeps quite often with this version. Take a look at the screen shot! That's just normal phone usage, not gaming.
3) All debug entries (except those required) have been stripped completely out of the kernel. This results in less wasteful debug information being generated.
4) The default algorithm for ZRAM has been changed from LZO (high compression, but slow) to LZ4 (slightly less compression, but fast). LZ4 algo was added. It still defaults to 4GB.
5) Dynamic Fsync has been added to the kernel as well. This patch allows journal entries to be written only when the screen is off. I.e. they are cached and written afterwards. This increases database performance. It is disabled by default so in SmartPack Kernel manager, if you'd like to turn it on, go under Misc, select Dynamic Fysnc, and select apply on boot. There is always a risk of data loss when delaying writes, although I've personally never have had issues - it only happens if the phone crashes, and mine has never crashed on this kernel. This won't normally increase your benchmark scores (except AndroBench), it increases SQLite database access speed. Up to you to use or not, works fine on my device.
6) Here are the updated frequencies (note there is 1 more). Will have to wait for AOSP before I can add back more. Note the 670MHz is likely the 865+ max frequency per the release notes today on the device (which I assumed by the source code anyhow pre-announcement): 900MHz / 800MHz / 670MHz / 525MHz / 400MHz / 305MHz
AS ALWAYS, USE AT YOUR OWN RISK!!!
Github Source:
https://github.com/mrslezak/NX659J_Q_kernel
Initial Release:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.0.BETA
Second release - gets over the "reset to 490mhz" bug caused by the system software, at the expense of reducing frequencies to 6 total:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.10BETA
Newest release -> will be posted on the top from now on.
Telegram:
https://t.me/NubiaRedMagic5G_Mods
And note the AnTuTu benchmark is just a first run after installing. 670K is likely a record on any 865 phone. The last bench turning off 4GB ZRAM (12gb/256gb device) I got 673K. AnTuTu doesn't equal performance, but if you've benched you'll see this is an insane improvement over the stock kernel. Only when the demand is there will it scale up to 900mhz. I've been using for a while now and notice no difference in battery life. The Adreno driver is very good at handling extra clock frequencies efficiently without modification (despite an "Adreno Boost" that is often added to kernels). The gamers using the kernel are making statements that they couldn't imagine the game play any better than it already was, but now it's even smoother.
Unfortunately the way the Nubia software behaves, it auto-resets to power level 5 (which was 490mhz) on the 1.0BETA on boot and also after boosting the frequencies up. I tried every possible way to bypass this but eventually just gave in and removed frequencies. So the BETA1.10 and above have less frequencies but will always revert to 305mhz, the base minimum frequency of the device. Hopefully once we have AOSP ready I can add more.
MattoftheDead
I.e. M.O.D. Kernel Developer
The first Red Magic 5G OC kernel.
Xiaomi Mi9 / Mi9T Pro Pie V2 and Q V1.5 Kernel Dev
Nice work. Do you notice any benefits to OCing the GPU like that? I don't think there are many games that would benefit atm.
This is amazing !!! :laugh:
Is this going to work on all roms like CN, NA or EU Roms? Im currently running NA 3.11 flash from CN rom with root and twrp
We have people using it on CN Global and NA versions no problem at all. Works fine on every model.
Kernel is fully functional no issues at all.
CN Rom to NA Rom v3.11
305mhz min to 900mhz max confirmed and using smart pack to control the frequency
Thank you for this hopefully there is more development i really appreciate ur effort
Kernel building is just a hobby of mine, I was posting a minimal kernel to get some more kernel developers on board to hopefully add more features. I usually add Boeffla Wakelock Blocker and Dynamic Fsync and call it a basic kernel. The last super kernel I made took way too long, and I don't have that kind of time anymore - boost functions and underclocking to balance out the battery life and such. Development work doesn't pay anything, I didn't get the phone free, all my donations go to other developers. And I have a full time job and family. But if anyone wants to port over my MOD Kernel Q 1.5 Mi9 features, well that would be a super kernel. It's just really, really time consuming, time I don't have at the moment. And the merging of source has to be EXACT or you end up with a really slow phone rather one that balances underclocking, boost, and overclocking.
MishaalRahman said:
Nice work. Do you notice any benefits to OCing the GPU like that? I don't think there are many games that would benefit atm.
Click to expand...
Click to collapse
All the gamers using the kernel are reporting that the games run smoother than before, which no one thought was possible. It is already a flagship device. But the GPU OC with the Adreno driver scales when needed up to the frequencies that it has in the table and has no issue on 670, 800, and 900mhz reported so far. There are gamers on NA, Global, and CN ROMs, with no bugs reported. No issues and everything works properly. I have tested myself and although I'm not a gamer, all the functions work as they should. It still connects via Bluetooth, it still takes photos and videos, etc. There is no lag whatsoever. Overall I think the frequencies are ideal for this device with it's advanced active cooling system. Other devices however, with passive cooling, are unlikely to handle the increased GPU clocks.
I found an unusual bug where the GPU Minimum Frequency will reset on its own to 490mhz even if i set the minimum frequency to 305mhz im using smart pack kernel manager that you provided and cool tool btw to monitor the gpu frequency.
I also set the battery optimization to off on smart pack so it wont turn off itself.
This also happens when i played games that actually boost to 800 to 900mhz then after i close the game it sets back the minimum frequency to 490mhz so i have to set it again to 305mhz on the kernel manager to save more battery and lower the temps.
I also notice it sets back to 490mhz minimum frequency by just watching youtube videos so i have to set it back to 305mhz again. I tried different kernel manager too like Franco Kernel Manager and Kernel Audiator and still doesnt fix the issue
I think this was a minor bug for sure
I never touch the GPU governor btw
Performance was super nice thou i scored 645k on antutu on my first run but for now im going back to stock and gonna wait for your next update
What to do to root the phone without breaking the fingerprint please. I read the article publish nothing understood someone can explain to me step by step. I am an amateur I never root a phone. I have cn 2.55 16gb.
I don't have the same issue - I just tried to recreate it by watching a YouTube video and I went back to SmartPack and it still shows 305MHz GPU frequency. Although I'm using the debloated / optimized ROM I created Black Magic 5G which has everything setup properly, Nubia apps frozen, everything moved to 3rd party apps. NETFLIX patched to 4K HDR10, YouTube Vanced, a ton of root utilities, AdAway ad blocker, etc. You can find it on the Telegram channel (I'm using the NA/Global version of Black Magic 5G). Then I watched Netflix, still at 305mhz. As I have no idea how you've setup your phone, I just can't recreate it.
shaifabra5 said:
I found an unusual bug where the GPU Minimum Frequency will reset on its own to 490mhz even if i set the minimum frequency to 305mhz im using smart pack kernel manager that you provided and cool tool btw to monitor the gpu frequency.
I also set the battery optimization to off on smart pack so it wont turn off itself.
This also happens when i played games that actually boost to 800 to 900mhz then after i close the game it sets back the minimum frequency to 490mhz so i have to set it again to 305mhz on the kernel manager to save more battery and lower the temps.
I also notice it sets back to 490mhz minimum frequency by just watching youtube videos so i have to set it back to 305mhz again. I tried different kernel manager too like Franco Kernel Manager and Kernel Audiator and still doesnt fix the issue
I think this was a minor bug for sure
I never touch the GPU governor btw
Performance was super nice thou i scored 645k on antutu on my first run but for now im going back to stock and gonna wait for your next update
Click to expand...
Click to collapse
Yeah maybe because you modified the rom.
Im currently running Flash Global V3.11 when i tested your kernel no modification made im just rooted with TWRP Installed and i posted this kernel on red magic 5g group on facebook and 3 of us having the same issues as well.
Im gonna try it again on V3.13
UPDATE:
still returning to 490mhz as minimum frequency after gaming and after watching one youtube clip
kinda sad hopefully you can fix this bug on the global rom that nubia provided if you have the time, great kernel for gaming because of the 900mhz boost and the phone can sustain this boost because of the active fan
Why don't I have a roughly similar score?
Is it possible to overclock the CPU as well? They officially release the specs sheet of ROG Phone 3 it has overclocked CPU (3.091ghz) and an overclocked GPU. I know this phone can keep up with those clocks because of the cooling system but the problem is the battery life. But still, its worth it.
Blink003 said:
Is it possible to overclock the CPU as well? They officially release the specs sheet of ROG Phone 3 it has overclocked CPU (3.091ghz) and an overclocked GPU. I know this phone can keep up with those clocks because of the cooling system but the problem is the battery life. But still, its worth it.
Click to expand...
Click to collapse
I believe Qualcomm blocked overclocking of CPUs quite a while ago from SD845. Only GPUs can be overclocked.
Though I don't know if devs have gotten tools to get around it.
The 490 bug looks like it's related to the gaming mode APK resetting the min frequency. I can't decompile or recompile APKs so I don't have a way to get around the system reverting to 490 without removing 3 other frequencies. It seems hard-coded in the app that it only expects to see 5 frequencies so to have all working properly, 3 need to be removed. This is in contrast to what my buddy dev on the Op8 Pro can do, but this device is designed differently in how it boots and custom apps that increase frequency clocks. If any devs are good with APKs it's a very simple function call that sets the minimum GPU frequency. The only odd thing I see is that the minimum power level stays at 8 (minimum) which corresponds to the lowest clock speed. That number doesn't change in a kernel manager when the min GPU clock reverts to 490.
I'm off on vacation not near a PC but will try to come up with a stock # of clock frequencies that still scrolls smoothly between them and the Adreno GPU driver. May take a few tries but it's quite easy to modify. I already think 180mhz is too low from using it, it's more of a sleep frequency some suggested going this low but I think the phone design is for 300+. I prefer to use more clocks for better throttling but have to work with what we are given and do the best inside those boundaries.
No you can't raise CPU clocks on 865 devices that ROG device is supposedly using the 865+ or whatever the mid device is named between the 865 and 875. They have blocked CPU OC hardware wise for some time now.
mslezak said:
No you can't raise CPU clocks on 865 devices that ROG device is supposedly using the 865+ or whatever the mid device is named between the 865 and 875. They have blocked CPU OC hardware wise for some time now.
Click to expand...
Click to collapse
Qualcomm's Meizu’s CMO Wan Zhiqiang recently commented on Weibo saying that there won’t be a Snapdragon 865 Plus this year.
We will see!
No 865+ this year..
Trust me whatever they call it it's already defined in the source code as a second GPU bin clock for another device ID. So maybe it won't be called an 865+ but there is some device between the 865 and 875 coming out. I have OEM confirmation as well this device exists the name isn't important. I can tell you the top GPU frequency is 670mhz that's it, vs. the 587mhz default on the 865. Still the 865 handles 900mhz GPU no problem the only benefit would be higher CPU clocks. And an extra GPU clock. Which I'll attempt to spoof next time I get near a PC.
mslezak said:
Trust me whatever they call it it's already defined in the source code as a second GPU bin clock for another device ID. So maybe it won't be called an 865+ but there is some device between the 865 and 875 coming out. I have OEM confirmation as well this device exists the name isn't important. I can tell you the top GPU frequency is 670mhz that's it, vs. the 587mhz default on the 865. Still the 865 handles 900mhz GPU no problem the only benefit would be higher CPU clocks. And an extra GPU clock. Which I'll attempt to spoof next time I get near a PC.
Click to expand...
Click to collapse
Is it possible to overclock the memory clock too? I assumed that 900mhz is the core clock.
mslezak said:
Trust me whatever they call it it's already defined in the source code as a second GPU bin clock for another device ID. So maybe it won't be called an 865+ but there is some device between the 865 and 875 coming out. I have OEM confirmation as well this device exists the name isn't important. I can tell you the top GPU frequency is 670mhz that's it, vs. the 587mhz default on the 865. Still the 865 handles 900mhz GPU no problem the only benefit would be higher CPU clocks. And an extra GPU clock. Which I'll attempt to spoof next time I get near a PC.
Click to expand...
Click to collapse
You're right, that makes sense.
I'm glad they are making a refreshed chip.
On another note, do you think we will see an overclocking tool in the future?
Possibly with a custom ROM?

Categories

Resources