Skip to content

Releases: liyafe1997/kernel_xiaomi_sm8250_mod

20241023

23 Oct 19:43
Compare
Choose a tag to compare

en

Updates:

  1. Fixed umi, cmi, cas, thyme, psyche USB connect to PC freeze problem.
  2. Add LZ4, LZ4HC, ZSTD compression algorithms support for zRAM.
  3. Use cnss2 driver from micode pipa-t-oss (Fix screen sharing problem)
  4. Add MI_RECLAIM, RTMM, MIUI_ZRAM_MEMORY_TRACKING (Some memory optimization modules from Xiaomi) from pipa-t-oss for MIUI/HyperOS builds.
  5. Use display and drm driver from Lineage OS 21 repo for AOSP builds so that makes fingerprint on display works on AOSP based ROMs.
  6. Enable CONFIG_UNICODE and CONFIG_F2FS_FS_COMPRESSION support. (Some ROMs and pipa might require them).
  7. Enable CANBus and USB CAN adapter (like CANable) supports. (Some geeks or embedded developers may happy with this ^v^)
  8. Some small patches from UtsavBalar1231's android14-stable branch and Qualcomm upstram that improve the CPU scheduler.
  9. Fixed problems of pipa (Mi Pad 6) , now all features fully working on pipa!

Known issues:

  1. Pen doesn't works on dagu (Mi Pad 5 Pro 12.4).
  2. elish (Mi Pad 5 Pro) still has the problem that unable to wakeup after sleep. Seems that is caused by the module phy-msm-ssusb-qmp.c. More debug needed.

zh-cn

更新日志:

  1. 修复了 umi、cmi、cas、thyme、psyche 插电脑USB时死机重启的问题。
  2. zRAM 添加 LZ4、LZ4HC、ZSTD 压缩算法支持。
  3. 使用来自 micode pipa-t-oss 的 cnss2 驱动(修复投屏问题)。
  4. MIUI/HyperOS 版本添加了来自 pipa-t-oss 的 MI_RECLAIMRTMMMIUI_ZRAM_MEMORY_TRACKING(一些小米开发的内存优化模块)。
  5. AOSP版使用 Lineage OS 21 repo中的display和 drm 驱动,修复AOSP类原生系统的屏下指纹问题。
  6. 添加 CONFIG_UNICODECONFIG_F2FS_FS_COMPRESSION 支持。(某些ROM和 pipa 可能需要)。
  7. 添加 CANBus 和 USB CAN(如 CANable)的支持。(一些折腾嵌入式的可能会喜欢这个)。
  8. 合并一些来自 UtsavBalar1231 android14-stable 分支以及高通上游的改善CPU调度的patch。
  9. 修复 pipa(小米平板 6)的问题,现在pipa所有功能都正常了!

已知问题:

  1. dagu(小米平板 5 Pro 12.4)上,官方笔和第三方笔都无法使用。
  2. elish(小米平板 5 Pro)仍然存在息屏后死机问题。似乎是由模块 phy-msm-ssusb-qmp.c 引起的,还需要debug。

20241012

12 Oct 09:45
Compare
Choose a tag to compare

en

Updates:

  1. Fix cas (Mi10 Ultra) camera unstable problem.
  2. All touch drivers use the Xiaomi stock version from pipa-t-oss (Which has Touch Boost feature in MIUI/HyperOS).
  3. dagu (Mi Pad 5 Pro 12.4) all working! (But keyboard & pen haven't been tested since nobody have it)
  4. Fix munch (POCO F5/K40S) USB PD problem.
  5. Enable F2FS Realtime discard (Maybe has better trim ops thus better IO performance).
  6. Import Xiaomi's perf_helper feature for MIUI(HyperOS) builds.

Known issues:

  1. Some users report that umi, cmi, cas, thyme, psyche might freeze when you unplug USB from PC. Since I don't have these devices, I need someone give me dmesg & logcat logs to debug it (It can be captured via WIFI ADB or Termux SSH when you try to reproduce it).
  2. pipa and elish/enuma still have significant problem so these models are not included in this release.

zh-cn

更新内容:

  1. 修复 cas (小米10 Ultra) 相机不稳定的问题。
  2. 触控驱动使用小米官方pipa-t-oss仓库原版 (小米的驱动在MIUI/HyperOS上有Touch Boost特性)。
  3. dagu(小米平板5 Pro 12.4)所有功能正常!(但键盘和手写笔没人测过)
  4. 修复 munch(POCO F5/红米K40S)USB PD 问题。
  5. 启用 F2FS realtime discard(更好的执行TRIM,可能能提高IO性能)。
  6. MIUI(HyperOS)版本加入了小米的 “perf_helper ”特性

已知问题:

  1. 有网友反馈umi, cmi, cas, thyme, psyche在从电脑上拨出USB的时候有可能死机。我没有这几个机器,需要有人给我提供复现时的dmesg & logcat来调试 (可以在复现时用WIFI ADB或者Termux SSH来抓)。
  2. pipaelish/enuma还有较多问题,所以这次Release不含这几个机型。

20240929

29 Sep 23:48
Compare
Choose a tag to compare

En

This is the first version which is based on lineage-21 kernel code base.

Because the previous UtsavBalar1231's android14-stable based releases (releases in 2024 August) has freeze problem during the device sleep/wake up. So now switched to Lineage OS 21 code base, and the MIUI features code and some of the drivers still copied from UtsavBalar1231's repo. Seems this time it really solved the freeze problem!

This kernel should be works with Android11~14.

Also, try to add sm8250 based Xiaomi tablets support, but not fully working, see below.

And also, this kernel added more USB Serial chips support: OTI6858, TI, SPCP8X5, QT2, UPD78F0730, CP210X. You can use them with USB-OTG and have access to /dev/ttyUSBx!

Some people have already this kernel for few days and variant models, basically it works fine and seems no longer freeze when sleep, except these known issues:

  1. cas (Mi10 Ultra) has some problem on camera (the telephoto camera sometimes may stop working), some people reported that clear the data of the Camera App may fix that, I have no idea at this moment. If you know the problem, please tell me or directly PR! (Also, I have no cas device to debug)
  2. elish (Xiaomi Pad 5 Pro) sometimes needs to take a long to wake up. also, I have no idea at this moment. If you know the problem, please tell me or directly PR! (Also, I have no elish device to debug)
  3. enuma (Xiaomi Pad 5 Pro 5G) should has the similar problem with elish since they are similar hardware.
  4. For dagu (Xiaomi Pad 5 Pro 12.4) and pipa (Xiaomi Pad 6), haven't been tested yet, even I don't know the kernel can boot up or not. If you have these devices you are welcome to test and please feedback! (even it works)

zh-cn

这是第一个基于lineage-21内核代码的版本。

之前基于UtsavBalar1231的android14-stable分支的版本老是有睡死问题,所以切到了Lineage OS 21 codebase来弄,MIUI特性的代码以及一些驱动代码是从UtsavBalar1231的仓库抠过来的。这次看起来真的解决睡死问题了!已经找不少酷友内测了几天了,包括我自己,没人反馈睡死问题。

这个内核应该兼容Android11~14。

以及从这次开始添加小米平板系列支持,但目前并没有完全正常工作,看下面。

以及这次还加入了更多USB转串口芯片支持:OTI6858, TI, SPCP8X5, QT2, UPD78F0730, CP210X。你可以用OTG来连接这些USB Serial,然后可以访问/dev/ttyUSBx

感谢这几天帮忙测试和反馈的酷安的朋友们,这段时间都是根据大家的反馈来一点一点修复问题。根据这几天大家的测试,内核基本上没问题了,功能都正常,除了以下机型:

  1. cas(小米10Ultra)长焦相机不稳定,有时候打不开?有人说清楚相机数据似乎会正常,但也有人说还是打不开,我不太确定,因为我手上也没有cas来调试,目前我也对这个问题no idea。如果你知道原因或者怎么修复,欢迎反馈或者直接提PR!
  2. elish(小米平板5 Pro)有时睡眠后需要很长时间才能唤醒。同样我也没有idea也没有elish设备调试,如果你知道原因或者怎么修复,欢迎反馈或者直接提PR!
  3. enuma (小米平板5 Pro 5G)应该也有和elish类似的问题,因为硬件几乎是一样的,只是多了5G modem。
  4. dagu (小米平板5 Pro 12.4)和pipa(小米平板6)没有人测过,我甚至不知道这个内核能不能boot起来。如果你有设备欢迎帮忙测试并反馈(哪怕正常工作也请反馈!)

20240824

24 Aug 11:23
Compare
Choose a tag to compare

En

  1. Change cnss2 driver for fixing freeze problem while sleeping.
  2. Fix alioth (Redmi K40/POCO F3) haptics problem.
  3. Enable USB Serial drivers (CH341/FTDI/PL2303), you can use these devices with OTG and have access to /dev/ttyUSBx
  4. Some defconfigs optimization (mostly follow the stock config)

zh-cn

  1. 更换cnss2驱动以修复睡死问题
  2. 修复alioth(红米K40/POCO F3)振动问题
  3. 启用USB串口设备驱动(CH341/FTDI/PL2303),你可以用OTG连接USB串口设备并且能访问/dev/ttyUSBx
  4. 其它一些deconfig优化(主要参考原版的defconfig)

20240814

14 Aug 10:07
Compare
Choose a tag to compare

En

  1. Force to enable ufs lpm for fixing power consumpation issue on some varients/ROM. (Thanks @wcedla found this fix)
  2. Disable CONFIG_CRYPTO_DEV_QCOM_ICE (According to Xiaomi's original defconfig it should be disabled, but previously it was set as enabled accidently)
  3. Use CONFIG_HZ_250 instead of CONFIG_HZ_300 (Also according to Xiaomi's original defconfig)
  4. Built by This clang-r487747c from Google.

zh-cn

  1. 强行启用UFS LPM以修复部分机型/ROM的耗电问题(感谢@wcedla发现这个fix)
  2. 禁用CONFIG_CRYPTO_DEV_QCOM_ICE(小米原版defconfig是禁用的,之前的build本应是禁用的,但意外被启用了)
  3. CONFIG_HZ_300 改为 CONFIG_HZ_250 (同样,小米原版defconfig是 CONFIG_HZ_250
  4. 使用 这个来自Google的clang-r487747c 来编译

20240811

11 Aug 14:38
Compare
Choose a tag to compare

En

Enable CONFIG_KALLSYMS_ALL for better APatch support.

Build with toolchain Proton Clang 20210522

Keep using old camera driver since it works on all varients & ROMs (also merged to android14-stable-mod)

zh-cn

启用CONFIG_KALLSYMS_ALL 以更好地支持APatch。

使用Proton Clang 20210522 toolchain来编译

摄像头驱动继续用旧的,这个驱动似乎在所有的机型&ROM上都可用,所以就保持了,也merge进了android14-stable-mod分支

20240809 (Using old camera driver)

09 Aug 15:07
Compare
Choose a tag to compare

En

This build is built on this commit, which is using the old camera driver from branch android-12-stable to solve camera issue for some models with some ROM.

If the camera doesn't work on your device & ROM after you flash the 20240804 kernel, you can try this one.

Instead, if you're having trouble with this one, you can try version 20240804.

Other things are as the same as 20240804, for other information, please refer to the release note of 20240804.

zh-cn

该版本基于这个commit编译,使用旧版的摄像头驱动(来自branch android-12-stable),以解决某些机型在某些ROM上摄像头打不开的问题。

如果你刷了版本20240804的内核之后遇到摄像头打不开的问题,可以尝试这个。

相反,如果你刷这个版本遇到问题,可以尝试版本20240804

其它内容和版本20240804一模一样,其它信息和说明请参阅20240804的说明。

20240804

04 Aug 17:31
Compare
Choose a tag to compare

en

This build is based on @UtsavBalar1231 upstream branch android14-stable, with some small fix, and also use cnss2 driver (Qualcomm WLAN driver) from android12-stable branch (because the new driver has some problems, it crashes when toggling WIFI/Airplane mode seems it fails to put the wlan hardware to sleep mode).

It should works on both stock MIUI and third-party AOSP based Android 11-14 ROMs. I have tested with apollo(Mi 10T / Redmi K30S Ultra) with MIUI12-14/HyperOS & Android11-14, AOSP based ROM (Pixel Experience/Paranoid/LineageOS) & Android13 and 14, also lmi(Redmi K30Pro) with MIUI14.0.4 & Android 12.

Since I only have these two devices, I didn't have a chance to test other models but it should works theoretically. You are welcomed to give feedback (Issues/Pull Requests)!

Please choose your model, AOSP-like or MIUI/HyperOS ROM, and with/without KernelSU from below to download the kernel zip. You can flash it in recovery (TWRP, etc.) or KernelFlasher App.

Note: The zip does not include the dtbo.img and it will not replace your dtbo partition. It is recommanded to keep the stock dtbo or the dtbo from your third-party rom (If the builder comfirmed it works well). Since there are some problems with the dtbo.img which built from this source, one of them is the screen will suddently goes to the highest brightness when shut try to shut off the screen in the lock screen. If you had flashed any other third-party kernels, and you got some weird problem, you should keep an eye to check your dtbo has been replaced or not.

Also, dtb is not flashed by default. (dtb is already in the zip). If you encounter some strange problems, you can try to flash it. Just uncomment # mv $home/kernels/dtb $home/dtb; in anykernel.sh.

zh-cn

该版本基于 @UtsavBalar1231 的上游分支android14-stable,修正了一些小问题,并且使用 android12-stable分支的cnss2驱动(高通的WLAN驱动)。(因为新版驱动在开关WIFI/飞行模式的时候会崩溃,看起来像是在把WLAN硬件切到睡眠模式时出问题)

该内核Build理论上应当能在原版MIUI和第三方的基于AOSP的各种Android11-14的ROM上使用。我只在apollo(Mi 10T / Redmi K30S Ultra)上测过MIUI12-14/HyperOS & Android11-14,AOSP类原生ROM (Pixel Experience/Paranoid/LineageOS) & Android13和14;以及lmi(Redmi K30Pro)上测过MIUI14.0.4 & Android12。

由于我只有这两个设备,所以我只能用这俩手机测,其它型号我没机会测,但理论上应该能用。欢迎大家尝试并反馈(提Issue或Pull Requests)!

请在下面选择正确的型号,AOSP类原生或者MIUI/HyperOS ROM,带或不带KernelSU,下载对应的Kernel zip包。可在Recovery(TWRP等),或者KernelFlasher App中刷入。

注意:该内核的zip包不包含dtbo.img,并且不会刷你的dtbo分区。推荐使用原厂的dtbo,或者来自第三方系统包自带的dtbo(如果原作者确认那好用的话)。因为该源码build出来的dtbo.img有些小问题,比如在锁屏界面上尝试熄屏时,屏幕会突然闪一下到最高亮度。如果你刷过其它第三方内核,或者遇到一些奇怪的问题,建议检查一下你的dtbo是否被替换过。

并且默认不刷dtbdtb已在zip中),如果你遇到奇怪的问题,可以尝试开启刷入dtb。把anykernel.sh中的# mv $home/kernels/dtb $home/dtb;取消注释即可。

20240620

19 Jun 23:52
Compare
Choose a tag to compare

Enable CONFIG_UFS3V1 for all xiaomi kona models.

20240616-01

16 Jun 15:35
Compare
Choose a tag to compare

About this kernel & repo / 关于本内核及repo

This repo is forked from https://github.com/UtsavBalar1231/kernel_xiaomi_sm8250. Thanks to @UtsavBalar1231!

The main purpose is fix this battery stuck at 1% problem, and some small changes and optimizations of defconfig. Also provide KernelSU integrated pre-built image(flashable anykernel3 zip), and a more intuitive and easy-to-use build script and build guide that allow you to try to build by yourself.

This focked branch and the pre-built kernel image/zip is based on the android12-stable branch of the original repo. It should works on both stock MIUI and third-party AOSP based Android 12 ROMs. Android 13 also should be works, but I don't have device to test it. As I only have a lmi with stock latest MIUI 14.0.4 with Android 12, I only tested on that. If you have a Android 13 based system, or other models you are welcomed to test it and feedback :)

Note: The zip does not include the dtbo.img and it will not replace your dtbo partition. It is recommanded to keep the stock dtbo or the dtbo from your third-party rom (If the builder comfirmed it works well). Since there are some problems with the dtbo.img which built from this source, one of them is the screen will suddently goes to the highest brightness when shut try to shut off the screen in the lock screen. If you had flashed any other third-party kernels, and you got some weird problem, you should keep an eye to check your dtbo has been replaced or not.

该repo fork自 https://github.com/UtsavBalar1231/kernel_xiaomi_sm8250 ,感谢 @UtsavBalar1231

主要目的是想修复电量卡在1%的问题,以及defconfig有一些小的改动和优化,以及提供带KernelSU的预编译好的内核(原作的没提供有KernelSU,而且原作release里的lmi内核在我的K30Pro上无法启动,所以就想着自己编译了)。以及再提供一个更直观和易用的编译脚本和README,方便大家自己折腾和修改,编译自己的内核。

该focked分支以及release里的编译好的内核成品基于原repo的android12-stable分支,应当能在原版MIUI和第三方的基于AOSP的各种Android12的ROM上使用。Android13理论上也许应该也行,但我没有测试。同样我手上只有lmi(K30Pro),所以我只在lmi上的最新版官方MIUI 14.0.4(Android12)上测试了。如果你有Android13,或者其它型号的机器,欢迎测试并反馈:)

注意:该内核的zip包不包含dtbo.img,并且不会刷你的dtbo分区。推荐使用原厂的dtbo,或者来自第三方系统包自带的dtbo(如果原作者确认那好用的话)。因为该源码build出来的dtbo.img有些小问题,比如在锁屏界面上尝试熄屏时,屏幕会突然闪一下到最高亮度。如果你刷过其它第三方内核,或者遇到一些奇怪的问题,建议检查一下你的dtbo是否被替换过。