yashsingh1/xdaforums huggingface dataset:
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] kennedyds:
Crash and restart from time to time.

Sometimes it's in the lock screen interface, sometimes it's in the stay interface, and sometimes it's browsing the web.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Freak07:
if you see the bootloader unlocked screen during the restart, after the restart share the files in sys/fs/pstore and upload them here.

make sure to not run any magisk modules or other modifications, besides the ak helper zip that comes with the kernel.

no crashes for me the last 7 days without a single reboot. without logs I can´t do anything.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] kepetrov:
kennedyds, try 165fps kernel
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Error-404-Go-Home:
Sorry to interrupt, but does anyone know how to enable KVM support in this kernel?
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] kennedyds:
I found that when I projected the screen, I had a higher probability of crashing and restarting.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Freak07:
can you share another set of logs (contents of sys/fs/pstore) after one of those crashes?
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] kennedyds:
I checked the problem and installed busybox NDK first and then 1.0.1_ R will lead to conflict and collapse. Error in KVM operation only.

If there is no busybox NDK, there will be no crash, only 1.0.1_ R is there no problem in inventory? I can only explore slowly.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] kennedyds:
A crash error occurred
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Freak07:
So from the logs you shared I can see the phone rebooting shortly after booting.

The next release might include a fix for this issue.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Freak07:
Update to 1.0.5_R

Hey guys and girls,

So here´s the next update.

The kernel is now made for the firmware 18.0410.2108.158. Please make sure to update to this firmware before flashing the kernel to avoid potential issues. You can always flash the previous kernel, before I find time to update the kernel with the latest source, just don´t report issues if you decide to do so.

Link to full firmware zip: https://dlcdnets.asus.com/pub/ASUS/...S_I003_1-ASUS-18.0410.2108.158-1.1.5-user.zip

Linux-Stable Upstream as well as CAF upstream is included. The latest prebuilt clang from google git was used to compile the kernel.

Overhead from PSI memory tracking driver was reduced.

Fix random lockups that can rarely happen when magisk is installed (the probability is increased with certain magisk modules and configurations)

More details in the changelog below and on GitHub as usual.

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:

- Include Source for 18.0410.2108.158

- Include linux-stable upstream to 4.19.204 (stock android 11 kernel is at 4.19.110)

- include latest CAF-upstream for the A11 base

- use prebuilt clang 13.0.1 from google for compilation

- disable per cgroup tracking to reduce overhead by PSI driver

- fix device to randomly lock up shortly after booting (probability is likely increased with certain magisk modules)

I wish you all a nice day/evening!

Download is below :)

Download is in this folder:

Downloads for : -Android- Generic Device/Other | AndroidFileHost.com | Download GApps, Roms, Kernels, Themes, Firmware and more. Free file hosting for all Android developers.

Download GApps, Roms, Kernels, Themes, Firmware, and more. Free file hosting for all Android developers.

www.androidfilehost.com

Instructions how to flash the kernel can be found in the OP!

But look at this post too :)

To make use of the CleanSlate features you need to download both CleanSlate Apps:

Please take a look at the CleanSlate thread for CleanSlate features. On the CleanSlate thread you will find links to both apps, companion and configuration app, to control the CleanSlate features.

If you use the CleanSlate features and benefit over time, maybe think about giving something back to @tbalden and purchase them from PlayStore. :)

Have fun, enjoy the kernel and your phone.

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
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] hoopsnake:
What a absolute rocket, .158 just barely came out wow.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] sploink:
This maybe not related to the post but I want to ask on how can I flash stock firmware (latest) without losing twrp and root?
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Freak07:
Check the third post in the TWRP thread. (y)
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] kepetrov:
I dont know its kernel related, but my GPS isnt working right. It refreshes location every 1 minute and Maps isnt usable. I need to clear Google Play Services storage and cache every day to have usable Maps. In previous firmware and kernel version was the same. Never had this problem on Android 10.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Freak07:
I believe I recall people talking about that exact issue on the Zenfone 7 forums on zentalk. So I guess it's an issue in asus firmware.

The only other advice I can give is to remove all apps, tweaks, mods and magisk modules. Especially ones that are anything like "fix drain from play services" or "solve background drain" etc.

If it persists maybe report the issue on zentalk.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] vinotux:
Thank you very much for the latest update, everything seems to be working in order.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] darth_waldi:
Hi

my display is broken third time and can someone make me a photo with pin screen lock because i must try blindly unlock my phone connected to monitor via hdmi

Thanks in advance :)
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Lossani:
Hello is this completely useless without root? I mean, can I install it while rooted then remove root? If I can use it without root what would not work? Thank you for your hard work!
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] sploink:
I think you'll need root access to use the kernel completely.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] BUB0Y:
Hello is the aeroactive cooler working with this kernel?

When I tried to use my aeroactive cooler it's showing "Please only use the ROG Phone 3's AeroActive Cooler." message

EDIT: I just reflashed the 1.0.5.zip then its working now.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Lossani:
Is the source code not available anymore? Github link seems to be outdated
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Freak07:
it´s all up on the repo the github link in the OP points to.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Lossani:
Nvm sorry I didn't check the branches. Thank you
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Freak07:
No last commit was on August 27th.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Lossani:
Hello

I'm trying to compile your kernel but I get these errors I don't know what it is exactly:

CC drivers/staging/qcacld-3.0/core/dp/txrx3.0/dp_txrx.o
CC drivers/staging/qcacld-3.0/core/dp/txrx3.0/dp_rx_thread.o
AR drivers/staging/qcacld-3.0/built-in.a
AR drivers/staging/built-in.a
AR drivers/built-in.a
make[1]: Leaving directory '/home/lossani/Desktop/tools/kernel/out'
make: *** [Makefile:146: sub-make] Error 2

I'm using kirisakura_defconfig and proton toolchains

Can you tell me what toolchains or compile options you use? Any guide you have around?

Also, do you know what is the stock Asus ROG Phone 3 kernel compiled with, seems to be GCC and not CLANG? I see two paths "kernel/msm-4.19" and "vendor"

VDSOA arch/arm64/kernel/vdso/note.o
VDSOA arch/arm64/kernel/vdso/sigreturn.o
/home/lossani/Desktop/tools/proton/bin/as: unrecognized option '-EL'
/home/lossani/Desktop/tools/proton/bin/as: unrecognized option '-EL'
clang-13clang-13: : error: error: assembler command failed with exit code 1 (use -v to see invocation)assembler command failed with exit code 1 (use -v to see invocation)

/home/lossani/Desktop/tools/proton/bin/as: unrecognized option '-EL'
clang-13: error: assembler command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../arch/arm64/kernel/vdso/Makefile:57: arch/arm64/kernel/vdso/note.o] Error 1

Thank you in advance!
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Freak07:
The actual error happens probably earlier during compilation already.

Tool chains are prebuilt clang found on google repo, as well as GCC. Check my buildscript for the exact clang versions I use.

DTC ext called by the buildscript, is dtc built from aosp source.

The stock source as it is, is not compilable for a standalone build.

Don't know which toolchains the stock kernel is built with. I think some older clang supplied by QCOM to the oems.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Lossani:
Hello again,

I'm sorry to ask for this but I'm really stuck trying to compile your kernel, CleanSlate as well as stock one.

Seems to keep giving built-in.a errors in drivers.

Could you please link me to the toolchains you use? I got DTC from here https://android.googlesource.com/platform/external/dtc/ and compiled it and still get the same error. I only changed the paths for the other stuff, I'm also using these binaries as it is, just downloaded it and pointed to path bin:

platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 - Git at Google

I don't know if this is needed: https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/ as it seems to be commented out.

With your kernel reached some good point pass built-in.a error but it stopped at some WireGuard compilation error of a redefinition. Not sure if it is toolchain related.

In other topic, can I just directly update through zip file on ROG Phone 3 website to new version WW-18.0410.2109.172? Will it replace with no errors the custom kernel with stock one or do I need to go back to stock kernel first, also what about Magisk, do you know if it gets deleted when applying manual update?

Please help me out, I will really appreciate it.

Thanks!
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Freak07:
clang you can get from here:

refs/heads/master - platform/prebuilts/clang/host/linux-x86 - Git at Google

compare the versioning in my script with that repo to see the exact build I´m using.

the links to GCC are correct. Clone the repos and reset the histories before GCC was deprecated on master branch. (so before remove GCC) It´s still needed for how the kernel is compiled on 4.19 for us.

32bit toolchain is not commented out in my buildscript, I´m not sure where you saw that:

Kirisakura_OBIWAN/build_kirisakura.sh at master_caf_linuxstable_custom · freak07/Kirisakura_OBIWAN

Contribute to freak07/Kirisakura_OBIWAN development by creating an account on GitHub.

github.com

the error you added to your post after I quoted it, seems to be a toolchain problem. Either you need different changes for proton clang or need to adjust your build commands for proton clang. I don´t have any experience with proton clang so I can´t help you there.

If you adjust my buildscript to reflect your environment there should be no problems. for LTO at the end to be successful you need 32GB of RAM.

for the update, put full firmware.zip in internal sdcard (root of sdcard). reboot, press notification to trigger the update. when it asks to reboot, say you want to reboot later. then go to magisk manager, choose install, then install to inactive slot. Disable your magisk modules just in case and reboot.

Now you´ll be rooted on new firmware with stock kernel.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Lossani:
Oh sorry, I mixed out about the 32 bit toolchain which was commented in CleanSlate build script.

Now that you mention about LTO, is 32 GB RAM the minimum possible? I guess with -j8 flag it requires more RAM?

Thank you again.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] kepetrov:
What about version *.172 ? Will be released updated kernel for this firmware ?
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Prisoner_945:
Yes you have to wait let's chill @Freak07 got this
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Freak07:
Update to 1.0.7_R

Hey guys and girls,

So here´s the next update.

The kernel is now made for the firmware 18.0410.2109.172. Please make sure to update to this firmware before flashing the kernel to avoid potential issues. You can always flash the previous kernel, before I find time to update the kernel with the latest source, just don´t report issues if you decide to do so.

Link to full firmware zip: https://dlcdnets.asus.com/pub/ASUS/...S_I003_1-ASUS-18.0410.2109.172-1.1.5-user.zip

More details in the changelog below and on GitHub as usual.

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:

- Include Source for 18.0410.2109.172

- Adjust battery saver (accessible via cleanslate config app) cpufreqs to most efficient ones according to freqbench

I wish you all a nice day/evening!

Download is below :)

Download is in this folder:

Downloads for : -Android- Generic Device/Other | AndroidFileHost.com | Download GApps, Roms, Kernels, Themes, Firmware and more. Free file hosting for all Android developers.

Download GApps, Roms, Kernels, Themes, Firmware, and more. Free file hosting for all Android developers.

www.androidfilehost.com

Instructions how to flash the kernel can be found in the OP!

But look at this post too :)

To make use of the CleanSlate features you need to download both CleanSlate Apps:

Please take a look at the CleanSlate thread for CleanSlate features. On the CleanSlate thread you will find links to both apps, companion and configuration app, to control the CleanSlate features.

If you use the CleanSlate features and benefit over time, maybe think about giving something back to @tbalden and purchase them from PlayStore. :)

Have fun, enjoy the kernel and your phone.

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
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Prisoner_945:
First always support your work man thanks
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] gnabtib8:
Thanks for the continued updates for our devices
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] borygo77:
Hi @Freak07! Is there any chance you could update Android 10 kernel with new security patches and drivers?

For some reason Android 11 doesn't work for me. I mean it's working but phone is freezing when unplugged from usb3 dock. And I'm docking it many times a day in my work place.

Have to hard reboot after which makes me really mad 😡 Would be really grateful and I will defo buy you a coffee or even breakfast if you could help 😜
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Lossani:
Thanks a lot for your hard work! Much appreciated.

I have few questions about the customization you did in your kernel source code. Does the module that requires root for this kernel (the one that gets installed as a Magisk module) is referenced or written in any way in the kernel source code? For example the UCI from Clean Slate is there as code. If so, what are the key parts included? You upstreamed from Google AOSP and included CodeAurora tags right?

I finally compiled your kernel but I tried to compile the stock one, including the techpack and other "missing" stuff following the Clean Slate structure but it never boots, well, I tried to implement parts of code from your kernel to compile with LTO and that one seems to not boot at all, so I tried to compile the most stock-like one without LTO and it boots but it takes a lot of time to boot and when it does the UI and other stuff like WiFi doesn't work or crashes.

I read somewhere in ROG Phone 5 forum that I needed to disable module signature check, I did but still same result with LTO compilation, didn't try the one that boots without module signature check though, but the question is: What else should I look at in order to compile stock one?

Thank you!
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Freak07:
hey,

unfortunately I´m usually only updating the kernel, that´s matching the android version the device is currently running from as official firmware.

The reason is that I´m not able to test a build for Android 10 prior to releasing it here. On one hand I lack the time (and motivation) to switch between Android 10 and Android 11 on the other I lack the time to maintain two kernel branches for a device.

If you´re running the latest A10 release from this thread you´re far ahead on CAF-Upstream and Linux-Stable upstream compared to the stock A11 kernel. Both contain most security patches that end up in the monthly security bulletin.

Of course at one point there might be something you´re missing, but it´s still a good option.

I´m also curious, can you link me the usb3 dock you´re having problems with and try to describe the exact configuration you have problems with? Do you utilize some mods or settings not exposed on the official settings?

Does that problem also happen on A11 stock kernel?

If there´s an obvious bug we might be able to forward this to asus and try to get it fixed.

The magisk helper module doesn´t require root per se, it requires a working magisk environment as we need to replace a few kernel modules during bootup.

The functionality of creating that module is part of the anykernel3, you find the source code for this on github.

Drivers can be compiled either directly into the zImage or outside the zImage as kernel modules. Those kernel modules (.ko files) need to be replaced with the ones that are compiled during compilation of my kernel, because they have to match the kernel they´re compiled against. That´s what the magisk helper module does.

That´s also the reason your compiled stock kernel has broken WiFi. WiFi driver gets compiled as a kernel module on stock firmware that´s loaded (insmod) during bootup.

Those modules always have to match the exact kernel. So insmoding will fail because you compiled your kernel and now it tries to insmod the stock kernel´s wifi driver module.

You have a few options. On a kernel like CleanSlate that´s very close to stock, except the added UX features, you can "force load" those modules and override the check. Depending on the code changes this can be fine, introduce bugs or not work at all depending how far you stray from the stock kernel.

My kernel has wifi driver built into the zImage instead of externally as a kernel module. You need to change the wifi driver to work when not being built as a kernel module though.

Due to how the fan is handled in asus OS, this driver needs to be shipped as a kernel module. The only way for me is to compile the kernel module, and replace it via magisk during bootup, as I can´t resort to force loading kernel modules.

Similar problems might apply to other drivers if you try to get the released kernel source into a compilable standalone kernel. Audio drivers need to be compiled also inline for example. :)

But if you already got it booting, the hardest step is done. Take kernel logs and compare with the stock one and I hope you will eventually get there.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] borygo77:
Thank you for your input Freak, understand you're not maintaining two branches :)

I'm back to 10 already so not able to do any tests but I think I got some logs collected from A11.

It's happening on stock and with your kernel as well. I'm running Panda Mouse and I think this makes my phone to freeze.

Dock link got one of those and it's working on A10 with no problems.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] varinder1469:
Excellent work bro.. Now I can play PUBG mobile on full graphics without much frame drops and high temperature
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Lossani:
Thanks for your reply, you made me notice some stuff I was not counting on.

By the way, do you think Interactive Governor is still worth to try? Or schedutil is better for 4.19? I can't find an updated cpufreq_interactive.c for 4.19 kernel though, ones from Yoda (4.9) and below has some errors when I try to port to 4.19 Obiwan source code directly, I might attempt to fix it I guess but I'm wondering if it's still worth to use, do you have any info about that?

Also, do you know any good efficient CPU freqs for Snapdragon 865+? I mean, in the Franco Kernel app there are some freqs not used at all but instead it makes primer core to jump straight to 3.09 GHz, I was wondering if I might just cap it at a few lower freqs for all 3 core types.

Thank you again!
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Freak07:
Interactive is for HMP based schedulers while we're using EAS. So no it's not worth to use or look into it at all.

Google around for the EAS documentation and you'll quickly find out.

You can look at freqbench results. They're up on GitHub. Might give you an idea, however how accurate those are you need to judge for yourself.

The battery saver accessible via cleanslate config app lets you already restrict the cpufreqs to three different levels already.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Lossani:
Thank you a lot for your answers.

I finally could boot a fully functional kernel of yours but only when I deactivate LTO ThinLTO, CFI and Shadow Stack and when I don't pass LLD in command line as parameter to make, doesn't seem to be LTO but whenever I pass LLD, so I took the Clean Slate build script and changed to your Clang version and it worked. Im not sure why. I thought LTO somehow failed because of low RAM but no error showed, it finishes normally but then I noticed its whenever I pass LLD as parameter even with LTO disabled. Any idea why?
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Sheon Shibu:
Is there any disadvantages like some features not working etc with this rom. I am looking for the air triggers to work well.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Captain_Throwback:
This is not a ROM.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Sheon Shibu:
Sorry my mistake 😣
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] DeSpTG:
Hey man, i've got a question or two:

I understand that i can't update my ROM until you checked it or released an updated kernel, but what about security updates and or google play system updates?

I am not sure whether it's displayed red because the bootloader is unlocked (+rooted) or it can't be updated because of the custom kernel.

Appreciate any help.

EDIT: There is a new update to version V18.0410.2111.182 too. A kernel source code is already released.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] RebornCheiko:
does this support LineageOS ROM? or just AOSP based roms? thanks.
[ASUS ROG Phone 3 ROMs, Kernels, Recoveries, & Othe] Captain_Throwback:
Neither. Just stock.