Skip to content

Releases: dtrail/nethunter_kernel_xiaomi_sm8250

Kali N0tHunter Kernel [4.19] v1.1.9a

06 Mar 01:41

Choose a tag to compare

Kali N0tHunter Kernel [4.19] v1.1.9a

CHANGES

Kernel:

  • Memory Management Refactor:

Ditched Simple_LMK in favour of PSI:

Dropped Simple_LMK: Switched from blocking, legacy in-kernel LMK to asynchronous PSI-based memory management.
Removed CONFIG_ANDROID_SIMPLE_LMK: Fully deprecated the legacy, synchronous low-memory killer. This removes the "wait-for-victim" deadlock path that previously blocked the kernel allocator during high memory pressure, which was the primary source of UI stutters and input latency.

Enabled CONFIG_PSI & CONFIG_MEMCG: Integrated Pressure Stall Information (PSI) and Memory Control Groups. This transitions the device to the standard AOSP-native memory management model.

Transition to Userspace lmkd: Delegated memory pressure response to the standard AOSP lmkd daemon. Memory killing is now handled asynchronously from userspace, preventing the kernel from entering uninterruptible sleep (D-state) during reclaim events, which results in significant improvement in system-wide responsiveness, reduced memory latency, and cleaner GPU pipeline transitions. The system now behaves predictably under load, with zero kernel-side stalls during heavy resource allocation.

Tests with games revealed higher overall performance in several cases, as well as overall more free memory in general.

Chimera Blocker:

  • Critical fix to the wakelock detection (in fact wakelocks set on the blocklist were rarely blocked due to a parsing error in the last releases)
  • Critical fix to parsing wakelock names from blocklist.conf
  • Critical fix to stats file generation: Blocked wakelocks didn't report any statistics in most caases

IMPORTANT:

  • Added WebUI for eaasy configuration: You can add wakelocks, either custom or pick directly from the stats list that is displayed in the WebUI.
  • --> Pleaase read the operational guide how to work with the new logic!
  • --> Uninstall the old module first!
  • WebUI: Added Search-buttons to directly google for wakelocks found in stats
  • Added action button to Magisk module entry
  • Updated Chimera CLI
  • Implemented a new fail-safe logic: In caase a wakelock causes any issues when blocked, it will be commented out automatically under a new category. This way you can easily see which ones are better not to be blocked.
  • Added update logic to Magisk installer: Your custom blocklist.conf will be renamed and a new, cleaned and safe list will be generated.

NOTE: Please do NOT replace the new list with your old one!!

Full Changelog: 1.1.9...1.1.9a

Kali N0tHunter Kernel [4.19] v1.1.9

25 Feb 19:53

Choose a tag to compare

EMERGENCY UPDATE: If you've already downloaded v6 of the Magisk module, please download the v6.1 one and flash it.

  • Commented out logd and pdp_watchdog. In rare cases they can cause random reboots. Happened only once in a week, but the default list should guarantee stability.
    If you don't want to reflash, you can just comment those out by yourself.

RELEASE BUILD

  • Latest N0Kernel base sync
  • New Chimera Wakelock Blocker: A powerful dynamic fire & forget kernel-level wakelock blocker.

NOTE: By default the module is disabled!
To enable it you need to flash the attached Magisk module (Chimera_Module_v6-Magisk.zip).

Quick features overview

  • After flashing the Magisk module and rebooting, it creates a default, curated, and thoroughly tested blocklist.conf.
    The list has been tested for several weeks and includes various GMS-related wakelocks, as well as Qualcomm and Android telemetry locks.
    It's fire & forget and does not interfere with the user experience or any functionality on your device. Data and messages are still synced without issues, but you will likely notice improvements in battery life. Especially the DIAG_WS wakelock (Qualcomm telemetry) is often blocked several hundred to a thousand times per hour. It serves no useful purpose other than collecting information about your device, draining the battery, and wasting CPU cycles.
    There are several other wakelocks on the list that can be safely blocked without causing any trouble.
    If you don't want to mess with configurations, you can simply leave it as it is and forget about it. It will improve battery life and performance in the background.
    Also, it improves doze by preventing egular wakeups due to useless telemetry and such.
    The full potential will unfold once you customize the blocklist by identifying device/rom/app specific wakelocks, services and alarms, and maintain your personal blocking profile. Read on if you want to know more.

If you want to go deeper:
You can customize the blocklist.conf (see the operational guide below) and add any wakelock you want. The blocker is far more power-efficient and faster than any userspace blocker (such as those using LSPosed or apps), since it runs directly at the source. The module maintains a stats file with detailed information about both blocked and allowed wakelocks.

Important to know: You might see different wakelocks in the stats file than those you’ve added to your list. This is normal because wakelocks in the Android userspace are defined by their respective apps and services. These apps "call" various generic wakelocks directly in the kernel to serve their purpose. This has a great side-effect: it allows you to identify exactly what the device is doing under the hood.

The kernel module comes with a fail-safe logic to recognize "bad" blocks. For example, if you add a wakelock that shouldn't be blocked, the module monitors its behavior and notices if a wakelock is firing too many times within a specific timeframe (burst). If that happens, the block is temporarily released to allow the wakelock to fire. Additionally, it recognizes log spam and behavior that could lead to kernel panics, releasing the block if necessary. The logic intelligently decides when it is best to block a wakelock and when to allow it. In most cases, this will save you from the consequences of adding a "bad" entry to the list. However, if you do encounter trouble—such as random reboots or bootloops—you can still edit the blocklist.conf from recovery mode and remove the related entry.

If you want to create your own blocklist, I recommend using a userspace wakelock blocker to identify wakelocks from specific apps, services, and alarms first.
An up-to-date tool that works exceptionally well is NoWakeLock: https://f-droid.org/packages/com.js.nowakelock/
A great addition to this is the following app: https://f-droid.org/de/packages/com.akylas.enforcedoze/

Please check the operational guide below for the real deal.

Chimera Familia: Doom Sleep Module

Operational Guide & Troubleshooting (v6.0 - Profiles & Stats Edition)

This kernel module and user-space controller implement the Doom Sleep logic for SM8250 devices on Android 14+. It is a hybrid battery saver that combines a hard kernel-level wakelock filter with an intelligent daemon to silence aggressive background activity.

What's new in v6.0: The kernel is now a pure execution engine. All blocking logic has been moved to a user-configurable Blocklist. By commenting or uncommenting lines, users can create custom battery-saving profiles without recompiling the kernel. Furthermore, Wakelock statistics are now safely stored in the Magisk directory.


1. The Core Components

  • Kernel Hook: Intercepts specific wakelocks at the source (/sys/kernel/chimera_doom). By default, the kernel blocks nothing until told otherwise by the controller.
  • In-Kernel Stats Engine: Efficiently tracks up to 128 unique blocked and allowed wakelocks at the kernel level without spamming dmesg or wasting CPU cycles.
  • Chimera Controller: A background daemon that monitors screen state, applies "Doom Mode", triggers "Maintenance Windows", and parses the user blocklist.
  • User Blocklist (Profiles): A live-reloaded configuration file. Users can easily swap profiles (e.g., Extreme Battery vs. Light Gaming) by replacing this text file.

2. CLI Tool: chimera

The module includes a helper tool for the terminal. You do not need to reboot to change settings.
Open a terminal (e.g., Termux), grant root access (su), and use the following commands:

Check System Status

Displays the Master Switch, Kernel Block status, Debug state, and current Blocklist configuration.

chimera status

Enable / Disable (Master Switch)

  • Disable: Instantly stops all blocking. The kernel lets everything pass. Use this for critical sync tasks, debugging, or banking apps.
  • Enable: Reactivates the intelligent background monitoring and applies the Blocklist.

chimera off
chimera on

Debug Mode

Enables verbose kernel logging to dmesg. Use this only for deep troubleshooting. Regular statistics are handled via Markdown logs.

chimera debug on
chimera debug off


3. Statistics & Logging

The Chimera Controller automatically generates a clean Markdown table of your wakelock statistics. It acts as a built-in, zero-battery-drain wakelock detector!

  • Log Location: /data/adb/chimera/logs/chimera_stats.md
  • Log Rotation: The controller archives logs if they exceed 500KB and deletes archives older than 7 days.

Example Output:

Wakelock Name Blocked (Total) Allowed (Total)
DIAG_WS 142 3
eventpoll 0 2197

4. Configuration (The Blocklist)

The entire blocking logic is controlled by a simple text file.

  • Config File: /data/adb/chimera/blocklist.conf
  • How to Edit / Create Profiles:
    1. Open the file with a root explorer or terminal editor (nano / vi).
    2. Uncommented (No #): The wakelock will be BLOCKED during Deep Sleep.
    3. Commented (With #): The wakelock will be ALLOWED (Ignored by the blocker).
    4. Save the file. The controller detects changes and updates the kernel within 10-30 seconds. No reboot needed!

Default Blocklist Layout:

# --- CRITICAL SYSTEM (Commented = ALLOWED) ---
# NEVER block these! Blocking will cause kernel panics/freezes.
# eventpoll
# alarmtimer
# [timerfd]

# --- HARDWARE & AUDIO (Commented = ALLOWED) ---
# Do NOT uncomment these!  tests revealed, that It will cause the microphone to not work after 2-3 days (only in messenger apps. Phone calls continue working. Technically those apps receive the mic in locked state due to blocking.)
# sensor_ind
# *mRoutingWakeLock*

# --- TELEMETRY & DIAGNOSTICS (Uncommented = BLOCKED) ---
# Safe to block. Stops Qualcomm/System data collection.
DIAG_WS
*telemetry*
*mdm_stats*
*logd*
pdp_watchdog

# --- GOOGLE SERVICES (Uncommented = BLOCKED) ---
*gms_scheduler*
GcmSchedulerWakeupService
QosUploaderService
PayGcmTaskService
Google_C2DM
ChromeSync
*SendReportAction*

# --- EXPERIMENTAL NETWORK (Commented = ALLOWED) ---
# Uncomment for extreme battery, but might delay Push-Notifications!
# qcom_rx_wakelock
# wlan_pno_wl
# wlan_rx_wake
# IPA_WS

Tip: You can create different files like extreme.conf and gaming.conf and copy them to blocklist.conf to switch profiles on the fly!


5. Logic & Behavior

Screen State Battery Saver Kernel Blocker GMS Bucket Sync Interval
ON Any OFF (Allowed) ACTIVE N/A
OFF OFF ON (Blocked) RESTRICTED Every 60 min
OFF ON ON (Blocked) RESTRICTED Every 120 min
  • Maintenance Window: Every 60/120 minutes, the system wakes up for 60 seconds to allow notifications and syncs, then returns to Doom Sleep.
  • Burst Protection (Panic Mode): If a blocked wakelock spams the kernel too aggressively (e.g., 50 times in 2 seconds), the kernel temporarily allows it for 5 seconds to prevent kernel panics and extreme CPU load. The system heals itself automatically.

6. Troubleshooting & Verification

Manual Verification

To manually verify the kernel engine without using the CLI tool:

Check Block State (1 = Blocking, 0 = Idle):

cat /sys/kernel/chimera_doom/active

Check Kernel Stats Engine directly:

cat /sys/kernel/chimera_doom/stats

Check active Blocklist directly in Kernel:

cat /sys/kernel/chimera_doom/blocklist

Common Errors

  • "Command not found": Ensure you are running as Root (su). The binary is located at /system/bin/chimera.
    ...
Read more

Kali N0tHunter Kernel [4.19] v1.1.9 - RC1

09 Dec 03:47
c1a5d65

Choose a tag to compare

RELEASE CANDIDATE

  • Fixed most remaining bugs / error log spam
  • Removed debugging loggers/tracers where appropriate
  • Reduced idle drain and general overhead
  • Removed BORE
  • Tweaked scheduling parameters, powersafe-toggle and hyst_mode
  • eBPF support

For the upcoming builds, we focus on stability and bug fixes.

Full Changelog: 1.1.7...1.1.9RC

Kali N0tHunter Kernel [4.19] v1.1.8 - Fixup release

09 Nov 15:33
7b356c8

Choose a tag to compare

Changes

  • Improve scheduler
  • Fixed and extended powersafe_toggle
  • Powersafe_toggle now handles CPU governor tuning automatically, depending on mode. Disabled by default
  • Reduced overall battery drain
  • Set default parameters for hyst_mode and powersafe_toggle to off
  • Added charger bypassing
  • Various optimizations

Full Changelog: 1.1.7...1.1.8

Kali N0tHunter Kernel [4.19] v1.1.7 - The Performance Update

04 Nov 23:25

Choose a tag to compare

Changes

This one comes with a massive performance boost, while staying cool and battery friendly as much as possible.
In fact, there was a bug lingering around and deeply hiding in the sources, that caused the device to run only at about 1/4 of its actual peak performance. This is now fixed, and you will notice the difference immediately. Try a heavy game or something. I didn't believe it how fast it runs now.

Some details:
There was a serious misconfiguration, if you may call it that, which caused the kernel to constantly "fight itself". It resulted in holding back intended power levels, therefore slowed down the entire system, and - to the best of it - consumed even more power while doing it. After this has been fixed, we do not have only gained performance, but also have a more steady and flat power consumption curve, especially in idle and sleep modes, because the system now can run efficiently.

  • Introduced new module: powersafe

Change values:

*the module manages several parameters: IO-Weight, CPU Latency, Input Boost, Max Freq (superseded by other tweaks, like FDE.AI, scripts, etc.)

Profile echo target path Main result
Default 0 /proc/powersafe/master_toggle Kernel default values (default)
Balanced 1 /proc/powersafe/master_toggle Balanced performance / battery-life
Performance 2 /proc/powersafe/master_toggle Boost CPU (Prime 3Ghz*)
Battery 3 /proc/powersafe/master_toggle All parameters tweaked for best power savings, input boost disabled

*Currently not available due to a bug.

Finetuning
You can cat/echo to the following parameters, if needed. But beware, these are controlled by the master_toggle!
Don't change them blindly!

  • input_boost
  • input_boost_state
  • io_weight
  • latency_toggle
  • prime_boost_freq

NOTE: By default, the kernel provides great performance and balanced energy consumption.
You can add the master to FKM tiles and switch between states by using Android's quick tiles.

ANNOUNCEMENT

I'm currently in the process of porting the kernel to another source. So far, I've prepared an LOS based repo and another one based on E404 kernel. LOS, though, hasn't been updated for a year, so I'll probably drop that one.
The current E404 test build has some bigger issues left to fix. But I'm on it.

Full Changelog: 1.1.5...1.1.7

[Apollo / Alioth] Kali N0tHunter Kernel [4.19] v1.1.5

02 Oct 00:09

Choose a tag to compare

CHANGES

  • N0Kernel base sync
  • Fixed audio issues
  • Minor fixes

Full Changelog: 1.1.4...1.1.5

[Apollo / Alioth] Kali N0tHunter Kernel [4.19] v1.1.4

14 Sep 13:51

Choose a tag to compare

CHANGES

This is the real fix for Alioth!

Earlier builds were troubled... First, installation issues persisted. Then, after I was able to fix those, the kernel was very unstable. I didn't notice that until very recently, because only one person got back to me and reported it.
Also, the previous build included the wrong touchscreen driver due to some mistake I made in my personal build script.
I'm very sorry for this! But, as mentioned before, I don't own that device, so I cannot test ot debug it effectively.
Additionally, the recent stability issues on Alioth builds were related to the DTBO image. And today I'm proud to announce, that all of this has finally been fixed!
Now the kernel should perform as expected. No lags, no crashes, no installation issues. Enjoy!

Note: I've removed previous Alioth builds from all releases!

  • N0Kernel base sync
    (this release doesn't have any other changes than N0Kernel has, but those on their own are a lot! Many improvements and fixes have been implemented.)

  • ALIOTH: FIXED

Full Changelog: 1.1.2...1.1.4

[Apollo / Alioth] Kali N0tHunter Kernel [4.19] v1.1.3

02 Sep 14:12

Choose a tag to compare

CHANGES

  • N0Kernel base sync
  • Sched: hystctl: Added a simple sysctl module with distinctive modes to set for scheduler hysteresis

Scheduler Hysteresis
*Read more: https://pastebin.com/LPTzTDAT

Use Termux, Sysctl GUI or FKM (or whatever you want) to set:

"hyst_mode"

0 - Balanced (Default)
1 - Performance
2 - Battery
3 - Off (Fully disable scheduler hysteresis)

shell:
/* replace X with number from above */
echo X > /proc/sys/kernel/hyst_mode

Btw, if using FKM: don't touch this parameter: /proc/sys/kernel/sched_busy_hysteresis_enable_cpus !
FKM misinterpreted it as a binary toggle, so "0" and "1" don't work here and the status given by the app is wrong.

Full Changelog: 1.1.2...1.1.3

[Apollo / Alioth] Kali N0tHunter Kernel [4.19] v1.1.2

26 Aug 15:47

Choose a tag to compare

CHANGES

  • N0Kerne base sync
  • Performance & battery drain fix: disabled serial debugging support (sorry for this)

Full Changelog: 1.1.1...1.1.2

[Apollo / Alioth] Kali N0tHunter Kernel [4.19] v1.1.1

22 Aug 00:09

Choose a tag to compare

CHANGES

  • N0Kernel base sync
  • Several config fixes
  • Attempt to fix GPSD not receiving location locks or any signal at all from Android GPS Provider
  • Stability & performance improvements
  • Alioth: platform specific configuration fixes. Hopefully fixes overall stability. *Untested!
  • Preparation for Munch support!

*I don't own an Alioth device. You tell me if it works.

Full Changelog: 1.1...1.1.1