Skip to content
MiniVoidyyPublic

About

Park CPU cores while your screen is off - pick how many, cap the awake cores at any frequency, wake them all on unlock. Live core map WebUI. Magisk / KernelSU / KSU Next / SukiSU / APatch.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

🌙 CoreNap

Cores take a nap when your screen does.

CoreNap parks a selectable number of CPU cores while your display is off, caps the remaining awake cores at a frequency you choose, and wakes everything back up the moment you unlock. Watch it happen live from the built-in WebUI core map.


✨ Features

  • 💤 Auto-park on screen off — up to N of the highest (fastest) cores go offline when you lock your phone
  • 🔢 You choose how many — 1 to all pinnable cores, straight from the WebUI stepper
  • ⚡ Frequency cap for awake cores — clamp the remaining cores to any supported frequency (big.LITTLE aware, per-cluster clamping)
  • 🔋 Charging-aware — optionally skip parking while plugged in for faster charging and less heat
  • 🚀 Boot grace period — never parks during the first minute after boot or before your first unlock
  • 🔓 Wake on unlock — optionally wake every core on unlock, or restore only what CoreNap parked
  • 🗺️ Live core map — WebUI tiles refresh every 2s: awake / napping / offline state + real-time per-core frequency bars
  • 🐕 Watchdog protected — a supervisor revives the watcher if it ever dies; screen checks are timeout-guarded so a wedged system can never freeze it
  • 🔒 Safe by design — cpu0 is never parked, every sysfs write is verified, caps are always removed on wake/disable/uninstall
  • 🖥️ Full terminal menu — everything the WebUI does, available over adb/Termux

📦 Installation

  1. Download the latest zip from Releases (or build it yourself)
  2. Flash in Magisk, KernelSU, KernelSU Next, SukiSU or APatch
  3. Reboot
  4. Open the module's WebUI from your manager app

🎛️ Usage

WebUI

Open CoreNap in your manager app → WebUI:

  • Stepper (− N +) → how many cores to park
  • Frequency dropdown → cap for the awake cores
  • Toggle → wake-every-core on unlock
  • Park now / Wake all / Enable / Restart watcher buttons

Terminal

su -c sh /data/adb/corenap/scripts/corenap.sh menu      # interactive menu
Command Action
on / off / toggle enable / disable
set <N> park <N> cores
freq <kHz|max> frequency cap for awake cores
wakeall-mode true/false wake every core vs only parked ones
interval <s> screen check interval (1–3600s)
park / wakeall manual park / wake
status banner + live ASCII core map
json machine-readable status (used by WebUI)

⚙️ Configuration

Everything lives in one file — also linked at the bottom of the WebUI:

/data/adb/corenap/config.conf
Key Default Meaning
ENABLED true master switch
PARK_COUNT 4 cores to park while screen is off
WAKE_ALL_ON_UNLOCK true wake every core on unlock
SCAN_INTERVAL 2 seconds between screen-state checks
CAP_FREQ 0 max kHz for awake cores (0 = no cap)
SKIP_CHARGING false don't park while charging

The watcher re-reads this file every tick — edits apply live, no restart needed.

🔬 How it works

  1. A lightweight watcher polls screen state (dumpsys deviceidle, with dumpsys power fallback and hard timeouts)
  2. Screen off → writes 0 to /sys/devices/system/cpu/cpuN/online for the top N cores, then clamps scaling_max_freq on the survivors
  3. Screen on → brings cores back, restores hardware max frequencies
  4. A watchdog revives the watcher if anything kills it; all park/wake mutations are lock-serialized against manual WebUI actions

✅ Verify it works

# watch cores vanish when the screen goes off
adb shell "while true; do cat /sys/devices/system/cpu/online; sleep 1; done"

# module status + log
adb shell "su -c 'sh /data/adb/corenap/scripts/corenap.sh status'"
adb shell "su -c 'tail -f /data/adb/corenap/log.txt'"

🧯 Troubleshooting

Symptom Fix
watcher: stopped in status su -c ... corenap.sh watcher-restart (watchdog will also self-heal within 30s)
FAILED to park cpuX (kernel refused) Your kernel pins that cluster online — lower the park count
Cores come back on their own ROM thermal/hotplug driver re-onlining them; normal on some devices, CoreNap re-parks next tick
WebUI shows dashes Open it from the manager app, grant the module WebUI/root permission

🤝 Compatibility

Manager Supported
Magisk ✅
KernelSU ✅
KernelSU Next ✅
SukiSU ✅
APatch ✅

CoreNap V1 · by Mini_Voidyy · sleep tight, little cores 😴

About

Park CPU cores while your screen is off - pick how many, cap the awake cores at any frequency, wake them all on unlock. Live core map WebUI. Magisk / KernelSU / KSU Next / SukiSU / APatch.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages