[Kernel][07.06.2021][Android 10] Kirisakura 3.2.2 for Asus Rog Phone 2 aka Yoda

Search This thread

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
4,906
15,668
i can answer you that also: it works with kirisakura
yes it should just work as it does on stock. The charging driver is not changed in any way.
Just to be clear for the community: this is totally parallel stuff to the dev work and it's nothing to do with the dev. Everybody that does this, does this at their own risk :)

Exactly. That’s also why I won’t give much input to this topic. I don’t like to play with these things as I’m no expert on the topic of batteries nor do I have any means to do long term testing with the batteries/charging method as on OEM does.
 

dvijetrecine

Senior Member
Mar 7, 2012
293
44
Exactly. That’s also why I won’t give much input to this topic. I don’t like to play with these things as I’m no expert on the topic of batteries nor do I have any means to do long term testing with the batteries/charging method as on OEM does.
thanks for the answer. i looked a bit into charging driver but oh boy, that was a lot of code. thought maybe you could help a bit but i understand your concerns
 

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
4,906
15,668
Update to 3.2.0

Hey guys and girls,


Here´s the next update for the Rog Phone 2.
Just like the last release for the Rog Phone 3 I´m sure a lot of people will be interested in this.
Two very interesting changes in this release.

The display commands were changed so visibility in dark scenes is improved when viewing any content on dark scenes.
Brightness dimmer functionality is included in the kernel and enabled by default now. No need for a magisk module that seemingly caused issues for a lot of people. (never for me though)
You can disable brightness dimmer by setting /sys/module/msm_drm/parameters/bl_dimmer to "N". It´s set to "Y" by default as it is enabled.
You can fine tune the lowest brightness value via /sys/module/msm_drm/parameters/bl_min. Default value is now "3". Default value on stock is "64". You can set it to anything below "64", to your liking.

These changes to the display also shift colours a bit. That means the "dark, red-blueish hue" from the ROG 2 is reduced and the screen looks more natural/neutral. I compared a lot with other devices and think I finally found a good spot, that´s hopefully acceptable for everyone.
I´m sure some will like the way the screen behaves on stock. That´s why there will be several flashable zips. So if you prefer the look on stock, you can still use it.
I encourage everyone to try the new display for a few days during regular usage. I adjusted to the colours looking a bit more neutral after a few days, and now I think it looks way better.
There´s always splendid to fine tune the display to your liking.


The second big change is another one. This release provides an option to use 144fps instead of 120fps on your ROG2, just like on the ROG 3.
When flashing this kernel.zip your device will run at 144fps when choosing the 120fps option in setting.
Keep in mind that there might be a certain risk involved when running it daily on 144fps.
There´s also a difference between the panel drawing at 144fps and an app rendering at 144fps.
Game genie or browser tests provide a possibility to check. Some apps rendering is limited to a certain framerate, even though the panel has a higher refresh rate.



The zips are labled the following:

custom = custom roms running Android 10
144fps = 120fps option will run at 144fps
newsetting= new display setting


Choose according to your liking.


Detailed changelog below and on github.

thanks to @uriii13 for testing the kernel with me prior to release!



Kernel backend PSI-Support and PSI-Enable Magisk-Module:
2.6.0 introduced kernel-backend PSI support .Asus enabled the userspace low memory killer in the stable firmware update. However they do not use it with PSI like the Pixel 4 and google intends, but with vmpressure levels.
If you´re interested in this topic here is more information.
I personally like the PSI-approach way better and I think google did some excellent work there.
If you want to enable this feature just flash the PSI-Enable Magisk-Module via Magisk Manager, when you´re on 2.6.0 or higher and reboot.
If you say I like the approach from Asus just don´t flash it.


I´d advise everybody to read the instructions in the OP and follow them. They are written for a reason, because they ensure everything will be working as expected.
Kernel is made for the latest stock rom from Asus, you must update your phone to the most recent Asus update, before flashing the kernel.

Enjoy!


Changelog:

- implement brightness dimming functionality into the kernel (make sure to remove the brightness dimmer module in magisk manager, before flashing the kernel in case you are using it)
- 144hz refresh rate
- improve visibility in dark scenes

I wish you all a nice day/evening!


Download is below :)

Download:

Disclaimer/Important:

Kernel for the Stock Firmware by Asus (make sure you´re always on the latest firmware)
Kernel:
https://www.androidfilehost.com/?w=files&flid=324225

Kernel for Custom Roms based on Android 10 (please note vibration only works properly on omni based custom roms)
Kernel:
https://www.androidfilehost.com/?w=files&flid=324224

Instructions how to flash the kernel can be found in the OP!
But look at this post too :)

PSI-Enabler-Magisk-Module: https://www.androidfilehost.com/?fid=4349826312261798764
Only for Android 10 Stock Rom running a custom kernel with PSI enabled! Flashable via Magisk Manager!


Have fun, enjoy the kernel and your phone.

If you like my work please consider a donation.
Donations are not mandatory but very welcome.
Coffee and Green Tea is what keeps the development going: http://paypal.me/freak07
 
Last edited:

533y4

Senior Member
Dec 1, 2010
85
15
What is the panel model of the rog 2? Is it the same as rog 3? Wanted to do some self research before trying 144hz
I will say this much, tho I believe this is more SOC based than panel based... The phone struggles to keep 144hz unless x mode is activated. This goes system wide. Chrome would shuffle between a range of 118-144hz/fps. X mode makes everything solid now. Just found that interesting. 120hz barely had any fluctuation at all no matter what.
 

ausaras

Senior Member
Sep 10, 2011
302
60
Taichung
> You can fine tune the lowest brightness value via /sys/module/msm_drm/parameters/bl_min. Default value is now "3".

I modified the value to "2" but it always resets back to "3" after reboot. Is it because the value cannot be lower than "3"?

Or, it is a problem with my text editor? I use MiXplorer's built-in code editor to modify the value.

thank you!
 

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
4,906
15,668
> You can fine tune the lowest brightness value via /sys/module/msm_drm/parameters/bl_min. Default value is now "3".

I modified the value to "2" but it always resets back to "3" after reboot. Is it because the value cannot be lower than "3"?

Or, it is a problem with my text editor? I use MiXplorer's built-in code editor to modify the value.

thank you!

The value defaults to 3 on every reboot. I don't think it will make a difference if set lower than 3 anyway.

If you want the value to stick across reboots, either create a script or create a "user setting" in exkm that sets it to your desired value on each boot :)
 
  • Like
Reactions: ausaras
Oct 7, 2011
15
0
UIO
Dear Sir,

I've got some Questions:

1.- Can I install without Rooting?
2.- Works with the latest Stock Rom (17.0240.2103.75- 25-MAR-2020)?
3.- What are the exactly steps to do it if yes without rooting

Looking Forward To,
Muadeep
 

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
4,906
15,668
What is the panel model of the rog 2? Is it the same as rog 3? Wanted to do some self research before trying 144hz
you probably won´t find any documentation about the panel as there´s basically nothing available. if you find anything interesting let me know.
the panels are probably very similar.
I will say this much, tho I believe this is more SOC based than panel based... The phone struggles to keep 144hz unless x mode is activated. This goes system wide. Chrome would shuffle between a range of 118-144hz/fps. X mode makes everything solid now. Just found that interesting. 120hz barely had any fluctuation at all no matter what.
yes indeed you´re right. The phone seems to can´t keep up rendering chrome at 144fps when the screen is not touched and no interaction with the phone is happening, thus the powerhal is not boosting the frequencies.

X-Mode raises the minimal cpu frequenices a bit, so the phone can´t idle on the lower frequencies hence it consistently renders chrome at 144fps.

This fine with latest update stock rom ? .75
Dear Sir,

I've got some Questions:

1.- Can I install without Rooting?
2.- Works with the latest Stock Rom (17.0240.2103.75- 25-MAR-2020)?
3.- What are the exactly steps to do it if yes without rooting

Looking Forward To,
Muadeep
Question 1 and 3 are answered if reading the first post.

It works for me with the latest stock rom on the .75 update. But if you want to avoid random issues that I might not yet have faced, it´s generally recommended to wait until I publish an update with the new source code merged.

Asus has not yet uploaded the source code for the .75 firmware.
 
Last edited:

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
4,906
15,668
  • Like
Reactions: KeNShi!

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Update to 3.2.2

    Hey guys and girls,


    Here´s the next update for the Rog Phone 2.
    It has the source for the firmware update ASUS_I001_1-17.0240.2105.90 merged. Make sure to run the latest firmware before flashing the new update.
    Linux-Upstream was merged to 4.14.235.
    The scheduler was updated with patches from linux mainline as well as CAF-Upstream from both, the SD865 and the SD888.

    I include an explanation about the changes introduced in 3.2.0 here again in hide-tags:

    The display commands were changed so visibility in dark scenes is improved when viewing any content on dark scenes.
    Brightness dimmer functionality is included in the kernel and enabled by default now. No need for a magisk module that seemingly caused issues for a lot of people. (never for me though)
    You can disable brightness dimmer by setting /sys/module/msm_drm/parameters/bl_dimmer to "N". It´s set to "Y" by default as it is enabled.
    You can fine tune the lowest brightness value via /sys/module/msm_drm/parameters/bl_min. Default value is now "3". Default value on stock is "64". You can set it to anything below "64", to your liking.

    These changes to the display also shift colours a bit. That means the "dark, red-blueish hue" from the ROG 2 is reduced and the screen looks more natural/neutral. I compared a lot with other devices and think I finally found a good spot, that´s hopefully acceptable for everyone.
    I´m sure some will like the way the screen behaves on stock. That´s why there will be several flashable zips. So if you prefer the look on stock, you can still use it.
    I encourage everyone to try the new display for a few days during regular usage. I adjusted to the colours looking a bit more neutral after a few days, and now I think it looks way better.
    There´s always splendid to fine tune the display to your liking.


    The second big change is another one. This release provides an option to use 144fps instead of 120fps on your ROG2, just like on the ROG 3.
    When flashing this kernel.zip your device will run at 144fps when choosing the 120fps option in setting.
    Keep in mind that there might be a certain risk involved when running it daily on 144fps.
    There´s also a difference between the panel drawing at 144fps and an app rendering at 144fps.
    Game genie or browser tests provide a possibility to check. Some apps rendering is limited to a certain framerate, even though the panel has a higher refresh rate.



    The zips are labled the following:

    custom = custom roms running Android 10
    144fps = 120fps option will run at 144fps
    newsetting= new display setting


    Choose according to your liking.


    Detailed changelog below and on github.

    thanks to @uriii13 and @jdmdrift for testing the kernel with me prior to release!



    Kernel backend PSI-Support and PSI-Enable Magisk-Module:
    2.6.0 introduced kernel-backend PSI support .Asus enabled the userspace low memory killer in the stable firmware update. However they do not use it with PSI like the Pixel 4 and google intends, but with vmpressure levels.
    If you´re interested in this topic here is more information.
    I personally like the PSI-approach way better and I think google did some excellent work there.
    If you want to enable this feature just flash the PSI-Enable Magisk-Module via Magisk Manager, when you´re on 2.6.0 or higher and reboot.
    If you say I like the approach from Asus just don´t flash it.


    I´d advise everybody to read the instructions in the OP and follow them. They are written for a reason, because they ensure everything will be working as expected.
    Kernel is made for the latest stock rom from Asus, you must update your phone to the most recent Asus update, before flashing the kernel.

    Enjoy!


    Changelog:

    - Merge Asus Source ASUS_I001_1-17.0240.2105.90
    - Linux-Stable Upstream to 4.14.235
    - scheduler improvements from mainline linux and CAF-Upstream.

    I wish you all a nice day/evening!


    Download is below :)

    Download:

    Disclaimer/Important:

    Kernel for the Stock Firmware by Asus (make sure you´re always on the latest firmware)
    Kernel:
    https://www.androidfilehost.com/?w=files&flid=324225

    Kernel for Custom Roms based on Android 10 (please note vibration only works properly on omni based custom roms)
    Kernel:
    https://www.androidfilehost.com/?w=files&flid=324224

    Instructions how to flash the kernel can be found in the OP!
    But look at this post too :)

    PSI-Enabler-Magisk-Module: https://www.androidfilehost.com/?fid=4349826312261798764
    Only for Android 10 Stock Rom running a custom kernel with PSI enabled! Flashable via Magisk Manager!


    Have fun, enjoy the kernel and your phone.

    If you like my work please consider a donation.
    Donations are not mandatory but very welcome.
    Coffee and Green Tea is what keeps the development going: http://paypal.me/freak07
  • 49
    Kirisakura-Kernel for the Asus Rog Phone 2

    Hello everyone,

    I proudly present Kirisakura-Kernel made for the Asus Rog Phone 2 aka Yoda!

    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!

    This project aims to keep most of the subsystems updated, way ahead of the stock kernel, thereby improving security and performance, while keeping stability as the foucs during testing! This includes Linux-Stable, CAF-Upstream and kernel/common.
    Kernel Control Flow Integrity (Kernel-CFI), which is achieved by linking the kernel with LLD and Link Time Optimization (LTO), more precisely ThinLTO, are quite unique security features. In fact this may be one of the only 4.14 msm kernels with a fully working Kernel-CFI implementation and CFI-Violations fixed on a smartphone.
    The only kernels made by OEMs offering this security feature are the ones for the Pixel 3 and Pixel 4 devices.

    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.

    Quick explanation of CAF-Upstream. CAF is short for Codeaurora-Forums. This is the place where development from Qualcomm for their SoCs happens. This includes the Snapdragon 855+ that´s built into the Asus Rog Phone 2.
    The kernel-bases available on the Codeaurora-Forums, are basically the foundations OEMs use to build their own kernel additions on top, for devices featuring Qualcomm SoCs.
    The Qualcomm developers push regular updates to the bases of the different SoCs, a bit similar to how Linux-Upstream works. OEMs usually stop updating the initial base after the phone is released.
    This kernel focuses amongst others to provide the latest CAF-Updates merged in a regular manner, to provide updates, improvements and enhancements for SoC specific drivers and subsystems! This might take a while, because a lot of device specific testing is done on my end to ensure stability.

    The kernel includes a lot of improvements and contributions from other developers as well. Without this kernel would not exist.
    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!


    Main Features:
    - Based on latest kernel sources from Asus for Android 10 and intended for use on Asus Stock Rom
    - compiled with Clang 12.0.2 and built with -O3 speed optimizations
    - Linux-Stable-Upstream included to latest 4.14.235
    - Regular CAF-Tag for SD855 merged LA.UM.8.1.r1-15400-sm8150.0
    - Next-Gen CAF-Tag LV.AU.0.2.0.r1-03200-gen3meta.0 merged
    - Next-Gen CAF-Tag LA.AU.0.1.1.r1-03100-gen3meta.0 merged
    - Link the kernel with LLD and use KASLR
    - include all important fixes/improvements from kernel/common
    - 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
    - Flashing the kernel will keep root!
    - Sweep to sleep functionality
    - Flashable via EXKM and FKM on a rooted system!
    - specifically tuned EAS for the Asus Rog Phone 2
    - removed nolog usage, remove rtb logging from the kernel
    - remove selinux auditing from kernel for lower overhead
    - remove IPC logging from the kernel
    - Anykernel zip is based on the all new Anykernel3 release from @osm0sis
    - option for 144hz refresh rate
    - option to improve visibility in dark scenes

    EAS related features:
    - EAS implementation patched up to latest CAF state
    - disable autogroups and use cgroups for more efficient task placement!
    - Dynamic Stune Boost to inflate task utilization and not overload cores on interaction (thanks to @RenderBroken and @joshuous )
    - improved schedutil governor
    - updates from kernel/common

    CPU related features:
    - Power saving workingqueues enabled by default
    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
    - improvements to cpufreq/times/stats
    - vDSO 32 patches to improve 32-bit performance
    - arm64: lse: Prefetch operands to speed up atomic operations (thanks to @kdrag0n )

    File System related features:
    - F2FS implementation updated to latest state of kernel/common and F2FS-Mainline on kernel.org maintained by Jaegeuk Kim.
    - 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.)
    - adapt F2FS to be inline with Pixel 4s code from Google, which is also directly maintained by Jaegeuk Kim
    - include a few F2FS fixes from the Pixel 4 kernel
    - include optimizations to UFS-Driver from Pixel 4
    - various improvements to FS-Performance from the Pixel 4
    - f2fs fix to prevent data loss in case of sudden power failure

    GPU related features:
    - Update GPU driver to latest CAF state
    - remove debugging and non-sd855+ specific code from the GPU driver
    - introduce low priority worker thread to improve performance in UI-critical situations


    Network related features:
    - Wireguard Support (Details)
    - advanced TCP algorithms enabled
    - includes new bbr and bbr2

    Memory related features:
    - Speculative Page Faults (1. 2) (CAF default)
    - enabled per process reclaim (CAF default)
    - Fix various memory leaks in different subsystems
    - 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
    - remove unused mem regions to free more RAM (thanks to @kdrag0n )

    Security related features:
    - Control-Flow-Integration (CFI) andLink-Time-Optimization (LTO) ported from 4.14 kernel/common and Pixel 4 Kernel
    - Shadow Call Stack ported from 4.14 kernel/common and Pixel 4 Kernel
    - enable init_on_alloc for even more security, more information can be found in the commit message

    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 and debugging to make the kernel more lightweight in various places (includes binder, mm, vma, gpu, ipa etc)
    - remove VLAs from the kernel (more info)
    - add support for steam controller
    - add support for nintendo switch controller

    Feature section for the "non visible" but perceptible improvements:
    - updated binder section (responsible for interprocess communication)
    - updated sdcardfs ; have a read about it here:
    - fix CFI violations
    - add ramoops/pstore support (thanks @luca020400)


    Requirements

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


    How to flash the Kernel:

    1. Download the latest kernel.zip and make sure you have properly updated to the latest Asus Firmware

    1a. Optional: While it may not be necessary all times, you may want to restore stock boot.img, re-root with magisk and optionally install twrp.zip if coming from another kernel. Before reporting issues make sure you do that! Thank you!

    2. Make sure to use latest Magisk stable. (not the latest canary!)

    3. Flash the kernel.zip via latest EXKM or FKM app, or TWRP (haven´t tested TWRP myself as I don´t need it) and do a full reboot.

    4. Flash the kernel again. This step is needed because flashing the kernel disables verity on vendor in order to modify two files. Disabling verity takes a reboot. Flashing the second time allows the two files to be changed correctly. This step is necessary if you flashed a firmware update. (This step should not be necessary when updating my kernel, if you are already running it, but if you want to be on the safe side just flash it twice)

    4a. Optionally flash the PSI-Enable Magisk Module (information can be found in this post)

    5. Reboot and profit. It will take around 15 seconds for the kernel and the system to execute all changes done by flashing the kernel.zip. After 15 seconds 120fps will kick in, if you use 120fps setting!


    DOWNLOAD:
    Download is located always in this folder:
    https://www.androidfilehost.com/?w=files&flid=303784

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

    Changelog:

    Android 9
    1.0.0 Initial Release
    1.0.2 https://forum.xda-developers.com/showpost.php?p=81389411&postcount=33

    Android 10
    2.0.0 https://forum.xda-developers.com/showpost.php?p=82238713&postcount=141
    2.1.0 https://forum.xda-developers.com/showpost.php?p=82317211&postcount=191
    2.6.0 https://forum.xda-developers.com/showpost.php?p=82495531&postcount=252
    2.6.2 https://forum.xda-developers.com/showpost.php?p=82560081&postcount=261
    2.6.4 https://forum.xda-developers.com/showpost.php?p=82602927&postcount=267
    2.7.2 https://forum.xda-developers.com/showpost.php?p=82834055&postcount=281
    2.7.5 https://forum.xda-developers.com/showpost.php?p=82837791&postcount=285
    2.9.0 https://forum.xda-developers.com/showpost.php?p=83100663&postcount=306
    3.0.6 https://forum.xda-developers.com/showpost.php?p=83526987&postcount=391
    3.1.0 https://forum.xda-developers.com/showpost.php?p=83606511&postcount=406
    3.1.3 https://forum.xda-developers.com/t/...us-rog-phone-2-aka-yoda.4028237/post-84124933
    3.1.5 https://forum.xda-developers.com/t/...us-rog-phone-2-aka-yoda.4028237/post-84617449
    3.2.0 https://forum.xda-developers.com/t/...us-rog-phone-2-aka-yoda.4028237/post-84717691
    3.2.1 https://forum.xda-developers.com/t/...us-rog-phone-2-aka-yoda.4028237/post-84799241
    3.2.2 https://forum.xda-developers.com/t/...us-rog-phone-2-aka-yoda.4028237/post-85145887

    Magisk-Module to reduce minimal brightness:
    Only for Android 10 WW Stock Firmware ! Flashable via Magisk Manager.
    The module is offered without any form of support. Please do not discuss it here in the thread.
    If you face issues, it´s because you accidentally use any form of tweak, app, script, module or some other conflicting mod.
    Brightness Module (reduces minimum brightness):https://www.androidfilehost.com/?fid=4349826312261766808

    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:
    Asus for the Rog Phone 2
    @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 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 too
    @topjohnwu for magisk!
    @osm0sis for anykernel!

    XDA:DevDB Information
    Kirisakura Kernel, Kernel for the ASUS ROG Phone II

    Contributors
    Freak07
    Source Code: https://github.com/freak07/Kirisakura_Yoda/commits/master_q_exp_13

    Kernel Special Features:

    Version Information
    Status:
    Stable

    Created 2020-01-01
    Last Updated 2020-09-29
    26
    Update to 2.0.0

    Hey guys and girls,

    The wait for the Android 10 kernel is finally over. As already announced this time it´s not only a stock kernel with a few minimal changes.
    I updated the OP with all the information on what´s included in the kernel. I include the list in this post as well. Most improvements have some descriptions linked.
    If not Google is your friend :)

    Flashing the kernel will automatically install a helper module for the kernel settings to be applied at boot! Don´t remove it in Magisk Manager!
    These settings will tune the Energy-Aware Scheduler to work better on the ROG, than what´s default. I can notice an improvement when cold-opening apps for example and in other scenarios as well.
    I´m not a fan of benchmarks for getting the highest score possible or to start competitions. However all tests I did so far showed a slight improvement. :) Jitter is improved, Jank is improved and other benchmarks as well.
    I´m very content how the kernel currently runs. I plan to look into this further, maybe there are more improvements to be gained.

    If you are installing the kernel for the first time on Android 10 you need to flash it twice. The first flash disables verity and the second flash edits some files on vendor, which is now allowed due to disabling verity.
    All consecutive flashes will require only one flash. If you at some point dirty flash your the asus firmware, you need to install it twice again.
    This was added to the instructions in the OP!

    If you need more performance or want to throttle the device, you can use X-Mode or the custom X-Mode.

    I don´t have the Asus Gamepad, so I don´t know if it still works. If anybody can give feedback on this it´s appreciated. The fan that´s included in the package works fine.


    The kernel includes latest linux-stable, is upstreamed against the latest CAF-Sources ( soc specific patches), uses latest f2fs-stable and has all relevant commits from kernel/common included.
    It´s built with the latest prebuilt Clang from Google.

    Bringing this kernel to the state it now is was a lot of work over the last month. This is now nearly the 100th build.

    Enjoy!


    Changelog:

    Main Features:
    - Based on latest kernel sources from Asus for Android 10
    - compiled with Clang 10.0.6 and built with -O3 speed optimizations
    - Linux-Stable-Upstream included to latest 4.14.175
    - Regular CAF-Tag for SD855 merged LA.UM.8.1.r1-14500-sm8150.0
    - Next-Gen CAF-Tag LV.AU.0.2.0.r1-03200-gen3meta.0 merged
    - Next-Gen CAF-Tag LA.AU.0.1.1.r1-03100-gen3meta.0 merged
    - Link the kernel with LLD and use KASLR
    - include all important fixes/improvements from kernel/common
    - 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
    - Flashing the kernel will keep root!
    - Sweep to sleep functionality
    - Flashable via EXKM and FKM on a rooted system!
    - specifically tuned EAS for the Asus Rog Phone 2
    - removed nolog usage, remove rtb logging from the kernel
    - remove selinux auditing from kernel for lower overhead
    - remove IPC logging from the kernel
    - Anykernel zip is based on the all new Anykernel3 release from @osm0sis

    EAS related features:
    - EAS implementation patched up to latest CAF state
    - disable autogroups and use cgroups for more efficient task placement!
    - Dynamic Stune Boost to inflate task utilization and not overload cores on interaction (thanks to @RenderBroken and @joshuous )
    - improved schedutil governor
    - updates from kernel/common

    CPU related features:
    - Power saving workingqueues enabled by default
    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
    - improvements to cpufreq/times/stats
    - vDSO 32 patches to improve 32-bit performance

    File System related features:
    - F2FS implementation updated to latest state of kernel/common and F2FS-Mainline on kernel.org maintained by Jaegeuk Kim.
    - 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.)
    - adapt F2FS to be inline with Pixel 4s code from Google, which is also directly maintained by Jaegeuk Kim
    - include a few F2FS fixes from the Pixel 4 kernel
    - include optimizations to UFS-Driver from Pixel 4
    - various improvements to FS-Performance from the Pixel 4

    GPU related features:
    - Update GPU driver to latest CAF state
    - remove debugging and non-sd855+ specific code from the GPU driver
    - introduce low priority worker thread to improve performance in UI-critical situations


    Network related features:
    - Wireguard Support (Details)
    - advanced TCP algorithms enabled
    - includes new bbr and bbr2

    Memory related features:
    - Speculative Page Faults (1. 2) (CAF default)
    - enabled per process reclaim (CAF default)
    - Fix various memory leaks in different subsystems
    - 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

    Security related features:
    - Control-Flow-Integration (CFI) andLink-Time-Optimization (LTO) ported from 4.14 kernel/common and Pixel 4 Kernel
    - Shadow Call Stack ported from 4.14 kernel/common and Pixel 4 Kernel
    - enable init_on_alloc for even more security, more information can be found in the commit message

    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 and debugging to make the kernel more lightweight in various places (includes binder, mm, vma, gpu, ipa etc)
    - remove VLAs from the kernel (more info)
    - add support for steam controller
    - add support for nintendo switch controller
    - optional Magisk-Module to reduce minimum brightness by a bit

    Feature section for the "non visible" but perceptible improvements:
    - updated binder section (responsible for interprocess communication)
    - updated sdcardfs ; have a read about it here:
    - fix CFI violations
    - add ramoops/pstore support (thanks @luca020400)

    I wish you all a nice day/evening!


    Download is below :)

    Download:

    Disclaimer/Important:

    Kernel: https://www.androidfilehost.com/?fid=4349826312261766784
    Instructions how to flash the kernel can be found in the OP!
    But look at this post too :)


    Brightness Module (reduces minimum brightness):https://www.androidfilehost.com/?fid=4349826312261766808
    Only for Android 10 WW Stock Firmware ! Flashable via Magisk Manager.
    The module is offered without any form of support. Please do not discuss it here in the thread.
    If you face issues, it´s because you accidentally use any form of tweak, app, script, module or some other conflicting mod.




    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
    25
    Update to 1.0.2

    Hey guys and girls,

    wait is over. everybody can enjoy that sweep to sleep. the sweep to sleep driver is not my work, but flar2´s. I just adjusted the driver to work with the Rog Phone 2.
    Since wake gestures are available in settings, I thought this might compliment the device.

    A few other changes, mainly display tweaks. One to save power on rendering static images. I haven´t noticed any issues so far. Please report back in case you notice screen glitches etc.

    Disabled auditing for lower overhead.

    Enjoy!


    Changelog:

    Kernel Base
    - sweep 2 sleep (enable via EXKM/FKM)
    - display tweaks to save power
    - disable auditing

    I wish you all a nice day/evening!


    Download is below :)

    Download:

    Disclaimer/Important:


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


    Instructions can be found in the OP!
    But look at this post 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
    18
    F.A.Q:

    Question: Why does the kernel version show as "unavailable" in settings after flashing it.
    Answer: Asus does not allow for custom kernel names in their settings. Use a kernel manager to check the kernel version.

    Question: Is root preserved when flashing this kernel?
    Answer: Yes the Anykernel Zip will detect root and keep it.

    Question: How do I return back to stock or another kernel.
    Answer: Extract boot.img as well as dtbo.img from matching firmware you are on and flash the extracted boot.img via fastboot.

    Question: How to report bugs properly?
    Answer: Have a look at post #3 in this thread. The linked guide is a pretty good starting point.
    Before reporting any bug make sure you´re not using any mods, magisk modules, scripts or other modifications that alter various functions like sound mods, data traffic etc.
    Try to describe the issue as detailed as possible! Give your exact setup, like rom, magisk version, kernel version.
    Is the issue reproducible? Does it happen frequently?
    Provide logs, otherwise debugging is a lot harder. If you can already reproduce the issue and provide logs it greatly limits the amount of time I have to spent until I figure out how to reproduce it.

    If the device force reboots/randomly reboots (that means you see the bootloader unlocked screen!) provide a ramoops file.
    Easiest way is immediately after booting up, with a root explorer navigate to sys/fs/pstore. Copy the contents to your internal storage, zip it up and send it to me.

    If the issue happens while the device is running provide a dmesg plus a logcat that you take while/shortly after the issue happens. This will log what´s running in the current session. Try to be as detailed as possible what´s happening when the issue appears. It will also help me in reading the log!
    15
    Useful Resources

    How to report bugs:

    It is incredibly useful if bug reports are done in a proper way. That saves everyones time and will ultimately lead to a faster bugfix (hopefully).
    The following guide from @nathanchance is a very good guideline on how to properly report a bug!

    https://github.com/nathanchance/Android-Tools/blob/master/Guides/Proper_Bug_Reporting.txt