[Kernel][MIUI-AOSP]Yuki ユキ Kernel 3.9 Miui 6 AOSP[curtana,excalibur,gram,joyeuse]

Search This thread

TeamMex

Recognized Developer / Recognized Contributor
xtArsqe.png


Code:
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM/Kernel
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
Yuki kernel is based in CAF

/* Details */
  • Last Xiaomi Changes
  • Last CAF Merges
  • LZ4 zram
  • LMK PSI
  • Backported pidfd
  • Use power efficient working queues
  • Use overlayed DT (to avoid making dtbo images)
  • LMK config module (see screenshots)
  • Wireguard
  • kCAL
  • Manthilla governor
  • Jump label optimizations
  • CLANG LTO-CFI-SCS
  • F2FS Rapid GC
  • BBR2 tcp cong

/* Work in progress features */
  • sound control
  • Upstream

/* Instructions */

  • Simply flash the kernel zip file from the recovery.
  • This kernel uses Anykernel 3 so no need to reflash magisk (if you use magisk) after installing it.
  • For good work don't disable Yuki-ユキ Kernel RN9Pro LMKD module (see the image click to see the image...)


Note: Yuki kernel (curtana folder) is for miui roms, miatoll folder is for AOSP based roms.
Note2: Now the AOSP variant have 2 versions uno for Android R versions for better compatibility zip name similar to this
"4.14.117-Redmi-Note-9s-Pro-AOSP-R.zip".



It is not necessary but if you like my job you could invite me a cup of coffee :)

Changelog in second post.

XDA:DevDB Information
Yuki-&#12518;&#12461; Kernel 3.6 for Xiaomi Atoll devices [curtana,excalibur,gram,joyeuse], Kernel for the Redmi Note 9 Pro

Contributors
TeamMex
Source Code: https://github.com/Klozz/android_kernel_xiaomi_sm6250

Kernel Special Features: LMK psi, Last CAF Merges, Backported pidfd, Wireguard and more...

Version Information
Status: Stable

Created 2020-10-26
Last Updated 2020-11-29
 

TeamMex

Recognized Developer / Recognized Contributor
Reserved

Changelog:
19/02/2021

  • Upstream to 4.14.221
  • Add Klapse and kcal
  • Optimice randomness
  • don't leak vdso pagelist
  • Use a larger on-stack video copy buffer
  • UPSTREAM: net: bpf: Make bpf_ktime_get_ns() available to non GPL programs
  • BACKPORT: bpf: add bpf_ktime_get_boot_ns()
  • Yuki ユキ clang update to 20210219 build
  • Merge tag ' LA.UM.9.1.r1-08600-SMxxx0.0 '
Note: AOSP android R with inline encrypt only.
Miui kernel will be updatyed when xiaomi release R miui for all devices.
Q kernel will be updated soon.

24/01/2021
  • Fixed performance regretions
  • Implement via userspace and update exec prog configuration
  • Don't force Low Memory killer configuration if detects we are using LMDK
  • Reconfigure LMKD configuration if detects 4GB ram device (needs more testing i have RN9Pro 6GB ram device)
  • Track power changes from Gram Q OSS
  • power: Drop “_3P5” from type to get recognized in AOSP (some roms haven't added this flag yet and sometimes cause issues so remove it)
  • Update ds28e16 driver from Q gram OSS
  • Merge tag 'LA.UM.8.1.r1-16600-sm8150.0'
  • Upstream to 4.14.214
  • optimize bpf modulo operation
  • RCU fixes
  • disable binderfs [Q ROM]

29/11/2020
  • exfat 5.8 [both]
  • bindefs port (as per R requeriments) (R in the name Redmi-Note-9s-Pro-AOSP-R.zip)
  • haptic update from gram-q-oss [AOSP]
  • NFC firmware download fixes (from CAF)[AOSP]
  • magical changes to make your life better (or not)[both]

    NOTE: AOSP zip have 2 variants now, 1 for Android Q and other for R
    Some new requirements on Android R won't work on Q based roms and may cause fastboot reboot

14/11/2020
  • Fix usb XHCI connection
  • Fix usb EHCI connection
  • Fix usb OHCI connection
  • v4l2-ioctl: Use a larger on-stack video copy buffer
  • printk: Add sleep time to timestamps
  • Mark vdso_pagelist allocation as not a leak
  • Avoid dynamically allocating memory in ext4_ext_remove_space
  • Alsa: Don't dynamically allocate a single struct instance
  • Atoll: increase linux,cma to 128M
  • Enable ULP
  • TTL Fixed (?)
  • some more.... for both kernels miui and aosp variants

30/10/2020AOSP variant only

26/10/2020
  • Rebased over LA.UM.8.9.r1-10600-SM6xx.0 (AOSP variant only)
  • Merge tag 'LA.UM.8.1.r1-16200-sm8150.0'
  • Wifi, Audio tag used LA.UM.8.9.r1-10600-SM6xx.0
  • Net Wireward
  • Enable PSI monitor
  • Add pidfd backport
  • Fixed boot on Joyeuse (Miui variant )
  • Last xiaomi changes (Miui variant )
  • Disable LMK
    Removed
  • [TESTING] exec: Add node tampering blacklist function
  • [TESTING] allow [email protected] and perf 2 to tampering blacklist


Old log history


  • dm-crypt: increase threads
  • mm: Introduce kvcalloc()
  • treewide: kvzalloc() -> kvcalloc()
  • Increase the cgroup limit to 7
  • fs: exec: Introduce is_zygote_pid()
  • [TESTING] exec: Add node tampering blacklist function
  • [TESTING] allow [email protected] and perf 2 to tampering blacklist
  • Optimize CRC32
  • UFS pm_qos
  • use buffer from the stack space
  • implement stpcpy
  • expose event streams
  • Allocate decoder buffers
  • Fix VLA's
  • Improve backwards memmove performance
  • Enable vDSO + vDSO COMPAT (32bit)
 
Last edited:

TeamMex

Recognized Developer / Recognized Contributor
Reserved

Bug reports
:
Take dmesg using adb or any app like Matlog

Adb process:(need root)
Code:
adb shell su -c dmesg > dmesg.txt
Code:
adb shell  logcat > logcat.txt
Code:
adb shell cat /sys/fs/pstore/console-ramoops > ramoops.txt

Matlog process:
Code:
Go to matlog menu and tap in create zip select log and kernel log

Updates:
Yuki kernel can be updated through Franco Kernel manager or similar using the following link:

Yuki-ユキ MIUI
https://thexperienceproject.org/downloads/device/api/curtana/kernel/kernel.json

Yuki-ユキ AOSP
https://thexperienceproject.org/downloads/device/api/miatoll/kernel/kernel.json


Follow telegram channel for faster updates:
https://t.me/Yuki_Kernel
 
Last edited:
  • Like
Reactions: rokes_h

TeamMex

Recognized Developer / Recognized Contributor
Credits not in order:
  • Xiaomi (MiCode) for kernel sources
  • Code Aurora Forum for kernel changes
  • Google for easy access to PSI Pidfd changes
  • Demon000 for his work on AOSP kernel
  • kdragon for proton clang
  • xlidz for Yuki logo
  • RN9pro tg group for donate the device
  • KernelToast for kernel changes like qOS etc
  • To you for use my work
  • and a lot of others developers :)

this config help with some "laggy issues"
I leave some config for get more perf on gaming
ySLbxGD.png


oBvx5D3.png
 
Last edited:

TeamMex

Recognized Developer / Recognized Contributor
Only installed the miui version on Joyeuse a couple of days ago, (obviously), but it's been faultless so far. Great job by the dev.

Was wondering if anyone had any info on the manthilla CPU governer? My Google skills are failing hard.

I'm not written documentation about Manthilla(Named for a good friend who passed away a few months ago) is my own governor based on schedalessa (another gov by me) is "new" i was working on it since dec of the last year (without name until now)
Similar to Schedutil with Energy awareness framework to make it more energy efficient without lags (if have issues with this let me know) Most of the settings are internal so there are no tunables to modify manually, maybe in the future add the way that the governor can be configured more.

I hope your question has been clarified, if not, let me know.

Have a nice day!
cheers.
 
  • Like
Reactions: rokes_h

Anonda

Senior Member
Oct 10, 2016
440
122
DHAKA
Thanks for your great work for our device. Many thanks from my Heart.
I am using Evox 4.5 (Not Miatoll)
Can i flash this kernel over evox 4.5?
 

TeamMex

Recognized Developer / Recognized Contributor
Flashed. Now will see the battery backup.

I just need the battery back up
Sot Means to me "Screen off time."
If any suggestion about battery back up, any configuration, or any profile.
It will be highly appreciated.

Thanks.

I'm sorry but I don't care if the battery lasts a long time.
I prefer raw performance so i don't have for now a config since i have with the device 2 weeks.
Is too early to deal with any configuration.
Wait some weeks more and i can tell you any good info.

cheers.
 
  • Like
Reactions: rokes_h

abhi.s4u

Senior Member
Jun 27, 2012
119
28
Thats what i looking for a miatoll kernel
Thank u..
Which one to flash for poco m2 pro? in curtana folder only note 9s,note 9pro is written
And one more question can flash it on official miui 12 without root??
 

Anonda

Senior Member
Oct 10, 2016
440
122
DHAKA
I'm sorry but I don't care if the battery lasts a long time.
I prefer raw performance so i don't have for now a config since i have with the device 2 weeks.
Is too early to deal with any configuration.
Wait some weeks more and i can tell you any good info.

cheers.

Thanks for your answer, with take your time.
:good:
:)
 

sir_bazz

Senior Member
I'm not written documentation about Manthilla(Named for a good friend who passed away a few months ago) is my own governor based on schedalessa (another gov by me) is "new" i was working on it since dec of the last year (without name until now)
Similar to Schedutil with Energy awareness framework to make it more energy efficient without lags (if have issues with this let me know) Most of the settings are internal so there are no tunables to modify manually, maybe in the future add the way that the governor can be configured more.

I hope your question has been clarified, if not, let me know.

Have a nice day!
cheers.
Well I thought I'd give it a go after reading your reply. Made a rookie error initially, only changing the governer on the little cluster and that didn't end well.

But some 24 hours after switching on both clusters, it seems to have achieved your goals.
No noticeable performance degradation but an improvement in idle battery drain, (according to FKM after a resetting stats).

Will be sticking with it for now.....thanks again for making it available for MIUI.
 

twistyplain

Senior Member
Nov 21, 2011
423
187
Nairobi
I flashed this kernel yesterday on my 9s running xiaomi eu v11.0.11 and since then I'm having some issues with headset detection. Sometimes the phone doesn't detect the headset even after unplugging and plugging it back in several times. I have never had this problem before so I figure it's related to something I did recently. The only modification I've made is the kernel change so I figure it must be kernel-related.

What are your thoughts.

Sent from my Redmi Note 9S using XDA Labs
 

TeamMex

Recognized Developer / Recognized Contributor
I flashed this kernel yesterday on my 9s running xiaomi eu v11.0.11 and since then I'm having some issues with headset detection. Sometimes the phone doesn't detect the headset even after unplugging and plugging it back in several times. I have never had this problem before so I figure it's related to something I did recently. The only modification I've made is the kernel change so I figure it must be kernel-related.

What are your thoughts.

Sent from my Redmi Note 9S using XDA Labs

Unfortunately the little time that I spent in miui I never had the problem you mention( but i was on stock miui EEA).
Normally that bug could be linked to the rom,Could you send me a kernel error log (Dmesg)? (Attach your headset then take the log)

I remind you that it is advisable to wipe cache and dalvik-cache every time you update the kernel to avoid weird and random issues =).

cheers.

Sent from my Redmi Note 9 Pro using XDA Labs
 
  • Like
Reactions: rokes_h

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    xtArsqe.png


    Code:
    #include <std_disclaimer.h>
    /*
    * Your warranty is now void.
    *
    * I am not responsible for bricked devices, dead SD cards,
    * thermonuclear war, or you getting fired because the alarm app failed. Please
    * do some research if you have any concerns about features included in this ROM/Kernel
    * before flashing it! YOU are choosing to make these modifications, and if
    * you point the finger at me for messing up your device, I will laugh at you.
    */
    Yuki kernel is based in CAF

    /* Details */
    • Last Xiaomi Changes
    • Last CAF Merges
    • LZ4 zram
    • LMK PSI
    • Backported pidfd
    • Use power efficient working queues
    • Use overlayed DT (to avoid making dtbo images)
    • LMK config module (see screenshots)
    • Wireguard
    • kCAL
    • Manthilla governor
    • Jump label optimizations
    • CLANG LTO-CFI-SCS
    • F2FS Rapid GC
    • BBR2 tcp cong

    /* Work in progress features */
    • sound control
    • Upstream

    /* Instructions */

    • Simply flash the kernel zip file from the recovery.
    • This kernel uses Anykernel 3 so no need to reflash magisk (if you use magisk) after installing it.
    • For good work don't disable Yuki-ユキ Kernel RN9Pro LMKD module (see the image click to see the image...)


    Note: Yuki kernel (curtana folder) is for miui roms, miatoll folder is for AOSP based roms.
    Note2: Now the AOSP variant have 2 versions uno for Android R versions for better compatibility zip name similar to this
    "4.14.117-Redmi-Note-9s-Pro-AOSP-R.zip".



    It is not necessary but if you like my job you could invite me a cup of coffee :)

    Changelog in second post.

    XDA:DevDB Information
    Yuki-&#12518;&#12461; Kernel 3.6 for Xiaomi Atoll devices [curtana,excalibur,gram,joyeuse], Kernel for the Redmi Note 9 Pro

    Contributors
    TeamMex
    Source Code: https://github.com/Klozz/android_kernel_xiaomi_sm6250

    Kernel Special Features: LMK psi, Last CAF Merges, Backported pidfd, Wireguard and more...

    Version Information
    Status: Stable

    Created 2020-10-26
    Last Updated 2020-11-29
    3
    Reserved

    Changelog:
    19/02/2021

    • Upstream to 4.14.221
    • Add Klapse and kcal
    • Optimice randomness
    • don't leak vdso pagelist
    • Use a larger on-stack video copy buffer
    • UPSTREAM: net: bpf: Make bpf_ktime_get_ns() available to non GPL programs
    • BACKPORT: bpf: add bpf_ktime_get_boot_ns()
    • Yuki ユキ clang update to 20210219 build
    • Merge tag ' LA.UM.9.1.r1-08600-SMxxx0.0 '
    Note: AOSP android R with inline encrypt only.
    Miui kernel will be updatyed when xiaomi release R miui for all devices.
    Q kernel will be updated soon.

    24/01/2021
    • Fixed performance regretions
    • Implement via userspace and update exec prog configuration
    • Don't force Low Memory killer configuration if detects we are using LMDK
    • Reconfigure LMKD configuration if detects 4GB ram device (needs more testing i have RN9Pro 6GB ram device)
    • Track power changes from Gram Q OSS
    • power: Drop “_3P5” from type to get recognized in AOSP (some roms haven't added this flag yet and sometimes cause issues so remove it)
    • Update ds28e16 driver from Q gram OSS
    • Merge tag 'LA.UM.8.1.r1-16600-sm8150.0'
    • Upstream to 4.14.214
    • optimize bpf modulo operation
    • RCU fixes
    • disable binderfs [Q ROM]

    29/11/2020
    • exfat 5.8 [both]
    • bindefs port (as per R requeriments) (R in the name Redmi-Note-9s-Pro-AOSP-R.zip)
    • haptic update from gram-q-oss [AOSP]
    • NFC firmware download fixes (from CAF)[AOSP]
    • magical changes to make your life better (or not)[both]

      NOTE: AOSP zip have 2 variants now, 1 for Android Q and other for R
      Some new requirements on Android R won't work on Q based roms and may cause fastboot reboot

    14/11/2020
    • Fix usb XHCI connection
    • Fix usb EHCI connection
    • Fix usb OHCI connection
    • v4l2-ioctl: Use a larger on-stack video copy buffer
    • printk: Add sleep time to timestamps
    • Mark vdso_pagelist allocation as not a leak
    • Avoid dynamically allocating memory in ext4_ext_remove_space
    • Alsa: Don't dynamically allocate a single struct instance
    • Atoll: increase linux,cma to 128M
    • Enable ULP
    • TTL Fixed (?)
    • some more.... for both kernels miui and aosp variants

    30/10/2020AOSP variant only

    26/10/2020
    • Rebased over LA.UM.8.9.r1-10600-SM6xx.0 (AOSP variant only)
    • Merge tag 'LA.UM.8.1.r1-16200-sm8150.0'
    • Wifi, Audio tag used LA.UM.8.9.r1-10600-SM6xx.0
    • Net Wireward
    • Enable PSI monitor
    • Add pidfd backport
    • Fixed boot on Joyeuse (Miui variant )
    • Last xiaomi changes (Miui variant )
    • Disable LMK
      Removed
    • [TESTING] exec: Add node tampering blacklist function
    • [TESTING] allow [email protected] and perf 2 to tampering blacklist


    Old log history


    • dm-crypt: increase threads
    • mm: Introduce kvcalloc()
    • treewide: kvzalloc() -> kvcalloc()
    • Increase the cgroup limit to 7
    • fs: exec: Introduce is_zygote_pid()
    • [TESTING] exec: Add node tampering blacklist function
    • [TESTING] allow [email protected] and perf 2 to tampering blacklist
    • Optimize CRC32
    • UFS pm_qos
    • use buffer from the stack space
    • implement stpcpy
    • expose event streams
    • Allocate decoder buffers
    • Fix VLA's
    • Improve backwards memmove performance
    • Enable vDSO + vDSO COMPAT (32bit)
    3
    @TeamMex This is a very fine kernel. I am currently working with using it (compiled with clang-11.0.4) as the kernel for OrangeFox Recovery, and it is looking very promising. :highfive:
    3
    Credits not in order:
    • Xiaomi (MiCode) for kernel sources
    • Code Aurora Forum for kernel changes
    • Google for easy access to PSI Pidfd changes
    • Demon000 for his work on AOSP kernel
    • kdragon for proton clang
    • xlidz for Yuki logo
    • RN9pro tg group for donate the device
    • KernelToast for kernel changes like qOS etc
    • To you for use my work
    • and a lot of others developers :)

    this config help with some "laggy issues"
    I leave some config for get more perf on gaming
    ySLbxGD.png


    oBvx5D3.png
    2
    hey @TeamMex ! great to see you developing for our device. I remember your Xperience Rom was one of the first roms i flashed back in the day on the original moto G lol. looking forward to trying this kernel :)
    Nice :D

    Yesterday, I installed yuki kernel on my joyeuse phone, it was really strong but after flashing I haven't been able to use my hhd hard drive
    My device didn't recognize that
    So I forced to flash stock boot

    fixed!

    It is possible to update
    new curtana branch?

    Because aosp has a newer branch

    Rebased over LA.UM.8.9.r1-10600-SM6xx.0 (AOSP variant only)
    Merge Tag 'LA.UM.8.1.r1-16200-sm8150.0'
    Wifi, LA.UM.8.9.r1-10600-SM6xx.0 audio tag applied

    I would like to check if galileo and dual gps work.

    Because cortana has this kernel there is no galileo and dual gps.

    I do not have a lag system
    check the miatoll core to see if it can detect galileo indual gps

    ---------- Post added at 12:40 PM ---------- Previous post was at 12:34 PM ----------



    I am also joining the request

    Not needed to switch to new branch i merged it

    What about fix TTL feature?

    It should be working on the latest version.
    let me know if not.