[Kernel][30.03.2021][4.14.227] Kirisakura 7.2.3 for Pixel 4/XL aka FLORAL

Search This thread

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
4,848
15,449
My screen turns red when I turn it into an extremely low brightness. ☹️

The question was already answered, but you could have found the answer on the previous page of this thread...

https://forum.xda-developers.com/showpost.php?p=83582171&postcount=1124

Cannot flash the kernel. Tried different apps. This is the most detailed log I got (see attachment).

EXKM works fine. Other apps need to be updated to work properly on Android 11. Either ask politely for support at the respective app/tool you want to use and be ready to provide logs for those apps/tools or wait until they are updated.

https://forum.xda-developers.com/showpost.php?p=83522673&postcount=1099

https://forum.xda-developers.com/showpost.php?p=83486659&postcount=1095

searching for either EXKM or FKM in the thread gives some quick results.
 

Utini

Senior Member
The question was already answered, but you could have found the answer on the previous page of this thread...

https://forum.xda-developers.com/showpost.php?p=83582171&postcount=1124



EXKM works fine. Other apps need to be updated to work properly on Android 11. Either ask politely for support at the respective app/tool you want to use and be ready to provide logs for those apps/tools or wait until they are updated.

https://forum.xda-developers.com/showpost.php?p=83522673&postcount=1099

https://forum.xda-developers.com/showpost.php?p=83486659&postcount=1095

searching for either EXKM or FKM in the thread gives some quick results.

Ah thanks man. I tried several apps and they mentioned that Android 11 is supported (e.g. FKM) but clearly they dont. I bought EXKM and now it works.

Always wanted to buy it in the past already but can't remember why exactly.
I think it was because of display color calibration but I haven't figured out how to calibrate the display with my Spyder 3 device anyway.
 

Utini

Senior Member
I have the feeling that my battery drain is worse than previously. How ever, there have been several changes to my setup at once (e.g. Android 10 -> 11 and also a different location with worse signal).
Do those screenshots from the settings and from BBS look good to you? E.g. I noticed a 7% battery drain overnight which previously was only 1%.

Thanks!
Pictures:
https://files.bestmail.ws/Battery/photo_1.jpg
https://files.bestmail.ws/Battery/photo_2.jpg
https://files.bestmail.ws/Battery/photo_3.jpg
https://files.bestmail.ws/Battery/photo_4.jpg
https://files.bestmail.ws/Battery/photo_5.jpg
https://files.bestmail.ws/Battery/photo_6.jpg
https://files.bestmail.ws/Battery/photo_7.jpg
 

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
4,848
15,449
I have the feeling that my battery drain is worse than previously. How ever, there have been several changes to my setup at once (e.g. Android 10 -> 11 and also a different location with worse signal).
Do those screenshots from the settings and from BBS look good to you? E.g. I noticed a 7% battery drain overnight which previously was only 1%.

Thanks!
Pictures:
https://files.bestmail.ws/Battery/photo_1.jpg
https://files.bestmail.ws/Battery/photo_2.jpg
https://files.bestmail.ws/Battery/photo_3.jpg
https://files.bestmail.ws/Battery/photo_4.jpg
https://files.bestmail.ws/Battery/photo_5.jpg
https://files.bestmail.ws/Battery/photo_6.jpg
https://files.bestmail.ws/Battery/photo_7.jpg

Your % of time kept awake over 15 hours looks good. Only 6.2% kept awake during the night and half a day is not bad. So there seem to be no apps keeping your phone awake.
Partial wakelocks and kernel wakelocks look also normal.
Like you already mentioned yourself, it´s probably a combination of many factors. Network always made a big difference on my end.
As an example: at home I lose about 1-3% charge during a whole night over 7-9 hours. When I´m at another spot with bad network coverage or a ****ty WiFi, this can go up to 7% to 10% as well.
Maybe it will get better over time, as A11 gets more mature. It´s always a bit luck of the draw if some changes suit or don´t suit your usage.
 

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
4,848
15,449
Update 6.2.4

Hey guys and girls,

Alright here´s the update for November. Only thing for my kernel was a security fix for the GPU driver. I couldn´t merge this commit previously as it is firmware related as well. Without the matching firmware it crashed the device.
So it´s very nice to see Google merging it this quickly.
Please make sure to update to November Firmware before flashing this kernel! The kernel.zip won´t flash on older firmware.

Linux-Upstream was merged, CAF-Upstream was merged, F2FS-Stable Upstream was merged.

@Mrcactuseater, one of my trusty testers, made aware of some scheduler commits from the pixel 5 kernel, being tested by other custom kernels. However some of those commits cause tasks to not upmigrate to the prime core in some scenarios on our Pixel 4 XL, which leads to longer app launch times on these occasions.
In retrospect this makes sense, as the Pixel 5 has 6 small cores, 1 big and 1 prime core, while the Pixel 4/XL has 4 little, 3 big and 1 prime core. It seems Google ran into a situation where too many tasks got scheduled to the Pixel 5´s performance cores (big and prime), which in turn hurt performance there.
The commits from pixel 5, causing this behaviour didn´t make it into the kernel. I think the most noteworthy of those fixes is the following one: https://android.googlesource.com/kernel/msm.git/+/7a1b8ea81e64234cc2e9bff7634eb88d755d715b

I found a way to reintroduce the change I did to the power-hal config file on Android 10. After flashing the kernel, you will see a module called AK3 Helper Module in Magisk Manager.

Overall I think 6.2.4 is a bit of a bigger update and a nice one. :)

More details in the changelog as usual! :)

I wish everybody a great day.
Enjoy the device and the kernel, because I certainly do :)

Before troubleshooting and reporting any issues make sure to not use any additional mods, scripts or tweaks. This includes all mods, even the tiniest modification you did.

big thanks to all my testers again:

@Mrcactuseater
@MArtyChubbs @ilal2ielli
@toastyp @Alcolawl


Detailed changelog below.


Changelog:

Kernel Base

- Merge November Security Update
- Linux-Stable-Upstream to 4.14.203
- latest f2fs-patches from f2fs-stable
- patches from kernel/common
- CAF Upstream merged. (tag LA.UM.8.1.r1-16200-sm8150.0)
- rework CAF-Updates regarding display driver
- reintroduce powerhal config file change from Android 10
- other changes please take a look at github

Magisk Module:
- Reintroduced with November 2020 Update. After flashing the kernel, you will see a module called AK3 Helper Module in Magisk Manager. This will fine tune the power-hal.

Have fun flashing and enjoy your device with latest linux-stable :)

Why is linux-stable important?

I wish you all a nice day/evening!


Download is below :)

Download:


Kernel: https://www.androidfilehost.com/?fid=10763459528675576774



How to flash the Kernel:

1. Make sure you are rooted, are using the latest magisk suited for your OS version and a kernel manager capable of flashing a zip is installed. If available you'll can use TWRP as well. Download the kernel.zip to your device.
1a. If you used the SQLITE3 Magisk Module and the GPay Fix Magisk Module in the past (prior to 2.0.0) look at this post: click me

2. Flash kernel zip in via your favorite method. Kernel Managers and Recoveries need to be updated to work with a specific Android Version. It's your job to ensure compatibility! :) Root will be preserved! (Make sure to be on the latest firmware the kernel is made for)

3. Reboot and profit! Before reporting any issues make sure to read the first three posts of this thread!
Instructions can be found in the OP too!


Have fun, enjoy the kernel and your phone.


If you like my work please consider a donation.
Donations are not mandatory but very welcome.
If you like my work and want to buy me a coffee/green tea: http://paypal.me/freak07
 
Last edited:

beeshyams

Senior Member
Dec 29, 2014
1,590
535
Bangalore
@Freak07 I have been using your kernel on One Plus 7, very happy with it and donated a few times too (not as much as you deserve :(

Any plans to add support to Pixel 4a. I am going to get the device in a few days and this is the first thing I am searching for!
 

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
4,848
15,449
Hey @Freak07 I wanted to know will you be making a kernel for the Pixel 5 anytime soon? Thanks in advance:)

Now that magisk has been released for p5 and p4a5G, is there any chance we shall see this kernel on the p5 forum?

Unfortunately no. I tried the device and it just offers nothing to me that made me keep it. I´d say the major pros for the Pixel 5 are the form factor and size, the price, the battery and for some the fingerprint scanner.
The only thing I really like and now miss about the Pixel 5 is the ability to reverse charge the Pixel Buds. Though in the end it´s just a gimmick, because the buds case charges super quick on my pc or wall charger.

Form-Factor/Size, Battery and Fingerprint Scanner are no advantages for my personal usage and subjective preference. Due to work and job ((rock)-climbing) my fingerprints are barely existent. Which made faceunlock with soli the best solution yet for me.
Price is probably directly related to not having the high-end current year soc along with a major cut of other features.
Apps launch slower on the Pixel 5, although the difference varies from app to app. The pixel 5 generally performs very well, but there are a few hiccups that aren´t there when I´m using the Pixel 4 XL. I guess different people are noticing this very subjectively.
While the SD765 is probably a good deal for somebody that searches for a new phone it´s not something I´m after at the moment. Googles Scheduler approach works way better for the SD765 than CAFs approach (see OnePlus Nord), but essentially it uses the same exact strategy as the Pixel 4a/4/XL.

In case anybody is interested in the app startup difference here´s a personal test for app opening speeds on various apps I use. The time for each startup is in milliseconds for 10 consecutive cold starts (previously force closed) of apps.
Rog 2 and Rog 3 were on Android 10 for this test. While Pixel 3, 4 and 5 were all on Android 11. So I´d expect better performance on the ROGs due to some improvements that address especially app launching in Android 11.
https://docs.google.com/spreadsheets/d/11RwNE-ceYQGnQpLTiaxSXu6nXf-ibHDkq3crPAVVUeE/edit?usp=sharing

I kept contemplating about keeping the Pixel 5 purely as a development device. But so far I used every phone I published a kernel for, for a longer period of time. I couldn´t see that happening with the Pixel 5.
Although it´s really somewhat sad, that this will be the first Pixel since the Pixel XL I don´t develop a kernel for, I didn´t want to create one just for the sake of it.
In the end I´m not doing this for anybody else, but only because I enjoy doing it. :) There is no infrastructure or app behind my kernel. Donations only cover a small fraction of every phone I bought myself.
This was not really an easy decision, as I very much enjoy the Pixel Community on XDA. Especially developing alongside @tbalden :)
But ultimately I feel I must enjoy developing a kernel for a device I really like to use.

I´m still using either the Pixel 4 XL or the ROG Phone 3 as a daily :)

@Freak07 I have been using your kernel on One Plus 7, very happy with it and donated a few times too (not as much as you deserve :(

Any plans to add support to Pixel 4a. I am going to get the device in a few days and this is the first thing I am searching for!

thanks for the kind words and thank you for the donations. no matter the amount it´s greatly appreciated.

I don´t personally own a pixel 4a. Without the device to personally test on, it´s (next to) impossible for me to provide a kernel similar to those on the pixel 4/4xl forums.

Just wondering if you are going to provide IMG version for your kernel?

no. you can repack the boot.img of your current firmware with my kernel however.

It´s quite easy with magiskboot once you get the hang of it. see the section about magiskboot here:
https://github.com/topjohnwu/Magisk/blob/master/docs/tools.md

Steps:
unpack boot.img of your current firmware with magiskboot
replace kernel image and dtb of unpacked boot.img with those found in my anykernel.zip
repack boot.img
flash repacked boot.img and dtbo.img from my anykernel.zip via fastboot.

6.4.2 is working great mate. on regular pixel 4 flame. thanx for the continud support!

you´re very welcome :)
 

beeshyams

Senior Member
Dec 29, 2014
1,590
535
Bangalore
Unfortunately no. I tried the device and it just offers nothing to me that made me keep it. I´d say the major pros for the Pixel 5 are the form factor and size, the price, the battery and for some the fingerprint scanner.
The only thing I really like and now miss about the Pixel 5 is the ability to reverse charge the Pixel Buds. Though in the end it´s just a gimmick, because the buds case charges super quick on my pc or wall charger.

Form-Factor/Size, Battery and Fingerprint Scanner are no advantages for my personal usage and subjective preference. Due to work and job ((rock)-climbing) my fingerprints are barely existent. Which made faceunlock with soli the best solution yet for me.
Price is probably directly related to not having the high-end current year soc along with a major cut of other features.
Apps launch slower on the Pixel 5, although the difference varies from app to app. The pixel 5 generally performs very well, but there are a few hiccups that aren´t there when I´m using the Pixel 4 XL. I guess different people are noticing this very subjectively.
While the SD765 is probably a good deal for somebody that searches for a new phone it´s not something I´m after at the moment. Googles Scheduler approach works way better for the SD765 than CAFs approach (see OnePlus Nord), but essentially it uses the same exact strategy as the Pixel 4a/4/XL.

In case anybody is interested in the app startup difference here´s a personal test for app opening speeds on various apps I use. The time for each startup is in milliseconds for 10 consecutive cold starts (previously force closed) of apps.
Rog 2 and Rog 3 were on Android 10 for this test. While Pixel 3, 4 and 5 were all on Android 11. So I´d expect better performance on the ROGs due to some improvements that address especially app launching in Android 11.
https://docs.google.com/spreadsheets/d/11RwNE-ceYQGnQpLTiaxSXu6nXf-ibHDkq3crPAVVUeE/edit?usp=sharing

I kept contemplating about keeping the Pixel 5 purely as a development device. But so far I used every phone I published a kernel for, for a longer period of time. I couldn´t see that happening with the Pixel 5.
Although it´s really somewhat sad, that this will be the first Pixel since the Pixel XL I don´t develop a kernel for, I didn´t want to create one just for the sake of it.
In the end I´m not doing this for anybody else, but only because I enjoy doing it. :) There is no infrastructure or app behind my kernel. Donations only cover a small fraction of every phone I bought myself.
This was not really an easy decision, as I very much enjoy the Pixel Community on XDA. Especially developing alongside @tbalden :)
But ultimately I feel I must enjoy developing a kernel for a device I really like to use.

I´m still using either the Pixel 4 XL or the ROG Phone 3 as a daily :)



thanks for the kind words and thank you for the donations. no matter the amount it´s greatly appreciated.

I don´t personally own a pixel 4a. Without the device to personally test on, it´s (next to) impossible for me to provide a kernel similar to those on the pixel 4/4xl forums.



no. you can repack the boot.img of your current firmware with my kernel however.

It´s quite easy with magiskboot once you get the hang of it. see the section about magiskboot here:
https://github.com/topjohnwu/Magisk/blob/master/docs/tools.md

Steps:
unpack boot.img of your current firmware with magiskboot
replace kernel image and dtb of unpacked boot.img with those found in my anykernel.zip
repack boot.img
flash repacked boot.img and dtbo.img from my anykernel.zip via fastboot.



you´re very welcome :)
@Freak07 thanks for the revert. I should have checked before buying 4a!

Anyway, please do let us know if you acquire the device and do your magic

Thanks again
 

rob_z11

Senior Member
Sep 20, 2010
4,459
1,231
Thanks for your detailed instructions on how to unpack the stock kernel boot image.

I have downloaded the tools and copied the magiskboot, but I can't seem to execute the binary.

I have copied the files to /dev/GCZ or my Download directory without any success.

I have also copied the tools to my linux desktop, but no success. Will keep looking..

Update: Thanks. I got it...
 
Last edited:
  • Like
Reactions: Freak07

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    Update 7.2.3

    Hey guys and girls,


    Here´s a bit of an early release this time. I figured since the kernel works on Android 11 and the Android 12 Developer-Preview at the moment it won´t hurt to release this build.

    Source from Dev-Preview 2 is merged. There was no new source drop for DP 2.1, so it´s fine to flash there as well.
    It contains a few other little changes here and there.

    Everything else in the changelog and on github as usual.

    I wish everybody a great day.
    Enjoy the device and the kernel, because I certainly do :)

    Before troubleshooting and reporting any issues make sure to not use any additional mods, scripts or tweaks. This includes all mods and magisk modules, even the tiniest modification you did.

    big thanks to all my testers again:

    @Mrcactuseater
    @MArtyChubbs @ilal2ielli
    @toastyp @Alcolawl @legents


    Detailed changelog below.


    Changelog:

    Kernel Base

    - Merge Android 12 DevPreview 2 source
    - Prebuilt Clang updated to 12.0.4 by google
    - Linux-Stable-Upstream to 4.14.227

    Magisk Module:
    - After flashing the kernel, you will see a module called AK3 Helper Module in Magisk Manager. This will fine tune the power-hal. Do not delete it!


    Have fun flashing and enjoy your device with latest linux-stable :)

    Why is linux-stable beneficial?

    I wish you all a nice day/evening!


    Download is below :)

    Download:


    Kernel:
    https://www.androidfilehost.com/?fid=2188818919693773022



    How to flash the Kernel:

    1. Make sure you are rooted, are using the latest magisk suited for your OS version and a kernel manager capable of flashing a zip is installed. If available you'll can use TWRP as well. Download the kernel.zip to your device.
    1a. If you used the SQLITE3 Magisk Module and the GPay Fix Magisk Module in the past (prior to 2.0.0) look at this post: click me

    2. Flash kernel zip in via your favorite method. Kernel Managers and Recoveries need to be updated to work with a specific Android Version. It's your job to ensure compatibility! :) Root will be preserved! (Make sure to be on the latest firmware the kernel is made for)

    3. Reboot and profit! Before reporting any issues make sure to read the first three posts of this thread!
    Instructions can be found in the OP too!


    Have fun, enjoy the kernel and your phone.


    If you like my work please consider a donation.
    Donations are not mandatory but very welcome.
    If you like my work and want to buy me a coffee/green tea: http://paypal.me/freak07
    8
    hey everybody,

    nothing new in the april source for my kernel. Seems like merging DP2 had already covered everything that found its way into the april source.

    So have fun flashing 7.2.3 on the april security update! :)

    I wish everybody a great week!
    2
    There seems to be a bug:

    When the display is on and I cover the front camera with my hand/finger, then it will turn the screen off. The screen gets turned on as soon as I life the finger.
    Basically it is the same behaviour as when I am in a call. When I put the phone to my ear it will turn of the screen.
    Do you use telegram? Telegrams privacy mode (when lifting your phone to your ear similar to the phone app) sometimes will not release usage and will trigger outside the app until I force close the offending app. You might be getting a similar issue from one of your communication apps. By the way it happens on my unrooted factory stock pixel 5. So don't think it kernel related.
    1
    I can flash kernel 6.8.3 from 7.1.1
    Please tell me which version has better battery stability and improvement @Freak07
    Thanks
    Always flash the latest version.
    1
    I hope I’ll find some time to upload a new release with dp2 changes merged later today :)
  • 73
    Kirisakura-Kernel for the Pixel 4 and Pixel 4 XL

    Hello everyone,

    After rising to the most popular kernel on the Pixel 3/XL forums, here is Kirisakura-Kernel for the Pixel 4 (FLAME) and Pixel 4 XL (CORAL), together FLORAL.
    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!

    The kernel aims to keep most of the subsystems updated, way ahead of the stock kernel, thereby improving security, stability and performance!
    This includes Linux-Stable, CAF-Upstream, F2FS-Mainline and kernel/common.
    If that got you curious,have a read about linux-stable and why it is important here. The stable-process is not the same for every subsystem, but the general idea, rule of thumb and benefits are applicable for other subsystems as well.


    Main Features:
    - Based on latest kernel sources from Google, Kernel is made for Android 11
    - Linux-Stable-Upstream included to latest 4.14.227
    - Next-Gen CAF-Tag LV.AU.0.1.0.r2-01000-qtiquingvm.0 merged
    - Next-Gen CAF-Tag LV.AU.0.2.0.r1-02900-gen3meta.0 merged
    - Next-Gen CAF-Tag LA.UM.8.11.r1-04800-NICOBAR.0 merged
    - Next-Gen CAF-Tag LV.AU.0.1.0.r2-00700-qtiquingvm.0 merged
    - Regular CAF-Tag for SD855 merged LA.UM.8.1.r1-16200-sm8150.0
    - include all important fixes/improvements from kernel/common
    - compiled with latest Clang 12.0.4 from Google prebuilts and built with -O3 optimizations
    - F2FS implementation updated to latest state of kernel/common and kernel.org maintained by Jaegeuk Kim.
    - Safety Net patches are included -> Kernel passes Safety Net (hardware attestation is not related to these kernel patches)
    - Flashing the kernel will keep root!
    - Tested to work on custom ROMs

    - Flashable via EXKM and FKM on a rooted system!
    - remove extensive Memory Management logging from Google
    - removed nolog usage, remove rtb logging from the kernel
    - remove selinux auditing from kernel for lower overhead
    - remove IPC logging from the kernel
    - introduce kmalloc reclaimable caches for improved memory management
    - AnyKernel3 powered by @osm0sis (big thanks!)

    EAS related features:
    - CleanSlate options to dynamically control freq boosting and sched boosting of powerhal
    - small improvements to tasks placement
    - fixes from kernel/common to EAS
    - improvements from Pixel 5


    CPU related features:
    - Power saving workingqueues enabled by default (toggleable in EXKM)
    have a read here: https://lwn.net/Articles/731052/
    this complements EAS in general
    - Change various drivers (WLAN, MM, audio, charger, power, thermal, glink etc) to user power efficient workingqueues. This should work well in conjunction with EAS
    - include cpuidle patches from CAF
    - s2idle-flow improvements from mainline
    - improve efficiency while music playback
    - arm64: lse: Prefetch operands to speed up atomic operations

    File System related features:
    - Include latest f2fs changes found on f2fs stable git
    - Include rapid GC by @arter97 ( best thing is to read the commit description linked here. I compared GC on stock google f2fs, upstreamed f2fs and f2fs with rapid GC. Rapid GC is the most effective, followed by upstreamed f2fs.)

    GPU related features:
    - KCAL to control various RGB related display configs (RGB, Hue, Saturation etc -> accessible via CleanSlate Config App)
    - add ability to reduce minimum brightness
    - add high-brightness-mode (HBM)
    - Update GPU driver to latest CAF state
    - improve GPU performance (overall smoother experience)
    - reduce power consumption when rendering static images
    - enable of usage of SD855+ GPU frequencies as optional feature

    UI/UX/Usability related features from CleanSlate:
    - CleanSlate features made by @tbalden
    - Adjust all CleanSlate features with the CleanSlate-Apps found in the CleanSlate-Thread (if you profit from the CleanSlate features make sure to buy the premium versions on Play-Store to support @tbalden
    - Flashlight Notification/Call blinking
    - Vibrating Notification Reminder
    - Sweep to Sleep touchscreen gesture - highly customizable
    - DoubleTap on Sweep2Sleep's area gestures - new way to pull down android Notification Area
    - Face down screen off - new gesture, e.g. conveniently use together with 'flip to shh' to turn screen off

    Network related features:
    - Wireguard Support (Details)

    Memory related features:
    - updated PSI monitor with latest changes
    - improved mm with patches from latest mainline
    - various other changes from mainline
    - included zstd and lz0-rle as options for ZRAM-algorithm (lz4 is probably the best all around, so only change it if you know why and what you are doing)
    - allow swappiness up to a value of 200
    - Backport to enable CONFIG_HAVE_MOVE_PMD (see here)
    - Backport to enable CONFIG_HAVE_MOVE_PUD (see here) ,

    Security related features:
    - CFI and LTO both kept intact and are used to keep additional security Google implemented for us!
    - ThinLTO used as of 3.9.0
    - Shadow Call Stack

    Tuned PowerHal
    - allow kernel to idle on lowest frequencies when no interaction is happening
    - increase swappiness during periods without interaction to favor swapping memory, relax swappiness otherwise
    - scheduler camera processes to the big cluster and prime core when faceunlock is used
    - adjust powerhal behaviour when the camera is used

    Misc Features:

    TCP Congestion Algorithms:
    - advanced algorithms enabled
    - includes new bbr2
    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


    Other features:
    - disable logging to make the kernel more lightweight in various places (includes mm, vma, gpu, ipa etc)
    - remove VLAs from the kernel (more info)
    - add support for steam controller
    - add support for nintendo switch controller
    - merge upstream solution for PM/Wakeup driver, which reduces unnecessary logspam and also improves sleeping behaviour
    - merge freezer v2 backport from google gerrit (required for developer option ""suspend execution for cached apps"")

    Feature section for the "non visible" but perceptible improvements:
    - updated binder section (responsible for interprocess communication)
    - updated sdcardfs ; have a read about it here:


    Requirements

    - unlocked Bootloader
    - USB-Debugging in developer options enabled
    - latest adb and fastboot binaries
    - working adb and fastboot environment
    - working magisk environment


    How to flash the Kernel:

    1. Download the kernel.zip to your device

    1a. While it may not be necessary all times when coming from another custom kernel: You may want to restore stock boot.img as well as stock dtbo.img, which can both be found in the factory image. If you´re on a custom rom, simply dirty flash your ROM. Reroot with magisk and optionally install twrp.zip (if existing). Before reporting issues make sure you do that! Thank you!

    1b. If you used the SQLITE3 Magisk Module and the GPay Fix Magisk Module in the past look at this post: click me

    You only need to do either 3a OR 3b
    2a. Boot to TWRP and flash my kernel.zip. Root will be preserved! (Currently not working on Android 10 due to no TWRP for the Pixel 4/XL!! )
    or
    2b. Flash kernel zip in EX Kernel Manager or FKM app. Root will be preserved! If a kernel manager is not yet updated to work on a specific Android Version, you need to wait until it is updated or use another one.

    4. Reboot and profit!



    DOWNLOAD:
    Download is located always in this folder:

    https://www.androidfilehost.com/?w=files&flid=301179


    Important: Read after Download
    Please take a look at the second post after flashing the kernel!


    Changelog:

    Android 10/ Q Kernels
    1.0.0 Initial Release
    1.0.1 https://forum.xda-developers.com/showpost.php?p=80712545&postcount=51
    1.0.3 https://forum.xda-developers.com/showpost.php?p=80791393&postcount=181
    2.0.0 https://forum.xda-developers.com/showpost.php?p=81069625&postcount=341
    2.1.0 https://forum.xda-developers.com/showpost.php?p=81168297&postcount=424
    2.3.0 https://forum.xda-developers.com/showpost.php?p=81244627&postcount=491
    2.3.4 https://forum.xda-developers.com/showpost.php?p=81311861&postcount=561
    2.6.0 https://forum.xda-developers.com/showpost.php?p=81408591&postcount=611
    2.9.0 https://forum.xda-developers.com/showpost.php?p=81527369&postcount=692
    2.9.2 https://forum.xda-developers.com/showpost.php?p=81575075&postcount=702
    3.1.0 https://forum.xda-developers.com/showpost.php?p=81625099&postcount=725
    3.2.0 https://forum.xda-developers.com/showpost.php?p=81679343&postcount=761
    3.9.0 https://forum.xda-developers.com/showpost.php?p=81926617&postcount=802
    3.9.1 https://forum.xda-developers.com/showpost.php?p=81943269&postcount=824
    4.2.0 https://forum.xda-developers.com/showpost.php?p=82189985&postcount=851
    4.5.0 https://forum.xda-developers.com/showpost.php?p=82485339&postcount=892
    4.5.6 https://forum.xda-developers.com/showpost.php?p=82562029&postcount=941
    4.7.5 https://forum.xda-developers.com/showpost.php?p=82725499&postcount=986
    5.0.0 https://forum.xda-developers.com/showpost.php?p=83019609&postcount=1022
    5.2.2 https://forum.xda-developers.com/showpost.php?p=83206123&postcount=1066
    5.2.6 https://forum.xda-developers.com/showpost.php?p=83387505&postcount=1078

    Android 11/ R Kernels
    6.0.0 https://forum.xda-developers.com/showpost.php?p=83476821&postcount=1092
    6.1.3 https://forum.xda-developers.com/showpost.php?p=83649491&postcount=1131
    6.2.4 https://forum.xda-developers.com/showpost.php?p=83849179&postcount=1143
    6.6.0 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-84068177
    6.6.6 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-84227741
    6.8.2 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-84408147
    7.1.0 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-84588667
    7.1.1 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-84603881
    7.2.3 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-84747379

    Donations:
    Donations are not mandatory but very welcome if you want to support development or just buy me a coffee :)
    If you like my work: http://paypal.me/freak07

    Credits:

    @osm0sis for all his work, including the ak3 installer!
    @tbalden for being the best HTC wingman!
    @LeeDroid for his awesome roms!
    @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 all of his work and the stuff I could learn from him
    @flar2 for all his work
    @joshuous for all the help he provided to me in the past!
    @topjohnwu for magisk!
    @arter97 , @kdrag0n for helping me out several times!

    XDA:DevDB Information
    Kirisakura Kernel, Kernel for the Google Pixel 4 XL

    Contributors
    Freak07
    Source Code: https://github.com/freak07/FLORAL

    Kernel Special Features:

    Version Information
    Status:
    Stable

    Created 2019-10-27
    Last Updated 2020-11-03
    59
    Update to 2.0.0

    Hey guys and girls,

    So here´s the update finally. I worked on this kernel in parallel to the initial release I uploaded on XDA, since I started developing for the Pixel 4 XL. Because ultimately the 2.0.0 release is built upon the kernel base I wanted initially, but wasn´t able to create.
    This will be a longer post, but have a bit patience and tenacity when reading this post it might be worth it.

    A little context so everybody can follow a bit more easily:
    Starting with the Pixel 3/XL, the pixel kernels are more close to "CAF" than on previous Google phones. CAF stands for codeaurora-forums, where the development from Qualcomm for our SOC, the SD855, happens.
    Usually OEMs get a snapshot of a CAF-Base from Qualcomm, stop updating it, implement own device or company specific drivers/necessary changes and only add minimal changes to the kernel as soon as it is deemed stable.
    The CAF-Developers however constantly push updates to their CAF-Base on their git. It´s a lot of work to completely merge all CAF updates into the kernel, but since there are a lot of device and soc specific fixes and improvements it´s very worth it.

    Google used a very early snapshot of the CAF-source to base their Pixel 4/XL kernel upon.
    So one of my initial goals was to merge a more recent CAF-Base. This proved to be very difficult however. It ended up in so many failed attempts with a non successfully booting phone that I lost count of it and was on the verge of giving up a few times.

    I worked on it for weeks, excluding more and more changes, piece by piece, until I finally got the phone to a state, where I was able to pull a log and work in a specific direction.
    After that it was just a lot of time, that went into merging and doing tedious work. I took a peek into many corners of the kernel, while fixing all the conflicts and understanding some of the fixes google applied, which were also fixed by CAF at a later stage.
    So I tried to always pick the best solution for the problems Google and CAF faced. Sometimes I reverted a fix from Google, sometimes I reverted a fix from Qualcomm and rather picked the Google one.
    I understand the kernel a lot better and learned a lot in the last weeks.
    The main difficulties I had to fight with, were the fact that Google is the only OEM that uses LTO in conjunction with CFI and ShadowCallStack for increased security. This requires some low-level changes to arm64/kernel, which conflicts with some more recent changes from CAF. These changes were identified and reverted.
    The Pixel 3 and Pixel 4 phones are also the only phones, which make use of the Userspace-Low Memory Killer (ULMK) instead of relying on the kernel side low memory killer. Google put a lot of work and thought into this after the Pixel 3 was released. Very exciting work started on the dev previews of Android 10 on the Pixel 3, regarding the ULMK. I tried these changes on a personal Pixel 3 Rom and was in contact with the google dev responsible for it. I like the approach and thought process behind it. Since CAF is still on the kernel space low memory killer, there were more conflicts, which needed to be identified.
    Some of these commits were really inconspicuous. That´s the main reason this took a lot of time.

    One more point I´d like to describe:
    CAF maintains various tags, which can be merged. There´s a regular CAF-Tag for the sd855, where most OEMs base their kernel upon. It´s also very similar to the CAF-Snapshot google received from Qualcomm, just the OEM version instead of the open-source version.
    F2FS state is pretty old on this CAF-base (Google did upstream this to a pretty recent state, because the official f2fs-maintainer/developer is employed by google) , as well as other subsystems. Linux-stable upstream is at 4.14.117.
    For comparison the Pixel 4 XL stock kernel is still at 4.14.111. Another symptom of the rather not recent CAF-Base Google built the kernel upon.

    Now lets get to the sweet stuff :)
    Then there´s a more advanced CAF-Tag/Branch maintained by CAF for the sd855.
    Most of the soc specific and other related drivers have way more recent CAF-Upstream patches. F2FS is on the same level as the Pixel 4. Linux-stable upstream is at 4.14.146. Just to give you an idea.


    A short summary of how the new base works in comparison to the 1.x.x releases:

    1.x.x: Googles Code + necessary changes to compile as a standalone kernel + linux-stable upstream from kernel.org to 4.14.15x + upstreaming of various subsystems + kernel features

    2.0.0: Googles Code + necessary changes to compile as a standalone kernel + nextgen CAF base (includes linux-stable to 4.14.146) + regular CAF base for the sd855+ missing linux-stable upstream (up to 4.14.156) + upstreaming of various subsystems + kernel features

    Example 1:
    As you can see merging that nextgen CAF base brings more than one advantage. It´s tested code from Qualcomm/CAF which includes upstream updates for various subsystems and also linux-stable updates. That means less rooms for errors introduced by me merging thousands of lines of code.
    We have linux-stable upstream up to 4.14.146 tested by Qualcomm on the SD855 in the new kernel base. On the initial 1.0.x kernel I merged linux-stable myself all the way from 4.14.111 to 4.14.15x.
    That´s just one example but I think it serves as a good way to understand my motivation better.
    Even though one can´t see the updated SOC-specific drivers, the kernel runs way better than the 1.0.x release.
    Updates include drivers as GPU, CPU, Modem, Bluetooth, basically nearly all drivers.
    For example my bluetooth range when connected to my earstudio has significantly increased due to some CAF-Updates!

    Example 2:
    Just so you all can see how far away we are from the stock kernel now we take a look at the amount of code changes:

    Merging the next-gen CAF-tag: 3,171 changed files with 241,690 additions and 23,565 deletions.
    Merging the regular SD855 tag on top: 223 changed files with 5,754 additions and 1,852 deletions.

    Not all of these changes end up in drivers we actually use, but it´s still a good indicator.


    There were many other changes done to the kernel as well. I try to list them in the changelog!



    Regarding the freezes some people faced straight after rebooting:
    The only issue I could reproduce myself and solve with the help of a tester that was affected by the freezes too, where caused by F2FS-Upstream not working well with the SQlite3 module and the Gpay Fix Module.
    So for now I have excluded F2FS-Upstream from my kernel. Judging from my experience with the Pixel 3 XL Google will soon merge these changes by themselves and then even the stock kernel will exhibit this behaviour.
    I can´t see anything wrong with the F2FS-Upstream kernel patches so a solution will have to be found anyway when Google merges these changes into the stock kernel.
    If you have used the SQLite3 Module and the GPay Fix Module in the past, please follow step 1a from my instructions.

    Screen freezes when using HBM in conjunction with AOD and Android Auto are resolved too.

    Please keep in mind. I only looked at the issue with the GPay Fix Module, because I saw some courage from @ilal2ielli providing logs and trying to actively help me.
    No magisk modules, scripts, tweaks, modifications, xposed, sound mods or similar are officially supported!
    If you face issues, try to reproduce them without any modifications done to the system at all. Then provide logs and steps to reproduce (instructions in post #2). This way I can look into it.
    Sometimes a clean flash after using to many mods like xposed, even if installed systemlessly gets rid of all perceived issues!
    Posts like: "I have issues please fix will be simply ignored. "


    Magisk Module fixing the stock powerhal behaviour:
    The power hal of the pixel 4 is partially controlled by a config file. On stock the setup of the power-hal causes the kernel to not idle at 576mhz on the little cluster after some random length of uptime, depending on usage and setup.
    This module fixes this behaviour. It´s not critically needed, but may increase battery life a tiny bit.

    On stock this config file sets up the power hal to boost top-app schedtune boost to 30 upon interaction and after the boost duration is finished, back to a value of 10.
    There are different groups for tasks. top-app tasks are ui-critical tasks, rt-tasks, all that are critical for a smooth experience of the phone.
    Setting top-app schedtune boost to 30 causes the follwoing: The scheduler will expect tasks of the top-app group to use 30% more CPU time than they (probably) actually will, and the CPU-frequency governor will speed up the processor accordingly. "Boosting" a process in this way, thus, does not affect its scheduling priority, but it will affect the speed of the CPU on which it ends up running.
    The problem is resetting the value back to 10, when no interaction is happening. This seems to cause the little cluster to idle at 1036mhz after the phone is up and running a few hours on 4.14 kernels.
    With my module the value gets reset back to 0 instead of 10, when the phone is not being interacted with
    As you can see this is not kernel related, but a userspace thing, that just influences how the kernel handles load. So it can´t be fixed in the kernel, it needs to be fixed in userspace.
    That´s why I created this magisk module. It can be used on the stock kernel and other kernels as well!



    This kernel was more than a month work and I spent countless hours during my free time (and the nights) to get it to this state! Especially preparing the CAF-Base I merged, understanding all changes and consequences which happen by merging it!
    I´m glad it worked out and a bit proud it can finally be released!

    So please enjoy it hopefully as much as I am :) I´m going to enjoy the rest of my sunday now!


    The kernel was tested for a week without a single issue reported by my testers :)
    A huge thanks to them at this place!
    @wrongway213
    @Mrcactuseater
    @MArtyChubbs
    @ilal2ielli
    @toastyp


    Detailed changelog below.

    Enjoy!


    Changelog:

    Kernel Base
    - Completely new kernel base based upon latest Google source
    - Next-Gen CAF-Tag LV.AU.0.0.1-02420-qtiquingvm.0 merged
    - Regular CAF-Tag for SD855 merged LA.UM.8.1.r1-12200-sm8150.0
    - linux-stable upstream to latest 4.14.156
    - included patches from kernel/common
    - removed F2FS upstream due to conflicts with SQLite operations introduced by SQLite3 Magisk Module and GPay fix magisk module
    - remove extensive Memory Management logging from Google
    - removed nolog usage, remove rtb logging from the kernel
    - remove selinux auditing from kernel for lower overhead
    - remove IPC logging from the kernel
    - introduce kmalloc reclaimable caches for improved memory management



    Features:
    - all previous features kept intact
    - reduce power consumption when rendering static images
    - add support for steam controller
    - introduce bbr2 tcp congestion control algorithm
    - improve bbr congestion control algorithm

    Further Kernel Changes:
    - make bluetooth driver more lightweight
    - remove IPC logging from several drivers
    - improve memory allocations (thanks @arter97 @Sultanxda)
    - remove VLA usage (thanks @arter97)
    -

    Other changes:
    - look at github :)

    Magisk Module:
    - Add Module to fix config for power hal

    Have fun flashing and enjoy your device with latest linux-stable :)

    Why is linux-stable important?

    I wish you all a nice day/evening!


    Download is below :)

    Download:


    Kernel: https://www.androidfilehost.com/?fid=4349826312261650873

    Magisk Module: https://www.androidfilehost.com/?fid=4349826312261650875



    How to flash the Kernel:

    1. Make sure you are rooted and either EXKM or FKM is installed. Download the kernel.zip to your device.
    1a. If you used the SQLITE3 Magisk Module and the GPay Fix Magisk Module in the past look at this post: click me

    2. Optionally: Flash the magisk module provided in the release post!

    3. Flash kernel zip in EXKM or FKM app. Root will be preserved!

    4. Reboot and profit! Before reporting any issues make sure to read the first three posts of this thread!
    Instructions can be found in the OP too!


    Have fun, enjoy the kernel and your phone.


    If you like my work please consider a donation.
    Donations are not mandatory but very welcome.
    If you like my work and want to buy me a coffee/green tea: http://paypal.me/freak07
    42
    Progress Report/Small Teaser :)

    Hey everybody,

    Testing of the new kernel I mentioned some time ago seems very very promising.
    I really hope I find some time this weekend to get the release ready.

    I started more than 3 times from scratch until everything worked out as I intended it to. That´s the reason, why there were no updates for over two weeks here now.
    It´s a completely new kernel base from CAF (basically from their Next-Gen branch) and essentially the kernel like I wanted it from the beginning but wasn´t able to build so it boots up.
    I will give a detailed description of everything done in the release post. That will be a long post. ;)
    The wait will be worth it so stay tuned.

    The new kernel should have the freezing on bootup issue fixed, when any sort of GPay fix is used. I will give short instructions once the kernel is released, to make sure you can start clean there.
    A big thanks to @ilal2ielli for debugging this issue with me, patiently providing logs all the time and keeping up with all the test builds I sent to him.

    The display issues related to Android Auto when used in conjunction with HBM will also be fixed in the new kernel. Thanks to @toastyp for taking the time, providing me logs and giving feedbacks on test builds I sent him over the last weeks.


    I wish everybody a nice day :)
    41
    Update to 4.7.5

    Hey guys and girls,

    I try to be quite fast with the monthly security updates indeed. Google always publishes the source code, when I´m going to sleep, so depending on your timezone you might have to wait a few hours or a day longer. :)
    Keep in mind, I´m just a human being so if it takes a little bit longer, it´s probably because there´s something else keeping me busy.

    With that said here´s the security update for June. We already had most of the changes from merging CAF, Linux-Upstream and other things.

    Upstream linux-stable is merged to 4.14.182 as well as CAF-Upstream and mainline f2fs-updates :)


    All recently developed CleanSlate options can be easily accessed via the CleanSlate apps on this kernel as well! Please make sure to buy the premium versions if you profit from these features and want to give a little bit back to @tbalden ! Or just drop him a small donation!
    This includes the option to reduce the freq boosting from the stock powerhal and EAS scheduler boosting with adjustable levels. This is a very handy way to safe power on the fly without using the stock powersaver profile.

    All option to use different gamma settings to reduce the green tint can be found as well! This includes a few different choices as well.
    Please take look at the latest release posts from @tbalden ! These include more detailed explanations!

    https://forum.xda-developers.com/showpost.php?p=82660965&postcount=219

    https://forum.xda-developers.com/showpost.php?p=82688341&postcount=228

    https://forum.xda-developers.com/showpost.php?p=82696759&postcount=233

    https://forum.xda-developers.com/showpost.php?p=82725109&postcount=255





    Before troubleshooting and reporting any issues make sure to not use any additional mods, scripts or tweaks. This includes all mods, even the tiniest modification you did.
    Once you know things are working add them back one by one to make sure everything works.



    More details in the changelog! :)

    I wish everybody a great weekend :)

    big thanks to all my testers again:

    @Mrcactuseater
    @MArtyChubbs @ilal2ielli
    @toastyp @Alcolawl


    Detailed changelog below.

    Enjoy!


    Changelog:

    Kernel Base
    - Merge June Security Update
    - Linux-Stable-Upstream to 4.14.182
    - Merge latest CAF-Tag for the SD855 as usual
    - patches from kernel/common
    - updates to f2fs to be inline with f2fs-stable
    - update WiFi driver with upstream CAF to remove some logging

    Features:
    - add all recently developed CleanSlate features! They are all accessible via cleanslate apps, which can be found on the CleanSlate thread! Please make sure to buy the premium versions if you profit from these features and want to give a little bit back to @tbalden !
    - option to reduce frequency boosting
    - option to reduce EAS Scheduler related boosting
    - option to reduce green tint by using different gamma tables (please refer to the release posts I linked above)


    Other changes:
    - see github :)

    Magisk Module:
    - Now included in the kernel.zip (will appear as AK3-Helper Module in Magisk Manager)

    Have fun flashing and enjoy your device with latest linux-stable :)

    Why is linux-stable important?

    I wish you all a nice day/evening!


    Download is below :)

    Download:


    Kernel: https://www.androidfilehost.com/?fid=4349826312261823892



    How to flash the Kernel:

    1. Make sure you are rooted, are using the latest magisk stable and either EXKM or FKM is installed. Download the kernel.zip to your device.
    1a. If you used the SQLITE3 Magisk Module and the GPay Fix Magisk Module in the past (prior to 2.0.0) look at this post: click me

    1b. Remove the old powerhint-magisk module in magisk manager starting with version 4.5.6 as it´s now included in the kernel.zip. After flashing the kernel it will show up as AK3 Helper Module in Magisk Manager.

    2. Flash kernel zip in EXKM or FKM app. Root will be preserved! (Make sure to be on the latest firmware the kernel is made for)

    3. Reboot and profit! Before reporting any issues make sure to read the first three posts of this thread!
    Instructions can be found in the OP too!


    Have fun, enjoy the kernel and your phone.


    If you like my work please consider a donation.
    Donations are not mandatory but very welcome.
    If you like my work and want to buy me a coffee/green tea: http://paypal.me/freak07
    38
    Update to 2.1.0

    Hey guys and girls,

    So here´s the next update. I guess you all have noticed by now, that I try to not constantly update the kernel, immediately for every single new commit that makes its way into the kernel.
    This has mainly two reasons. I want the kernel to be tested thoroughly. I´m not trying to develop a very close to stock kernel, but I still want it to be stable. Testing needs time and some issues only creep up after a while.
    The other reason I´m short on time lately and updating the thread takes time. :)

    Short explanation on some logs I examined, the new CAF-Merge and the December update from Google.


    Regarding the logs. I further dug through the source and while testing we stumbled upon a few things.

    I took a look at the log @rickysidhu_ send me a few days ago. It´s unfortunately caused by a warning that´s also present in the stock kernel on the Pixel 3 and I saw the same on a log from one of my testers. @rickysidhu_ confirmed it happens on EX-Kernel on the Pixel 4 as well, which is very close to stock. So I´m sure it isn´t something I introduced.
    I never encountered the warning or the following reboot on my own device, so it might be something network related tied to a very specific scenario or some sequence of events.
    I´m aware of the issue and still looking for a solution.

    problem number two is connected to another issue one of my testers run into.
    Looking at the log I found this commit from Google present in the stock kernel related to a problem where the device fails to switch between suspend and resume.
    It essentially forces a kernel panic, when the device is stuck between suspend and resume. This issue appears to be quite rare, but it happens more frequently for some people.
    It seems to me Google had no other choice, than to implement that non-desirable "workaround" for the issue.
    If this happens the radar chip and some thermal driver related code seems to be at play.

    If you encounter a reboot, immediately go to sys/fs/pstore, zip up the contents and upload them here for me. Give all details about your setup and I will look at the logs.


    This brings us to the December update from Google.
    Google now enforces warm reboots on thermal related shutdowns. That means logs are kept intact in case a random reboot happens.
    I think this is directly related to the suspend/resume issue described above. So google is aware of the issue and seems to work on it.

    On the good side, they worked on the face-detection driver and made it work more quickly and efficiently.
    Google maxed out PCIe speeds, and fixed an encryption related problem which both impacted file system performance as well
    Follow this link for an androbench taken on the December update

    There are many other little improvements from Google in the December drop, so the wait was definitely worth it for me. :)


    The last point is reserved for some of my own changes.

    The nextgen-CAF tag is now merged to the most recent state to what´s available on the CAF-repos. This second merge brought again many fixes from CAF-Upstream and I can tell the kernel runs better than before from the logs and usage.
    I was able to revert a few "emergency" google fixes in the source and replace them again with CAF-Upstream solutions. Some of these reverts seemed over a year old and seemingly forgotten by Google. This might have been the issue for some deep sleep issues. I didn´t encounter a single instance where my phone was left with broken deepsleep for over 2 weeks now.
    Additionally I merged an upstream solution for PM/Wakeup driver from kernel/common, which reduces unnecessary logspam and also improves sleeping behaviour/operation.
    Since there are some problems with sleep/suspend/resume behaviour on the Pixel 4, I wanted to give this a few weeks before it gets in the release kernel.
    Alongside these commits, the Google and CAF drivers which make use of the upstream PM/Wakeup solution, were updated to work properly.

    The CAF-Tag brought many improvments to SOC-related driver and EAS- Implementation as well. I certainly haven´t noticed any negative performance issues for now. Hundreds of files were updated. Take a look at github if you´re interested in detailed changes.

    Removal of kernel side enforced HBM.

    There are currently two ways to enable HBM on this kernel, either use the kernel side enforced HBM (toggleable in EXKM) or enable the hidden factory disabled HBM from Google.

    After some Pixel 4 owners reported issues with the HBM toggle in EXKM, I decided to remove this implementation from the kernel for now.
    The Pixel 4 and the Pixel 4XL share different BL values. Which made toggling HBM on the Pixel 4 reset the brightness to 1/4 of maximal brightness.
    The HBM mode enforced by the kernel makes the display drop to 60hz, maxes the brightness out and renders the brightness slider non-functional.

    However enabling the HBM mode baked into stock kernel, but disabled by Google leaves the display at 90hz and the brightness slider functional.
    It´s described in the following artice: How to enable disabled factory HBM from Google on the Pixel 4/XL

    Since that method works way more smoothly, I decided to remove the kernel side enforced HBM from my kernel.
    So refer to that XDA article above for high brightness mode, in case you want it enabled.

    A word of warning however. HBM is one of the mods, that can damage your device and Google could arguably deny any warranty claim, if you decided to use it.

    Google made the Pixel 4/XL devices only use HBM on HDR video playback.
    That might have a few reasons other than to save battery or to "limit" and leave users with a dimmer display.

    Yes limiting the maximum brightness saves a bit battery especially when 90hz is used. I guess we all like a bit more battery life.
    However what also needs to be seen is the relation of battery life versus increased usability in sunlight by HBM!

    here´s a comparison shot with a camera on manual controls. One in a dark corner of the room and one in the "not so bright" German winter sun.
    https://photos.app.goo.gl/wmN56Gd6unhvXBym8

    As you can see the difference isn´t really big. I wouldn´t say enabling HBM makes usability in the sun better by a huge margin. Even the super bright displays of other phones are not comfortable to use in bright sun.

    With the method above every can try by themselves if they increased brightness is worth the increased power consumption and decide for themselves.

    Now the warning. Google deliberately made HBM only available on HDR Video playback. That means moving content with less chance of burn in.
    Since we don´t have documentation about the safety limites of the displays available, you´re touching ground that isn´t clearly labeled as safe for the display on a daily basis.
    Rendering static images on highest brightness in HBM, may "benefit" and accelerate burn in.
    If you´re not using HBM and make a warranty claim for burn in, law is on your side when asking for a replacement. If you decide to use HBM and overwrite googles intentions, your in another zone.



    Anyway :) have fun with the release. I´m very satisfied with the kernel so far :)


    Small update on the magisk module:

    Magisk Module fixing the stock powerhal behaviour:
    The power hal of the pixel 4 is partially controlled by a config file. On stock the setup of the power-hal causes the kernel to not idle at 576mhz on the little cluster after some random length of uptime, depending on usage and setup.
    This module fixes this behaviour. It´s not critically needed, but may increase battery life a tiny bit.

    On stock this config file sets up the power hal to boost top-app schedtune boost to 30 upon interaction and after the boost duration is finished, back to a value of 10.
    There are different groups for tasks. top-app tasks are ui-critical tasks, rt-tasks, all that are critical for a smooth experience of the phone.
    Setting top-app schedtune boost to 30 causes the follwoing: The scheduler will expect tasks of the top-app group to use 30% more CPU time than they (probably) actually will, and the CPU-frequency governor will speed up the processor accordingly. "Boosting" a process in this way, thus, does not affect its scheduling priority, but it will affect the speed of the CPU on which it ends up running.
    The problem is resetting the value back to 10, when no interaction is happening. This seems to cause the little cluster to idle at 1036mhz after the phone is up and running a few hours on 4.14 kernels.
    With my module the value gets reset back to 0 instead of 10, when the phone is not being interacted with
    As you can see this is not kernel related, but a userspace thing, that just influences how the kernel handles load. So it can´t be fixed in the kernel, it needs to be fixed in userspace.
    That´s why I created this magisk module. It can be used on the stock kernel and other kernels as well!

    I recommend using the module as I´m using it myself :)

    V2 boosts the CPU cores to max for 5 seconds instead of only 1, when launching the camera app to ensure smoother operation.



    The changes introduced by the new CAF-Tags were tested for over a week without a single issue reported by my testers :)
    A huge thanks to them at this place again.
    @wrongway213
    @Mrcactuseater
    @MArtyChubbs
    @ilal2ielli
    @toastyp
    @Alcolawl


    Detailed changelog below.

    Enjoy!


    Changelog:

    Kernel Base
    - Merge all Google related changes from December Security Drop
    - Next-Gen CAF-Tag updated to LV.AU.0.1.0.r2-00200-qtiquingvm.0
    - revert some Google changes, which could lead to a non deep sleep behaviour and replace them with CAF-Upstream solutions
    - additionally merge upstream solution for PM/Wakeup driver, which reduces unnecessary logspam and also improves sleeping behaviour
    - update Google and CAF drivers to make use of the upstream PM/Wakeup solution
    - linux-stable upstream to latest 4.14.158
    - update AK3 zip to latest state (thanks to @osm0sis )


    Features:
    - Remove kernel enforced HBM (only disadvantages at the moment, use this instead: how to activate factory disabled HBM from Google
    - make WLAN driver more lightweight and user power efficient workingqueues
    - remove an unnecessary wakelock from the WLAN driver (the wlan has more than enough ways to acquire wakelocks)


    Further Kernel Changes:
    - look at github

    Other changes:
    - look at github :)

    Magisk Module:
    - update to v2
    - boost cpu-cores to max when opening the camera app 5 seconds instead of only 1 second to ensure smoother operation until all necessary firmware and drivers are loaded

    Have fun flashing and enjoy your device with latest linux-stable :)

    Why is linux-stable important?

    I wish you all a nice day/evening!


    Download is below :)

    Download:


    Kernel: https://www.androidfilehost.com/?fid=4349826312261667498

    Magisk Module: https://www.androidfilehost.com/?fid=4349826312261667499



    How to flash the Kernel:

    1. Make sure you are rooted and either EXKM or FKM is installed. Download the kernel.zip to your device.
    1a. If you used the SQLITE3 Magisk Module and the GPay Fix Magisk Module in the past look at this post: click me

    2. Optionally: Flash the magisk module provided in the release post!

    3. Flash kernel zip in EXKM or FKM app. Root will be preserved!

    4. Reboot and profit! Before reporting any issues make sure to read the first three posts of this thread!
    Instructions can be found in the OP too!


    Have fun, enjoy the kernel and your phone.


    If you like my work please consider a donation.
    Donations are not mandatory but very welcome.
    If you like my work and want to buy me a coffee/green tea: http://paypal.me/freak07
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone