[M.O.D. KERNEL Q 1.5] MIUI 11 Mi9/ 9T Pro 835mhz GPU DynFsync LZ4 WLblock *FOD Fix*

Search This thread

Bryceicle1971

Senior Member
You copied fstab.qcom to /vendor/etc/? Boot into recovery, attached to your PC. Then from a command prompt in Minimal ADB and Fastboot,copy fstab.qcom there. Then type: adb devices. It should show a device ID. Then type adb push fstab.qcom /vendor/etc/. It should say succeeded. Then reboot. This only makes a difference if you are on F2FS.

If you aren't booting to system go ahead and try the TWRP recovery version - unzip and flash that package to boot and dtbo from TWRP Restore. It's already patched with Magisk 19.4 and several people are on it that had issues flashing the files separately.
Right ill try that then? One thing eludes me. Do you have to have an actual ROM installed or can you do that after the other steps?
 

smeroni68

Inactive Recognized Contributor
Jan 23, 2011
4,455
11,020
Milano
Right ill try that then? One thing eludes me. Do you have to have an actual ROM installed or can you do that after the other steps?
This is why i asked about the rom!
This is just kernel. You need to have a rom working installed.

Inviato dal mio MI 9 utilizzando Tapatalk
 
Last edited:

smeroni68

Inactive Recognized Contributor
Jan 23, 2011
4,455
11,020
Milano
Have tried with rom an without rom. no difference. I might try the simplified way an install to Ext4
Sorry... but if you write you try with and without rom, probably this kernel is not for you!

Seems that you have no idea of what are you doing!

Sorry, do not want be rude... but this is my thinking.

Inviato dal mio MI 9 utilizzando Tapatalk
 
  • Like
Reactions: Bryceicle1971

Bryceicle1971

Senior Member
You copied fstab.qcom to /vendor/etc/? Boot into recovery, attached to your PC. Then from a command prompt in Minimal ADB and Fastboot,copy fstab.qcom there. Then type: adb devices. It should show a device ID. Then type adb push fstab.qcom /vendor/etc/. It should say succeeded. Then reboot. This only makes a difference if you are on F2FS.

If you aren't booting to system go ahead and try the TWRP recovery version - unzip and flash that package to boot and dtbo from TWRP Restore. It's already patched with Magisk 19.4 and several people are on it that had issues flashing the files separately.

Mate??? None of the methods work. In the terp restore method You cannot actually see the files present?

This seems to get more confusing the more I try.

This cell gets 403000 in antutu with no enhancemnts. Maybe thats enough :) ?
 

mslezak

Senior Member
Dec 12, 2016
456
487
Houston
OnePlus 8T
Samsung Galaxy S23
Mate??? None of the methods work. In the terp restore method You cannot actually see the files present?

This seems to get more confusing the more I try.

This cell gets 403000 in antutu with no enhancemnts. Maybe thats enough :) ?

You have to unzip the TWRP restore file and follow the directions. Unzip to /TWRP/backups/[device id]/ (there will be a boot and dtbo .win file in there). Then from TWRP go to Restore and select boot and dtbo. Then restore. Yeah it's all up to you AnTuTu is between 425k-430k usually. This is complicated to setup. I know this. It's for people who don't mind working through the directions fully. If the boot.img and dtbo.img + Magisk.zip don't work, everyone who used the TWRP restore method has had success.
 
Last edited:
  • Like
Reactions: Bryceicle1971

mslezak

Senior Member
Dec 12, 2016
456
487
Houston
OnePlus 8T
Samsung Galaxy S23
Have tried with rom an without rom. no difference. I might try the simplified way an install to Ext4

Try reading the directions again. IF YOU DON'T FOLLOW THEM YOUR PHONE IS RUNNING IN STOCK MODE!!! It's setup this way on purpose - battery life is totally custom. You need a kernel manager (Smart Pack is provided it is free and the screen setup is shown in this post). Dial the *#*#8106#*#* to enable 830mhz. If that doesn't work on your ROM, you can try FK or EX and set the max/min GPU clocks to 830mhz.
 
  • Like
Reactions: Bryceicle1971

Bryceicle1971

Senior Member
Try reading the directions again. IF YOU DON'T FOLLOW THEM YOUR PHONE IS RUNNING IN STOCK MODE!!! It's setup this way on purpose - battery life is totally custom. You need a kernel manager (Smart Pack is provided it is free and the screen setup is shown in this post). Dial the *#*#8106#*#* to enable 830mhz. If that doesn't work on your ROM, you can try FK or EX and set the max/min GPU clocks to 830mhz.

Maybe in the morning :)
 

mslezak

Senior Member
Dec 12, 2016
456
487
Houston
OnePlus 8T
Samsung Galaxy S23
If you already installed please download and install the updated version from https://mega.nz/#!qgxQhKBA!F1eOTk7ay_9PIOo3Je8VWdulhn4lFoXJfeqbhLgcu1M there was a bug in the GitHub repo frequency table whereas the max frequency was 833 instead of 830mhz (mismatch between definitions). It may not cause any issues using the original but this is better because they should be matched up in sm8150-gpu-v2.dtsi source file. I have already installed to my phone and updated the TWRP flashable etc.
 

smeroni68

Inactive Recognized Contributor
Jan 23, 2011
4,455
11,020
Milano
If you already installed please download and install the updated version from https://mega.nz/#!qgxQhKBA!F1eOTk7ay_9PIOo3Je8VWdulhn4lFoXJfeqbhLgcu1M there was a bug in the GitHub repo frequency table whereas the max frequency was 833 instead of 830mhz (mismatch between definitions). It may not cause any issues using the original but this is better because they should be matched up in sm8150-gpu-v2.dtsi source file. I have already installed to my phone and updated the TWRP flashable etc.
Tested on Global Stable MIUI v10.2.13.0 and cameras do not work. Also face detection obviously not working.
Sent logs to Matt via telegram.
Probably this vendor isn't full compatible with kernel.
Other testing, no problems found.

Used a modded fstab done by Matt, tested on original os and was fine.

Used the restore of nandroid for boot and dtbo, plus flashed dm verity and force encrypt disabler.
Also formatted cache into f2fs to test.

Restored complete previous backup, phone is back perfectly working.

If any update for the camera issue, let me know.

Thanks guys.

Inviato dal mio MI 9 utilizzando Tapatalk
 

Bryceicle1971

Senior Member
Sorry... but if you write you try with and without rom, probably this kernel is not for you!

Seems that you have no idea of what are you doing!

Sorry, do not want be rude... but this is my thinking.

Inviato dal mio MI 9 utilizzando Tapatalk
I think you might be right. It's extremely complex. I am a visual thinker an need to be able to picture what's going on? The steps all seem slightly confused out of order an unclear to me. I'm not being rude either but I suspect that's why this enhancement will no doubt confuse an be beyond most people
 
  • Like
Reactions: smeroni68

Dariusdd

Senior Member
Hmm... I had to use the restored images, it wouldn't boot on F2FS on xiaomi.eu's 9.8.1 otherwise. The device booted with the /data partition formatted to ext4 and while having the kernel installed, but it was bootlooping while using the patched 9.8.1 images.
I guess that ain't working?
Meanwhile: removing FBE really brought up the speed. The kernel's file performance is somewhat lower than expected though, the sequential writes and SQLite performance went down by a lot, still not as bad as Android Q. EDIT: A couple of reboots later they're fine, at the levels I expected from MIUI 9.8.1, if not slightly faster.
Still trying it out, thank you for the work!
TL;DR: it didn't boot for me on 9.8.1 on F2FS unless using the restored boot and dtbo images. It ended up bootlooping. It booted on ext4.
 
Last edited:

mslezak

Senior Member
Dec 12, 2016
456
487
Houston
OnePlus 8T
Samsung Galaxy S23
Hey There.
I am trying to mount the fsqtab.qcom an do not get how to do it on my Mi9 using these directions?


The fstab.qcom included MUST be placed in /vendor/etc/ OR YOUR PHONE WILL NOT BE ABLE TO MOUNT THE DATA PARTITION!!!! So your next step is to copy the fstab.qcom via a root browser or from Minimal ADB and Fastboot. Boot to Recovery (hold power + volume up, release power button when the boot logo appears), then run from a terminal: adb push fstab.qcom /vendor/etc/fstab.qcom

How do you do whats listed above 'precisely'?

I can make everything else work. I just cannot seem to get this file inserted in Vendor?

Can you help please

(my profile says senior member but I am really not :) )

Download the new Mega.nz link and use the TWRP flashable zip it will insert fstab.qcom for you. In the directions now.
 

mslezak

Senior Member
Dec 12, 2016
456
487
Houston
OnePlus 8T
Samsung Galaxy S23
Hmm... I had to use the restored images, it wouldn't boot on F2FS on xiaomi.eu's 9.8.1 otherwise. The device booted with the /data partition formatted to ext4 and while having the kernel installed, but it was bootlooping while using the patched 9.8.1 images.
I guess that ain't working?
Meanwhile: removing FBE really brought up the speed. The kernel's file performance is somewhat lower than expected though, the sequential writes and SQLite performance went down by a lot, still not as bad as Android Q.
Still trying it out, thank you for the work!
TL;DR: it didn't boot for me on 9.8.1 on F2FS unless using the restored boot and dtbo images. It ended up bootlooping. It booted on ext4.

Others are already on F2FS with much greater speed. If you flashed the TWRP backup of boot.img and dtbo.img it has Magisk 19.4 already. I added a flashable zip to enable F2FS it copies the fstab.qcom to /vendor/etc for you. Download the the latest Mega.nz link at the top of the post and give it a shot. Directions have been updated as well.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 30
    [M.O.D. KERNEL Q]

    *** NOTE: a dev has posted on TG the FOD fix for beta/ MIUI 12 forked from my code, download there! I asked for GitHub source to comply with XDA and will post once I have it and provide a link to the file link "Mi9/Mi9T Pro Optimization and Overclocking" Telegram has it now: https://t.me/joinchat/NNTe_E9G4ZcZKXCUrajFYQ ***

    MIUI 11 Mi9/ 9T Pro MOD 1.5

    MOD-Q 1.5 is for stable MIUI 11 variants for Mi9 only - Xiaomi.eu 11.0.5 stable is what it was built for, runs best on, just use it. The Mi9T Pro version supports MIUI 11 variants plus many AOSP builds. If you use an official MIUI 11 Xiaomi version you will get a warning message "Contact device manufacturer." You can ignore that, it means nothing. But I highly suggest using Xiaomi.eu 11.0.5, or another MIUI 11 variant like MiRoom or some use Revolution OS.

    ***DO NOT USE ANY PERFORMANCE (CPU/GPU/ETC) MAGISK MODULES WITH THIS FOR BEST PERFORMANCE!!! IT INSTALLS IT'S OWN OPTIMIZED MAGISK MODULE AUTOMATICALLY***

    FP scanner will only work up to 11.0.5. Xiaomi keeps changing the code and not releasing it to made Dev builds not work. There were "patches" that worked until a few weeks back, but Xiaomi has yet again changed their FP scanner code. So I will not update the FP code, do not ask, it is a complete waste of time. Sorry, but Xiaomi.eu 11.0.5 and MOD 1.5 work very very well together.

    Features:
    835mhz GPU, Adreno Boost, Dynamic Fsync, Boeffla WL blocker (better battery idle), F2FS optimizations, LZ4 ZRAM. EXFAT USB/SDCard support added. Sultan Boost + PapaSmurf's Op7Pro tweaks, Dynamic Overclocking + Underclocking with frequency boost for smooth, fast, clean performance and fluid scaling. Many thanks to PapaSmurf who greatly influenced this kernel; portions are ported from his Op7 Pro Repo.

    Mi9T Pro version also reported to work on AOSP ROMs using the original FOD implementation (Derpfest, MSM, CRDroid, Havoc, LOS).

    Just use the Magisk Module it installs for you automatically when you flash the zip from TWRP, likely the best results will be obtained. SmartPack can be installed to choose between profiles under Performance Tweaks - battery / balanced / performance / gaming, although the default installed Magisk module is highly recommended by itself for optimal performance and good battery drain.

    Github source has been added for MOD 1.5 here. Please read the Readme that's why it's there.
    https://github.com/mrslezak/MODQ1.5

    Releases are available here: Download them for your device and follow the instructions there. If you already have TWRP and Magisk, it will be easy. Just read please it will answer your questions.
    https://github.com/mrslezak/MODQ1.5/releases/tag/MOD1.5


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [M.O.D. KERNEL PIE] Mi9 Android9 GPU830mhz F2FS data/cache Dynamic Fsync LZ4 WLblocker V2 [STABLE]

    MOD Pie notes:

    ***New features added! Dynamic Fsync replaces the Fsync toggle (credits to author Paul Reioux aka Faux123 <reioux@gmail.com>), and Boeffla Wakelock blocker 1.1.0 (credits to author: andip71 <andreasp@gmx.de>) has been added. The GPU830mhz runs on a higher regulator now so even 3DMark runs without issue, this is as stable as it gets. A battery saving Magisk Module has been added for longer life and scored 422.5K still on AnTuTu! It will throttle and hotplug (idle) cores as needed to save battery ***

    Super tweaked kernel for the Mi 9. Best AnTuTu Benchmark 432K thus far, expect 420K-430K in daily operation with good battery life. This will vary based on the ROM selected. Stock AnTuTu is 370K. So you can run your phone faster than any production 855+ at the moment. This kernel is setup on purpose to allow anything from stock to maximum performance, you can set parameters as you like in a kernel manager.

    GitHub Source: https://github.com/mrslezak/MODKernel-V2-Cepheus

    Releases are available here:
    https://github.com/mrslezak/MODKernel-V2-Cepheus/releases/tag/V2

    TG Name: MattoftheDead

    M.O.D. Kernel (MattoftheDead). This kernel is STABLE, everything works, it runs on any MIUI based ROM (MIUI Global Dev, MIUI China Dev, MiGlobe, Xiaomi.eu, AOSP, etc.). ***If you install this kernel and don't follow the tweak instructions, it runs exactly like stock. There is now a Magisk module that will run with the optimal settings to make this easy! *** So read up. You can apply any tweaks you'd like. These include:

    GPU 830mhz overclock - stable and smooth. The GPU will throttle down when not being used to a lower mhz. The Magisk Module will enable the max 830mhz clock for you. Or you can go without if you have a dialcode supported GPU MaxFreq OC mode *#*#8106#*#*

    ZRAM LZ4 data encryption enabled - fastest encryption method, smaller ZRAM sizes (512mb is good) work very well [2GB is the stock ZRAM default, LZO is the default kernel compression which is slow]. ZRAM is in-memory swap so it is ultra fast. This allows you to have more free RAM for apps to run.

    F2FS data and cache partition support - full ICE AES 256bit encryption. Note only @mauronofrio TWRP 3.3.1-39 + supports F2FS partition mounting so you MUST use this TWRP recovery!!!

    F2FS has been tested on MIUI Global Dev 9.6.27 and Xiaomi.eu 9.7.22, 9.8.1, MiGlobe, RevOS, AOSP, Havoc thus far (more added daily) and read/write speeds and app access are definitely fast. Support was enabled by working directly with @mauronofrio on XDA (thanks Mauro) so we originated F2FS support for Mi9 - there are also F2FS kernel tweaks that help the speed in the kernel.

    BOEFFLA Wakelock Blocker 1.1.0 - blocks wakelocks and allows you to change what gets blocked that is waking up your phone and preventing deep sleep. There are defaults blocked already in this build that are known to be blockable safely. If you want to add more, use SmartPack Kernel manager under Wakelocks. It will also show you what apps are causing them and the frequency so you can disable the ones that are not needed.

    If you want to join in the discussion and see updates in realtime, World MI9 & Mi9T Pro Optimization and Overclocking is a TG group which has many things related to MOD and any other kernels, mods for the phone, Magisk Modules, all types of things for the devices.

    Step 1: [KERNEL REQUIRED FILES]
    Go to the releases page posted earlier and download everything.

    Step 2: [ROM SELECTION]
    If you already have a Pie MIUI based DEV ROM installed, you can continue to use it. Global Dev 9.6.27 is recommended. But this supports up to Xiaomi.eu 9.8.1. If you want to use a new MIUI based ROM, download it and setup the device (between these ranges of releases - some like MiRoom, some like stock, some like Xiaomi.eu). If you are clean flashing everything, don't bother restoring all the apps - they will be deleted when you switch to F2FS. Just set it up so you can login and get to the default menu with the default apps displayed. Either way, you will have to setup the device as a new phone. So back up all your user data (photos, downloads, etc), apps, etc. using Google Drive, Xiaomi Cloud, Titanium Backup Pro, or any other app that backs up apps and settings. It's often easiest to put them on your PC since you will be plugged into it during this install process with your USB cable.

    Step 3: [MAURO TWRP INSTALLATION FOR F2FS SUPPORT]:
    Boot Mi9 holding Power + Volume Down
    Hook up to your phone to the PC with the charging cable
    Open a command prompt. Go to your Minimal ADB and Fastboot folder.
    Type: fastboot devices
    And hopefully you see your device ID pop up. If not you don't have the right driver, the cable is bad, or something else is wrong. Search Google.

    Next flash Mauro TWRP:
    fastboot flash recovery twrp-3.3.1-41-cepheus-mauronofrio.img (or use his latest from the link at the bottom of this thread)
    Hopefully you see it flash to the device in a few seconds successfully and it's ready to go.

    Booting to TWRP:
    Turn off your phone. Now hold down power + volume up. Once the boot Logo appears, let go of the power button but keep holding volume up. TWRP should boot. If not, try again. I usually have to remove the phone case. Now enter your password and proceed to the next section. If it asks you if you want to keep the system read only SAY NO! You will be modifying system components, keep it writable to avoid installation issues.

    Step 4: [FLASHING THE M.O.D. KERNEL]
    Check the releases page posted above. Just unzip the file there and flash via TWRP as an image to boot. It's patched with Magisk already.

    Step 5: [CONVERT EXT4 TO F2FS}:
    Converting EXT4 data and cache partitions to F2FS:

    Check the releases page posted above for fstab_patch_F2FS_MI9_Cache_NoBarrier.zip required to enable F2FS. You MUST flash this in TWRP or your OS will NOT be able to boot an F2FS data partition!!!! This file has been kanged all over the internet, it was created here. Feel free to use it, everyone already is.

    ***Note flashing TWRP / Install / fstab_patch_F2FS_MI9_Cache_NoBarrier.zip MUST be repeated any time you change ROMs or you won't have access to your data!!! So back this up!!!!***

    Boot back into TWRP. You will need to go to Wipe, Advanced Wipe, Click Data, Repair or Change File System, Change File System, and click F2FS. Swipe to change. It will format and you'll have nothing on your data partition. Next format cache. Go to Wipe, Advanced Wipe, Click Cache, Repair or Change File System, Change File System, now click F2FS. Swipe to change. Again it will format and be wiped.

    Step 6: [SETTING UP YOUR "NEW" PHONE]:
    Next, reboot to System. The device should boot up and welcome you to your "new" device. It has no data apps so it has to be new. You will have to login to your Xiaomi account if it is associated with the device. Then you can choose to restore from a Google Backup and next from Xiaomi Cloud. You can do either one to get your apps back. I would suggest Xiaomi Cloud after Google completes all its downloads - it will place icons in the right places and install your root apps if you had them. And after setting up your apps, now boot back to TWRP and make a Backup. Now for this Nandroid backup you should backup data, boot, dtbo, and vendor partitions (vendor has the fstab.qcom file that allows your F2FS supported partition to boot now). Even if you save to your internal device initially, be sure to put it on a PC for safe keeping. Then If you accidentally wipe your partition later, you can skip importing, get to the main screen after minimal setup completes, enable file transfer from the connected PC, and then copy the Nandroid backup to your Internal Memory. Boot into TWRP and restore the backup and you're back in business.

    Step 7: [INSTALLING MAGISK MANAGER AND KERNEL MANAGER]:
    So now you install the MagiskManager-v7.3.2.apk to enable all root functions. If you want Google Pay and anything else setup posts are here in the Mi9 forum that show you how. Generally hide all banking apps, trading apps, Google Pay, GMS, etc. And I suggest installing GMS doze for better battery life and the Mi9 Auto Brightness fix.

    In addition, to have the MOD kernel setup for the best performance, go into Magisk Manager, Modules, and flash the (Magisk)MOD-Battery-Saver+_v2.zip from the releases page. It will auto set all the parameters the kernel features, and does a great job with extending battery life at the same time.

    This is the best setup for performance. Pictures are included below.

    If you would like to change the settings, you need a kernel manager. So next you can install the Smart Pack APK SmartPack_Kernel_Manager_v8.7.apk to enable or disable all the tweaks you desire.

    Pictures are attached below to show the TWRP screens for flashing and F2FS partition conversion. Also the settings of best performance using Smart Pack kernel manager are here. If you want to change any of the best settings after flashing the Magisk Module, do it in the kernel manager of your choice and set on boot - where to change those options is in the pictures below for SmartPack.

    Enjoy!

    Mauro TWRP
    https://xdaforums.com/Mi-9/development/recovery-unofficial-twrp-xiaomi-mi-9-t3905825

    SmartPack Kernel Manger
    https://xdaforums.com/android/apps-games/app-smartpack-kernel-manager-t3854717

    FK Kernel Manager CPU Profile
    https://play.google.com/store/apps/details?id=com.franco.kernel&hl=en_US

    Magisk
    https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

    Minimal ADB and Fastboot
    https://xdaforums.com/showthread.php?t=2317790

    And one last thing. I have been working with some of the most well known devs out there on XDA on Telegram, Private Messaging, and other channels to get this kernel where it is - but I have no XDA presence. I've helped hundreds of people on Telegram setup their systems or diagnose their issues. If you find this post useful, helpful, innovative, or install my kernel and like it, please click the Thanks button to acknowledge the work that I've done to get the Mi9 to this point. It would be greatly appreciated to get some thank yous for all the hours I've put into this development work for the Mi9, and provides some motivation to keep improving. Other kernels are on the way as well for more Xiaomi / Redmi devices if I feel some love from the community. Much appreciated!

    Thanks goes out to @smeroni68 and @mauronofrio for helping fix the fstab.qcom zip that cost several hours of pain yesterday for users and I on Telegram that did not have the Vendor partition mounted when flashing the old fstab.zip file - it will flash now mounted or not from TWRP. And thanks to @ilia1985 for providing a Magisk Module template for the kernel manager settings, now OC setup doesn't even need a kernel manager!

    ***DISCLAIMER - APPLYING ANY ROOT MODS IS ALWAYS AT YOUR OWN RISK! I AM NOT RESPONSIBLE FOR BRICKED DEVICES, DAMAGE OR OTHER THAT MAY OTHERWISE OCCUR. THIS HAS BEEN TESTED EXTENSIVELY BUT USE AT YOUR OWN RISK***
    4
    If you have trouble installing this mod, try my video tutorial, also I was able to condense down some of the steps.

    3
    MIUI Global Dev 9.6.27 is the basis of this mod. All benchmarks and tests were done on this ROM.
    3
    My Results

    Excellent work @mslezak

    Glad to see some love for our device.

    These are my results before and after flashing the magisk optimal settings file with your kernel.
    2
    Looks like it's base on last one version of android9 MIUI DEV 9.8.1 to modify its kernel, doesn't it ?
    So it's not base on linux kernel 4.14.139 to develop ?

    Kris

    4.14.83 per the hardware device settings. Q is already upstreamed to the latest Linux and CAF so just waiting on a source release so kernels can be made. No need to spend time upstreaming unless another dev wants to (I'm in contact with the other kernel dev here on XDA we're working together now, he may upstream). He upstreamed his to 4.14.139 and will pull my source repo soon to fix bugs in his build so he may just upstream this kernel or fix bugs in his kernel in the process. Collaboration is a good thing. I've been waiting for assistance for a long time and it's good to team up with others devs. We don't get paid we do this as a hobby.