[Kernel][09.06.2021][4.14.235][A11/A12 BETA 1] Kirisakura 7.4.4 for Pixel 4/XL aka FLORAL

Search This thread

dangh5

Member
Mar 11, 2012
9
0
can you please try the attached kernel and see if the issue is fixed on your end?
Sorry, i have a question, when flash Clean State, my Solid radar auto enable, with stock it disable (beccause my country not support). Can you process to enable with your's kernel.
Many thank 😍😍😍
 

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
4,913
15,676
Sorry, i have a question, when flash Clean State, my Solid radar auto enable, with stock it disable (beccause my country not support). Can you process to enable with your's kernel.
Many thank 😍😍😍
CleanSlate is supposed to be used without root, so the funtionality of the following magisk module is replicated with a kernel tweak on CleanSlate:


Since Kirisakura is supposed to be used with root, simply flash the magisk module on the linked thread via magisk manager and reboot.
 
  • Love
Reactions: dangh5

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
4,913
15,676
Update 7.4.2

Hey guys and girls,


I hope everybody started in or has a great day. It seems release 6.6.6 in January broke CODM (or an update to the game later, who knows) and possibly similar games. The cause is the CONFIG_HAVE_MOVE_PUD backport. Until I find a fix, the backport is reverted.
Thanks to @dangh5 and @ryandxter for reporting the issue and bringing it to my attention.

Linux-Stable Upstream is included as well.

For those wondering, why the test was versioned 7.5.8 and this release is 7.4.2.
7.5.8 is based of a more recent branch that I´m still not comfortable to release yet and want to test further.

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

- Linux-Stable Upstream 4.14.232
- revert CONFIG_HAVE_MOVE_PUD backport from release 6.6.6 for now as it causes issues with audio driver that breaks certain games like CODM

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=2188818919693800935



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
 

rob_z11

Senior Member
Sep 20, 2010
4,462
1,231
I am not sure why, but flashed the kernel using Franco's Kernel Manager, and broke the camera. Had to flash the SP3 again to get the camera back...
 

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
4,913
15,676
I am not sure why, but flashed the kernel using Franco's Kernel Manager, and broke the camera. Had to flash the SP3 again to get the camera back...
working just fine here.

did you try to do one additional reboot after flashing the kernel? sometimes after switching from stock kernel (or even on stock kernel) this seems to happen to some people on dev preview.

some stuff needs to be adjusted by magisk after flashing the kernel. I think it might be a timing issue that seems to happen on the first boot, and as a result the camera hal can´t be started.
It might be also connected to the amount of magisk modules, if you´re using xposed etc.

there´s no need to flash whole sp3 again. just restore stock dtbo.img and boot.img via fastboot and you´re back on stock. (y)
 
Last edited:
  • Like
Reactions: crixley and rob_z11

rob_z11

Senior Member
Sep 20, 2010
4,462
1,231
working just fine here.

did you try to do one additional reboot after flashing the kernel? sometimes after switching from stock kernel this seems to happen to some people on dev preview.

some stuff needs to be adjusted by magisk after flashing the kernel. I think it might be a timing issue that seems to happen on the first boot, and as a result the camera hal can´t be started.
It might be also connected to the amount of magisk modules, if you´re using xposed etc.

there´s no need to flash whole sp3 again. just restore stock dtbo.img and boot.img via fastboot and you´re back on stock. (y)
Thanks for the prompt response. Yes, I have done several reboot to see if I can get the camera to start. Every time I press camera, it brings camera up, but nothing is there like it is frozen, and no preview.

I believe I tried both dtbo.img and boot.img in past when I had similar issues with earlier alpha preview release in which front camera was acting up.

I don't have any other module other then ACC to control the charging.

Thanks again. Will try again next week.
 

fripSide2021

Member
  • May 15, 2021
    5
    0
    中国
    Hi, I failed to install the Kernel in Pixel 4.
    I use Android 10 factory image and the TWRP-3.5.2-10.pixel4.
    I push the Kirisakura kernel.zip to the phone via adb and install it via the TWRP install.

    However, it failed with the error message: Unsupported Android security Patch Level .

    By the way, I also want to know how to install the kernel for Android 11 since the TWRP does not support Android 11 now in Pixel 4.
    I try to use the kernel kitchen to replace the kernel file in boot.img. But it failed with the touch screen does not work properly.
     

    Freak07

    Recognized Developer / Recognized Contributor
    Jan 2, 2011
    4,913
    15,676
    Hi, I failed to install the Kernel in Pixel 4.
    I use Android 10 factory image and the TWRP-3.5.2-10.pixel4.
    I push the Kirisakura kernel.zip to the phone via adb and install it via the TWRP install.

    However, it failed with the error message: Unsupported Android security Patch Level .

    By the way, I also want to know how to install the kernel for Android 11 since the TWRP does not support Android 11 now in Pixel 4.
    I try to use the kernel kitchen to replace the kernel file in boot.img. But it failed with the touch screen does not work properly.

    Give the OP a read.
    You´ll find the kernel for Android 10 and the firmware you´re on there. If you run an A10 rom with a very recent security patch (I don´t know if that exists) then your best bet might be the most recent A10 release from the OP. If it doesn´t work for some reason you´re out of luck.

    If twrp is not working on your specific android version, the best way to flash is a kernel manager like EXKM or FKM. There´s another more recent one called smartpack (or similar), which I haven´t tried and I don´t know if it support flashing kernels properly here.

    Simply repacking the boot.img isn´t enough to get the "whole" package of this kernel. Flashing the kernel creates a magisk-helper module which is an integral part as well. So you need to be rooted with magisk as per instructions and if you go the manual route you need to re-create the magisk-module yourself. (y)


    I'd just recommend to give the OP a read and follow the instructions there.

    Thanks for the prompt response. Yes, I have done several reboot to see if I can get the camera to start. Every time I press camera, it brings camera up, but nothing is there like it is frozen, and no preview.

    I believe I tried both dtbo.img and boot.img in past when I had similar issues with earlier alpha preview release in which front camera was acting up.

    I don't have any other module other then ACC to control the charging.

    Thanks again. Will try again next week.

    I don´t know what is wrong on your end then. I´m using the kernel on a daily basis and my camera is working fine.
    If restoring stock boot.img and dtbo.img from factory image doesn´t fix issues you face after flashing the kernel, then something else might be wrong. :(
     
    Last edited:
    • Like
    Reactions: rob_z11

    fripSide2021

    Member
  • May 15, 2021
    5
    0
    中国
    Give the OP a read.
    You´ll find the kernel for Android 10 and the firmware you´re on there. If you run an A10 rom with a very recent security patch (I don´t know if that exists) then your best bet might be the most recent A10 release from the OP. If it doesn´t work for some reason you´re out of luck.

    If twrp is not working on your specific android version, the best way to flash is a kernel manager like EXKM or FKM. There´s another more recent one called smartpack (or similar), which I haven´t tried and I don´t know if it support flashing kernels properly here.

    Simply repacking the boot.img isn´t enough to get the "whole" package of this kernel. Flashing the kernel creates a magisk-helper module which is an integral part as well. So you need to be rooted with magisk as per instructions and if you go the manual route you need to re-create the magisk-module yourself. (y)


    I'd just recommend to give the OP a read and follow the instructions there.



    I don´t know what is wrong on your end then. I´m using the kernel on a daily basis and my camera is working fine.
    If restoring stock boot.img and dtbo.img from factory image doesn´t fix issues you face after flashing the kernel, then something else might be wrong. :(
    Thanks for your reply. The problem may be that my kernel version is Linux-4.14.180. But the Kirisakura-kernel version is 4.14.197. So the security patch level does not match.
    I have tried FKM and it works. The SmartPack does not work in Android 11.

    Currently, the most serious problem for me is that my custom kernel compiled from AOSP and google/kernel does not work properly and the touch screen does not work. The reason may be that my own dtb file and the kernel modules does not match the AOSP prebuild ones. Then my own kernel cannot load the kernel modules in AOSP rom.

    By the way, is the dbt file generated by "cat sm8150.dtb sm8150-v2.dtb > dtb"
     

    Freak07

    Recognized Developer / Recognized Contributor
    Jan 2, 2011
    4,913
    15,676
    Thanks for your reply. The problem may be that my kernel version is Linux-4.14.180. But the Kirisakura-kernel version is 4.14.197. So the security patch level does not match.
    I have tried FKM and it works. The SmartPack does not work in Android 11.

    Currently, the most serious problem for me is that my custom kernel compiled from AOSP and google/kernel does not work properly and the touch screen does not work. The reason may be that my own dtb file and the kernel modules does not match the AOSP prebuild ones. Then my own kernel cannot load the kernel modules in AOSP rom.

    By the way, is the dbt file generated by "cat sm8150.dtb sm8150-v2.dtb > dtb"

    This has nothing to do with the security patch level. The security patch level is the one you can check in settings/system.
    The anykernel.zip checks the android version and the security patch level. And if it detects incompatibility it aborts.

    If you're not on the latest firmware from Google with may 2021 security patch, you need to go back in the changelog in the first post and find the kernel that fits best.
    Flashing kernels that are not build for a specific android version or security patch can cause issues.

    All of your other issues have nothing to do with my kernel. So I don't think this is a good place to discuss this...


    However:
    You need to either force load the kernel modules (might work as long as your kernel is close to stock) or built the drivers into the zImage if you want to build a custom kernel.
    One of the touchscreen drivers for pixel 4/xl must be imported from a different repo on googles git. Should be fts_touch.
    It's not related to dtb, but the module magic blocking, as your kernel is not the one they have been originally been built with.


    Dtb is generated similar to here:
    https://github.com/CaptainThrowback/android_kernel_asus_sm8250/blob/rog3_recovery/build_kernel.sh

    :)
     

    fripSide2021

    Member
  • May 15, 2021
    5
    0
    中国
    This has nothing to do with the security patch level. The security patch level is the one you can check in settings/system.
    The anykernel.zip checks the android version and the security patch level. And if it detects incompatibility it aborts.

    If you're not on the latest firmware from Google with may 2021 security patch, you need to go back in the changelog in the first post and find the kernel that fits best.
    Flashing kernels that are not build for a specific android version or security patch can cause issues.

    All of your other issues have nothing to do with my kernel. So I don't think this is a good place to discuss this...


    However:
    You need to either force load the kernel modules (might work as long as your kernel is close to stock) or built the drivers into the zImage if you want to build a custom kernel.
    One of the touchscreen drivers for pixel 4/xl must be imported from a different repo on googles git. Should be fts_touch.
    It's not related to dtb, but the module magic blocking, as your kernel is not the one they have been originally been built with.


    Dtb is generated similar to here:
    https://github.com/CaptainThrowback/android_kernel_asus_sm8250/blob/rog3_recovery/build_kernel.sh

    :)
    Thank you. Now I can flash use the Kirisakura-FLORAL_6.0.0 version. It works well now.
    The patch security level seems to be a date, e.g. 2020-11-5. It works when the two kernel's dates are similar.
    Thanks for your guides. Now I have learned to flash via FKM or just modify the boot.img by Android-Kernel-Kitchen.

    I think I can write a tutorial for the newbie to flash the zip and avoid these problems.

    All of your other issues have nothing to do with my kernel. So I don't think this is a good place to discuss this...
    I am sorry. I will find another place to ask some questions about it.

    Currently, I still work on solving the problem of making touch screen works. The repository fts_touch is inside the new kernel repo manifest and generates a new kernel module ftm5.ko. The problem seems to be the module magic blocking. First, I will try to force reload all the modules.

    It is a very good idea to build the kernel modules together with the kernel. But I don't know how to modify the makefile. I will try to disable the module magic checking if it still does not work after reload the kernel modules. Then I try to learn from your kernel repository to find out how to build the kernel modules into the kernel.
     

    Freak07

    Recognized Developer / Recognized Contributor
    Jan 2, 2011
    4,913
    15,676
    Thank you. Now I can flash use the Kirisakura-FLORAL_6.0.0 version. It works well now.
    The patch security level seems to be a date, e.g. 2020-11-5. It works when the two kernel's dates are similar.
    Thanks for your guides. Now I have learned to flash via FKM or just modify the boot.img by Android-Kernel-Kitchen.

    I think I can write a tutorial for the newbie to flash the zip and avoid these problems.


    I am sorry. I will find another place to ask some questions about it.

    Currently, I still work on solving the problem of making touch screen works. The repository fts_touch is inside the new kernel repo manifest and generates a new kernel module ftm5.ko. The problem seems to be the module magic blocking. First, I will try to force reload all the modules.

    It is a very good idea to build the kernel modules together with the kernel. But I don't know how to modify the makefile. I will try to disable the module magic checking if it still does not work after reload the kernel modules. Then I try to learn from your kernel repository to find out how to build the kernel modules into the kernel.
    modifying the date specified in anykernel.sh doesn´t change that fact that you should only flash kernels on a matching firmware. flash the kernel that was released in december 2020, on a rom/firmware that has the same security patch.
    There´s no need for a guide how to be able to flash kernels on non matching firmwares.
    This is not something that anybody needs or should do on my kernel zips. Search the correct kernel for the matching firmware and follow the instruction in the first post and there won´t be any issue.

    Good luck in your endeavor. :)
    change =m to =y in the defconfig to build a driver into the zImage and not as a module. ;)
     
    • Like
    Reactions: bradical711

    Flyview

    Senior Member
    May 17, 2010
    2,467
    1,639
    Toronto/San Diego
    I just installed this on my Pixel 4XL and loving it. There are so many more optimizations than EX Kernel, I'm so glad I found it! Even a small improvement in battery life would be great! I can tell the CPU is not ramping up as much as it used to (use SystemGlow to check). I am using the CleanSlate config app to calibrate the colors and get rid of the disgusting green tint it has stock (a bit better with "Ambient EQ" on, but didn't want to rely on that).

    One suggestion:
    Would we be able to truly force 90Hz through the kernel? As of now, even with the force option on in developer options, it still drops down to 60Hz in certain apps, like Google Maps. I actually like it dropping down to 60Hz when I'm not interacting with the phone and there's nothing moving on screen, but in Google Maps it's always at 60Hz. Thanks!
     

    fripSide2021

    Member
  • May 15, 2021
    5
    0
    中国
    modifying the date specified in anykernel.sh doesn´t change that fact that you should only flash kernels on a matching firmware. flash the kernel that was released in december 2020, on a rom/firmware that has the same security patch.
    There´s no need for a guide how to be able to flash kernels on non matching firmwares.
    This is not something that anybody needs or should do on my kernel zips. Search the correct kernel for the matching firmware and follow the instruction in the first post and there won´t be any issue.

    Good luck in your endeavor. :)
    change =m to =y in the defconfig to build a driver into the zImage and not as a module. ;)
    Thanks for your help. It finally works after moving all the modules into the kernel.

    But the problem is that the linkage of vmlinux.o need half an hour on my server, while yours only need less than 5 mins. Maybe I should fork your branch for developing. :ROFLMAO:


    I do not know why your obj files are larger but faster. Interesting...
    Yours: 926017280 May 17 05:27 vmlinux
    Mine: 495692120 May 17 07:10 vmlinux
    Yours: 2617917488 May 17 05:26 vmlinux.o
    Mine: 1198656560 May 17 07:10 vmlinux.o
     
    Last edited:

    Top Liked Posts

    • There are no posts matching your filters.
    • 12
      Update 7.4.3

      Hey guys and girls,


      I hope everybody started in a great week. Here´s the next update. I was very busy so I didn´t find time to release 7.4.3, which has s-beta 1 source merged. However the previous kernel worked fine as well.
      Kernel can still run fine on A11 and A12.

      There might be a release with a lot of changes and improvements in one of the next releases. It´s going to be exciting if everything will go well.

      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

      - Include S-Beta 1 source (kernel still works on A11)

      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=14943124697586340092



      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
      9
      Update 7.4.4

      Hey guys and girls,


      I hope everybody started in a great week. Here´s the next update. I was very busy so I didn´t find time to release this update earlier.

      This update includes June Source Updates, as well as Linux-Stable Upstream to 4.14.235. None of my testers reported any issues so here we go.
      Kernel works fine on A11 June and A12 Beta 1.

      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

      - June Security Update
      - Linux-Stable to 4.14.235

      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=14943124697586346952



      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
      3
      This kernel is the absolute best. I've tried pretty much every other kernel that exists for this phone and nothing brings even close to the mix of battery life and performance that this does.

      Enjoy a beer or coffee on me, you deserve it
      3
      Despite June update being a feature drop month, I flashed 7.4.3 anyway without checking any logs and it seems to be playing nicely so far (hey, I was in a house all day with 3 toddlers running around screaming and just said F it let's go, lol). Couldn't live even a few hours without my Kiri / Cleanslate features, lol.

      I'm sure Freak07 has an update coming down the pipe soon like he usually does, the magnificent bastard, but for anyone who has already OTA'd and can't wait, so far 7.4.3 seems to be playing just fine with the latest firmware. ;)
      1
      Was unable to recreate this with the same build and kernel. Flash photo taken fine. Outside of doing a full clean install I would suggest trying to clear data on stock camera app and making sure it is on the most up to date version. Then enable all permissions and reboot and try again
    • 78
      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 and Android 12 Dev Preview/Beta
      - Linux-Stable-Upstream included to latest 4.14.235
      - 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.5 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) (reverted for now as it breaks audio driver)

      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 2a OR 2b
      2a. If TWRP is available for this device and specific android version, boot to TWRP and flash my kernel.zip. Root will be preserved!
      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
      7.4.0 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-84900715
      7.4.1 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-84951399
      7.4.2 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-85000553
      7.4.3 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-85079523
      7.4.4 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-85155405

      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