[KERNEL][Snapdragon][4G/5G] PrimeKernel

Search This thread

pascua28

Recognized Developer
Apr 23, 2016
773
1,489
26
Samsung Galaxy S20 FE
Realme 7 Pro
photo_5136793745604323957_x.jpg

Code:
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM/Kernel
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
Details:
  • Based on latest Samsung open source drop​
  • Compiled with the Clang 12 + full LTO GCC 12.2​
Instructions:
  • Assuming you have a custom recovery installed, simply download and flash the kernel zip. This kernel uses Anykernel 3 so no need to reflash magisk(if you use magisk) after installing it.
Join our Telegram group to get access to early releases: https://t.me/s20fesnapdragon

Kernel source code:
Did you like my work? Any support is much appreciated!
Patreon
Buy me a coffee!
Other ways to support me


Downloads:
 
Last edited:

pascua28

Recognized Developer
Apr 23, 2016
773
1,489
26
Samsung Galaxy S20 FE
Realme 7 Pro
Changelog:
v6.1 (December 31, 2022)

  • Fixed missed memory management code warnings due to recent changes in v6.0
  • Fixed coding warnings for better code quality
  • Enabled zero initialization for stack variables for better security and stability
  • Compiled with latest GCC 12.2.1

v6.0 (December 26, 2022)
  • Reverted more of CAF's memory management changes
  • Disabled memcg to allow lmkd to use the more efficient PSI (pressure stall information)
  • Disabled per-cgroup pressure tracking to reduce overhead
  • Disabled lots of debugging from the wlan driver
  • Disabled lots of logging spam
  • Disabled hardened usercopy to reduce memory overhead
  • Fixed incorrectly affined cpus for kgsl. This bug has been present since PrimeKernel v2.0 due to a coding mistake
  • Updated source base to latest Android 13 kernel source (G781BXXU4GVK6)

v5.2 (December 4, 2022)
  • Speed up pm_qos
  • Imported some optimized libs
  • Killed lots of logging
  • Reverted CAF's messed up memory management changes
  • Disabled process reclaim
  • Fixed memory safety issues for various MSM drivers for better stability and security
  • Disabled lots of debugging and logging from qcacld driver (this resulted in several hundred kilobytes shaved off from the kernel binary size)

v5.1-beta (November 16, 2022)
  • Rewrote ashmem for clarity and performance
  • Imported several optimized libraries
  • Converted cpumasks to atomic to reduce expensive operations
  • Selectively applied compiler optimizations to some parts of the kernel
  • Use kmem_cache for some drivers to reduce (de)-/allocation
  • Disabled some security suits
  • Disabled SCHED_DEBUG
  • Re-added MGLRU
  • Compiled with GCC 12.2 with LTO enabled
Note:
If you want to squeeze a bit more performance, just rename this zip file and add -perf.
Perf variant has fewer CPU frequencies for better performance​

v5.0 (November 11, 2022)
  • More stability fixes
  • Lots of under-the-hood optimizations
  • Fixed Google Play System update not working
  • Fixed some random reboots
  • Added 150MHz GPU freq
  • Overall code quality fixes
  • Compiled with latest GCC 12.2

v4.1 (October 21, 2022)
  • More stability fixes
  • Optimizations on GPU and iommu drivers
  • Compiled with Clang 12 ThinLTO

v4.0 (October 6, 2022)
  • Based on G781BXXS4FVF3
  • Compiled with clang full LTO for better performance
  • Compiled with O3
  • Added MGLRU for better memory management and performance
  • Code quality fixes for better stability
  • Added optimized libraries for better performance
  • Added kcal color control
  • Removed additional logging and debugging

v3.1 (June 7, 2022)
  • Based on G781BXXS4FVD9
  • Reverted Linux upstream since I can't thoroughly test this kernel and for better stability
  • Compiled with latest clang from clearlinux (Clang 13)
  • Removed dynamic allocation from several subsystems to speed them up
  • Removed more logging and debugging from several drivers on their hot code paths
  • Micro-optimizations for scheduler and workqueues
  • Sped-up pm qos by using atomic operations
  • Tweaked cpusets for better battery life and thermals
  • Improved audio driver a bit
  • Affined GPU and display IRQs to big cluster for better performance
  • Used optimized energy model and cpu frequencies
  • Undervolted GPU a bit
  • Code quality fixes for better overall stability
  • Compiled with O3 optimization
  • More under-the-hood optimizations

v2.0 (December 16, 2021)
  • Upstreamed to Linux 4.19.219
  • Converted some subsystems to use power efficient workqueues
  • Removed logging from various drivers
  • Removed F2FS additional tracings

v2.0-rc1 (December 1, 2021)
  • Display driver optimizations
  • Used BBR as default TCP congestion algorithm
  • Enabled BPF_JIT to improve network performance
  • Implemented optimized spinning loop
  • Updated to G780GXXU3AUI3 source drop
  • Speed up mremap
  • Removed msm_performance CPU boosting
  • Implemented optimized PM QoS for UFS
  • Changed zRAM compression algorithm to lz4
  • Disabled EAS_PREFER_IDLE for better power efficiency

v1.0 (Nov. 8, 2021)
  • Based on Samsung G780GXXU3AUH5 source drop
  • Disabled knox and Samsung security stuffs
  • Changed timer tick to 100Hz for better throughput and power consumption
  • Optimized GPU wakeup
  • Removed use of dynamic allocation from several subsystems
  • Disabled binder debugging
  • Optimized UFS irq handling
  • Updated lz4 compression used by zswap
  • Disabled input booster
 
Last edited:

Ubimo

Senior Member
Dec 22, 2011
1,598
797
This kernel is based on G780GXXU3AUH5.
Does this kernel also work on the G781B?
I'm on FW G781BXXS4CUJ2.
 
Last edited:

HarryCustom

Senior Member
Dec 26, 2007
202
12
Hi, after flashing a message tells me there some problems, thant I can use the phone as usual, how can I uninstall the Kernel?
 

3mel

Senior Member
Aug 23, 2012
1,968
646
London
if he's flashed this kernel with TWRP he can flash the extracted boot.img with TWRP (flash image).

@HarryCustom you'll need to download a command line app for LZ4 from github and figure out the command to extract the boot.img but it's not difficult.
 
  • Like
Reactions: Rick_BR

HarryCustom

Senior Member
Dec 26, 2007
202
12
Ok thank you I'll do it!
Anyway I own a G780G/DS, I only report that to me the kernel gave problems for anyone else who wants to use it with the same phone as me! :)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    photo_5136793745604323957_x.jpg

    Code:
    #include <std_disclaimer.h>
    /*
    * Your warranty is now void.
    *
    * I am not responsible for bricked devices, dead SD cards,
    * thermonuclear war, or you getting fired because the alarm app failed. Please
    * do some research if you have any concerns about features included in this ROM/Kernel
    * before flashing it! YOU are choosing to make these modifications, and if
    * you point the finger at me for messing up your device, I will laugh at you.
    */
    Details:
    • Based on latest Samsung open source drop​
    • Compiled with the Clang 12 + full LTO GCC 12.2​
    Instructions:
    • Assuming you have a custom recovery installed, simply download and flash the kernel zip. This kernel uses Anykernel 3 so no need to reflash magisk(if you use magisk) after installing it.
    Join our Telegram group to get access to early releases: https://t.me/s20fesnapdragon

    Kernel source code:
    Did you like my work? Any support is much appreciated!
    Patreon
    Buy me a coffee!
    Other ways to support me


    Downloads:
    10
    Changelog:
    v6.1 (December 31, 2022)

    • Fixed missed memory management code warnings due to recent changes in v6.0
    • Fixed coding warnings for better code quality
    • Enabled zero initialization for stack variables for better security and stability
    • Compiled with latest GCC 12.2.1

    v6.0 (December 26, 2022)
    • Reverted more of CAF's memory management changes
    • Disabled memcg to allow lmkd to use the more efficient PSI (pressure stall information)
    • Disabled per-cgroup pressure tracking to reduce overhead
    • Disabled lots of debugging from the wlan driver
    • Disabled lots of logging spam
    • Disabled hardened usercopy to reduce memory overhead
    • Fixed incorrectly affined cpus for kgsl. This bug has been present since PrimeKernel v2.0 due to a coding mistake
    • Updated source base to latest Android 13 kernel source (G781BXXU4GVK6)

    v5.2 (December 4, 2022)
    • Speed up pm_qos
    • Imported some optimized libs
    • Killed lots of logging
    • Reverted CAF's messed up memory management changes
    • Disabled process reclaim
    • Fixed memory safety issues for various MSM drivers for better stability and security
    • Disabled lots of debugging and logging from qcacld driver (this resulted in several hundred kilobytes shaved off from the kernel binary size)

    v5.1-beta (November 16, 2022)
    • Rewrote ashmem for clarity and performance
    • Imported several optimized libraries
    • Converted cpumasks to atomic to reduce expensive operations
    • Selectively applied compiler optimizations to some parts of the kernel
    • Use kmem_cache for some drivers to reduce (de)-/allocation
    • Disabled some security suits
    • Disabled SCHED_DEBUG
    • Re-added MGLRU
    • Compiled with GCC 12.2 with LTO enabled
    Note:
    If you want to squeeze a bit more performance, just rename this zip file and add -perf.
    Perf variant has fewer CPU frequencies for better performance​

    v5.0 (November 11, 2022)
    • More stability fixes
    • Lots of under-the-hood optimizations
    • Fixed Google Play System update not working
    • Fixed some random reboots
    • Added 150MHz GPU freq
    • Overall code quality fixes
    • Compiled with latest GCC 12.2

    v4.1 (October 21, 2022)
    • More stability fixes
    • Optimizations on GPU and iommu drivers
    • Compiled with Clang 12 ThinLTO

    v4.0 (October 6, 2022)
    • Based on G781BXXS4FVF3
    • Compiled with clang full LTO for better performance
    • Compiled with O3
    • Added MGLRU for better memory management and performance
    • Code quality fixes for better stability
    • Added optimized libraries for better performance
    • Added kcal color control
    • Removed additional logging and debugging

    v3.1 (June 7, 2022)
    • Based on G781BXXS4FVD9
    • Reverted Linux upstream since I can't thoroughly test this kernel and for better stability
    • Compiled with latest clang from clearlinux (Clang 13)
    • Removed dynamic allocation from several subsystems to speed them up
    • Removed more logging and debugging from several drivers on their hot code paths
    • Micro-optimizations for scheduler and workqueues
    • Sped-up pm qos by using atomic operations
    • Tweaked cpusets for better battery life and thermals
    • Improved audio driver a bit
    • Affined GPU and display IRQs to big cluster for better performance
    • Used optimized energy model and cpu frequencies
    • Undervolted GPU a bit
    • Code quality fixes for better overall stability
    • Compiled with O3 optimization
    • More under-the-hood optimizations

    v2.0 (December 16, 2021)
    • Upstreamed to Linux 4.19.219
    • Converted some subsystems to use power efficient workqueues
    • Removed logging from various drivers
    • Removed F2FS additional tracings

    v2.0-rc1 (December 1, 2021)
    • Display driver optimizations
    • Used BBR as default TCP congestion algorithm
    • Enabled BPF_JIT to improve network performance
    • Implemented optimized spinning loop
    • Updated to G780GXXU3AUI3 source drop
    • Speed up mremap
    • Removed msm_performance CPU boosting
    • Implemented optimized PM QoS for UFS
    • Changed zRAM compression algorithm to lz4
    • Disabled EAS_PREFER_IDLE for better power efficiency

    v1.0 (Nov. 8, 2021)
    • Based on Samsung G780GXXU3AUH5 source drop
    • Disabled knox and Samsung security stuffs
    • Changed timer tick to 100Hz for better throughput and power consumption
    • Optimized GPU wakeup
    • Removed use of dynamic allocation from several subsystems
    • Disabled binder debugging
    • Optimized UFS irq handling
    • Updated lz4 compression used by zswap
    • Disabled input booster
    7
    4
    Hi guys! PrimeKernel v4.1 is up!