• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[KERNEL][10.0.0] Sultan Kernel [August 14, 2020]

Search This thread


Senior Member
Jun 10, 2010
Hi, everyone. There's a lot of great information here, but I wanted to get some advice before I proceed, just to make sure I am going down the best route. I am still on Android 9 on my P2XL, bootloader is unlocked but I am not rooted yet. I want to use this kernel, but I know I obviously have to get to Android 10 first. Should I let me device take the OTA update to Android 10, and then root and install this kernel? Or should I root now, flash a rooted stock 10 ROM, and then install this kernel? For reference, my current version is build PQ3A.190801.002, kernel is 4.4.169-g09a041b17c60.

Thank you all for your time.
Last edited:


Senior Member
Dec 28, 2009
New build is up with a significant update to Simple LMK. Turns out that SLMK needed an update for proper compatibility with Android 10; without it, SLMK would target more important apps to kill rather than less important ones. Oops.

Can confirm, after installing this latest kernel I can use L Speed without any issues and phone is super snappy again. I guess the problem got amplified to x10 with L Speed which was causing a lot stuttering and slow downs basically killing every important background task. Haha.

Thanks for the update :good: phone is buttery smooth again.


Senior Member
Dec 28, 2009
New build is up with March fixes.

I'm using February firmware update with PixelDust ROM. I don't need the March firmware to upgrade to this build of the Kernel, correct?

Also Google has updated the Kernal for all the Pixel devices with this latest firmware update, is the new Kernel the one you're using for the base of this Kernel?

Thank you for the quick updates. :good:


Recognized Developer
I'm using February firmware update with PixelDust ROM. I don't need the March firmware to upgrade to this build of the Kernel, correct?

Also Google has updated the Kernal for all the Pixel devices with this latest firmware update, is the new Kernel the one you're using for the base of this Kernel?

Thank you for the quick updates. :good:

Yes, that's what updating to the March security update means. You don't need a March ROM to use the March kernel though.

thanks for the hard work sultan . i still have many unnecessary apps in my ram which are slowing me down
(about 600 mb free ram in average) . i would loveeee some version of this with the most aggressive
Low memory killer ...
and typo :D

Manage it yourself by swiping apps out from recents. This is not the job of the low memory killer.


Recognized Developer
Thanks for your continued support.

Just wondering, looking at your latest commit, as to why you choose the 1478400 kHz over 1555200 kHz as the lower efficient CPU frequency for the small cluster?

Because 1478 MHz is the cutoff for efficiency; everything below it is significantly more inefficient. I wanted to choose the lowest possible frequency that still had good efficiency.

Top Liked Posts

  • There are no posts matching your filters.
  • 127
     * Your warranty is no longer valid, unless you lie.
     * I am not responsible for bricked devices, strained relationships,
     * 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 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.

    This is a no-frills custom kernel for the Pixel 2 and Pixel 2 XL designed to be used with the stock ROM and custom Android 10 ROMs. It's intended to be a simple replacement for the stock kernel that brings several under-the-hood enhancements. This kernel is not meant to be customized by users.

    Changelogs for each update can be found in the 2nd post of this thread.

    • Compiled with GCC 10.2 from the Arch Linux repository
    • Built with Link Time Optimization (LTO) for improved overall kernel performance
    • Built with Dead Code Elimination (DCE) to shrink the kernel's size by removing unused code
    • Removed lots of excessive bloat (improves security and performance)
    • Simple LMK, a custom low memory killer that improves memory management
    • Fast fingerprint unlock and screen power on
    • Improved touch latency
    • Optimized CPU frequencies and EAS energy model for improved performance and battery life
    • Haptic feedback disabled while the camera is in use
    • Hall sensor disabled by default (it can be re-enabled by flashing the optional enable-flip-cover-support zip)
    • Removed maximum screen brightness limitation
    • WireGuard, a next generation secure VPN tunnel
    • Passes SafetyNet bootloader unlock check
    • Improved overall system fluidity and graphics performance
    • Improved stability
    • Westwood+ TCP congestion algorithm
    • Vibration strength control
    • Many other miscellaneous improvements not listed here

    Source code:
    10.0.0-sultan branch: https://github.com/kerneltoast/android_kernel_google_wahoo

    • zx2c4 (for WireGuard, providing project resources, working directly on development, and sending me stickers)
    • MSF Jarvis (for helping with testing and AnyKernel3)
    • osm0sis (for AnyKernel3)
    • If your name should be here and it isn't, then replace my camera with a OnePlus device

    Installation instructions:
    First of all, this kernel comes with a custom dtbo so DO NOT FLASH A DIFFERENT DTBO AFTER INSTALLING THIS KERNEL! To install this kernel, simply download and flash it in a custom recovery. Do the same when there is a new update available.

    Note that there are some caveats if you'd like to flash Magisk and/or TWRP in addition to this kernel. If you want to flash TWRP, then you must flash it after flashing the kernel first. If you want to flash Magisk, then you must flash it after flashing both the kernel and TWRP first. You don't need to re-flash Magisk after every kernel update though.

    This is the order in which the kernel, TWRP, and Magisk should be flashed:
    Kernel -> TWRP (optional) -> Magisk (optional)

    The optional enable-flip-cover-support zip can be flashed at any point of the installation process. It does not need to be re-flashed after each update.

    Latest kernel
    Enable support for flip covers (optional)

    XDA:DevDB Information
    Sultan Kernel, Kernel for the Google Pixel 2 XL

    Kernel Special Features:

    Version Information
    Status: Stable

    Created 2018-06-10
    Last Updated 2020-08-15

    August 14, 2020:
    *Merged August Security Bulletin fixes
    *Now built with GCC 10.2
    *Slightly reduced overall power consumption

    Old changelogs:

    July 11, 2020:
    *Merged July Security Bulletin fixes
    *Fixed occasional flashes when the screen was turned off or on (Pixel 2 XL only)
    *Fixed lagging after accumulating about a week or more of continuous uptime (i.e., not rebooting for a week or more)

    June 2, 2020:
    *Merged June Security Bulletin fixes
    *Fixed a bug where the screen would turn black and the device would stop responding
    *Reduced Pixel 2 XL display power consumption (thanks to kdrag0n)
    *Pixel 2 XL screen turns on faster now (thanks to kdrag0n)

    May 22, 2020:
    *Fixed a rare random reboot bug caused by ext4 which affects every Pixel 2/XL kernel (including stock)

    May 7, 2020:
    *Merged May Security Bulletin fixes
    *Improved CPU idle efficiency yet again for better battery life
    *Built with GCC 10.1 for improved performance

    April 25, 2020:
    *Improved CPU idle efficiency even more for better battery life

    April 22, 2020:
    *Merged April Security Bulletin fixes
    *Fixed Simple LMK killing music apps in the background
    *Improved Simple LMK's speed in some rare scenarios
    *Improved CPU idle efficiency
    *Updated installer for Lineage recovery (thanks to MSF Jarvis and Eamo5)

    March 27, 2020:
    *Built with GCC 9.3 (previously built with GCC 9.2)
    *Built with Dead Code Elimination (DCE) to shrink the kernel's size by about 10%
    *Attempted to fix a rare kernel panic in the ext4 driver
    *Improved filesystem performance
    *Fixed the vDSO so that Android can get the time from the kernel faster
    *Slightly improved Simple LMK performance for certain scenarios

    March 11, 2020:
    *Built with Link Time Optimization (LTO) for improved overall kernel performance

    March 5, 2020:
    *Lowered minimum CPU frequency from 1.8 GHz to 1.4 GHz to improve battery life

    March 2, 2020:
    *Merged March Security Bulletin fixes

    February 28, 2020:
    *Fixed intense lag when opening camera sometimes (due to Simple LMK)

    February 26, 2020:
    *Fixed Simple LMK incompatibility with Android 10 (this caused it to erroneously kill important apps frequently)

    February 24, 2020:
    *Improved Simple LMK kill mechanism to fix lag when opening the camera

    February 21, 2020:
    *Improved memory management performance
    *Improved Simple LMK app selection and performance
    *Backported binder driver from the Android 4.19 kernel (improves overall system performance)

    February 9, 2020:
    *Merged February Security Bulletin fixes
    *Improved Simple LMK's performance to fix random freezes

    January 20, 2020:
    *Updated to Android 10
    -Fixed a bug in the Android 10 kernel that caused WiFi to randomly disconnect
    -The Settings app is no longer killed in the background
    *Fixed Simple LMK killing too many apps when memory was extremely low

    November 5, 2019:
    *Added fix for Binder use-after-free security vulnerability
    *Removed a buggy GPU driver change I made that caused graphical glitches
    *Rewrote ION driver again for improved performance and stability
    *Fixed a severe deadlock issue in the rewritten IOMMU driver
    *Improved Simple LMK to kill fewer apps and react to low memory situations faster
    *Fixed a rare bug where Simple LMK would stop working entirely until a reboot (this would cause freezes when memory was low)

    August 22, 2019:
    *Fixed video playback and camera issues introduced in the previous build

    August 21, 2019:
    *Further improved the performance of and fixed bugs in the rewritten IOMMU driver

    August 6, 2019:
    *Merged August Security Bulletin fixes
    *Fixed rare graphical glitches when opening the camera
    *Improved frame rendering latency

    July 31, 2019:
    *Added back various small performance optimizations that were confirmed to be safe

    July 29, 2019:
    *Fixed graphical glitches

    July 21, 2019:
    *Attempted to fix occasional graphical glitches

    July 20, 2019:
    *Fixed a serious bug in Simple LMK that caused it to kill a random number of processes when memory was low
    *Removed multiple potentially unstable performance optimizations until they can be validated

    July 13, 2019:
    *Further improved ION memory manager performance
    *Fixed a rare random reboot when switching between Google Camera and Settings

    July 8, 2019:
    *Fixed another rare random reboot introduced in the ION driver rewrite
    *Fixed serious stack memory corruption issue introduced in a display driver optimization
    *Improved ION memory manager performance

    July 1, 2019:
    *Merged July Security Bulletin fixes
    *Improved filesystem performance
    *Improved frame rendering performance
    *Fixed more memory leaks

    June 28, 2019:
    *Fixed random reboots caused by a race condition in the rewritten IOMMU driver
    *Compiled kernel with GCC 9.1

    June 26, 2019:
    *Fixed rare random reboot caused by ION driver rewrite
    *Fixed 4-year-old memory leak located deep in the IOMMU subsystem

    June 25, 2019:
    *Fixed random reboot caused by an incorrect audio driver optimization

    June 24, 2019:
    *Added back charge-rate limitation for the 2 XL (removing it caused charging speeds to plummet)
    *Improved camera speed slightly

    June 23, 2019:
    *Fixed remaining random reboots caused by ION driver rewrite
    *Fixed random freezes and reboots caused by an incorrect memory allocation optimization
    *Removed charge-rate limitation while the screen is on for the 2 XL
    *Removed maximum screen brightness limitation
    *Google Camera and Settings are killed when they run in the background, to prevent high battery drain (more info)

    June 22, 2019:
    *Fixed random freezes caused by ION driver rewrite

    June 21, 2019:
    *Fixed crash when trying to record video

    June 20, 2019:
    *Fixed potential use-after-free bug in rewritten ION driver

    June 19, 2019:
    *Further rewrote ION memory manager for improved stability and performance
    *Replaced several high-frequency dynamic memory allocations with constant-time ones (this improves overall performance)

    June 15, 2019:
    *Improved ION memory manager performance
    *Reduced GPU processing latency

    June 12, 2019:
    *Rewrote ashmem driver to improve performance
    *Improved binder driver performance
    *Fixed diag mode

    June 7, 2019:
    *Fixed memory leak introduced in the previous build

    June 6, 2019:
    *Rewrote ION memory manager to improve performance

    June 3, 2019:
    *Merged June Security Bulletin fixes

    June 1, 2019:
    *Fixed rare display glitches

    May 27, 2019:
    *Improved Simple LMK to kill fewer apps
    *Improved touch latency
    *Improved frame rendering latency
    *Improved display, touchscreen, and UFS power consumption

    May 11, 2019:
    *Fixed camera issues

    May 10, 2019:
    *Improved Simple LMK performance
    *Improved frame render latency

    May 6, 2019:
    *Merged May Security Bulletin fixes
    *Reduced scheduler tick frequency to 100 Hz to save power
    *Added back zRAM support

    May 4, 2019:
    *Added functional Simple LMK
    *Removed zRAM support (Simple LMK works better without the costs of zRAM hindering it)
    *Improved graphics rendering performance
    *Reduced idle power consumption

    May 1, 2019:
    *Removed Simple LMK (will it ever work?)

    April 30, 2019:
    *Tweaked Simple LMK yet again to fix freezes
    *Disabled haptic feedback while the camera is in use
    *Disabled hall effect sensor by default to fix the screen randomly turning off/on near strong magnetic fields (it can be re-enabled by flashing an optional zip in the OP)

    April 29, 2019:
    *Tweaked Simple LMK to fix short freezes

    April 28, 2019:
    *Optimized CPU frequencies and EAS energy model for improved performance and battery life
    *Added overhauled Simple LMK for improved memory management

    April 19, 2019:
    *Fixed high power consumption when multitasking
    *Improved performance when gaming

    April 18, 2019:
    *Rebased on official April kernel release
    *Overhauled the entire kernel

    January 13, 2019:
    *Merged January Security Bulletin fixes
    *Improved memory management (apps are killed less often)

    December 12, 2018:
    *Merged December Security Bulletin fixes
    *Fixed random reboots when performing backups in recovery

    November 6, 2018:
    *Merged November Security Bulletin fixes

    October 30, 2018:
    *Fixed Simple LMK randomly killing too many apps (this caused music players to die sometimes)

    October 23, 2018:
    *Fixed camera laser sensor
    *Fixed stuttering when multitasking

    October 16, 2018:
    *Fixed overheating
    *Slightly improved overall performance

    October 14, 2018:
    *Re-enabled zRAM
    *Improved graphics performance (details)

    October 2, 2018:
    *Merged October Security Bulletin fixes

    September 30, 2018:
    *Added Simple LMK, a new LMK written from scratch that improves memory management (details)

    September 17, 2018:
    *Switched back to stock LMK until Simple LMK is stable

    September 10, 2018:
    *Fixed SystemUI crashes caused by Simple LMK

    September 9, 2018:
    *Fixed more performance issues and bugs with Simple LMK
    *Added flar2's vibration control

    September 8, 2018:
    *Fixed lag and performance issues caused by Simple LMK
    *Improved memory management compared to previous builds with Simple LMK

    September 5, 2018:
    *Merged September Security Bulletin fixes
    *Fixed additional issues with the new low memory killer
    *Fixed several instances of blatantly incorrect code (improves stability; details)

    September 4, 2018:
    *Fixed freezes caused by new low memory killer

    September 3, 2018:
    *Fixed occasional lag when low memory killer kicked in
    *Added Westwood+ TCP congestion algorithm and enabled it by default

    September 2, 2018:
    *Switched to custom low memory killer driver for improved memory management

    August 19, 2018:
    *Switched to userspace low memory killer (apps will be killed less frequently; improves memory management)

    August 18, 2018:
    *Fixed touchscreen not working in TWRP

    August 15, 2018:
    *Fixed slow charging on the Pixel 2 XL
    *Reduced power consumed by the battery fuel gauge

    August 14, 2018:
    *Fixed Android being unable to read detailed power info from the kernel

    August 13, 2018:
    *Reconfigured CPU boost frequencies to reduce overall power consumption

    August 12, 2018:
    *Reworked for Pie
    *Added devfreq boost driver; boosts the device that controls how quickly data can move between RAM and the CPU (improves overall fluidity)

    June 28, 2018:
    *Fixed worsened screen-wake performance introduced in previous build

    June 27, 2018:
    *Added CPU boost on app launch (makes apps launch faster)

    June 20, 2018:
    *Reduced power consumed by new CPU boost mechanism

    June 19, 2018:
    *Fixed WeChat

    June 18, 2018:
    *Added support for custom ROMs (thanks to nathanchance)
    *Adjusted CPU boost frequencies to significantly reduce power consumption without hurting performance

    June 17, 2018:
    *Added new CPU boost driver that maximizes battery life while keeping the phone perfectly smooth (details: 1, 2, 3, 4)
    *Fixed potential random reboots caused by coding errors detected using static analysis

    June 11, 2018:
    *Removed CPU underclock
    *Fixed off-mode charging
    *Fixed the internal hardware problem error message shown on boot

    June 10, 2018:
    *Initial release
    I'm pretty frustrated and disappointed by my 3 XL, so I'm going to buy a 2 XL and switch back to it. This kernel will live once more.
    I wish I could find a kernel w/ Wireguard that worked well for me. I do not mean any disrespect towards the kernel developers, I appreciate the countless hours they sink in and the undeserved flack they take in the forums and have to put up with, but since @nathanchance left the scene, nothing custom worked well for me:
    - Sultan: reboots, freezes, lag
    - Caesium: moved to Q
    - EX: T-Mobile Wi-Fi Calling does not work
    - Stock kernel seems to work well enough, but no Wireguard in the kernel
    I'm not even after battery life as I can't really say I see any significant difference between the above kernels, stock included, all on rooted stock ROM. It seems kernels have gotten a lot more complicated on modern hardware so it's easy to break things while tweaking and stock kernel has gotten a lot better compared to what we used to have on devices from 3-4 years ago (I still remember how much fun it used to be to try new kernels every couple days on the Nexus 4 ...)

    Hey, I fixed the freezes and reboots. And the process of going through fixing those freezes and reboots has resulted in *massive* performance gains in my kernel. My rewritten drivers make this kernel perform faster than even Snapdragon 855 phones; I don't see why you're complaining.

    Freezes and reboots are unexpected, and I fixed them rather quickly considering the *very high* difficulty of the optimizations I was making. There is literally nobody else on this forum making the optimizations that I am...

    You can't make progress towards any goal without making mistakes, and if I hadn't received feedback on the freezes and reboots, then my optimizations would've never become stable.

    FYI, the stock kernel is complete and utter trash. But feel free to use it if you don't like my kernel.
    New build is up with a couple of random reboot fixes and a small performance improvement.