[Xiaomi Poco F1 ROMs, Kernels, Recoveries, & Other ] Pierre2324:
Useful stuffs

Clean flashing a kernel:

1. Boot into recovery

2. Wipe dalvik/art cache, cache, system and vendor(if recovery have this option)

3. Reboot into recovery (only needed on some recoveries)

4. Flash latest ROM zip

(Optional) Flash other zips like GApps, DFE, etc depending on ROM and your preference

5. Flash latest Magisk zip

6. Reboot into system (yes boot with stock kernel first)

7. Reboot into recovery

8. Flash latest NGK Kernel zip

9. Reboot and enjoy

Not to be confused with a ROM clean flash!

Do not wipe data or internal storage!

Encryption fix

For the ones who uses an encrypted device, those steps needs to be done to worl properly with NGK:

To those who are facing screen flicker/bootloop upon flashing NGK on an encrypted device.

1. Dirty flash your current ROM and boot into system.

2. change your password to whatever you want then click on "No" when it shows "Secure Start-up".

3. Boot into recovery then flash NGK. You will notice that it will not ask for a password even though you are encrypted.

Taking logs

Screen Freezes:

-Connect phone to PC

-Run following commands in terminal:

[*]adb shell

[*]dmesg

Random Reboots:

-When the random reboot occurs press the TWRP button combo to got straight into TWRP

-Send the pstore folder as a .zip file located in /sys/fs/

Any runtime kernel/app related crashes that doesnt make the device reboot or freeze:

-Use Matlog app on play store

-Start recording before the issue

-Stop recording after the issue

-Send the .zip file created

Charging:

Okay lets break it down for yall.

Every kernel on every device has WARM_TEMP and HOT_TEMP values which are usually always 45 and 50 respectively.

When device reaches 40-42C charging rate will decrease more and more until it reaches about 45C where device will stop charging even if its plugged in for safety reasons. Battery must not charge when they are this hot.

Battery thermal removal: this will prevent throttling before battery reaches about WARM_TEMP. Once battery reaches about 45C there is nothing in the world you can do. So yea battery thermal removal is still safe, just a matter of preference because if charging throttles before reaching 45C it will heat less then continue charging but if charging doesnt throttle yea it will charge charge faster under 45C but may heat more so you may hit 45C faster. So as in every other tweaks it depends on user.

As per my tests I would get about those but that may vary for you:

Battery temp (°C) - Charging rate (mA) tuples

46-1800

45-1800

44-2000

43-2600

42-2800

What else? oh yea here are some tips for you to lower temps (cause yes some of you charge while playing pubg..)

Tips for lowering temps:

-Turn off NGK thermals from NGK APP

Right you all need to understand thermals first.. A lot of users are just asking best thermals, best this, best that.. there is no universal bests..

Thermals will throttle performance depending on heat generated.. so yes there is a gain in performance when using NGK thermals because performance will throttle at higher temperatures. Why do I say it depends? Well someone living in a hot place and is getting high temps and throttling will use NGK thermals so he gets more performance for the same temperature point but there is always throttling else a phone would heat too much in the end and be really unsecure and all. That being said, if your device throttle with stock thermals then you go ngk thermals it will throttle at higher temps but in the end may still throttle and if you hit too high temps it will throttle even harder to keep temps low. For those people using normal thermals would be best since yea performance will throttle but it will prevent the phone from getting higher temps which could lead to more intense throttling. (Can also read about charging above you may want more aggressive thermals that will throttling performance to reduce heat so you can charge phone)

So next tip:

-Reduce Big cluster max frequency as this cluster is a hest generator

-Use another profile than Gaming! (Performance for me is best because its less aggressive, some people prefer balance for gaming)

All in all, try stuffs by yourself I think I did my part guiding you through all this, the best things you can do is the best things for yourself not necessarily the best for others.

Touchscreen Tests (NGK v1.5.5):

Spent a whole week with testers to just sit down and find the firmware to choose and then rebuild the drivers from the groud up.. but first here's an intro

Intro:

Small intro for everyone cause many people confuse many things..

-Panels: We have 3 main panels:

FTS, NVT REV1 & NVT REV2

-Touch firmware: comes in kernel and also in ROMs but kernel will flash its inbuilt firmware if the kernel firmware checksum is different to the one already present in ROM

-Touch Drivers: comes in kernel and those dont have numbers/versions its up to the kernel dev to make changes it those so stop asking for driver version no one can answer that precisely compared to firmware

Tests:

Alright now enough talking, the tests and results.

-Panels:

For FTS panels, using stock xiaomi drivers was fine no touch issues seem to happen since those went out.

For NVT panels, some had touch issues on rev1 and rev2 depending on firmware used while keeping xiaomi stock drivers so below tests were focusing on NVT mostly

-Firmware:

We tried 3 firmware and the ones who remained are 9.1.24 and 10.3.7 since other one gave issues

So I did incremental test builds modifying drivers for both firmware

-Drivers:

For drivers, as said before I reverted all changes to xiaomi stock drivers from their source. Some issues were present for some on both firmware version and different issues on both panel revisions (rev1 and rev2)

-Latency:

some issues was only related to latency and I knew latency was going to be better by optimizing the drivers later on

-Touch issues:

So based on that, I only took account of the issues present between firmware for each driver changes

Part 1:

Part 1 was updating novatech drivers from a CAF source that can be seen in my kernel source. So did that, compiled 2 versions again fixed some small issues here and there like firmware flashing wasnt working, touch didn't work at first and some bootup issues, anyway main thing is that novatech driver were updated a bit with less variable locking and such coding changes making the driver faster. Results after that were good it fixed some people's issues but latency wasnt perfect.

-Part2:

Now was time to optimize the drivers and did for both NVT and FTS (most of those optimizations were seen in previous ngk versions) but needed to add them again and add some more and see how they impact (cause not every optimizations means better results, some optimizations introduced issues)

Conclusion:

So in the end if TLDR

The conclusion was that issues were fixed after some driver changes as some optimizations made them worst, 9.1.24 firmware gave better touch (mostly under load or heat a.k.a for gamers) and didnt impact day to day users hence why NGK uses now 9.1.24 drivers.

BUT that is based on the fact that I reviewed the drivers from official xiaomi source, then updating them, then doing specific optimizations, other kernels may have different results or different ways of doing tests, thats just how I did it.

So yea for people who wont like touch, I will send this cause I did work on it to give better touch to most users and limiting the touch issues. I still dont think its possible to have perfect latency and perfect touch due to our phone but here's what has been done..