Development [Kernel][12.04.2023][Android 13] Kirisakura 3.0.1 for Sony Xperia 1 III aka "Sagami" - Sony Xperia 1 III

Kirisakura-Kernel for the Sony Xperia 1 III
Hello everyone,
To keep it short: Here is Kirisakura - Kernel for the Sony Xperia 1 III aka Sagami. Sagami is the internal codename for this years development platform of Sony Mark III devices. Please note this kernel is made to run only on Xperia 1 III.
I would appreciate if everybody that flashes the kernel, reads at least once through this opening post and the following ones.
Kirisakura - Kernel is designed to bring a handful of beneficial features to the device, while ensuring excellent performance and smoothness to get you safely through the day!
If you expect a custom kernel to magically improve your devices battery life manifold and this is your only priority then this might not be the right place for you.
However the kernel is built to keep battery life close to the same as you would experience the on stock kernel while being tuned to perform better in various UI related benchmarks. The same benches are used by google to verify and ensure UI smoothness on the Pixel devices.
There´s also a cpu-battery saver mode that cuts back the CPU max- freqs, but without the disadvantages like delayed notifications from built into the system user-space power-saving modes.
If that got your curious, I welcome you to continue reading if you´re still interested!
The kernel includes a lot of improvements and contributions from other developers as well. Without this kernel would not exist.
A big part of improvements originate from @arter97´s, @kdrag0n´s and @Sultanxda´s work. Many others contributed in some way or another to this kernel.
A big thanks to all of them at this place!
Now lets continue with a list of features in the next paragraph!
Main Features:
- Based on latest kernel sources from Sony for Android 12 and intended to be used on the latest Stock-Firmware
- compiled with Clang 14.0.7 and built with -O3 speed optimizations
- Linux-Stable-Upstream included to 5.4.202
- upstreamed CAF base for the Snapdragon 888 (qcoms internal codename "lahaina")
- CPU-Battery saver to be able to restrict max cpufreqs on the fly, without enabling powersaving modes that might cause missed notifications (more info here)
- include important fixes/improvements from kernel/common
- reduce power consumption during deep sleep
- remove logging while device is suspended
- add SSG-IO scheduler from samsung (less overhead, better tuned towards android)
- disable various debugging mechanisms for drivers which are not needed on a perf build (e.g. binder)
- disable selinux auditing (we don´t have to adress selinux denials running a stock rom)
- disable unnecessary CPU errata for our specific SoC
- implement LRNG (thanks @arter97, see arter kernel OP for more info )
- Flashing the kernel will keep root!
- Flashable via EXKM, FKM or TWRP (if available) on a rooted system!
EAS related features:
- Implement dynamic WALT-Window size depending on current FPS, collecting information about CPU-Load to provide more precise information for the scheduler
- EAS implementation patched up to latest CAF state
- updates from kernel/common
- scheduler updates from sd888/ 5.4 kernel
CPU related features:
- Power saving workingqueues enabled by default (toggleable in EXKM)
- Change various drivers (WLAN, MM, audio, charger, power, thermal, glink etc) to use power efficient workingqueues. This compliments EAS in general
- improvements to cpufreq/times/stats
- vdso32 patches as found on Google Pixel devices (brief documentation here) (CAF 5.4 default, keep for documentation)
- remove event debug logging
- disable broken irq detection, disable debugmon
- improve suspend/resume from audio driver (caf-upstream for audio-kernel)
- cpuidle: wake only cpus for which qos has changed (this allows cores to keep idle states better)
- disable debugging during sleep states as per qcom recommendation
- remove RTB logging to reduce overhead
- disable trace_printk as it shouldn´t be used on production/perf kernel builds
- enable suspend_skip_sync to save power during suspend/resume
- disable edac and coresight (following google on the pixel kernels)
- disable jtagv8 debugging as recommended by qcom for perf builds to avoid potential power, performance and memory penalty
- disable s2idle in favor of deep idle state -> improves deep sleep drain (google initially used 2idle for improved suspend/resume latency on pixel 3 and pixel 4, but disabled it on pixel 5. qcom followed suit for sd 888, but apparently didn´t see google reverting it on pixel 5. Other OEMs such as Xiaomi or OnePlus already disabled s2idle on their SD888 devices in favor of deep- read more about s2idle vs deep here)
GPU related features:
- GPU driver updated to latest CAF-State
- gpu/kgsl improvements from pixel 4/pixel 5 kernel
- add low_prio_worker thread for gpu driver (Improves performance when tearing down processes (eg, via LMK) and not blocking currently running UI from submitting work to the GPU
File System related features:
- upstream BFQ-MQ to latest state in linux-mainline and default to 128KB readahead
- improve memory allocations in kernfs
- ufs improvements from pixel 4/ pixel 5 kernel
- improve GC as to not interfere while user interaction is happening and prevent possible jitter or latency spikes
Network related features:
- Wireguard Support (Details)
- advanced TCP algorithms enabled
- use bbr as default TCP congestion algorithm (fasted algo according to this excellent research from @kdrag0n found here )
- improved networking drivers from caf-upstream (especially wifi)
- remove unnecessary wakelock from WLAN driver to reduce thousands of very short wakeups during a 7 hour deep sleep period
- improved bluetooth performance (¹, ²)
- Enable support for TTL spoofing
Memory related features:
- Speculative Page Faults left enabled (1. 2) (CAF 5.4 default, keep for documentation)
- Fix various memory leaks in different subsystems
- improved mm with patches from mainline
- patches from kernel/common
- improve memory allocations in various subsystems, video encode/decode, kernfs, cgroup
- Backport to enable CONFIG_HAVE_MOVE_PMD (see here) , thanks @arter97
- Backport to enable CONFIG_HAVE_MOVE_PUD (commit here) , thanks @arter97
- free more RAM by removing unused reserved memory regions
- mm: Micro-optimize PID map reads for arm64 (improves game performance, especially unity based games such as genshin impact)
- MGLRU added (info here and here
Security related features:
- Control-Flow-Integration (CFI) and Link-Time-Optimization (LTO) (CAF 5.4 default, keep for documentation)
- Use ThinLTO which was first used in the Pixel 4 XL Android R-Kernel instead of full LTO (CAF 5.4 default, keep for documentation)
- Shadow Call Stack (SCS) Security-Feature ( 5.4 default, keep for documentation)
- enable init_on_alloc for even more security, more information can be found in the commit message (CAF 5.4 default, keep for documentation)
Misc Features:
Wakelock Blocker:
- advanced wakelock blocker with the ability to block any wakelocks (dangerous, use with caution)
- please read [URL="https://arstechnica.com/gadgets/2018/08/p-is-for-power-how-google-tests-tracks-and-improves-android-battery-life/"]this for further info
- blocking a kernel wakelock should only be done in case of firmware incompatabilities (WiFi network at work (can´t be changed) causes deep sleep to not work on the phone.) That´s the only use case I see for this feature. The kernel does not features this to improve battery life!
Other features:
- clean up asus drivers and fix a few warnings in kernel log
- disable logging and debugging to make the kernel more lightweight in various places (includes binder, mm, vma, gpu, ipa etc)
- fix several coding issues detected by newer Clang-Toolchains
- enlarge dmesg size to ease debugging
Flashing Guide, Download and Changelog
Requirements:
- unlocked Bootloader
- USB-Debugging in developer options enabled
- latest adb and fastboot binaries
- working adb and fastboot environment
- magisk root
- a backup of stock boot.img or your magisk patched boot.img in case you want to go back to stock.
How to flash the Kernel:
1. Download the latest kernel.zip and make sure you have properly updated to the latest matching Firmware (check the feature list for the current firmware the source is based on). When there´s an OTA update for the Sony Xperia 1 III it takes Sony a while to release the source code for the new OS and me a while to build a new kernel. If you don´t want to face any issues, wait until I either release an updated kernel or give green light because there were no kernel changes.
If you want to be sure there are no issues, always make sure to run the firmware the kernel is built for!
If you feel adventurous and try in advance, make sure you have a backup ready!
2. Flash the kernel.zip via latest TWRP (if available), EXKM or FKM app and do a full reboot.
3. Reboot and profit.
DOWNLOAD:
Download is located always in this folder:
https://www.androidfilehost.com/?w=files&flid=331114
Or attached to the release post starting with Android 13 as AFH is currently not working correctly
Important: Read after Download
Please take a look at the second post after flashing the kernel!
Changelog:
Android 11
1.0.0 Initial Release
1.0.1 https://forum.xda-developers.com/t/...xperia-1-iii-aka-sagami.4377449/post-86140929
Android 12
2.0.0
[Kernel][02.07.2022][Android 12] Kirisakura 2.0.0 for Sony Xperia 1 III aka "Sagami"
Kirisakura-Kernel for the Sony Xperia 1 III Hello everyone, To keep it short: Here is Kirisakura - Kernel for the Sony Xperia 1 III aka Sagami. Sagami is the internal codename for this years development platform of Sony Mark III devices. Please...
forum.xda-developers.com
Android 13
3.0.0 https://forum.xda-developers.com/t/...xperia-1-iii-aka-sagami.4377449/post-88048199
3.0.1 https://forum.xda-developers.com/t/...xperia-1-iii-aka-sagami.4377449/post-88404445
Donations:
Donations are not mandatory but very welcome if you want to support development or just buy me a coffee/tea
If you like my work: http://paypal.me/freak07
Credits:
Sony for the development device, giving me the opportunity to create this project!
@osm0sis for all his work, including the ak3 installer!
@tbalden for being the best HTC, Pixel, OnePlus and now Asus wingman!
@LeeDroid and @mwilky for their awesome roms and work I used on multiple devices!
@Captain_Throwback for all the mentoring and guidance!
@Eliminater74 for bringing me into the game and the Inspiration
@nathanchance for his upstream guidance and assistance
@RenderBroken for helping me out
@flar2 for all his work
@joshuous for all the help he provided to me in the past!
@arter97 for giving me advice
@kdrag0n for his help and advices!
@topjohnwu for magisk!
Source Code: https://github.com/freak07/Kirisakura_Sagami

F.A.Q:
Question: Is root preserved when flashing this kernel?
Answer: Yes, the AnyKernel.zip will detect root and keep it.
Question: Safetynet does not pass on my phone since I unlocked the phone, why is this so?
Answer: Google introduced hardware backed attestation recently. Unfortunately the old kernel tricks to still get safetynet passing won´t work. Instead you will have to rely on some magisk modules. Short guide in post #4 below.
Question: How do I return back to stock or another kernel.
Answer: Extract boot.img from the matching firmware you are on (you can do so by using this tool or similar ones found on XDA and when googling around) and flash them via fastboot. If you want to keep root flash back the magisk_patched_boot.img. Or dirty flash your rom and re-root.
Question: Why is having Magisk installed mandatory for this kernel?
Answer: The kernel uses a ramdisk overlay to apply some settings after boot. If you are not rooted these settings will not get applied and you miss some of the optimizations.
Question: How to report bugs properly?
Answer: Have a look at post #3 in the linked thread. The linked guide is a pretty good starting point.
Before reporting any bug make sure you´re running on a stock configuration. That´s means you´re not using any mods, tweaks in kernel managers or other root tweaks , magisk modules, scripts or other modifications that alter various functions like sound mods, data traffic, sleeping behaviour, scheduler, magical battery tweaks etc.
Try to describe the issue as detailed as possible! Give your exact setup, like rom, magisk version, kernel version.
Is the issue reproducible? Does it happen frequently?
Please make sure to meet the points described above, provide logs as detailed in the link above, otherwise debugging is a lot more time consuming and harder. (kernel flashing apps usually support exporting logs of flashes too) If these requirements aren´t met and I don´t find time to either reproduce the issue myself or I´m not able to reproduce the issue myself, reports might just be ignored. If you can already reproduce the issue and provide logs it greatly limits the amount of time I have to spent until I figure out how to reproduce it.
If the device force reboots/randomly reboots (that means you see the bootloader unlocked screen!) provide a .zip of /asdf.
Easiest way is immediately after booting up, with a root explorer navigate to /asdf. Copy the contents to your internal storage, zip it up and send it to me.
If the issue happens while the device is running provide a dmesg plus a logcat that you take while/shortly after the issue happens. This will log what´s running in the current session. Try to be as detailed as possible what´s happening when the issue appears. It will also help me in reading the log!

Feature Documentation:
Here´s a brief documentation about some of the features included in the kernel that can be changed as the user desires.
They can be accessed via either terminal, scripts or for example EXKM manager ( tools -> user settings).
CPU-Frequency Limiting:
Another option is CPU-Freq Limiting. You can now limit the CPU frequency to a few different levels with a sysfs interface. Original implementation is from @tbalden, I only changed it to be accessible via traditional root methods.
Main Switch:
sys/module/cpufreq/parameters/batterysaver
Set this option to "1" to enable the feature
Max-Frequency Selection (Input boosts, such as scrolling boost or app launching boosts will still apply, if touch boost restriction is not set to 1)
sys/module/cpufreq/parameters/batterysaver_level
Set this to "1" to restrict the max CPU-Freqs to 1,7GHZ/2,1GHZ/2,49GHZ (Little Cluster/Big Cluster/Prime Core)
Set this to "2" to restrict the max CPU-Freqs to 1,6GHZ/1,7GHZ/2,0GHZ (Little Cluster/Big Cluster/Prime Core)
Set this to "3" to restrict the max CPU-Freqs to 1,49GHZ/1,4GHZ/1,6GHZ (Little Cluster/Big Cluster/Prime Core)
Touch-Boost Restriction
sys/module/cpufreq/parameters/batterysaver_touch limiting
Set this to "1" to restrict the powerhal from boosting over the limit defined in batterysaver_level
Set this to "0" to allow the powerhal to boost above the values defined in batterysaver_level, but only during interaction with the Phone!
Screenshots:
View attachment 5309899View attachment 5309901View attachment 5309903
This is for example very useful during gaming to prevent additional heat, if not the highest performance from the CPU is required. Check if the game is running fine on level 1 or 2, and you´ll notice much less heat. Powerdraw will be reduced as well.
Another very useful trick while doing video calls or long extended navigation sessions with google maps to preserve battery or keep the phone from heating. Especially during summer if the ambient temperatures are high.
This is a very easy way to preserve battery or reduce heat without toggling the battery save mode in settings as that restricts background data usage, which can lead to delayed notifications.

How to pass Safetynet after unlocking the bootloader
With the introduction of hardware backed safetynet attestation, passing safetynet has become a lot more complicated.
Some probably remember a while ago, flashing a kernel that forced some flags was enough to pass it. However these days are gone.
Below is a short guide how to pass safetynet on phones that are flagged to use HW attestation (such as the ROG 5).
1. Make sure you´re running latest magisk canary.
2. In Magisk Manager enable both zygisk and deny list.
4. Download the latest Universal Safety Net Fix from @kdrag0n ´s github for zygisk cand flash it in Magisk Manager. Reboot.
5. Profit

this one is the last one

Freak07,
Please not this kernel is made to run only on Xperia 1 II
Click to expand...
Click to collapse
I guess it should be "Please note this kernel is made to run only on Xperia 1 III"
By the way, is there any plans to make same kernel for 5 III ?
Source Code: https://github.com/freak07/Kirisakura_Sagami
Click to expand...
Click to collapse
Leads me to nowhere (404).

dron39 said:
Freak07,
I guess it should be "Please note this kernel is made to run only on Xperia 1 III"
By the way, is there any plans to make same kernel for 5 III ?
Leads me to nowhere (404).
Click to expand...
Click to collapse
Fixed the typos and the link.
No, I only have the Xperia 1 III to work on.

Amazing work mate, very meticulous tuning. Would love to have this kernel on the 5 III. I understand the device architectures are quite similar?

treff89 said:
Amazing work mate, very meticulous tuning. Would love to have this kernel on the 5 III. I understand the device architectures are quite similar?
Click to expand...
Click to collapse
I asked the same question above
And unfortunatelly Freak07 do not support 5 III because he doesn't have it. Hope someone else could transfer his patches and things to 5 III.

Thanks for the kernel. However after installing the kernel my SD card gave an error. It says issue with the SD Card tap to fix and then asks me to format it?

BlazingKahn35 said:
Thanks for the kernel. However after installing the kernel my SD card gave an error. It says issue with the SD Card tap to fix and then asks me to format it?
Click to expand...
Click to collapse
I see. Thanks for the report!
I think i know whats up. They use a proprietary driver for exfat formatted sdcards ( I assume yours is formatted as exfat?) so it's not included in the source i build the kernel from.
I don't use a sdcard, that's why I missed it.

treff89 said:
Amazing work mate, very meticulous tuning. Would love to have this kernel on the 5 III. I understand the device architectures are quite similar?
Click to expand...
Click to collapse
dron39 said:
I asked the same question above
And unfortunatelly Freak07 do not support 5 III because he doesn't have it. Hope someone else could transfer his patches and things to 5 III.
Click to expand...
Click to collapse
They are similar, but I can't support a device i don't own. I also lack the time to do any remote debugging.
The phones however are similar as you mentioned, so if somebody is interested in starting to work on it all my work is up on GitHub. That might make it a lot easier than it would be otherwise.

Freak07 said:
I see. Thanks for the report!
I think i know whats up. They use a proprietary driver for exfat formatted sdcards ( I assume yours is formatted as exfat?) so it's not included in the source i build the kernel from.
I don't use a sdcard, that's why I missed it.
Click to expand...
Click to collapse
Yes mine is exfat since it's 256gb but not a big issue. I just transferred all my files to PC formatted the SD and transferred back now it works.

Also I'm using forced 4K all the time. But the only downside is the slowing down of the FP sensor. I think it's a kernel panic can you look in to that also maybe? (It was also slow on stock kernel)

Dear developer, if there is an opportunity, I would like to receive a kernel for PRO-I products!
I promise to donate

Update to 1.0.1
Good morning everybody,
thanks to @BlazingKahn35 ´s report exfat formatted sdcards are now working fine again.
Included an open source driver, that spoofs texfat support (the proprietary exfat driver) once an exfat sdcard is detected.
Download link can be found in the OP.

BlazingKahn35 said:
Also I'm using forced 4K all the time. But the only downside is the slowing down of the FP sensor. I think it's a kernel panic can you look in to that also maybe? (It was also slow on stock kernel)
Click to expand...
Click to collapse
Not sure what you mean. A kernel panic crashes the device so that it reboots.
The fingerprint scanner works fine for me. I place my finger on it, it scans and proceeds to unlock. It's not the fastest around, but it's quick enough for me.
Also used the adb commands to enable 4k and the speed of the fingerprint sensor stayed the same on my end.

I noticed just as I woke up that my phone was charged to 100%. Did you removed battery care from the kernel?

Freak07 said:
Not sure what you mean. A kernel panic crashes the device so that it reboots.
The fingerprint scanner works fine for me. I place my finger on it, it scans and proceeds to unlock. It's not the fastest around, but it's quick enough for me.
Also used the adb commands to enable 4k and the speed of the fingerprint sensor stayed the same on my end.
Click to expand...
Click to collapse
For me there is a big delay sometimes. Do you have AOD enabled?

BlazingKahn35 said:
I noticed just as I woke up that my phone was charged to 100%. Did you removed battery care from the kernel?
Click to expand...
Click to collapse
Not intentionally no. It might be not enabled the way I built the source or i need to see if the drivers is available somewhere else to be able to build it in.
I'll play around with it the next few days, see if I can reproduce the issue and find what's missing or broken. Thanks for the report again.
BlazingKahn35 said:
For me there is a big delay sometimes. Do you have AOD enabled?
Click to expand...
Click to collapse
Not constant AOD. Only waking to AOD screen when lifting the phone is enabled.

Related

[KERNEL][UV][CWM] Entropy's Daily Driver-GB, 03/07/2012 (Small Fixes))

OK, I figure it's time to start providing my kernels to the general public.
This should be compatible with most stock-derived Gingerbread firmwares. It is NOT compatible with CM7/MIUI or any other AOSP-derived firmware. It is NOT compatible with ICS and WILL NOT BE until ICS kernel source for the I9100 is released. At that point a new thread will be created for those kernels. I am testing it currently with self-deodexed/debloated/Hellraised XWKL1.
This kernel series is intended to be similar in spirit to my Daily Driver series for the Infuse at http://forum.xda-developers.com/showthread.php?t=1212795
It is built from sources at https://github.com/Entropy512/linux_kernel_sgh-i777/commits/master, and initramfs at https://github.com/Entropy512/initramfs_sgh-i777/commits/master
My general goals are to focus on stability and battery life. If it comes to a tradeoff between performance and the above two, I will choose stability/battery life. In general I will choose stability first, with the exception of undervolting.
Current features:
codeworkx's cpuidle patch - should improve battery life a bit. In most cases it will likely not improve things much, but in rare cases it will result in significant improvements. (I only have one partially-reproducible test case on the Infuse so far)
JHash 3
BFQ I/O scheduler
CIFS module in initramfs
CWM 5.0.2.8 pulled from latest CM7 source tree as of 2/28/2012
"insecure" kernel (meaning root in ADB)
CPU governor set to Conservative by default to conserve some battery - this will make your device slightly less responsive, use SetCPU or a similar app to return to ondemand if you want it, or reduce the conservative polling interval
Filesystem readahead tweaks in initramfs
netarchy's Sleep of Death fix
netarchy's conservative governor tuning patch - should improve responsiveness of devices when using the conservative governor if you reduce the polling interval (misnamed as sample_rate) - the I9100 community calls this "lionheart" even though it's really only a 2-line patch
Battery charge current monitoring (CurrentWidget) support - only reports charge current and not discharge, and reports a value 2.85 times the actual current. Use CurrentWidget's "operation on value" to divide by 2.85.
Miscellaneous bugfixes pulled from Ninphetamine and CM7 sources - see github for details
/system/etc/init.d support in initramfs - Note that this only runs stuff in /system/etc/init.d - ROM developers or you need to create it. Attached is an example script that will change the CPU frequency governor to ondemand if placed in /system/etc/init.d and set to executable
Four "use at your own risk" features that trade performance for stability - See Post #4 for details
Standard bootanimation support
/proc/last_kmsg crash debugging support
NFS modules in initramfs - note that they must be insmodded in a specific order: sunrpc.ko, lockd.ko, then nfs.ko
Fix for fuel_alerted perma-wakelocks
Fix for wifi tethering on I9100 ROMs that have been Hellraised
Bump up TCP buffer sizes in initramfs to match that of the Infuse - may help network performance in some cases
cpuidle driver from Tab 7 Plus kernel - allows entry into AFTR more often
Support Bluetooth HID on newer firmware bases
3-step GPU clock/voltage control
Extended hotplug tuning
Support for Xan's ExTweaks universal tuning app - https://market.android.com/details?id=com.darekxan.extweaks.app
Planned features, short term:
Pull in some improvements from myfluxi and arighi's trees
Planned features, mid-term:
????
Planned features, long-term:
Improved battery charge algorithm for faster charging - Initial research indicates we have an alternate battery charger chip (MAX8922) that differs from the MAX8997 used in the I9100. We DO have an 8997 also - but on our device for some reason Samsung decided to use an alternate chip instead of using the 8997's built-in charging. This means we have far fewer options (90,400,660 mA) in terms of charge rates compared to the I9100 (from 200 to 950 in 50 mA steps). So we might not be able to implement any fancy charging algorithms.
Features not planned:
BFS process scheduler - I have only once ever seen a test case where this clearly outperformed the mainline Linux scheduler (multithread x264 encoding) - The mainline schedule was fixed in the next release and BFS now has no performance benefits
Any feature that trades off stability or data integrity for performance unless it can be disabled entirely and defaulted to "off"
Any feature that cannot have functionality tested without a paid app. Interface-only checks don't cut it - I don't want users complaining that the app they paid for didn't work because an interface check worked but function didn't
Touch recovery - too prone to accidental user errors - Maybe I will revisit when ICS hits.
Known issues:
Power management regression somewhere between 12/8/11 and 1/2/12 - Intermittent high drain without high AOS or reduced deep sleep percentage when on some wifi networks - seems more likely if GPS is used when connected to wifi. Wifi with high AOS/reduced deep sleep is not a kernel problem. This appears to only happen on some firmwares - it happens on XXKI3 but not XWKL1. It is likely connected to a wifi power management bug in some firmwares. A debugging feature in 2/7 and later will allow identification of such firmwares - see http://forum.xda-developers.com/showpost.php?p=22581928&postcount=1777 for details
Some people have reported touchkey lights becoming disabled until the screen is turned off and back on again. Under investigation - seems to mainly happen on firmwares with BLN-modded liblights even if the BLN app isn't used
Internal and External SD card are swapped in CWM currently
Basic flashing instructions for .tar releases (NOTE - There are currently no releases in this category. These instructions only remain for heimdall+ZIP users:
(Tested on Linux, not tested MacOS/Windows but should work) Heimdall - Extract the contents of the tar file, enter download mode, and flash with the following command line:
Code:
heimdall flash --kernel zImage
Flashing instructions for .zip releases:
Flash in CWM, or extract the zImage and use the Heimdall instructions above.
Please do not ask how to enter download mode or install Heimdall/Odin in this thread - these are basic generic skills anyone flashing custom firmwares on Samsung devices should know and plenty of documentation exists elsewhere. If you really need to ask, use the General forum, or if created, the Q&A forum. I want to try to keep this thread clean and only with bug reports and issues specific to this release, not general HOWTO or troubleshooting posts. Some of the information you need is in jivy26's FAQs thread at http://forum.xda-developers.com/showthread.php?t=1288112 - Reading at least the first post of this thread in its entirety is STRONGLY recommended.
Bug reports:
If you have a crash (reboot all the way to Galaxy S I9100 screen), use ADB dump the contents of /proc/last_kmsg and post
If you have oddball behavior, include a clearly reproducible test case with your report, or use ADB to obtain a dmesg and logcat capturing the odd behavior at the time of error.
Similar to flashing - using ADB and obtaining last_kmsg, dmesg, and logcat dumps are basic skills that anyone working with custom firmwares on Android devices should have. If you need help with these, do some searching, or post in the General forum or, if created, Q&A forum.
Firmware ("ROM") Developers:
While I cannot restrict anyone from putting this kernel into a ROM as long as links are given to the github sources for GPL compliance, I request that anyone who includes this kernel in a firmware release does the following out of courtesy:
Link to this thread
Clearly indicate in your firmware changelog which Daily Driver kernel release is included in your firmware release whenever you change DD releases - this lets users identify whether a fix is present in the kernel they're using or not
Kernel Developers:
Similar to my request for ROM developers, while I can't restrict you from doing anything, I ask as a courtesy that if you cherry-pick my commits, you do the following:
Please don't rebase my commits into a large multi-feature without consulting me - rebasing related bugfixes together is OK.
Please try not to implement lots of unrelated features or bugfixes in a single git commit - it makes it hard to reimplement that when Samsung drops new sources or releases a new device
ALL OF MY RELEASES ARE NAMED BY RELEASE DATE - MMDDYYYY. See the changelog for differences between Experimental (exp) and non-exp versions for days where dual releases are made.
Change Log
3/7/2012 Release:
Default GPU voltages were slightly too high (but not dangerously so) due to misreading some #ifdefs. Adjusted them downwards.
03/05/2012 Release:
3-step GPU voltage control (thanks to gokhanmoral of SiyahKernel)
Extended CPU hotplug tunables (also thanks to gokhanmoral of SiyahKernel) - I didn't bother with Tegrak Second Core support as it offers nothing these tunables don't offer that makes sense
Preliminary support for Xan's ExTweaks tuning app - https://market.android.com/details?id=com.darekxan.extweaks.app (Yes, it currently says SiyahKernel only, but I added support) - use this to tweak the new features
03/04/2012 Release B:
Add GPU voltage control in addition to existing clock control - see http://forum.xda-developers.com/showpost.php?p=23260574&postcount=64 for more
Reduce default sampling_rate of conservative governor from 100ms to 50ms - conservative uses deferred ticks that shouldn't impact cpuidle
03/04/2012 Release:
Readd https://github.com/Entropy512/linux_kernel_sgh-i777/commit/0746aeb285341896877a3adddd79bdaa0cf4a6f6 (disable second core when screen is off)
03/03/2012 Release B:
Readd a couple of cpuidle register restore/saves that were removed by Samsung between the I9100 and Tab 7 Plus sources - Small chance this might be where the SoDs come from.
03/03/2012 Release:
Readd https://github.com/Entropy512/linux_kernel_sgh-i777/commit/373425c3130fbbb67cdae74793bd3df363a5dc04
Remove powersave governor - it's a guaranteed SoD if used and the same results (without SoD) can be achieved by setting conservative with min=max=200 MHz
03/02/2012 Release:
Revert https://github.com/Entropy512/linux_kernel_sgh-i777/commit/3954900055afe0d22a7ce71b50e4a5cb439c24bf - It turns out it's not actually in the mainline tree, and it has had questionable results from users. It may have caused power regressions for shoman94
Readd https://github.com/Entropy512/linux_kernel_sgh-i777/commit/ec9e34085c2e1284b3e30926862161fa63d498ea - Should improve performance a little on devices with "small" memory (compared to PCs, 1GB is "small")
02/28/2012 Release:
Revert https://github.com/Entropy512/linux_kernel_sgh-i777/commit/634b73c2d0b7e156b5c1626fd268662fcaa5fabe again - It was causing severe performance regressions for red5, and was clearly narrowed down to a single patch (red5 swapped between 18B and 26 multiple times, these are adjacent releases that differ by only one patch.)
Readd https://github.com/Entropy512/linux_kernel_sgh-i777/commit/9c10cd423cdcb0039c5f7730076d1f8db9c09442
Reduce minimum polling interval of conservative from 25 msec to 20 msec
Make defaults of conservative governor consistent with battery-optimized tuning - won't affect anyone using SetCPU to tune governors
Initramfs: Clean up cruft that was doing nothing but taking space
Initramfs: Compiled latest CWM 5.0.2.8 from sources - should fix advanced restore
Initramfs: Swap internal/external SD in CWM to be consistent with newer Android standards
02/26/2012 Release:
Readd https://github.com/Entropy512/linux_kernel_sgh-i777/commit/634b73c2d0b7e156b5c1626fd268662fcaa5fabe
02/16/2012 Release B:
PULLED - actual release was identical to 15C due to a mistake in creating the ZIP. - Replaced by 02/18/2012 Release B.
Readd https://github.com/Entropy512/linux_kernel_sgh-i777/commit/3954900055afe0d22a7ce71b50e4a5cb439c24bf (cpuidle: governor: menu: don't use loadavg)
02/16/2012 Release A:
PULLED - actual release was identical to 15C due to a mistake in creating the ZIP. - Replaced by 02/18/2012 Release A. (CWM will report this as 2/17A - ignore this, CPUSpy should report afternoon in 2/18)
Readd https://github.com/Entropy512/linux_kernel_sgh-i777/commit/4d8a7e7834e29cee232d6634454c0c38e9903d49 (Add MSHCI Power Control)
02/15/2012 Release C:
Fixes to multiple drivers that were attempting to lock frequency to certain levels. On an overclock kernel, these were all two frequency steps higher than originally intended:
Application-controlled lock in kernel/power/main.c - Likely this combined with arighi's frequency scaling patch was the cause of most 2/7 stability issues
Camera locking to 1.2 GHz is fixed
Thermal limits (reducing clock frequency while overheating) was broken, should now work properly
02/15/2012 Release B:
Readds the following patches, should be safe:
https://github.com/Entropy512/linux_kernel_sgh-i777/commit/35187426d15d05d465d07b6d743e1eb37c629a24 - small network performance improvement
https://github.com/Entropy512/linux_kernel_sgh-i777/commit/733758d888e4a23d7ae6487de0dbb525e9d7433c - another small network performance improvement
https://github.com/Entropy512/linux_kernel_sgh-i777/commit/325cdbf1b89e7d2138482e76879fabf9a6dac5b7 - Provide a warning when a broken firmware is preventing proper wifi power management
02/15/2012 Release A:
Revert most patches from 1/30 and 2/07 due to stability issues EXCEPT:
BTHID interoperability fix
MFC/new cpuidle interoperability fix
A BCM4330 patch revert (it was a revert to begin with)
There will be a second "B" release containing patches that I think should be safe stability-wise but want to have separated anyway. After that, I will be making releases 1-2 times a day, each with only one new patch. This will allow the offending patches for recently reported stability problems to be identified. As a result, releases will have A/B/C/etc letter codes after the date until I no longer expect multiple releases per day. Until the stability issues are resolved, Experimental releases are suspended.
02/07/2012 Release:
Lock out AFTR during hardware accelerated video playback - should fix issues with hwaccel video that some people had with 1/29 and later
Disables second core when the screen is off (this patch comes from arighi)
A patch from arighi ("smooth scaling") that prevents the performance governor from getting "stuck" at the wrong frequency, and should make ondemand a bit more responsive
Small cpuidle governor fix from mainline
Revert a wifi patch that did nothing at all if you read the code
Print an error in dmesg when suspend handling in the wifi driver is blocked by the system firmware for whatever reason (XXKI3 does this) - System firmwares that do this will make you vulnerable to battery drain on "dirty" networks (ARP spam, broadcast traffic)
Small performance patch by Russell King of ARM (see github for details)
Standard only for now - will release experimental in a day or two
Warning - This doesn't have as much testing as I normally put into a kernel, but I needed to get a cpuidle fix out ASAP in my opinion
1/30/2012 Releases:
Backport Bluetooth HID fixes from Epic 4G Touch EL29 sources - Seems to fix Bluetooth HID on UCKK6, should also fix it on newer I9100 bases
Backport a power management change (MSHCI power control) from E4GT EL29 - Actually, I think this is something that was in the AT&T drop and I9100 Update3 removed
ashmem deadlock fix - might fix nizda1's issue (unknown, I thought I had this in already but I guess I didn't) - found by arighi
Tweak from arighi - set SLUB_MAX_ORDER to 0 since our device doesn't have ginormous amounts of RAM
Increase TCP initial receive and congestion windows - should improve throughput on new TCP connections (such as web page loads)
Remove a small dmesg spam introduced by the cpuidle backport
Add ARM Errata 753970 (bugfix)
1/29/2012 Releases:
Backported cpuidle driver from the Tab 7 Plus - Allows AFTR idle to be entered more often, enables it my default, and permits it to be tracked separately from LPA idle mode.
Reverted some small I9100 changes to GPIO configurations - These changes may do nothing, the functions of these GPIOs are undocumented but appear to be somehow sleep related. See github commit for details
1/24/2012 Releases:
Include tun.ko
The above change is so small I'm removing the 1/23 download
1/23/2012 Releases (Note: Experimental might not actually be posted until 1/24):
Enable building for I9100 targets (source code change only, see github)
Revert some unnecessary patches from arighi's tree, prep for implementing more useful ones
A pile of upstream Linux kernel bugfixes, huge thanks go to myfluxi for finding these and testing them on himself: https://github.com/myfluxi/xxKernel
Bring in two small missing updates from I9100 update3 sources
Enable separate debugging of wake_lock_destroy() to enable diagnosing high deleted_wake_locks time
1/2/2012 Releases:
Road to I9100 Update3: COMPLETE - Video changes, media changes, battery/PMIC changes, Samsung-specific arch/arm changes
Road to I9100 Update3: Revert touchscreen drivers to I777 source codebase. SiyahKernel also did this, it seems to solve the wake lag issues. However those that didn't encounter lag may see reduced responsiveness. There's a possible workaround though.
12/21/2011 Releases:
Road to I9100: USB Host (untested), Touchkey, Broadcom DHD (Bluetooth, WiFi)
Initramfs: Bring in a few updates from UCKK6. Might fix wifi for KK6 people (UCKK6 compatibility UNTESTED.)
12/12/2011 Releases:
Road to I9100: Touchscreen Drivers
Irrelevant Road to I9100: DPRAM, WiMax, staging drivers
12/8/2011 Releases:
Resume dual-release standard (2.6.35.7) and experimental (2.6.35.14) builds - note exp does NOT fix the AOS bug, just hides it - see http://git.kernel.org/?p=linux/kern...it;h=a3fe22ee824895aafdc1b788e19c081a2e6dd9da
Remove some debugging printk()s from the AFTR cpuidle driver for those who enable AFTR deep idle mode (see init.d scripts thread linked below)
More components of I9100 update3 sources - MMC, filesystem, and generic arch/arm changes
Removed filesystem I/O scheduler tweak script from initramfs - this belongs as a separate init.d script. See http://forum.xda-developers.com/showthread.php?t=1378080 for this script's new home along with other scripts
Enable compilation of FUSE module. Combined with an ntfs-3g binary this should allow people who want to mount NTFS drives with OTG cables to do so. I cannot provide any additional support for this though - no OTG cable
12/1/2011 Release:
Disable interactive governor - it was causing kernel panics in LPM (e.g. reboot to normal poweron when power-off charging), too much risk of it causing a panic during normal operation so it's gone
Two small fixes, one to MMC power management and one to cpuidle - see github for details
Per-file fsync disable - see HERE BE DRAGONS post #4 and USE AT YOUR OWN RISK
First step of patching up to Samsung I9100 update3 sources - New sound drivers. Please focus on sound until the next release.
11/23/2011 Release:
BLN from Ninphetamine - WARNING: An active BLN notification WILL drain your battery by holding a wakelock. Also, you need to install a compatible liblights if your ROM doesn't already have it. VillainROM 3.0 has it, I'll try to post a library and installation instructions after the Thanksgiving weekend ends
Permissions changes for /data/misc/wifi that allow tethering settings to persist on Hellraised ROMs (EDIT: Not working for fresh flashes... Maybe not working at all. what the **** is overriding the perms?)
Enabled Interactive governor in defconfig. drowningchild says it's stable - I tend to be paranoid when it comes to governors
11/13/2011 Release:
Upgrade to CWM 5.0.2.7 pulled from Cyanogenmod 7 nightly 12 - adds nandroid backup/restore to external SD - advanced restore from extSD not working yet, also CWM labels external SD as "internal"
11/10/2011 Release:
Removed automatic root injection from the initramfs - It causes too many problems. Flash ChainsDD's Superuser package from CWM instead.
11/03/2011 Release:
Fix for wifi tethering on I9100 ROMs
Bump up TCP buffer sizes in initramfs to match that of the Infuse - may help network performance in some cases
Experimental (2.6.35.14) releases discontinued until further notice - They provided no discernible benefit, and hid the infamous "AOS Bug" making it harder to diagnose. (It did not fix the drain)
10/20/2011 Releases:
Fix for fuel_alerted perma-wakelocks
GPU clock control, same method as Ninphetamine - see Ninphetamine kernel for documentation. Completely untested other than that the default values don't change or break anything. Same rules as for my overclock code... Credit goes to Netarchy for this, it's his git commit 100%
10/16/2011 Releases:
Make root injection script less aggressive
NFS modules in initramfs - note that they must be insmodded in a specific order: sunrpc.ko, lockd.ko, then nfs.ko
Miscellaneous bugfixes, see git
10/13/2011 Releases:
Make root injection script in initramfs less aggressive
10/09/2011 Releases:
Update root injection script to install su-3.0 - Still need work on this to make it more robust when su updates again.
Misc. fixes from codeworkx's CM7 tree and Ninphetamine
Start of Experimental dual-release series - Experimental updates base to 2.6.35.14 using arighi's patches
10/07/2011 Releases: (There were multiple, but as their files are no longer posted I'm merging it into one changelog entry)
Conservative tuning patch no longer considered experimental
/system/etc/init.d support in initramfs
Overclocking/Undervolting implementation by codeworkx - USE AT YOUR OWN RISK. DO NOT REPORT BUGS OR PROBLEMS IF YOU ARE OVERCLOCKING OR UNDERVOLTING. IF YOU EXPERIENCE ANY STABILITY PROBLEMS, DISABLE ALL OC/UV
Standard bootanimation support
10/06/2011 Experimental Release:
netarchy's conservative governor tuning patch - should improve responsiveness of devices when using the conservative governor
10/06/2011 Release:
Automatic root injection in initramfs
Filesystem readahead tweaks in initramfs
netarchy's Sleep of Death fix
Battery charge current monitoring (CurrentWidget) support - only reports charge current and not discharge, and reports a value 2.85 times the actual current. Use CurrentWidget's "operation on value" to divide by 2.85.
Miscellaneous bugfixes pulled from Ninphetamine sources - see github for details
Initial Release: 10/04/2011
codeworkx's cpuidle patch - should improve battery life a bit. In most cases it will likely not improve things much, but in rare cases it will result in significant improvements. (I only have one partially-reproducible test case on the Infuse so far)
JHash 3
BFQ I/O scheduler
CIFS module in initramfs
CWM 5.0.2.3 from Codeworkx's CWM kernel
CPU governor set to Conservative by default to conserve some battery - this will make your device slightly less responsive, use SetCPU or a similar app to return to ondemand if you want it
"Insecure" kernel - ADB sessions ALWAYS have root
Here be dragons
This post is for features present in the kernel that are "use at your own risk" - They have either potential or guaranteed negative side effects if used.
Overclocking (CPU):
Enable using SetCPU or a similar app
USE AT YOUR OWN RISK. DO NOT REPORT BUGS OR PROBLEMS IF YOU ARE OVERCLOCKING OR UNDERVOLTING. IF YOU EXPERIENCE ANY STABILITY PROBLEMS, DISABLE ALL OC/UV
Overclocking (GPU):
See Ninphetamine kernel for documentation - Same control method
USE AT YOUR OWN RISK. DO NOT REPORT BUGS OR PROBLEMS IF YOU ARE OVERCLOCKING. IF YOU EXPERIENCE ANY STABILITY PROBLEMS, DISABLE ALL OC
Per-File fsync() disable:
This allows you to disable per-file write forced syncs. (e.g. if an app tries to force a write straight to disk, it'll just go to cache). This achieves the same goal as the modded sqlite hacks seen in tweaks such as USAS, however it can be disabled at runtime.
WARNING: THIS CAN CAUSE DATA LOSS OR CORRUPTION IN A CRASH
To enable, do the following in a terminal, or add it to an init.d script (look at my ondemand script as an example):
Code:
echo "1" > /sys/module/sync/parameters/fsync_disabled
And to disable (return to the default):
Code:
echo "0" > /sys/module/sync/parameters/fsync_disabled
Good for around 200 points of epeen in the database benchmarks in Antutu or 500-600 points of epeen in Quadrant. Real-world benefit: Probably not worth the data integrity risk, but you've got a choice now.
Backlight Notifications (BLN):
This allows the touchkey backlights to be used for notifications. Some stock apps (such as stock MMS) don't support it. Supposedly services.jar mods can change this.
This WILL drain your battery when a notification is active due to a wakelock that holds deep sleep. Sorry, it's either this or instability for the time being.
In addition to the BLN control app, the ROM needs a modified liblights file for this to work
Attached here - Liblights - both BLN-modified (extracted from VillainROM 3.0) and stock I777
To install, take the file and push it to /system:
Code:
adb remount
adb push <file> /system/lib/hw/lights.SGH-I777.so
adb chmod 644 /system/lib/hw/lights.SGH-I777.so
Then reboot
Note that on a Hellraised ROM, you need to replace SGH-I777 with GT-I9100. This includes manually ported ROMs like Cognition 777
Like my prerooted system image, this file is compressed using 7-Zip to prevent people from trying to flash it with CWM
OK, right now this post only has documentation of one "special but safe" feature:
To enable debugging of high deleted_wake_locks time, I've set this up to allow wake_lock_destroy() to be debugged without enabling DEBUG_WAKE_LOCK (which spams dmesg with a ton of stuff not needed for wake_lock_destroy() debugging). To enable, add 32 to the value of /sys/module/wakelock/parameters/debug_mask - This defaults to 3, so the proper value is 35.
Code:
echo "35" > /sys/module/wakelock/parameters/debug_mask
Return this to 3 to set it back to the default.
With this, you'll see wake_lock_destroy debugging information in your dmesg output. This is only needed if you have very high deleted_wake_locks times.
If we're not rooted(stock) this will give us root? Or just cwm where we can either use superoneclick or your pre rooted kernel?
eep2378 said:
If we're not rooted(stock) this will give us root? Or just cwm where we can either use superoneclick or your pre rooted kernel?
Click to expand...
Click to collapse
If it's in "planned features" - it's not in yet.
However it can be SOCed just like codeworkx's kernel
Works fine, as in I don't notice a huge difference in speed or anything but huge differences after changing kernels shouldn't really happen so I guess that's good.
I flashed your kernel with Odin and I think it went well. Will kernel version in About phone be the same as stock (2.6.35.7)?
Thanks for using the recommended toolchain to compile
all the newer ones seem to cause the SGS2 to get very warm.
shishir95 said:
Works fine, as in I don't notice a huge difference in speed or anything but huge differences after changing kernels shouldn't really happen so I guess that's good.
Click to expand...
Click to collapse
Shouldn't be any difference in speed - might even be slightly slower since I make conservative governor default for battery saving purposes. You can change this with SetCPU.
wonner said:
I flashed your kernel with Odin and I think it went well. Will kernel version in About phone be the same as stock (2.6.35.7)?
Click to expand...
Click to collapse
In About Phone, yes. If you use a more advanced info tool that shows the localversion, the git tag should be appended and the [email protected] build info should be [email protected] I'm going to be adding a CONFIG_LOCALVERSION tag in the future.
I just had my first Sleep of Death and realized I'm missing last_kmsg support. That's on the list for Planned Features, short-term now.
designgears said:
Thanks for using the recommended toolchain to compile
all the newer ones seem to cause the SGS2 to get very warm.
Click to expand...
Click to collapse
Newer ones make the Infuse die a horrible and painful death, if the kernel even compiles, and I want to retain that compatibility for now.
Sorry for my ignorance regarding Samsung Hardware, this is my first device from them.
Is this kernel aimed at CM or any Rom such as Cognition?
Drew
drewdatrip said:
Sorry for my ignorance regarding Samsung Hardware, this is my first device from them.
Is this kernel aimed at CM or any Rom such as Cognition?
Drew
Click to expand...
Click to collapse
Right now, stock-derived ROMs. NOT CM7/MIUI.
Regarding BLN - I am very unhappy to hear it may not be easy/possible to implement this on our phones. It appears that they've got it working on the international galaxy s 2s, do our phones have more in common with the Infuse than with those?
By the way, I almost forgot -- thank you for this! Flashed it with ODIN, no problems at all, and super-one-click-rooted as well. So far so good!
Any chance of adding a date to the thread title do I can know when you've updated and flash it again lol
jivy26 said:
Any chance of adding a date to the thread title do I can know when you've updated and flash it again lol
Click to expand...
Click to collapse
Will do. If you look at my Infuse series, I usually edit the first post with the update, and post to a post within the thread with a list of changes. The post in the thread will cause a bump - but since bumps don't always mean updates this is a good idea.
Initial observation.
With setting i/o to deadline i did not see my phone go into deep sleep much last night.
Today using noop the phone seems to sleem more often
Drew
drewdatrip said:
Initial observation.
With setting i/o to deadline i did not see my phone go into deep sleep much last night.
Today using noop the phone seems to sleem more often
Drew
Click to expand...
Click to collapse
Hmm... Interesting. That might be part of why battery life in CM7 on my Infuse seemed to be less the last time I used it, I never got tweak_scheduler.sh running on that.
Default in this kernel is CFQ, I've added BFQ but I've had bad things happen when it's the default at boot.
Is this a common issue that we're supposed to be having? Sleep of deaths? I haven't gotten any since I started using your kernel.

[KERNEL] UniKernel v8-0002 COH9 [G920 /925]

~~~~S6 UniKernel~~~~​
For Galaxy S6 920 F / I / S / K / L / T / W8 ​For Galaxy S6 925 F / I / S / K / L / T / W8 ​
For Lollipop 5.1.1 only! ​
UniKernel Features
- Supports F / I / S / K / L / T / W8 variants of 920 AND 925 devices
- Supports 920FS, ID and SD Dual SIM devices
- All edge screen special functions on Edge devices working
- Built from official Samsung Sources
- Full init.d scripting support
- SE Linux set to permissive (will prevent private mode from working)
- Stock Clocks
- Fully working Auto-Root for all 5.1.1 roms
- BusyBox injection if not detected in ROM
- DriveDroid support
- CIFS / FUSE
Kernel Configuration
The TWRP flashable kernel now comes with an Aroma installer, allowing you to choose a configuration you prefer. It also comes with 3 preset options - Stock, Performance, and Battery.
The Stock preset will make the kernel behave exactly as a stock kernel - no turbo mode, CFQ scheduler, stock interactive
If no pre-existing configuration file is found on the phone, (ie - New ROM flash) the ODIN flashable kernel will also have stock behaviour.
Every Aroma option is clearly labelled with an accurate description of what the setting will change. You are free to reflash to change configurations or manually edit the /system/unikernel.prop file that is generated by the installer (and then reboot). If you choose either the performance or custom options and enable Turbo mode, do not post in this thread about poor battery life. Turbo mode costs battery. deal with it
Download
UniKernel v8-0002 TWRP FLASHABLE >>> https://www.androidfilehost.com/?fid=24052804347808102
UniKernel v8-0002 ODIN FLASHABLE >>> https://www.androidfilehost.com/?fid=24052804347808101
If you get any FCs after flashing this kernel, wipe cache and dalvik cache in TWRP and reboot.​
Changelog
UniKernel v8-0001
- Updated to COH9 Sources (New WiFi Driver and sensorhub firmware amongst other things)
- Fixed CIFS support
- Slight modification to ramdisk tweaks when a non-stock configuration is used
UniKernel v8-0001
- Updated to COH2 Sources
- Rewritten unification code
- Aroma Installer with preset and configurable options (Stock, Performance, Battery, Custom)
- ALL 5.1.1 ROMs are supported, even early versions, ie - BOFj / COF6
Sources
UniKernel >>> https://github.com/glewarne/S6-UniKernel
Credits
Source contributors
@ktoonsez - Major contributor to universal patch set
@edgarf28 - Relentless Testing testing testing, help and suggestions
@Xileforce - Help, encouragement and some code bits
@mikeyinid - Help, DHA tweaks
AndreiLux - Permissive mode patch and some other bits
Awesome Testers
@-Mr. X- for relentless and speedy testing
@sswagonman - Primary 925 feedback
Kyle - For not sucking any more
Robert - Primary 925 feedback
Steve - Primary 925 feedback
Other Credits
@Chainfire - For SuperSU included in the kernel
Disclaimer
You, the User, Accept full responsibilty for anything you choose to flash to your own device. I cannot be held responsible for any loss of data, income, revenue, software or hardware damage that may occur due to the use, or attempted use of this kernel.
reserved
Okay tried on the Canadian 920W8 and no call audio and Network Settings gets replaced with Sim Card Manager. LTE icon doesn't show anymore but data works!
Elisha said:
Okay tried on the Canadian 920W8 and no call audio and Network Settings gets replaced with Sim Card Manager. LTE icon doesn't show anymore but data works!
Click to expand...
Click to collapse
Yeah, to be expected. the defconfig in the kernel sources I used was specific to the international versions only. I will need to download the sources for the T variant (and maybe W8) and examine them for file differences and defconfig differences. gonna take some time. However, i I can build a working one its easy to build 2 simultanoeusly for upload in the future. only takes 5 mins per kernel.
thanks for testing though!
No problem.
If I flash back the stock kernel, will there be any leftovers from your kernel in the system?
So far no problem at all. Good work. I hope that some talented dev could port to our galaxy savoca color calibration... Thanks.
mcreego said:
So far no problem at all. Good work. I hope that some talented dev could port to our galaxy savoca color calibration... Thanks.
Click to expand...
Click to collapse
great to hear! thankyou
Hi , what about performance ? is it really more fluid than the stock one ?
thanks
Works like it should. Thank you for your work and time spent!
I don't see ktoonsez in your credits. Since you copied his voltage control.
jordan.elliott said:
I don't see ktoonsez in your credits. Since you copied his voltage control.
Click to expand...
Click to collapse
1) not released yet
2) originator is on the github commit
3) is actually made by Andrei lux
There is no need to credit every kernel contributor in existence especially if those commits are tagged
Um. ktoonsez spent hours trying to get the voltage control to actually apply. It was being overridden by touchjizz rom on every boot. I was one of his testers. It took about 4 hours. It wasnt just a copy paste.
jordan.elliott said:
Um. ktoonsez spent hours trying to get the voltage control to actually apply. It was being overridden by touchjizz rom on every boot. I was one of his testers. It took about 4 hours. It wasnt just a copy paste.
Click to expand...
Click to collapse
that may well be the case. however, as I said previously, the commits on my github from today are on code that has not been released yet. You can see the released kernel with the defconfig v01a commit and comment (last one pushed yesterday)
perhaps im using voltage control sysfs for some internal testing? maybe ill remove it before release? maybe i am going to release it in the future? maybe i would have given credit, as I have everyone else on the *curerntly released* code.
I will not enter into any further discussions with you on this matter. If you wish to report my thread please do go ahead. as it stands right now, i am 100% in compliance with both the stickies at the top of this very thread and XDAs very clear GPL rules.
The OP has not violated the GPL or xda rules by using kernel code from other developers. First because he hasn't released that code as a binary yet, and second he has not squashed the original authorship out of his sources. This satisfies the GPL and xda's rules on giving credit.
It is simply not possible to list all the kernel contributors in the OP...the list is way way way way too long.
If there are any more issues about the GPL, credit, sharing, etc. Please PM me about them.
Thanks!
OK everyone
After a bit of a delay due to computer issues, i have a new kernel ready for beta testing. Anyone interested?
Built in OC to 1.6GHz on .LITTLE and 2.3GHz on .big cores
lots of fixes and boosts
very very smooooooth
Bring it on. I would love to overclock 53 but tone down the 57 ones, it's possible with a tuner I belive?
Sent from a mobile gadget...
g.lewarne said:
OK everyone
After a bit of a delay due to computer issues, i have a new kernel ready for beta testing. Anyone interested?
Built in OC to 1.6GHz on .LITTLE and 2.3GHz on .big cores
lots of fixes and boosts
very very smooooooth
Click to expand...
Click to collapse
Can I test ? ?
sure ill have a beta up for you guys later tonight
ok, beta kernel time!
download here: https://www.androidfilehost.com/?fid=23991606952601582
some changelog:
BFQ scheduler default
increased bus frequency on apollo and atlas cores
enabled Mali 772Mhz GPU maximum
lots of kernel patches
framework for fixed overclock implementd (though not enabled in this build)
reduced readahead (is actually faster)
tweaked interactive and ondemand governors - interactive is now default again
please test for general stability and performance, I will released a overclocked version soon maybe
sources: https://github.com/glewarne/Galaxy_S6_920F_Kernel_v2

[KERNEL][AOSP][AnyKernel][LOS-14.1+EAS] Gamma Kernel for [All Lineage Variants]

{
"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"
}
DESCRIPTION
Hey guys, I have started a custom Kernel based on LineageOS sources with 98% CAF. So I would like to share my own performance and usability improvements with minimal feature and enhancements on top. The intention is to have a minimal light-weight kernel that is very fine tuned for the device.
FEATURES
Minimal Kernel with a stripped defconfig base to be more streamlined and have less memory footprint
User space display color calibration (KCAL) with screen calibrated against iPhone 8 Plus, also helps reducing screen retention
Schedutil governor making use of EAS features with updates from Linux 4.4 and 4.12
Up to date with LineageOS sources for maximum compatibility and security bugfixes
Memory and cache subsystem optimizations, you will feel it
Adaptive LMK enabled by default
Transparent Hugepages are enabled
ZRAM/Swap partition is disabled by default
BFQ IO scheduler set by default to avoid slow-downs on task intensive scenarios
No overclocking was chosen to avoid unnecessary heat, optimizations were focused on other different areas
Kernel Samepage Sharing enabled with deferred timer by default to gain some memory usage optimizations, the process sleeps on regular basis and I've profiled it so that there's no battery drains due to it
Simple temperature controls for msm_thermals exposed
Compiled with GCC 6.x optimized toolchain and -O3 plus other hardware specific flags
Undervolted the Adreno 530 GPU voltage rail to keep things cooler
CAF Rebase on major portions of the Kernel has helped lower the memory footprint a lot
ES9218 Quad DAC automatic toggling working inside the kernel for headphone HIFI playback, please read here for details
DOWNLOADS
AnyKernel: Click Here (Or check top of the post, download tab)
(Optional) LineageOS 14.1 Netflix Black Screen Fix : Click Here
(Optional) Updated Adreno Drivers by @BlackSoulxxx : Click Here
SOURCE
V20-Kernel-Gamma GitHub Source
NOTES
Here is a GeekbenchV4 result example : http://browser.geekbench.com/v4/cpu/7618872
These is intended to be used primarily with LineageOS, I have not tested other ROM's
Since LineageOS uses a way newer Bluetooth stack, this Kernel will most likely not work on old ROM's such as ResurrectionRemix
This will not work with LineageOS 15.1, please see the other thread
KNOWN BUGS
When using v1.0.0 will fail to boot if you had Magisk previously installed. Please install something newer if using Magisk.
When using v13.0.0 - v15.x.x infrared remote control will not work.
I would also like to thanks to various people who contribute tremendously such as:
@x86cpu
@EvilHowl
@USA-RedDragon
@savoca
@albinoman887
@emdroidle
@Rashed97
@joshuous
@RenderBroken
and many others!
<< If you like my work here is my hat, please donate! >>​
​
XDA:DevDB Information
Gamma Kernel, Kernel for the LG V20
Contributors
Omar-Avelar
Source Code: https://github.com/oxavelar/V20-Kernel-Gamma
Kernel Special Features:
Version Information
Status: No Longer Updated
Current Stable Version: 46.0.0
Stable Release Date: 2018-07-11
Created 2017-12-10
Last Updated 2018-10-22
CHANGELOG
46.0.0 - Started msm_irqbalance by default on boot, disabled lp11 and enabled allow mdss phy powerdown during idle screen.
45.0.0 - Smoother memlat ramp and tuned the schedTune DVR cpusets a bit for better performance overall.
44.0.0 - More deep sleep enhancements.
43.0.0 - Update to Oreo TouchScreen firmware and more MDSS PLL merge fixes that help deep sleep.
42.0.0 - Missing MDSS Oreo merges are now in place.
41.0.0 - Added IPA_WS as a default in the wakelock blocker, as well as enabling CONFIG_PM_SLEEP which if missing would in turn cause some ueventd wakeups.
40.0.0 - Disabled CONFIG_RMNET_DATA_DEBUG_PKT. Full fix for USB OTG and added missing slimport drivers. Tweaked the random wakeup values, added some extra cpusets based on Marlin's android-cts-8.0_r8/init.common.rc and fixed some BFQ IO possible hang.
39.0.0 - Disabled CONFIG_RMNET_DATA_DEBUG_PKT. Full fix for USB OTG and added missing slimport drivers.
38.2.0 - Removed LGE's battery manager alarms.
38.1.0 - Fixed potential wireless packet loss.
38.0.0 - Further tweaked the wlan_rx_wake wakelock, migrated the audio and thermal workers to power efficient queues, and added an arm64 prefetching optimization for memcpy.
37.0.0 - Better deep sleep enhancements with the charger infrastructure borrowed from the V30 Kernel Oreo sources.
36.0.0 - Full fix for 6a00000.ssusb wakelocks while keeping fast charging enabled.
34.0.0 - Added boeffla_wl_blocker to tame NETLINK wakelock, this wakelock is caused by IPC between the wireless driver in the Kernel and Android. This was the reason why when on wireless the battery would drain more compared than radio. Also disabled OTG as this keeps the phone from deep-sleeping for now.
33.0.0 - Enabled OTG.
32.0.0 - Fixed a bug from Oreo merge that causes video to go green and crash sometimes. Disabled ZRAM from the compilation rather than AnyKernel patch.
31.0.0 - Merged some V20 Oreo Kernel changes in, as well as some DAC enhancements to prevent popping, better USB PD and QC 2.0/3.0 charging code.
30.0.0 - Oreo Kernel changes in, trying to unify the Kernel to keep support for a little while on 14.1.
29.0.0 - Merged msm idle from Linux 4.4 as well as full EAS 1.4 support from Linux 4.4, reduced the memory subsystem timer ramp values for speedier operation.
27.0.0 - Enabled wifi.supplicant_scan_interval on boot, and disabled IPv4 TCP Timestamps and ICMP responses as well as CCKM fast secure roaming.
26.0.0 - Full EAS 1.4 from Wahoo (Pixel 2XL) backported.
25.0.0 - Updated EAS (schedutil, walt, fair scheduler) to be in sync with Wahoo (Pixel 2XL) latest changes.
24.0.0 - Fixed another performance regression in multi-core scores within schedutil.
23.0.0 - Screen brightness is 50% while booting to reduce heat when it is regenerating cache on boot. v22.1.0 was 25% but this was barely visible if you were rebooting under direct sunlight. So went for the safe value.
22.1.0 - Reduced the screen brightness while booting to reduce the heat of the device during cache wipes.
22.0.0 - WALT and schedutil cpufreq commit fixes backported from RenderBroken.
21.0.0 - The GPU Voltage rail undrervolt is now ~60 mV, do not see any problem and games run way cooler.
20.0.0 - After feedback on frequency utilization/distribution I've put 3 WELT commits that should help alleviate this. And enabled some extra configurations from our wireless driver for better power savings.
19.0.0 - Trimmed around ~40 mV from the GPU voltage rails, and updating the wireless stack to DHD 1.80.13 - 2017.06.22, from us997 V16a.
17.0.0 - Increased the multi-core benchmark scores.
16.1.0 - Reverted the binder to be Nougat only, since Oreo support will be on a separate Kernel anyway. Fixed the Infrared Remote Control support that I had broken, and tuned the memory scaling to be more responsive.
15.0.0 - More audio fixes. This audio CAF merging has fixed the speaker-phone that suddenly stops recording or suddenly stops recieving audio from the phone call in LineageOS. Also have increased the schedutil timer values to be similar to the Pixel 2 XL (Wahoo). And finally have fixed a CONFIG_LGE_PM_LGE_POWER_CLASS_CHARGER_SLEEP problem, so that the charger module now sleeps better and uses less power in idle.
14.0.0 - Updated WALT (Window Assisted Load Tracking) fixes aggregated by RenderBroken. Fixed an audio bug introduced in 13.0.0 where headphone insertion could change the sampling rate of other audio sessions. Changed again the schedutil timer values to favor benchmarks a tiny bit and increased the external SD read-ahead and minimum number of requests so that there is better merging when using slow SD cards while keeping the internal storage device in a low-latency configuration.
13.0.0 - Merged CAF audio upstream changes and enabled transparent hugepages.
12.0.0 - Tuned the memory subsystem frequency scaling parameters further down to focus on batter savings as well as the EAS timers.
11.0.0 - Added cpuidle optimizations to idle more, bumped up the memlatency trigger.
10.2.0 - Reintroduced back QuickCharge 2.0 and QuickCharge 3.0 fast charging support into the Kernel.
10.0.0 - Bumped up the Kernel to version 3.18.71.
9.0.0 - Full arm64 arch CAF update done to the Kernel based on CAF LA.UM.6.5.r1-05300-8x96.0. Added support for H918 variant too.
8.2.0 - Partial update to get the Kernel in a big percent that of CAF LA.UM.6.5.r1-05300-8x96.0, no bugs introduced and using a CAF / LineageOS kernel base. Using the binder interface that works both for Android Oreo and Nougat to be prepared for Lineage15. Also fixed a bug that I had introduced in previous versions related to wireless access point, hence why I had pulled versions 7.x from the server.
4.1.0 - Reintroduced into the LineageOS kernel the partial-update in the panel, to gain some power savings and overall performance feeling when refreshing the panel and screen elements.
4.0.0 - Raised the EAS schedutil timers and the memlat governor threshold to kick in faster. This will bring up the responsiveness to similar levels to HMP even when still using EAS. Brought back KSM after profiling on battery utilization, it doesn't hurt as long as a the timer value is between 4000.
3.0.x - Bugfixes and testing with Magisk compatibility, I think there are no more compatibility problems with Magisk after this, had to remove KSM for testing.
1.0.0 - Initial version, with KCAL, and streamlined defconfig based on cm-14.1 kernel sources and minor commits on top.
Omar-Avelar said:
DESCRIPTION
Hey guys, I have started a custom Kernel based on LineageOS sources to get and share my own performance improvements up and adding minimal feature and enhancements on top. The intention is to have a minimal light-weight kernel that is very fine tuned for the device.
FEATURES
Minimal Kernel with a stripped defconfig base to be more streamlined and have less memory footprint
User space display color calibration (KCAL) with less blue tints by default
Schedutil governor making use of EAS features
Up to date with LineageOS sources for maximum compatibility and security bugfixes
Memory and cache subsystem optimizations, you will feel it
Adaptive LMK enabled by default
ZRAM/Swap partition is disabled by default
BFQ IO scheduler set by default to avoid slow-downs on task intensive scenarios
No overclocking was chosen to avoid unnecessary heat, optimizations were focused on other different areas
Kernel Samepage Sharing enabled with deferred timer by default to gain some memory usage optimizations, the process sleeps on regular basis and I've profiled it so that there's no battery drains due to it
Compiled with GCC 6.x optimized toolchain and -O3 plus other hardware specific flags
Re-introduced stock thermal values and engine for a safer device operation
DOWNLOADS
1) AnyKernel: Click Here (Or check top of the post, download tab)
2) EAS-Project OP3 Prebuilts Flashable : Click Here
3) Thermal Engine Flashable : Click Here
SOURCE
V20-Kernel-Gamma GitHub Source
NOTES
These is intended to be used primarily with LineageOS, I have not tested other ROM's
Please flash all *.zip's mentioned in the download sections for optimal results
KNOWN BUGS
Hopefully none
I would also like to thanks to various people who contribute tremendously such as:
@x86cpu
@EvilHowl
@USA-RedDragon
@savoca
@albinoman887
@emdroidle
@Rashed97
and many others!
<< If you like my work here is my hat, please donate! >>
​
XDA:DevDB Information
Gamma Kernel, Kernel for the LG V20
Contributors
Omar-Avelar
Source Code:https://github.com/oxavelar/V20-Kernel-Gamma
Kernel Special Features:
Version Information
Status: Testing
Current Stable Version: 1.0
Stable Release Date: 2017-12-09
Created 2017-12-10
Last Updated 2017-12-09
Click to expand...
Click to collapse
I don't know how 'in-depth' testing I can do. But I'll be willing to do what I can!
I'll be flashing this soon.
I'm on Desolation ROM, VS995. I'll report back. Thanks for your hard work!
Edit: not necessarily a problem, but it has static on boot.
nightra88 said:
I don't know how 'in-depth' testing I can do. But I'll be willing to do what I can!
I'll be flashing this soon.
I'm on Desolation ROM, VS995. I'll report back. Thanks for your hard work!
Edit: not necessarily a problem, but it has static on boot.
Click to expand...
Click to collapse
Oh, I didn't compile specifically for VS995 so it will have static on boot. Since these two are mostly the same devices I might give u a VS995 Kernel next week with that static gone.
Here are some Geekbench results in case anyone is interested : http://browser.geekbench.com/v4/cpu/5506983
Great to have someone finally building an AOSP kernel!
Any chance you'll be compiling for the H918 sometime in the future? No worries if you aren't. I'm just curious =p
Omar-Avelar said:
Oh, I didn't compile specifically for VS995 so it will have static on boot. Since these two are mostly the same devices I might give u a VS995 Kernel next week with that static gone.
Click to expand...
Click to collapse
That sounds great! I'll look forward to it! But I'm about 12-14hrs in the kernel now, and so far so good! With normal usage.
Have updated Kernel to 1.1.0 version with two minor changes that improve the performance by quite a big. Figured out the OP3 and the Marlin Kernel was using 300 Hz tick timers. But for some reason our Kernel was only using 100 Hz tick's. So two changes in this version.
1. Enable high-res timers for schedulercks
2. arm64: hz: make it configurable
Click to expand...
Click to collapse
Plus I have decided to go on and change the perfd binary again. I was not aware how much of impact this has to EAS and the fluidity, since with EAS the input freq boost in the Kernel is now gone. You can read more about it here : https://github.com/EAS-Project/android_device_voxpopuli in the README.md. I am not yet using 100% of the capabilities of Vox Populi Power HAL but a lot of features from it turned off for now.
NippleSauce said:
Great to have someone finally building an AOSP kernel!
Any chance you'll be compiling for the H918 sometime in the future? No worries if you aren't. I'm just curious =p
Click to expand...
Click to collapse
Most likely yes, but after I polish a few features and once I am 100% happy with the performance
Hmm... Oddly enough if I install I get stuck into a boot loop. Not even a LineageOS boot animation. I am and will continue to use Magisk, even flashed all 3.
x86cpu said:
Hmm... Oddly enough if I install I get stuck into a boot loop. Not even a LineageOS boot animation. I am and will continue to use Magisk, even flashed all 3.
Click to expand...
Click to collapse
Oh shoot... I haven't tested it with Magisk on top myself, I wonder if I removed some thing in the defconfig that Magisk needs... Mmmm, both versions give u that same outcome ? Thx for the report!
Omar-Avelar said:
Oh shoot... I haven't tested it with Magisk on top myself, I wonder if I removed some thing in the defconfig that Magisk needs... Mmmm, both versions give u that same outcome ? Thx for the report!
Click to expand...
Click to collapse
I only tried the latest one. I did not try without Magisk though or the older version, the all 3 reference was all 3 files you had. gamma/vox/thermal.
I noticed in your thermal, that the camera files are the same as Lineage, so you could take those out. I also took out the mixer one as I bumped those VOL up as it was hard to hear on calls without it. If you do find any adjustments that the op3 or marlin did, we might be able to get those into the Lineage msm8996 kernel. Ideally, the commits from op3 in the Lineage tree, then I can cherry pick it to preserve history. I'm all for getting things into Lineage where we can.
Omar-Avelar said:
Oh shoot... I haven't tested it with Magisk on top myself, I wonder if I removed some thing in the defconfig that Magisk needs... Mmmm, both versions give u that same outcome ? Thx for the report!
Click to expand...
Click to collapse
I flashed with Magisk, on the first version, and everything is going fine for me
nightra88 said:
I flashed with Magisk, on the first version, and everything is going fine for me
Click to expand...
Click to collapse
Thanks man, let me re-upload the 2nd version just in case then and will verify the MD5 hash...
Omar-Avelar said:
Thanks man, let me re-upload the 2nd version just in case then and will verify the MD5 hash...
Click to expand...
Click to collapse
No problem! Glad to help.
x86cpu said:
Hmm... Oddly enough if I install I get stuck into a boot loop. Not even a LineageOS boot animation. I am and will continue to use Magisk, even flashed all 3.
Click to expand...
Click to collapse
So I got home to try just in case @x86cpu and I was able to flash Magisk-v14.5(1456).zip after all of the 3 files had been flashed on my system and it booted fine.... so I've re-uploaded the Kernel as v1.1.1 in the downloads section just in case...
Wiped /system (as I had su from LineageOS flashed before)
Flashed system with lineage-us996-*.zip
Flashed OpenGapps
Flashed perfd update (2nd of my zips)
Flashed the 'hotfixes' (3rd of my zips)
Flashed gamma-kernel (1st zip)
Flashed Magisk-v14.5(1456).zip
Hit reboot
If you can let me know if the v1.1.1 version works on your side then I can blame the bad upload. If not I can do more experiments to see if there is some other condition that depends on the order of flashing with my AnyKernel approach... and then I can try and replicate and fix it , please do let me know...
UPDATE: I am able to hit the failure now @x86cpu... let me see if AnyKernel needs any update or something to allow to re-install the Kernel if Magisk is already pre-installed. In order to hit it I had to:
Wiped /system (as I had su from LineageOS flashed before)
Flashed system with lineage-us996-*.zip
Flashed OpenGapps
Flashed perfd update (2nd of my zips)
Flashed the 'hotfixes' (3rd of my zips)
Flashed Magisk-v14.5(1456).zip
Flashed gamma-kernel (1st zip)
Hit reboot
Essentially flashing the Kernel last... which might be a common thing that could happen, let me polish that up...
I've uploaded flashable-us996-gamma-kernel-v1.2.0.zip now with an updated AnyKernel script that seems to now be working even with Magisk installed previously. Thanks to @x86cpu for reporting this bug.
U
Omar-Avelar said:
So I got home to try just in case @x86cpu and I was able to flash Magisk-v14.5(1456).zip after all of the 3 files had been flashed on my system and it booted fine.... so I've re-uploaded the Kernel as v1.1.1 in the downloads section just in case...
Wiped /system (as I had su from LineageOS flashed before)
Flashed OpenGapps
Flashed the 'hotfixes' (3rd of my zips)
Flashed Magisk-v14.5(1456).zip
Wiped /system (as I had su from LineageOS flashed before)
Flashed OpenGapps
Flashed the 'hotfixes' (3rd of my zips)
Flashed gamma-kernel (1st zip)
Hit reboot
Essentially flashing the Kernel last... which might be a common thing that could happen, let me polish that up...
Click to expand...
Click to collapse
I just installed the v1.1.1 before the fix. So. In other words before I saw this update, I just flashed it with no wiping, Desolation rom, and it booted fine, it's just now, in Magisk I can't pass cts or basic integrity. I'll try your updated method and see if that fixes the problem.
Edit: did the above steps, minus wiping twice and flashing the hot fixes twice. Rebooted it. And now I can successfully pass safetynet on the latest gamma kernel!
Edit#2: false hope, my apologies, safetynet apparently isn't passed.
Edit#3: okay. I had a blonde moment. I forgot to wipe my dalvik. It passes now.
What do the HAL's do? And what order should I flash the zips?
Obamaloominaty said:
What do the HAL's do? And what order should I flash the zips?
Click to expand...
Click to collapse
The order doesn't matter as they are independent. And I would suggest you read about the EAS perfd HAL in here : README.md
However keep in mind that I haven't implemented all of the VoxPopuli features from the HAL in the AnyKernel as it needs some SELInux permissions updates (which I can do later on). But without all of those enhancements it will behave like the Pixel HAL.

[KERNEL] [8.1.0/9.0] Endurance Kernel V2.0.27 / V1.2.33 [Linux 4.9.190] [CSG5 / ASB1]

Endurance Kernel • Galaxy Note 9​
Endurance Kernel was designed by me with the goal of providing a much more responsive user experience whilst simultaneously conserving the devices battery as much as possible. This kernel is a port of Endurance Kernel, recreated for the Galaxy Note 9. The kernel is largely adjustable in the paid app EX Kernel Manager (EXKM) by flar2 or in the free app MTweaks by Morogoku. Please note, I don't actually own a Note 9!
DISCLAIMER - I am not responsible for any harm that may come to your device as a result of flashing this kernel. I am however happy to provide support if required.
Downloads
1.x.x indicates the kernel should be used with an Oreo based firmware. 2.x.x indicates the kernel should be used with a Pie based firmware.
Latest GitHub Release
MEGA Repository
Key Features
Latest ELS (almost) always merged in
Implemented AndreiLux’s custom scheduling, EAS backports, 16ms PELT half-life, and migration hysteresis filter
Hotplugging enabled
Boeffla wakelock blocker supported (default list tweaked for improved deep sleep)
Support GPU overclocking up to 598MHz on all builds
Adapted notification LED fade support from NX Kernel from the Galaxy S8
Enabled fsync on / off support (on is default and recommended)
DoubleTap2Wake, Sweep2Wake, Sweep2Sleep & RGB colour control
CFQ (stock and kernel default), deadline, noop, FIOPS, SIO, Zen, Maple and BFQ support
Westwood (kernel default), bic (stock), cubic, reno, htcp, lia, veno and olia TCP congestion algorithms enabled
9.0 AOSP support
Several kernel optimizations from Notorious Kernel
WireGuard Support
DriveDroid Support
SELinux set to enforcing
F2FS support
Unofficially supported adjustable SELinux status through the 'Magisk SELinux Manager' module or # setenforce 1 or 0
Disabled irrelevant or unused Samsung security and features
Disabled almost all logging, debugging and tracing
Various patches to improve performance and battery
No bull****!
Detailed Overview
The PELT half-life has been reduced from 32ms (stock) to 16ms which greatly improves device responsiveness, alongside the use of updated custom scheduling, both thanks to Andrei Frumusanu’s amazing work on the kernel. For a more up to date reference on the performance of the Exynos 9810, look at Andrei's investigation comparing the Exynos Note 9 to the Snapdragon Note 9.
This kernel supports overclocking. In order to use overclocking, simply flash the OC zip from the Android File Host folder.
The overclock build will now use big cluster (M3) quad / triple frequencies up to 2106MHz, dual frequencies up to 2416MHz and single frequencies up to 2964MHz. The small cluster has now also been overclocked to 2002MHz. The overclock build also modifies Andrei's conservative frequencies in order to utilise the higher frequencies more. There is no guarantee that your battery will perform well with overclocking, nor your device will be safe running above stock frequencies. Use at your own risk.
Notification LED fade support has also been added and enabled by default. The fade can be turned on and off and have fade in and out speed adjusted in EXKM or MTweaks. Additionally, in both EXKM and MTweaks such as fsync on / off support, DoubleTap2Wake, Sweep2Wake, Sweep2Sleep & RGB colour control.
This kernel unofficially supports (but I typically strongly advise against the use of) a permissive SELinux status through the 'Magisk SELinux Manager' module.
GSI / AOSP Kernel
The kernel supports 9.0 AOSP GSIs. These builds are entire ports of Endurance Kernel that have been adapted for AOSP, hence any changes that are made to the base kernel will almost always also be included in the AOSP kernels.
If SafetyNet is failing, this can be worked around to allow SafetyNet to pass. You will need the 'MagiskHideProps' module installed. After rebooting, using a Terminal Emulator app enter the following commands in the order listed without quotation marks.
Type 'su'
Type 'props'
Type '1' to edit the device fingerprint
Type 'f'
Type '13' to select Samsung
Type '24'
Reboot
Due to the sheer diversity of AOSP GSIs, it is important to ensure you are concise when reporting an issue. Before you report an issue ensure you explicitly state the variant of the kernel you are using, as well as the ROM, firmware and vendor once you have ensured the ROM is compatible with the kernel. If these requirements are not met, you may receive support for the wrong platform or no response at all. It is preferred that you ask in the relevant telegram group prior to publishing on the XDA thread if possible.
Telegram Groups
If you're joining the Telegram group for support, please read the FAQ first!
Endurance Kernel Discussion / Support Group - https://t.me/endurancekernel
Endurance Kernel News Channel - https://t.me/endurancekernelnews
Credits
A huge thank you to everyone involved in the production of this kernel. Particularly a few names I would like to mention.
ianmacd - For creating A Pretty Good Kernel and doing all the hard work for me, as well as being a fantastic mentor who has assisted me through every stage of this kernel. My words understate my appreciation for your efforts.
AndreiLux - For pushing the device to its limits in many regards and paving the pathway from which many other devs, myself included rely on, and for assisting me in the production of the kernel.
farovitus - For his vast efforts included in the development of Notorious Kernel and for providing inspiration of changes and commits to include in the kernel as well as making another great kernel before the production of Endurance Kernel. Also thanks for maintaining ELS and keeping it simple for me!
flar2- For his fantastic EXKM app, and all his work from ElementalX included in APGK such as wake / sleep gestures and RGB colour control.
djb77 - For inspiring a few additions to the ramdisk and for being another fellow Aussie.
Freeza - For allowing the use of his installation script and for aiding in the issues faced in the early stages of kernel development.
Chrisaw - For being an exceptionally thorough and generous beta tester and for basically doing the hard troubleshooting for me. I can't say thanks enough for the time and effort you put into the kernel.​
Huge thanks to everyone else who was involved in development of the kernel, and helped me during the stages of instability in the early phases of this kernel. You know who you are!
And of course, everyone involved in mainline Linux development!
Additonally
Lord Boeffla for Boeffla Wakelock Blocker
franciscofranco for fsync on / off support
Ktoonsez for initially introducing Notification LED fade support.
Noxxxious for making it easier to adapt Notification LED fade to the S9!
osm0sis for Android Image Kitchen
If I included your work and forgot you, let me know and I’ll add you to the credits list!
Source - https://github.com/eamo5/crownlte-endurance
Click here to donate! I used to not accept donations but while I'm undertaking my degree, a small donation could go a long way.
OneUI Current Build Changelog
V2.0.27
Linux 4.9.190
CSG5 kernel source and ramdisk
Converted GPU workqueues to kthreads (thanks farovitus)
Previous Changelogs
V2.0.26
Linux 4.9.186
CSFC source and ramdisk
Removed various unneeded drivers
Disabled swap on AOSP
AOSP 2.0 build works again
V2.0.25
Linux 4.9.185
V2.0.24
Linux 4.9.184
AOSP 2.0 based kernel appears to be broken for now, I will try to address this ASAP
V2.0.23
Linux 4.9.183
Addressed some regressions from the previous build
I forgot to update the kernel version lol
V2.0.22
Linux 4.9.182
CSF9 kernel source and ramdisk
Several improvements to ashmem, binder, SELinux dynamic memory allocation, IRQs & qos from Sultanxda
V2.0.21
Linux 4.9.180
V2.0.20
Linux 4.9.179
Cross compiled with GCC 9.1
Fixed instability in 4.9.178
V2.0.19
Linux 4.9.177
CSDJ ramdisk (kernel source is identical to CSDE)
V2.0.18
Linux 4.9.176
Cleaned up defconfig
V2.0.17-1
CSDE kernel source and ramdisk
Unset CONFIG_DEBUG_KERNEL (and it's dependencies)
Optimised F2FS configuration
V2.0.17
Linux 4.9.175
Fixed F2FS
V2.0.16
Linux 4.9.174
F2FS support
V2.0.15
Linux 4.9.173
V2.0.14
Linux 4.9.172
Updated Gator driver to v6.9
V2.0.13
Linux 4.9.171
Unset CONFIG_AUDIT (reduce SELinux overhead)
Updated Gator driver to 6.8
V2.0.12
Linux 4.9.170
V2.0.11
Linux 4.9.169
V2.0.10
Linux 4.9.168
V2.0.9
Linux 4.9.166
Fixed 4.9.165 performance regression
V2.0.8
Linux 4.9.165
Reduced kernel size
Unset CONFIG_ION_EXYNOS_STAT_LOG
V2.0.7
CSC1 kernel sources
Linux 4.9.164
V2.0.6-1
Fixed lockscreen issue on CSC1 ROMs
V2.0.6
Linux 4.9.163
CSB3 kernel sources
V2.0.5
Linux 4.9.162
Unset approximately 15 CONFIG_TRACE & CONFIG_EXYNOS_SNAPSHOT related options
Linux 4.9.161
Set CONFIG_STRIP_ASM_SYMS
Unset CONFIG_BT_DEBUGFS
Unset CONFIG_USB_DEBUG_DETAILED_LOG
Unset CONFIG_DEBUG_ATOMIC_SLEEP
Unset CONFIG_SEC_BOOTSTAT
Unset CONFIG_SEC_UPLOAD
Unset CONFIG_SEC_DEBUG_PPMPU
Fixed an issue with the r8152 ethernet driver & updated the driver.
V2.0.3
Linux 4.9.160
Unset CONFIG_EXYNOS_CORESIGHT (and everything it unsets)
Unset CONFIG_DEBUG_LIST
Unset CONFIG_DEBUG_EXCEPTION_STACK
Unset CONFIG_TIMER_STATS
Unset CONFIG_DEBUG_NOTIFIERS_PRINT_ELAPSED_TIME
Suppressed additional minor logging
V2.0.2
Linux 4.9.159
Unset CONFIG_KSM
Unset CONFIG_SDFAT_DEBUG
Unset CONFIG_SCHED_DEBUG
V2.0.1-1
CSB3 ramdisk (fixes lockscreen loop on CSB3)
Kernel now requires CSB3 ROM
V2.0.1
Linux 4.9.158
V2.0
Linux 4.9.156
Minor tweaks to scheduling
V2.0 RC 4
Linux 4.9.155
V2.0 RC 3
Rebased on ELS 4.9.154
Tweaked conservative scheduling a bit more for a slightly better user experience.
V2.0 RC 2
Tweaked conservative scheduling for an improved user experience
V2.0 RC 1
Support Android 9.0 OneUI
Linux 4.9.59
CSA2 kernel sources
Can boot with and without Magisk
Full OC implementation
DriveDroid support
Conservative scheduling
Oreo and GSI Current Build Changelog
V1.2.33
Linux 4.9.190
Previous Changelogs
V1.2.32
Linux 4.9.186
Removed various unneeded drivers
V1.2.31
Linux 4.9.185
Reverted Simple LMK on AOSP builds as it doesn't appear to be making reclaims correctly atm.
V1.2.30
Linux 4.9.184
Introduced the latest stable Simple LMK from Sultanxda in AOSP kernels
V1.2.29
Linux 4.9.183
Addressed some regressions from the previous build
I forgot to update the kernel version lol
V1.2.28
Linux 4.9.182
Several improvements to ashmem, binder, SELinux dynamic memory allocation, IRQs & qos from Sultanxda
V1.2.27
Linux 4.9.180
V1.2.26
Linux 4.9.179
Cross compiled with GCC 9.1
Fixed instability in 4.9.178
V1.2.25
Linux 4.9.177
V1.2.24
Linux 4.9.176
Cleaned up defconfig
V1.2.23
Linux 4.9.175
Fixed F2FS
V1.2.22
Linux 4.9.174
F2FS support
V1.2.21
Linux 4.9.173
V1.2.20
Linux 4.9.172
Updated Gator driver to v6.9
V1.2.19
Linux 4.9.171
Unset CONFIG_AUDIT (reduce SELinux overhead)
Updated Gator driver to 6.8
V1.2.18
Linux 4.9.170
V1.2.17
Linux 4.9.169
V1.2.16
Linux 4.9.168
V1.2.15
Linux 4.9.166
Fixed 4.9.165 performance regression
V1.2.14
Linux 4.9.165
Unset CONFIG_ION_EXYNOS_STAT_LOG
V1.2.13
Linux 4.9.164
V1.2.12
Linux 4.9.163
V1.2.11
Linux 4.9.162
Unset approximately 15 CONFIG_TRACE & CONFIG_EXYNOS_SNAPSHOT related options
V1.2.10
Linux 4.9.161
Set CONFIG_STRIP_ASM_SYMS
Unset CONFIG_BT_DEBUGFS
Unset CONFIG_USB_DEBUG_DETAILED_LOG
Unset CONFIG_DEBUG_ATOMIC_SLEEP
Unset CONFIG_SEC_BOOTSTAT
Unset CONFIG_SEC_UPLOAD
Unset CONFIG_SEC_DEBUG_PPMPU
V1.2.9
Linux 4.9.160
Optimised scheduling
Unset CONFIG_MODULES
Unset CONFIG_EXYNOS_CORESIGHT (and everything it unsets)
Unset CONFIG_DEBUG_LIST
Unset CONFIG_DEBUG_EXCEPTION_STACK
Unset CONFIG_TIMER_STATS
Unset CONFIG_DEBUG_NOTIFIERS_PRINT_ELAPSED_TIME
Suppressed additional minor logging
V1.2.8
Linux 4.9.159
Unset CONFIG_SDFAT_DEBUG
Unset CONFIG_SCHED_DEBUG
V1.2.7
Linux 4.9.158
ARL4 Kernel Source
V1.2.6
Linux 4.9.156
V1.2.5
Linux 4.9.155
V1.2.4
Linux 4.9.154
DriveDroid support
Fixed Android System warning on boot on GSI and AOSP kernels
V1.2.3
Linux 4.9.153
Fixed several weird bugs related to booting including requiring Magisk to boot!
V1.2.2
Linux 4.9.152
V1.2.1
Linux 4.9.151
V1.2.0
Linux 4.9.150
Realigned defconfig closer with ELS to hopefully fix some issues
V1.1.9
Linux 4.9.149
Updated WireGuard importer
FAQ
A FAQ section will be established as kernel development progresses. If you have any explicit unanswered questions, feel free to ask away. If you must contact me due to an issue, please report your device variant, ROM, firmware, vendor and previous kernel.
1. I can’t unlock / boot my phone! What do I do?
If you're stuck in a lockscreen loop, make sure you're on a firmware with a matching ramdisk to the kernel. Do not mix a CSC1 kernel ramdisk with a CSA2 ROM for example. Anytime the ramdisk is changed, it will be listed in the changelog. Are you on the correct firmware and vendor? If not, you can always flash this zip or revert back to previous versions through the Android File Host folder. Can anyone else successfully flash the kernel? If yes, verify the MD5 sum by referencing and ensuring a matching MD5 sum between the local file and the Android File Host file. Did I just push an update? If yes, contact me on Telegram in the Endurance Kernel group for a faster response, and XDA for an eventual response. Does your ROM require a permissive SELinux status to boot? If yes, use the 'Magisk SELinux Manager' module to adjust your SELinux status. If none of this can solve your problem, contact me through the Endurance Kernel group.​
2. Why doesn't my camera work after flashing the kernel?
Verify that you are on the correct firmware, vendor and a ROM that supports the current kernels sources. If you are still encountering issues after verifying this is correct, then let me know! If you do not wish to update, you can maintain a version of the kernel that does support your ROM by reading the changelog and downloading the previous versions from the Android File Host folder​
3. Why doesn't my Bluetooth work after flashing the kernel?
Are you on a ROM that does not patch libsecure_storage, such as DevBase? If your Bluetooth is broken, the answer is probably. Instead you can use ianmacd's Magisk module 'libsecure_storage companion for rooted Samsung devices' or you can manually flash a zip to patch it yourself, without the need for Magisk.​
4. Why doesn't my WiFi work after flashing the kernel?
Make sure you have forgotten and rejoined all WiFi networks after installing the kernel if the device won't connect to the network. If the devices WiFi won't turn on at all, make sure you do not have ianmacd's 'libsecure_storage companion for rooted Samsung (Oreo) devices' installed. If you're still encountering issues, please contact me in the Telegram group or on XDA.​
5. Should I use the permissive or enforcing SELinux status?
The decision is yours. There is plenty of documentation available online outlining their differences. I strongly recommend enforcing, hence why permissive is not officially supported. Permissive is far less secure, and hence I do not condone the use of permissive. If you are using permissive, you should either have to due to a dependency or have another specific reason for doing so. eg. ROM requires disabled signature check. For most users, unless directed otherwise, use the default enforcing build.​
6. When will you update the kernel?
Once ELS is updated and the kernel is ready! This is just a side hobby and I do have a life outside of kernel development. Be patient, the update will arrive within a few days if not ASAP.​
7. Will you add CPU / GPU undervolting?
No, EAS (Energy Aware Scheduling) has mostly made CPU undervolting mostly irrelevant. Google EAS if you would like it find out more information as to why it is the case. I've included a detailed YouTube video outlining the scheduling mechanisms of EAS here. Currently, any GPU voltage control for Exynos 9810 devices does not work, hence I will not be including it in my kernel.​
8. Do I need to install Magisk?
Magisk is entirely optional with this kernel.​
9. Why does this kernel offer no additional governors?
Because most of them are unstable and cause the device to crash, as well as EAS' integration with schedutil and EHMP.​
10. Why does this kernel makes my device crash / battery poor / performance poor?
Because this kernel is still in beta. Since I can't personally verify anything with the kernel, it's possible there may be issues. If this is the case, report it on the XDA thread or Telegram group.​
11. Why is my WiFi performance worse when using this kernel?
This may be the case for some people. This kernel uses the Westwood+ TCP algorithm for enhanced WiFi speeds on certain networks. However there may be scenarios on poor signal networks, this TCP algorithm may cause packet loss at a greater rate than is default. This should hopefully not be an issue for anyone, however if it is, try using bic as default and contact me.​
12. Why is my battery still terrible?
Are you in an area with poor signal reception? Unfortunately that is one thing a custom kernel cannot compensate for due to the device modem having restricted access and also legal issues. That leaves us with optimizations that can only be done to the SOC of the device. How you use your device can also greatly lead to variation in battery stats. If you are in need of further battery, 'underclocking' is available and is explained in OP. If you want the best battery life, I advise you try out that build.​
13. Why does SafetyNet fail on the AOSP kernels?
This is a minor issue I don't believe I can address on my end. This can be worked around however to allow SafetyNet to pass. You will need the 'MagiskHideProps' module installed. After rebooting, using a Terminal Emulator app enter the following commands in the order listed without quotation marks.
Type 'su'
Type 'props'
Type '1' to edit the device fingerprint
Type 'f'
Type '13' to select Samsung
Type '23' or '24'
Reboot
14. How can I use F2FS?
To use F2FS, you must erase your data and format your data partition (and optionally cache partition) to F2FS using the N9 TWRP available here, even if you are on S9. From there you should be able to reboot your device and restore your data through a backup.​
15. Where can I donate?
I used to not accept donations but while I'm undertaking my degree, a small donation could go a long way. You can donate through my PayPal link here.​
Bluetooth connections does not stick. Latest oreo.
Edit: Install libsecure from magisk and the issue fixed.
burakgon said:
Can't connect to wifi. Bluetooth connections does not stick. Latest oreo.
Click to expand...
Click to collapse
Hmmmm the kernel is using the latest ramdisk. This wasn't an issue in any of my beta tests. What device model are you on? Anyone else?
Eamo5 said:
Hmmmm the kernel is using the latest ramdisk. This wasn't an issue in any of my beta tests. What device model are you on? Anyone else?
Click to expand...
Click to collapse
After connecting a different network, I could reconnect my old wifi. But after reboot bluetooth connections does not stick. Check with s pen.
burakgon said:
After connecting a different network, I could reconnect my old wifi. But after reboot bluetooth connections does not stick. Check with s pen.
Click to expand...
Click to collapse
You might need to use the libsecure_storage companion Magisk module to fix Bluetooth pairing on some ROMs.
Amazing!!! Bring Exynos back to the glory again... Golden Age is coming again for Exynos I knew there's alot of sh*t happening on kernel level with Exynos.... I'm glad you got it all sorted (nearly)
But... I will wait till you add or support GPU & CPU undervolt , CPU Overclocking as undervolting CPU will further increase battery life it is obvious
Thank you! For providing this kernel!! I will keep watching it till at least have an undervolting CPU & GPU support (I'm not asking for any ETA'S) Thank you again!
#Exynos is back
Nice to see this here! Kudos
Good job man, this kernel working very good and Good battery life.. on my N9 TW keep going bro
Da-BOSS said:
Amazing!!! Bring Exynos back to the glory again... Golden Age is coming again for Exynos I knew there's alot of sh*t happening on kernel level with Exynos.... I'm glad you got it all sorted (nearly)
But... I will wait till you add or support GPU & CPU undervolt , CPU Overclocking as undervolting CPU will further increase battery life it is obvious
Thank you! For providing this kernel!! I will keep watching it till at least have an undervolting CPU & GPU support (I'm not asking for any ETA'S) Thank you again!
#Exynos is back
Click to expand...
Click to collapse
The conservative scaling of frequencies should already return some battery life, but slightly worsen the scores of some synthetic benchmarks. This is counterbalanced by the introduction of 16ms PELT which will in return improve real world performance.
The OC build will be much more performance centred.
The UC build should reduce peak power drain, but most battery savings will occur in the standard build. As stated in the FAQ, undervolting is mostly irrelevant with EAS.
Trying to work out the script ATM with a talented Note 9 tester. Hopefully should be introduced soon
Eamo5 said:
The conservative scaling of frequencies should already return some battery life, but slightly worsen the scores of some synthetic benchmarks. This is counterbalanced by the introduction of 16ms PELT which will in return improve real world performance.
The OC build will be much more performance centred.
The UC build should reduce peak power drain, but most battery savings will occur in the standard build. As stated in the FAQ, undervolting is mostly irrelevant with EAS.
Trying to work out the script ATM with a talented Note 9 tester. Hopefully should be introduced soon
Click to expand...
Click to collapse
I'm really happy to hear that :victory: this is like a new year gift to my ears !:victory:
But I'm really sorry for not being specific... I know what you mean for the CPU undervolting is irrelevant I have readed the FAQ ....
But what about the GPU? Is undervolting is irrelevant for the GPU too? it is an achievement when maximizing GPU OC with undervolting since the GPU is the weakest part on the Exynos... a significant OC pump frequency with tweaking voltage will bring some performance pump on heavy graphics performance :fingers-crossed: see what I mean?
Waiting for your reply.... as your opinion matters to me alot
Again Thank you.. Thank you!
Da-BOSS said:
I'm really happy to hear that :victory: this is like a new year gift to my ears !:victory:
But I'm really sorry for not being specific... I know what you mean for the CPU undervolting is irrelevant I have readed the FAQ ....
But what about the GPU? Is undervolting is irrelevant for the GPU too? it is an achievement when maximizing GPU OC with undervolting since the GPU is the weakest part on the Exynos... a significant OC pump frequency with tweaking voltage will bring some performance pump on heavy graphics performance :fingers-crossed: see what I mean?
Waiting for your reply.... as your opinion matters to me alot
Again Thank you.. Thank you!
Click to expand...
Click to collapse
GPU Voltage control was originally ported over to the Exynos 9810 but the voltage control was seemingly broken. When GPU voltage control is working, I'll introduce it again. Underclocking the GPU and allowing to run at a lower minimum frequency is something I may eventually investigate and measure if there are any benefits.
Eamo5 said:
GPU Voltage control was originally ported over to the Exynos 9810 but the voltage control was seemingly broken. When GPU voltage control is working, I'll introduce it again. Underclocking the GPU and allowing to run at a lower minimum frequency is something I may eventually investigate and measure if there are any benefits.
Click to expand...
Click to collapse
Thank you :fingers-crossed::good:
Running this kernel for 24 hours. Battery life & smoothness improved. No problem yet. Stock latest oreo S2ARL3 Thank you.
Endurance Kernel V1.1.8
Happy New Years!
Linux 4.9.148
Fixed GPU minimum frequency on TW build
Download links updated in OP!
Eamo5 said:
Endurance Kernel V1.1.8
Happy New Years!
Linux 4.9.148
Fixed GPU minimum frequency on TW build
Download links updated in OP!
Click to expand...
Click to collapse
thank you sir.
to you and yours aswell
Eamo5 said:
Endurance Kernel V1.1.8
Happy New Years!
Linux 4.9.148
Fixed GPU minimum frequency on TW build
Download links updated in OP!
Click to expand...
Click to collapse
Nice! Happy New year to all XDA! Cheers :highfive:
Will see version for pie soon?

(EOL) [Kernel][04.10.21][Q:1.6.3][R:2.6.0] JimboK - Kernel for SM-8250 (S20 and Note 20 Snapdragon)

Hello!
I want to introduce my first custom kernel for the SM8250 family of Snapdragons. This is based of latest Samsung OneUI 2.5 Sources and I cherry-picked commits to make improvements to the stock base. I'm not a developer, but i really like to port stuff over .
I will try to have this Kernel updated as soon as new source tarballs are drop by Samsung. If you want to request for specific features, let me know and i'll do my best to bring them over.
Special Features:
Changelog is in post #2
How to Install:
First, make sure you are in any OneUI 2.5 (BTH* or BTI*) ROM and have TWRP on the device. Make sure you take a backup of your current boot partition in twrp, now install either the boot.img (extract from the tar file) or use ODIN to flash in Dowload mode. Please make sure to read Post #3 regarding issues with the current OS Patch Level. Images from 1.5.0 onwards are pre-rooted but you will probably need to update magisk either manually or by flashing latest magisk.zip file.
Keep in mind the following table to determine your phone model:
x1q = S20 - G981X
y2q = S20+ - G986X
z3q = S20U - G988X
r8q = S20 FE - G781B
c1q = Note 20 - N981X
c2q = Note 20U - N986X
IMPORTANT NOTE: It seems some users need to flash a vbmeta image file provided by Google in order to boot and user the Custom Kernel. If you find yourself in a situation were you are not able to boot, please flash the attached vbmeta img along with the Kernel and if still bootlooping share the last_kmsg to determine what's driving the issue.
Download:
Disclaimer: I am not responsible if you use this and brick your device or if your device blows up, implodes, flames start shooting from it or it kills your neighbor's dog. Flash at your own risk. I am not responsible.... It was the other guy... I swear....
You can use THIS link to get the latest builds. These and other downloads can also be found in the Telegram Group.
Sources for Q? https://github.com/Jimbo77/JimboK_common_sm8250
Sources for R? https://github.com/Jimbo77/Jimbok_common_sm8250-R
Join the Telegram Group for additional discussions and downloads - HERE
Special thanks to:
Afaneh
Ianmcd
0smosis
flar2
Lord Boeffla
jesec
elliwigy
pappasmurf
For their work and dedication to development!
Changelog or features or whatever
04.10.21 - JimboK-R-2.6.0
Upstreamed to .185
04.05.21 - JimboK-R-2.5.0[/B]
Sync code to add missing changes in upstreamed branch
Reworked the DEVFREQ_BOOST driver
Tweaked SchedHorizon default freqs
Tweaked DEVFREQ_BOOST defaults in defconfig
03.31.21 - JimboK-R-2.4.0[/B]
Upstreamed to Stable Linux 4.19.184
Built with cortex-a55 specific optimizations
removed facebook process from 'kill-in-the-background' mod. This was affecting the user experience (for those that use Facebook a lot, like my wife lol)
02.24.21 - JimboK-R-2.3.0[/B]
Upstreamed to Stable Linux 4.19.176
Switched from G988U source as base to N986N source drop for OneUI 3.1
Removed a lot of unused configs from defconfig. This resulted in a reduction of Kernel size and will have an impact on the overall performance and resource utilization.
Reworked the DEVFREQ and CPU_INPUT_BOOST drivers
Added and Enabled schedhorizon governor
Imported the option to edit the CPU Frequency table
Performance Governor is default for LITTLE Cluster now
02.03.21 - JimboK-R-2.1.0[/B]
Upstreamed to Stable Linux 4.19.172
Moved to KOR dts to improve on stability for custom DTBO's
Added Flicker-Free or DC Dimming. There are two versions of the Kernel and this will be the only version with Flicker Free. After this, there will not be added since i don't like how it messes the Screen Colors/Performance.
Disabled Bootstats
Enabled MPTCP
01.25.21 - JimboK-R-2.0.0[/B]
Upstreamed to Stable Linux 4.19.169
Disabled several not needed debug Samsung Configs
CPU ASSIST Feature
Disabled ZRAM and SWAP
DTS (dtb and dtbo) updates for all variants to their latest source drops
General CLANG and LLVM optimizations
01.01.21 - JimboK-R-1.8.0
Reworked both DEVFREQ and CPU_INPUT Boost functionalities
finetuned for SM8250 (Samsung) specific frequencies/values
added and enabled Simple Low Memory Killer (SLMK)
added: CIFS, NTFS and ISO9660 FS in-kernel Support
added Wireguard Support
Several 'under the hood' improvements to task/memory management.
12.28.20 - JimboK-R-1.7.0
Added BBR2 TCP Config and made Default
Several updates to NET protocols and BBR2
Added PROC_MAGISK_HIDE_MOUNT
Added a script to fix Shealth, Smart View and set ZRAM parameters.
12.25.20 - JimboK-R-1.6.0
Added Dynamic Fsync
Tweaks for Memory Management
Updated LZ4 compressor
Enabled ZSTD Compressor for ZRAM - Default now
12.21.20 - JimboK-R-1.5.1
Fixed Wifi Calling
12.20.20 - JimboK-R-1.5.0
Fsync On/Off Support
Readahead 0
Slimbus OC
Toggle to enable/disable CRC
Turned off several debug options within the tree
added EAS related commits
12.16.20 - JimboK-R-1.4.0
Added Kcal Color Control Driver
Added KLAPSE Driver
Disabled Gentle Fair Sleepers
Added Boeffla Wakelock Blocker
Disabled AVB Flag for better protector in terms of SafetyNet
Misc fixes and addons to dtb
12.15.20 - JimboK-R-1.3.0
Skipped, no public Release xD
12.13.20 - JimboK-R-1.2.0
Added IO-SCHED drivers like: ZEN, FIOPS, MAPLE etc...
Added DevFreq Boost Driver and tuned based off OP8
Added Adreno Boost Driver
12.12.20 - JimboK-R-1.0.0
Initial Android R (OneUI 3.0) bring up
Source is based off the G988U source drop. This includes all other variant files, i have added support to all previous phones from day one now
Disabled Samsung Security useless stuff (DM Verity for example)
11.01.20 - JimboK-1.6.3
Added a fix to hide Magisk Mount for Isolated Processes. This is a critical leak in MagiskHide that can be exploited by apps trying to determine if the device is rooted. I had an issue with two payment apps that after applying this fix, they work. Not sure if they were finding magisk with this method lol. Read more here https://darvincitech.wordpress.com/2019/11/04/detecting-magisk-hide/
Finally removed the warning upon boot. EdXposed compatibility was not affected by the removal of it.
10.27.20 - JimboK-1.5.0
Rebased to S20 FE source as baseline for all models. This is to ensure support for the S20 FE is added and to keep the most up date source from Samsung
Streamlined even further the 'common' defconfig and updated all other variant defconfigs to make it easier to build individual Kernels.
Removed GPU OC - This is to test drive if performance takes a small hit but battery is gained. I have this as *temp change* consider it a 'test' phase so i will need your feedback on it to see whether if we keep it or not. Also, the OC was causing issues to boot in N20 units and some weird hiccups in the System-UI for my S20U.
Added BBR2 TCP CONG protocol. By far, the best TCP CONG to speed up the network connections overall. Read out more here: http://dl.ifip.org/db/conf/networking/networking2018/2B1-1570416152.pdf
BBR2 is now default TCP CONG for the Kernel. I recommend ya'll to make the switch
Several Upstreams to NET/TCP in order to improve Network Connectivity and Speed.
Kernel comes pre-rooted now (via ramdisk). In the event of a magisk update you will only need to update through Magisk Manager. This is for the sake of simplicity
10.16.20 - JimboK-1.4.0
Removed several DEBUG options from defconfig that should not be present in a Production Kernel
Disabled ZSWAP and VBSWAP (this will create conflict with ZRAM) and ZRAM has proven to be more effective and create less wear than ZSWAP
Disabled LZO, updated LZ4 compression algorithms
Enabled ZSTD Compression, it is recommended to enable this for ZRAM moving forward
Disabled KPERFORM in defconfig
Enabled .gz compression for Kernel. Kernel is now almost 1/3 in size of what it used to be
Added and Enabled HID: NINTENDO SWITCH controllers support
10.13.20 - JimboK-1.3.0
Unified Sources a bit more. Removed the individual defconfigs to have one single plus each variant
for X1Q and Y2Q moved dts sources from CHN OPEN to KOR to keep it in line with main (Z3Q) sources and also for CXQ sources. BTI3 (latest software release) is now used for those models.
Enabled a few drivers inside of Kernel: CDC, NTFS, CIFS and some native gaming devices as well
Disabled DM_VERITY checks. This will help with the booting times
JimboK-1.2.0 and before:
Build with latest LLVM Clang 11
Disabled Samsung Security useless stuff (DM Verity for example)
GPU OC up to 895mhz
Adreno Boost
Boeffla Wakelock Blocker Driver
Disabled ZRAM and moved to ZSWAP and VBSWAP
KCAL Color Control Driver (Up to date)
KLAPSE Driver (check out https://forum.xda-developers.com/an...apse-kernel-level-livedisplay-module-t3907025)
Added IO-SCHED drivers like: ZEN, FIOPS, MAPLE etc...
Latest Wireguard Driver
BBR TCP Congestion algorithm by Default
built-in Kernel Westwood and other modules
SLIMBUS OC to improve the Audio Mods
Several Debug Options removed from driver and all over the Kernel itself
QCACLD-3.0 Support
Dynamic Sync Control
Fsync On/Off Toggle
Several EAS commits for balancing power+efficiency
OS PATCH LEVEL set as 2099-12 (Read post #3 - Mandatory)
OS PATCH LEVEL PROBLEM
This is a modified version of @evdenis post HERE
My Kernel uses an OS Patch Level of 2099-12 to maximize its compatibility among all releases by Samsung across all the supported phones. That's it. No other reason as to why choose that date, now, when you continue using my Kernel update after update there will be no issue, but if you change the kernel to any other (specially stock) chances are that Kernel is using the current month OS PATCH LEVEL which will cause two things:
You will not be able to pass beyond your lockscreen. No matter what you try, it won't let you unlock upon reboot
Your Samsung Account will warn you to log off and log back in but you will not be able to do so
The problem is not in sources. It's due to os_patch_level mismatch with you current kernel. As mentioned JimboK Kernel does not uses common security patch date to be in sync with the official samsung firmwares. You can check the default os_patch_level in build.mkbootimg.* files. However, this date can be higher than other kernels use. When you flash a kernel with an earlier patch date on top of the previous one with a higher date, android activates rollback protection mechanism and you face the problems stated earlier. It's impossible to use a "universal" os_patch_level because different users use different custom kernels and different firmwares. JimboK Kernel uses a highest date by default in order to suite most of users.
How can you solve the problem? 6 ways:
You can restore my kernel and the problems will be gone
You can flash the attached zip file. backtothefuture-2099-12.zip, it will make your new Kernel Patch OS Level 2099-12 thus avoiding the issues above. - read more about the zip HERE. You will have to flash this with any new kernel if you ever use mine (unless you do a full wipe as mentioned at the end of this list).
You can check the os_patch_level date of your new kernel here https://cruelkernel.org/tools/bootimg/ and patch the kernel image image to the same date. If your previous kernel is mine (JIMBOK), patch your new Kernel to 2099-12 date.
You can reboot to TWRP, navigate to data/system and delete 3 files those names starts with 'lock'. Reboot. Login, set a new pin. To fix samsung account login, reinstall the app
You can rebuild JimboK Kernel with os_patch_level that suites you. To do it, you need to change the OS PATCH LEVEL to the desire date when using mkbootimg.
You can do the full wipe during the new Kernel flashing
Update 10.20.20
Updated the zip file to add support for W models.
Update 10.19.20
Updated the zip file to remove Exy devices and focus solely in N20 and S20 Snap line.
Finally kernel for s20 thanks a lot.
Works great!
I've got bootloop with my S20U G9880 after flashing this kernel even with a full wipe
Working
It works on my G9810 Thanks!!!
stszf9124 said:
I've got bootloop with my S20U G9880 after flashing this kernel even with a full wipe
Click to expand...
Click to collapse
Strange I have G988N which is just about the same and I don't have that issue. Did you come from a rooted device? Were you in a custom ROM before?
Can you tell me a bit more of your setup?
Are there any other G9880 users with the same issue?
I have s20+ 5g g986u
Unlocked bl
Flashing twrp
Flashed the kernel
Flashed vmbeta disabler
Flashed magisk
Boot
All ok
Thank you
thank you
my device is running custom Rom and stock kernel, the firmware is BTH6 , last night I installed the latest version of TWRP and format data and flashed the multiple disabler, the device booted , but it got this issue after the kernel was installed even with a full wipe again
has battery life been improved?
can i flash this and then magisk to get root?
Smartphones13 said:
can i flash this and then magisk to get root?
Click to expand...
Click to collapse
Yes, you can do that.
Viet.molet said:
has battery life been improved?
Click to expand...
Click to collapse
I flashed this and did a minor debloat and gained roughly 30 minutes of screen on time.
I also noticed the animation from recents to home screen is slightly snappier.
Could be placebo but I like it.
@jimbo77 what kind of benefits do I get by flashing your Kernel?
chieco said:
@jimbo77 what kind of benefits do I get by flashing your Kernel?
Click to expand...
Click to collapse
Disabled some Samsung Security, you will be able to run edxposed if you are into that. Also a few changes and add-ons, read the op for some of the features added to the Kernel
Works on sm-g9810?
jucin said:
Works on sm-g9810?
Click to expand...
Click to collapse
It should. Although I haven't personally tried since I own a G988N
jimbo77 said:
Yes, you can do that.
Click to expand...
Click to collapse
Hey man, how's it going? Did you do anything special to get kcal working on the kernel? Mental made a kernel for the Note 20 Ultra but said he could not get Kcal working.
Also, even better, would you consider making a common kernel for the Note 20 Ultra Snapdragon? I'd definitely send a donation your way.

Categories

Resources