Development [Kernel][08.11.2022][Android 13.0.0]Kirisakura 4.3.0 for Pixel 6/Pro aka "RAVIOLE"

Search This thread

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
5,890
20,070
When I update the stock ROM monthly, I disable all Magisk modules, then uninstall Magisk (restore images) so that it's back to an unpatched boot.img prior to flashing the update.

There is a warning not to disable or uninstall the AK3 Helper module.

What should I do instead?

Flash the patched root image in the bootloader?

Will that restore me back to stock kernel?

Seeking to avoid bootloops and data wipes.
Please check the FAQ on how to return back to stock.


You can just use the android flash tool or flash a factory image while the AK3 helper module is installed. It will delete itself once you flash the stock firmware (which contains the stock partitions for every partitions that gets modified when flash this kernel).


I followed the directions and used the kernel flasher that was listed to "attempt" to flash this. Now it bounces to the fastboot mode after the google logo. How do I recover from this without wiping everything?
Please check the FAQ on how to return back to stock.
Either flash the changed partitions back to stock or use the android flash tool.

Curious why it would do that though. Which zip did you flash on which firmware?
 

JerichoKru

Senior Member
Jan 14, 2012
94
6
Please check the FAQ on how to return back to stock.


You can just use the android flash tool or flash a factory image while the AK3 helper module is installed. It will delete itself once you flash the stock firmware (which contains the stock partitions for every partitions that gets modified when flash this kernel).



Please check the FAQ on how to return back to stock.
Either flash the changed partitions back to stock or use the android flash tool.

Curious why it would do that though. Which zip did you flash on which firmware?
Following the FAQ did NOT restore functionality. I flashed the lastest 4.1.6 on top of a fully updated 6 pro, using the kernel flasher.

EDIT: I should add the first time flashing the kernel, the Kernel Flasher abruptly closed after adding the zip to it.
 
Last edited:

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
5,890
20,070
Following the FAQ did NOT restore functionality. I flashed the lastest 4.1.6 on top of a fully updated 6 pro, using the kernel flasher.
If you just flashed the kernel.zip, following the instructions and restoring the images either manually or by flashing a full firmware package works.
Android flash tool is probably the easiest way and helped in this case too.

The kernel is made for latest A13 stable firmware, not QPR beta or A12.

Just in case take a look here too, if you haven´t installed A13 on both slots already.
 

Flyview

Senior Member
May 17, 2010
2,511
1,649
Toronto/San Diego
Hey @Freak07 , thanks for the kernel! I've been using it for a couple of years on a 4XL and now do on my (new to me) Pixel 6 Pro!

I use the CleanSlate companion app to further fine tune it. Right now that's just turning the "battery saver" on.

I searched through the thread and saw what you previously had to say about undervolting. I'd like to put in my vote for undervolting, if you find it's possible to implement! It should of course be off by default and at your own risk to do. With a phone that runs this hot, I think it's worthwhile to try and undervolt it, even if it's a tiny amount. In hotter environments (28c+), charging will basically halt because the phone just gets too hot even with light usage. Having undervolted phones/laptops in the past, I think it can make a substantial difference to heat. It's also *usually* fine if you find the limit at where the device reboots, and then back off a step or 2 from that.

Are you still collecting kernel logs to get a sense of the binning range?
 
  • Haha
Reactions: Mrcactuseater

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
5,890
20,070
Hey @Freak07 , thanks for the kernel! I've been using it for a couple of years on a 4XL and now do on my (new to me) Pixel 6 Pro!

I use the CleanSlate companion app to further fine tune it. Right now that's just turning the "battery saver" on.

I searched through the thread and saw what you previously had to say about undervolting. I'd like to put in my vote for undervolting, if you find it's possible to implement! It should of course be off by default and at your own risk to do. With a phone that runs this hot, I think it's worthwhile to try and undervolt it, even if it's a tiny amount. In hotter environments (28c+), charging will basically halt because the phone just gets too hot even with light usage. Having undervolted phones/laptops in the past, I think it can make a substantial difference to heat. It's also *usually* fine if you find the limit at where the device reboots, and then back off a step or 2 from that.

Are you still collecting kernel logs to get a sense of the binning range?
Hey :)

Nice to have you on board. :)

I´m still skeptical about undervolting.

Sure, if you want to send me a kernel log, I gladly check if I already have that binning. I just haven´t come around to bring the data to a presentable graph yet. :) But it´s still on my to-do list and I hope to get that out soon.


where can I download this kernel?
download links are in the first post.
how can I lower the CPU frequency to save battery?
use batterysaver option in cleanslate config app. (check the cleanslate thread for the app)
 

Flyview

Senior Member
May 17, 2010
2,511
1,649
Toronto/San Diego
Hey everyone :)

I´ll bump this up so it doesn´t get lost on the previous page.

I´d like a favor to ask from all of you. I´m trying to create some graphs/mapping about the binnings of different tensor chips so the differences in voltages used for the CPU freq steps can be evaluated.
I´m not after trying to undervolt the CPU or similar I just want to see the differences in voltages for the binnings so we can get an idea for the range that inevitably exists there.

If you want to help me, all you need to do is to reboot the phone and immediately after boot is finished take a dmesg and upload it here so I can check.
The easiest way to take the dmesg is to just open exkm if you have the app installed, go to tools -> save logs -> current kernel log (dmesg).
Other apps can do this as well or via terminal. Instructions for terminal/adb shell can be found here.
The most important thing is to take the dmesg as fast as you can after boot finished!

I´ll collect all the data and create a spreadsheet for everyone to check.

I´d be really happy if as many as possible could share a kernel log here, the more data of different devices I can gather the better the picture we will see later will be.

Thanks for your help and I wish everyone a great day.

Here's my kernel log.
 

Attachments

  • Flyview P6P dmesg.txt.zip
    117.4 KB · Views: 10

Top Liked Posts

  • There are no posts matching your filters.
  • 28
    Update to 4.3.0

    Hey guys and girls,

    I hope everyone started well in the new week. Here´s the next release and it´s again a rather big one with lots of under the hood improvements.
    We already had all the changes in from the November security patch release released, due to merging linux-stable stable, some code of the QPR Beta and kernel/common in advance.

    I added the following part about linux-stable in the last release too, but to further emphasize it with a bit of context.
    5.10.148 and 5.10.149 fixed the CVEs discussed here and here. Those were fixed on kernel common on November 2nd. It might take a few months until they trickly down into any officially shipped android kernel.

    The kernel is now at 5.10.152 way ahead of the stock kernel. To further emphasize the importance of this. About 90% of kernel security issues are solved in linux stable. While I didn´t check the actual number myself, I´d have estimated about the same (80-90%) before actually reading the slides from @arter97 presentation.
    What also needs to be kept in mind is that a big part of those security issues are resolved in linux-stable sometimes months ago before those patches end up in a monthly security patch. (as pointed out above)

    Amongst linux-stable upstream there are a few other updates in this kernel.



    I´d like to write all of this with more detail, but at the moment I lack the time to do so.

    Kernel is compiled for stable A13, not A13 QPR Beta!


    I wish everyone a nice day.

    If you´re one of the unfortunate ones that suffer from the device is corrupt bug on pixel 6 series please take a look at the FAQ at the beginning of this thread it contains a solution. The issue is probably caused by a bug that affects pixel 6 devices and has nothing to do with magisk or a kernel, it just happens to get triggered when using any of those.



    Changelog:

    - Linux-Stable bumped to 5.10.152
    - kernel is compiled with latest prebuilt google clang 15.0.3
    - f2f2 bumped to latest f2fs stable
    - some patches from pixel 7 source
    - updates from kernel/common to several subsystems
    - include bbrv2 from google, more info here
    - match 1080p display timings to pixel 7 source


    Download:
    Attached to release post as AFH does not allow me to upload files at the moment.
    I´ll push to AFH once it´s back up.



    If you´re coming from another kernel restore stock boot.img, dtbo.img, vendor_boot.img and vendor_dlkm.img before flashing. Thank you.

    I wish everybody a great day/evening!
    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
    18
    Google pushed the source now, but I have to leave for work.

    I´ll update the kernel probably in the evening if I find time.

    Stay tuned :)
    9
    Why is A13 QPR not supported?
    There are sources for QPR Beta available, that´s not the problem.

    Copy paste from another post in this thread where I already answered the question, why I don´t support dev-previews/betas:

    No, I have no plans to support A13 beta or any dev-preview or beta firmware. It will be supported once it´s stable. I don´t have the time, desire and motivation to support it.
    It all boils down to the fact that I enjoy doing what I´m doing here, I do it in my free time and share what I´m using myself with others so they can enjoy it with me and I want to release something that´s polished, extensively tested and stable.

    Since that questions comes up from time to time:

    I´m not comfortable releasing something I´m not running/testing extensively myself with loads of changes compared to the stock base.
    I never felt the urge to do beta testing for companies just to run more recent software too.

    I don´t have time to test, maintain and build that many compilations, let alone switching between Beta Firmware and Stable firmware on my phone for testing. It´s simply not possible, and I don´t want to release something that´s not extensively tested.
    I think sometimes people don´t realize how much time goes into this aspect of my kernels projects alone.

    Also try to see it that way:
    Merging code updates takes time. Be it linux-stable, f2fs-stable, kernel/common, lrng updates, updates directly from Google or a lot of the features that are descrbied in the OP. Sometimes longer, sometimes shorter.
    This kernel is now very very far from the stock base (compared to the other kernels available) as is also reflected in the OP. So while merging code updates will take time as there are many conflicts that need to be solved on my kernel. Even if the branches are somewhat similar I still need a lot of additional time to manage this aspect alone, not to speak of testing on my device to make sure nothing is broken.

    There´s no longer just the kernel repo itself to manage. With the introduction of GKI, the kernel is split in several sub repos for different device specific drivers, touchscreen, wifi, uwb, nfc, bt, etc etc. Those needs to be managed too, as well as other repos from the build environment as they´re different between stable and beta.
    Powerhal changes need to be monitored and adjusted each month too, as there might be differences between stable and beta as well.

    Building takes time. Every compilation, for testing or release purposes takes about 15 minutes. Only building, not adjusting the code. Every release here needs 2 different builds for oriole/raven. Yes I can do something else during the compilation, but it´s still time I need to spend.


    Ohhh .. So no kirisakura kernel option available... That's a bummer...
    Is there a Telegram group?
    No there´s no telegram group. Everything you need is here on XDA. All information is in the first few posts. If you use the search function you´ll find even more I guess.
    6
    I doubt "Now Playing" has anything to do with it. I have that enabled and am getting excellent idle drain on stock kernel.
    Neither do I have a problem running my kernel with now playing enabled :)

    And generally the kernel has not much to with idle drain. Network coverage, wifi signal, usage patterns, usage and not to speak of apps and services running in the background have far more impact compared to a kernel. :)
    6
    Anyone try 4.2.0 on Nov update yet? 🙂
    there's usually a new Kirisakura version when Pixel monthly update arrives so im waiting for that before I update to Nov

    Google did not yet push the source for november firmware as of now. Usually I have all of the non device specific updates months ahead, by regularly merging kernel/common and linux-stable.

    However sometimes there device specific changes that depend on a combination of kernel driver/ firmware related changes.
    If one of those changes doesn´t work without the other part, flashing a kernel not updated with the latest source may introduce issues, if the new firmware can´t work without the kernel counterpart change.
    It´s "usually" fine as long as you not jump between between major android versions or QPR versions.

    But if you want to be on the safe side, it´s better to wait for me to inspect sources and push out an updated build or give green light in case there are no changes done to the source, as @djo_5296 and @AlDollaz pointed out. :)

    Since Google didn´t push the source yet, I went ahead and flashed the older build on november firmware, it booted up fine and so far no issues. So it should be fine.
    But if you want to be on the safe side, wait for Google and me. :)

    Stuck at 120 all them time is it related to the kernel ?
    So far the kernel is awesome great work hope you will port the faceunlock feature from pixel 7 pro
    (I don't have force peak refresh enabled)
    No, that´s not related to the kernel. The framework decides how the framerate is handled. The kernel just provides the endpoints the frameworks decides when to switch from and has nothing to say about this.

    I remember back when I set up the Pixel 6 Pro, I restored data from my Pixel 4 Pro via google backup and it messed up the Pixel 6 Pro badly, as it wouldn´t allow the phone to go to 120hz, unless via forcing in dev options.
    I tried everything I can think of, but in the end only wiping and starting fresh without setting my data up helped.

    I don´t know if it´s an app or service, or maybe some mod that you have installed that´s causing the issue on your end. I´d remove all mods and dirty flash back to stock (without wiping, don´t forget about your vbmeta flags if you disabled them previously, flashing a firmware will default them to enabled) and start troubleshooting from there if it still happens.
  • 115
    Kirisakura-Kernel for the Pixel 6/Pro

    Hello everyone,

    To keep it short: Here is Kirisakura - Kernel for the Google Pixel 6 Pro aka Raven and the Pixel 6 aka Oriole, together Raviole.
    I would appreciate if everybody that flashes the kernel, reads at least once through this opening post and the following ones.

    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, F2FS-Stable 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.

    The kernel includes a lot of improvements and contributions from other developers as well. Without this kernel would not exist.
    A big part of improvements originate from @arter97´s, @kdrag0n´s and @Sultanxda´s work. Many others contributed in some way or another to this kernel.
    A big thanks to all of them at this place!

    Now lets continue with a list of features in the next paragraph!

    Features:
    Main Features:
    - Based on latest A13 kernel sources from Google, Kernel is made for Android 13
    - Linux-Stable-Upstream included to 5.10.152
    - Compiled with prebuilt Google clang 15.0.3
    - FHD Support for Pixel 6 Pro (display is able to run at 1080p), more info here and here
    - merged kernel/common (improvements to android-common-kernel straight from google)
    - MM subsystem reworked (more info and some patchsets linked in this post)
    - Multi-gen LRU backported (more info here, here as well and here) to improve mm and reduce cpu cycles
    - Utilize an additional kswapd thread to increase throughput for memory reclaim
    - pelt multiplier tied into powerhal to speed up scheduler during interaction (more info here)
    - prevent frequency spikes caused by small transient tasks when the device is idle(more info here)
    - tie mechanism to prevent frequency spikes caused by small tasks also into powerhal
    - scheduler improvements for RT (realtime) tasks
    - introduce and setup PMU limiter (prevents CPU from spiking to max when it isn´t needed, based on PMU reads, more information here)
    - improve camera performance by tuning the powerhal during recording
    - bias tasks of rt, sf and ta groups to prefer high capacity cpus during app launches, interactions
    - improve app launches via powerhal
    - improve trusty driver performance which connects to fingerprintscanner-hal by using high perf wq during fp unlock
    - restrict maximum CPU-Freqs during screen off/ idle to 1.1GHZ for all clusters to save power
    - introduce unfair f2fs rwsems to prevent writer starvation and improve IO perf under heavy load
    - fuse: give wakeup hints to scheduler to speed up compress/decompress in internal storage (details)
    - enable RCU_BOOST (details here), also fix RCU_BOOST behaviour
    - F2FS-Stable updated
    - TCP backports from mainline
    - SSG IO scheduler for reduced overhead and less CPU cycles (more lightweight and android optimized)
    - Scheduler updates from linux-main
    - use improved energy model for exynos cpu cooling/thermal control
    - allow GPU to scale down to 150mhz, but boost to higher value in case of interaction via powerhal
    - affine IRQS to CPU 7 during camera usage for improved performance as it tends to overload the little cores
    - use bbr as default TCP congestion algorithm (fasted algo according to this excellent research from @kdrag0n found here )
    - include bbrv2 from google, more info here
    - Enable support for TTL spoofing
    - Include LRNG, see here and here for more info, bump to v45 with 3.0.0
    - important patches from kernel/common for 5.10 (here are more details)
    - CleanSlate Features from @tbalden, big applause here! (s2s, notification booster, battery saver, flashlight notifications. Please note: cleanslate features that work otherwise with rooted devices like kadaway (adblocking) are not implemented on this kernel since I´m running rooted)
    - dirty pipe exploit fixed
    - supports direct usb access for hi-res playback over USB-C DACs
    - flashing the kernel will preserve root

    Various Optimizations:
    - update several drivers to use power efficient workingqueues (for example wlan driver)
    - kernfs: use buffer from the stack space
    - printk: use buffer from the stack space
    - kthread: use buffer from the stack space
    - bpf: avoid dynamic memory allocation for small value buffers
    - binder: Reserve caches for small, high-frequency memory allocations
    - kernfs: use kmem_cache pool for struct kernfs_open_node/file
    - cgroup: use kmem_cache pool for struct cgrp_cset_link
    - f2fs: reduce timeout for uncongestion
    - f2fs: Demote GC thread to idle scheduler class
    - f2fs: set ioprio of GC kthread to idle
    - mm: vmstat: use power efficient workingqueues
    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

    AK3 Helper Module:
    - restrict little cluster to 1,19ghz mid cluster to 1,19ghz and big cluster to 1,1ghz during screen off, to reduce battery usage for example during music playback
    - only use little cores during screen off/device suspend
    - tie pelt multiplier into the powerhal (more info here)
    - prevent frequency spikes caused by small transient tasks during idle operation (more info here)
    - boost scheduler using the pelt multiplier during fingerprint unlock operation
    - setup and control PMU limiter via powerhal (more info here)

    DOWNLOAD:
    Download is always located in this folder:
    4.2.0 and 4.3.0 are attached to the release posts linked below as AFH is wonky at the moment.


    Changelog:
    Android 12.0.0

    1.0.0 Initial Release
    1.0.2 https://forum.xda-developers.com/t/...r-pixel-6-pro-aka-raven.4358435/post-85910621
    1.0.5 https://forum.xda-developers.com/t/...r-pixel-6-pro-aka-raven.4358435/post-85924419
    1.3.0 https://forum.xda-developers.com/t/...pixel-6-pro-aka-raviole.4358435/post-85976139
    1.4.0 https://forum.xda-developers.com/t/...pixel-6-pro-aka-raviole.4358435/post-86109665
    1.5.0 https://forum.xda-developers.com/t/...pixel-6-pro-aka-raviole.4358435/post-86259863
    1.7.0 https://forum.xda-developers.com/t/...pixel-6-pro-aka-raviole.4358435/post-86390563
    1.8.4 https://forum.xda-developers.com/t/...pixel-6-pro-aka-raviole.4358435/post-86541727

    Android 12.1.0 Stable (March feature drop and more recent)
    2.0.0 https://forum.xda-developers.com/t/...pixel-6-pro-aka-raviole.4358435/post-86617873
    2.0.1 https://forum.xda-developers.com/t/...pixel-6-pro-aka-raviole.4358435/post-86637233
    2.1.0 https://forum.xda-developers.com/t/...pixel-6-pro-aka-raviole.4358435/post-86695911
    2.3.0 https://forum.xda-developers.com/t/...pixel-6-pro-aka-raviole.4358435/post-86821331
    2.4.0 https://forum.xda-developers.com/t/...pixel-6-pro-aka-raviole.4358435/post-86834981

    Android 12.1.0 Stable (June feature drop and more recent)
    3.0.0 https://forum.xda-developers.com/t/...pixel-6-pro-aka-raviole.4358435/post-86992705
    3.0.1 https://forum.xda-developers.com/t/...pixel-6-pro-aka-raviole.4358435/post-86996237
    3.0.17 https://forum.xda-developers.com/t/...pixel-6-pro-aka-raviole.4358435/post-87127695

    Android 13.0.0 Stable (not QPR beta!)
    4.1.0 https://forum.xda-developers.com/t/...pixel-6-pro-aka-raviole.4358435/post-87290247
    4.1.6 https://forum.xda-developers.com/t/...pixel-6-pro-aka-raviole.4358435/post-87399635
    4.2.0 https://forum.xda-developers.com/t/...pixel-6-pro-aka-raviole.4358435/post-87524609
    4.3.0 https://forum.xda-developers.com/t/...pixel-6-pro-aka-raviole.4358435/post-87697425



    Android 12L QPR Beta - Deprecated

    Requirements

    - unlocked Bootloader
    - USB-Debugging in developer options enabled
    - latest adb and fastboot binaries
    - working adb and fastboot environment so you can flash back to stock in case something goes wrong
    - working magisk environment (a device rooted with latest magisk stable in case you want to be absolutely safe)
    - IMPORTANT: Unrelated to the kernel, but update both slots of your phone to A13! (take a look here)


    How to flash the Kernel:
    1a. Make sure you tick all the requirements above
    1. Download the correct kernel.zip depending on your device (Pixel 6 = oriole || Pixel 6 Pro = raven)
    2. Flash the correct kernel.zip via EXKM, FKM or kernel flasher. Root will be preserved. The AK3 magisk helper module will be automatically installed during flashing the kernel.zip and be present on next reboot.
    Do not remove or disable the AK3 Magisk Helper Module otherwise the device will bootloop.
    3. Reboot and profit.


    Manual installation is no longer supported starting with release 3.0.0, as there´s a free open-source option to flash kernel.zips now.
    Instead use the free kernel flasher, which can be found here.

    Manual installation without relying on paid apps like fkm/exkm:
    Please have a look at the linked post.



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

    Credits:
    @osm0sis for all his work on AK3.
    @tbalden for being the best HTC, Pixel, OnePlus and Asus wingman!
    @capntrips for all his work on the pixel 6!
    @LeeDroid and @mwilky for their awesome roms and work I used on multiple devices!
    @Captain_Throwback for all the mentoring and guidance!
    @Eliminater74 for bringing me into the game and the Inspiration
    @nathanchance for his upstream guidance and assistance
    @RenderBroken for helping me out
    @flar2 for all his work
    @joshuous for all the help he provided to me in the past!
    @arter97 for giving me advice
    @kdrag0n for his help and advices!
    @topjohnwu for magisk and his entire work!


    Source Code: https://github.com/freak07
    44
    Update to 4.1.0

    Hey guys and girls,

    I hope everyone started into a good week. Here´s the next release. It´s for stable Android 13.
    Thanks to Google releasing the kernel source for the previews and the betas I´m able to push this update out very quickly. As in the past, the code didn´t change between last beta and stable release.

    There are again a lot of changes in this release. I´ll try to keep the release post short as I don´t have that much time lately.


    FHD/1080P Support for Pixel 6 Pro

    The biggest change is FHD support for the Pixel 6 Pro. If you follow twitter you might have seen this tweet from @MishaalRahman.
    Instead of using the display driver that´s supposedly for the Pixel 7 Pro, FHD support was added to the Pixel 6 Pro display driver. There were a few obstacles to make it run properly on the Pixel 6 Pro, but I got it working nicely so far. If anyone has more experience than me regarding panel timings, display drivers etc, feel free to push any improvement as a pull request to my github or point me towards any improvement.

    As a result you can now select 1080p resolution from settings after flashing the kernel. Dynamic refresh rate works, brightness scaling works, no tints, colour shifts or contrast issues either. AOD has a 1080p Low-Power timing as well.

    You´ll find a few more infos with a short video on my tweet here:
    Screenshot_20220816-083147.png
    Screenshot_20220816-083204.png

    It´s perfectly usable on a daily basis so far. I ran it for a few days without issues on my end. While the advantage might be debatable (saving battery, less load on GPU, still needing to drive the same amount of pixels in the end even on lower resolution, etc etc) having options is nice and this is why I decided to ship it.

    Apps need to redraw after switching resolution, sometimes 1080p on big display size selected in settings the UI looks a bit sketchy. So I think Google is still working on that.

    There´s however one bug I found so far that makes me believe this is still very much a WIP from google. If having the "show current refresh rate" option from dev settings enabled while switching resolutions, the display will black out and a restart needs to be forced by keeping the power button pressed or using adb interface to restart the phone. This is not due to the kernel, but display settings in framework getting scrambled as it´s not yet implemented 100% on googles end. So be warned. :)


    MM Subsystem Rework

    MM subsystem was completely reworked including many improvements from linux-mainline. During this MGLRU was also reworked a bit and works better now. I´ll include links to a few of the improvements/patchsets in hide-tags below, if you´re interested beyond that please check out my github.
    links:

    Additionally tie in a few of the MM changes into the powerhal. For example Proactive compaction is more aggressive during screen-off/device suspended operations to improve long term-performance.

    Other changes:

    Also tune the powerhal and implement all A13 changes, according to the changes that were already present on A12.

    Latest changes from f2fs-stable are included, which include several bugfixes and small improvements.
    Binder improvments/fixes, scheduler improvements from kernel/common, performance for exfat formatted storage device improved (niche use case, but still nice) and other little improvements.
    For other changes and details please take a look at github.


    I wish everyone a nice day.

    If you´re one of the unfortunate ones that suffer from the device is corrupt bug on pixel 6 series please take a look at the FAQ at the beginning of this thread it contains a solution. The issue is probably caused by a bug that affects pixel 6 devices and has nothing to do with magisk or a kernel, it just happens to get triggered when using any of those.



    Changelog:

    - Rebase kernel fully on A13 trees
    - Linux-Stable bumped to 5.10.136
    - FHD/1080p support for Pixel 6 Pro
    - all previous features and improvements kept intact
    - bump f2fs-stable to latest available
    - rework mm subsystem (check git for more details)
    - scheduler improvements
    - binder improvements from kernel/common
    - improve exfat performance (if someones uses exfat formatted devices)
    - loads of other changes from kernel/common
    - update powerhal to account for a13 changes and port existing changes over
    - loads of other changes, please check github



    Download:


    If you´re coming from another kernel restore stock boot.img, dtbo.img, vendor_boot.img and vendor_dlkm.img before flashing. Thank you.

    I wish everybody a great day/evening!
    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
    43
    Update to 4.2.0

    Hey guys and girls,

    I hope everyone started well in the new week. Here´s the next release and it´s a rather big one with lots of under the hood improvements.
    We already had all the changes in from the October security patch release released, due to merging linux-stable stable and kernel/common in advance.
    The kernel is now at 5.10.146 way ahead of the stock kernel. To further emphasize the importance of this. About 90% of kernel security issues are solved in linux stable. While I didn´t check the actual number myself, I´d have estimated about the same (80-90%) before actually reading the slides from @arter97 presentation.
    What also needs to be kept in mind is that a big part of those security issues are resolved in linux-stable sometimes months ago before those patches end up in a monthly security patch. Additionally to that the security patches are about 3 months behind the discovery of those vulnerabilities.

    Amongst linux-stable upstream there are a few other not minor updates in this kernel.

    Clang
    The kernel is now compiled with the latest prebuilt Clang from Google. This was quite a journey as this is a pretty big update to clang. This is quite experimental to be on googles side of a "bleeding" edge compiler, but after fixing several issues that originated from the new compiler it ran stable for over 2 weeks.

    There´s a potential for CFI failures that originates from that new Clang rather than a "real attack", due to the changes in clang.
    Short reminder what CFI actually does: Control flow integrity (CFI) is a security mechanism that disallows changes to the original control flow graph of a compiled binary, making it significantly harder to perform such attacks.
    A typical crash (that´s not wanted and originates from compiler changes rather than an actual attack, which is already resolved of course ) would look like the following: Open camera app, due to compiler changes CFI is accidentally tripped every time this code is executed.
    I think we catched all of these newly CFI failures and everything is nice and stable. In case you discover such a behaviour please send me the contents of sys/fs/pstore, once the phone booted back up.

    There´s always the possibility of a "real" attack in which CFI will crash the phone, before the attacker can compromise the phone. That´s why keeping subsystems updated is important.


    Powerhal
    The powerhal was retuned due to changes to the scheduler introduced. It should work even better now, regarding efficiency and performance. Of course I try to tune it also to my personal needs, while trying to keep it working for all workloads. The changes are not drastic, so please don´t post after several hours you see drastic differences.

    Other improvements
    Several other improvements from kernel/common (for higher branches than 5.10) and linux-main were backported to this branch so we can benefit from those improvements. For details please check my git.



    I´d like to write all of this with more detail, but at the moment I lack the time to do so.

    Kernel is compiled for stable A13, not A13 QPR Beta!


    I wish everyone a nice day.

    If you´re one of the unfortunate ones that suffer from the device is corrupt bug on pixel 6 series please take a look at the FAQ at the beginning of this thread it contains a solution. The issue is probably caused by a bug that affects pixel 6 devices and has nothing to do with magisk or a kernel, it just happens to get triggered when using any of those.



    Changelog:

    - Linux-Stable bumped to 5.10.146
    - kernel is compiled with latest prebuilt google clang 15.0.2
    - improvements from linux-mainline
    • locking subsystem
    • memory management
    • more details please check github
    - patches to f2fs
    - updates from kernel/common to several subsystems
    - tweak powerhal for improved performance/efficiency


    Download:
    Attached to release post as AFH is currently down.
    I´ll push to AFH once it´s back up.



    If you´re coming from another kernel restore stock boot.img, dtbo.img, vendor_boot.img and vendor_dlkm.img before flashing. Thank you.

    I wish everybody a great day/evening!
    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
    37
    Update to 1.8.4

    Hey guys and girls,


    So here´s the next update. It´s kind of an off schedule update, as I planned to update the kernel with the next security update/feature drop.

    But in the light of recent events regarding the new exploit called "Dirty Pipe" (more info here), which is similar to the "Dirty Cow" exploit from a while ago, but easier to exploit this time, I decided to release an update ahead of schedule.

    This exploit was fixed in linux-stable 5.10.102, as opposed to a single commit in AKC (android kernel common, commit here). This shows once more why merging linux-stable is beneficial as explained in detail in the OP.

    Since one of the key aspects of this kernel is security and staying on par with upstream (which often fixes exploits way ahead of android security bulletin updates, even before an exploit is even known or fixed via a patch on the security bulletin) I decided to release this update as quickly as possible, so this exploit is fixed on devices running this kernel.

    Several other notable improvements and changes in this release:
    Bring in scheduler updates from Android 13 Developer Preview, which aim at improving task placement. (adjust powerhal accordingly)
    BFQ IO-Sched is now on par with linux-mainline.
    Several fixes to mm subsystem, f2fs and others.

    Several other improvements are included as well. More details in the changelog.
    Download is below.
    Updated instructions in the OP!


    Changelog:
    - linux-stable 5.10.103
    - contains fix for the dirty pipe exploit
    - built with clang 14.0.2 prebuilt by google
    - improvments from kernel/common
    - fix memory leaks
    - security related patches
    - mm improvments
    - f2fs fixes
    - scheduler fixes
    - for details please check github
    - built with improvements from A13 Dev Preview to display driver
    - other changes please look at my github


    Download:


    Instructions can be found in the OP! Please follow the instructions to avoid any issues.
    If you´re coming from another kernel restore stock boot.img, dtbo.img, vendor_boot.img and vendor_dlkm.img before flashing. Thank you.
    37
    Update to 1.7.0

    Hey guys and girls,


    So here´s the next update. It includes the february security update. Most of the changes brought by the February kernel source drop, were already included in this kernel by merging kernel/common and linux-stable.


    Several other notable improvements and changes in this release:
    Improve f2fs performance by merging a patchset to prevent writer starvation for the checkpoint thread. This was discussed this month in the f2fs mailing list and is already merged to the kernel/common tree. It´ll improve performance under heavy I/O utilization.
    You can find more information following the discussion here.
    Necessary backports were brought to the kernel and the platform specific f2fs-implementation was also adjusted.
    Latest f2fs-stable was also merged to the kernel.

    Update the patchset to prevent frequency spikes caused by small tasks as well. Tie those new changes into the powerhal. (That means users not flashing the kernel.zip, but instead use the manual installation method, which are only a handful from the download count, need to flash the updated magisk helper module. Users that flash the kernel.zip via FKM/EXKM have to just flash and forget)

    Several other improvements are included as well. More details in the changelog.
    Download is below.
    Updated instructions in the OP!


    Changelog:
    - February Security update merged
    - linux-stable 5.10.96
    - include latest f2fs-stable
    - improvments from kernel/common
    - fix memory leaks
    - security related patches
    - mm improvments
    - for details please check github
    - introduce unfair f2fs rwsems to prevent writer starvation and improve IO perf
    - update patchset to prevent freq spikes caused by small transient tasks (also tie this into powerhal)
    - give pelt multiplier power hint for scheduler performance boost during fingerprint unlock
    - fuse: give wakeup hints to scheduler to speed up compress/decompress in internal storage (details)
    - enable RCU_BOOST (details here), also fix RCU_BOOST behaviour
    - update LRNG implementation (thanks to arter97 )
    - improvements/fixes for CleanSlate features
    - other changes please look at my github


    Download:


    Instructions can be found in the OP! Please follow the instructions to avoid any issues.
    If you´re coming from another kernel restore stock boot.img, dtbo.img, vendor_boot.img and vendor_dlkm.img before flashing. Thank you.