4.0 KiB
Power optimization
Battery endurance and deep idle efficiency are first-class design requirements across the kernel, daemons, radios, display, audio, and storage stack in Geminux.
Kernel-level optimizations
Configured in kernel/configs/geminux-mt6797x.config and built into 7.3.5-geminux:
CONFIG_HZ_100=y: 100 Hz tick rate cuts periodic timer interrupt overhead compared to 250 Hz / 1000 Hz kernels while remaining responsive for interactive X11 workloads.CONFIG_RCU_LAZY=y: Batches RCU callbacks during idle periods to extend CPU C-state residency.CONFIG_SUSPEND=y: Enables deep Suspend-to-RAM (mem/deep) triggered on Gemini PDA lid close (SW_LID) or power button press.CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y: Uses scheduler utilization feedback (schedutil) across the MT6797X tri-cluster (Cortex-A53 + Cortex-A72) topology instead of staticperformancegovernors.CONFIG_ZRAM_DEF_COMP_LZ4=ywith2 GiBLZ4zramswap (etc/conf.d/zram-init) andvm.swappiness=100(etc/sysctl.d/99-geminux-power.conf): avoids slow, power-hungry flash swap I/O on eMMC and pairs withcommit=60,noatimemount options (etc/fstab).
Zero-poll userspace daemons
All background system services avoid wake-up timers and polling loops:
geminux-powerd: Sleeps indefinitely inepoll_wait()over/dev/input/event*(SW_LID,KEY_POWER),KOBJECT_UEVENTnetlink (AC charger/HDMI hotplug),/run/geminux/powerd.sock, and an on-demandtimerfd.geminux-statusd: Usessignalfd(SIGUSR1),RTMGRP_LINKnetlink,inotify, and a minute-alignedtimerfdso the DWM status bar wakes only on actual network/power/modem changes or minute boundaries with zero child shell forks.geminux-ccci-daemon&geminux-modem-ctl: Event-drivenepoll_wait()over/dev/ccci_*, AT port, and netlink; enter completely idle sleep when no modem activity is pending.geminux-bt-obex&geminux-leds: Event-driven GLib/GDBus andepoll_wait()+KOBJECT_UEVENTcontrol without periodic polling.
Cluster gating and profiles
geminux-power-ctl (and geminux-control) switches between three profiles managed in src/geminux-daemons/geminux-power-policy.c:
| Profile | Governor | A72 big cores (cpu8..9) |
A53 max freq | Auto-suspend on battery |
|---|---|---|---|---|
eco |
schedutil |
Offline (0) |
1391 MHz |
180 s idle |
balanced |
schedutil |
Online (1) |
1547 MHz |
300 s idle |
performance |
schedutil |
Online (1) |
1846 MHz |
Disabled |
Closing the Gemini PDA clamshell (SW_LID = 1) suspends immediately to RAM (mem), unless inhibited by an active voice call (inhibit add call), an explicit inhibitor, or a connected external HDMI monitor (SiI9024).
Audio, radios, and storage defaults
- Audio: PipeWire uses
default.clock.min-quantum = 1024andquantum = 2048(10-geminux-power.conf); WirePlumber suspends idle ALSA and BlueZ nodes after3seconds (50-geminux-suspend.conf) so audio DSP clocks gate quickly. - Bluetooth:
bluetoothOpenRC service is disabled from default boot (AutoEnable=falseinetc/bluetooth/main.conf); users toggle Bluetooth on demand viageminux-net. - Wi-Fi: NetworkManager enforces
wifi.powersave = 3(10-geminux-power.conf). - Storage:
noatime,commit=60inetc/fstabalongsidevm.dirty_writeback_centisecs=1500reduces eMMC write amplification and wakes.
Auditing on device
Run the bundled C11 audit utility at any time:
geminux-power-audit
geminux-power-audit --json
It prints the live power profile, battery capacity/voltage/current, online CPU count (including A72 cluster gating status), CPUfreq governor, ZRAM compression algorithm, and supported /sys/power/mem_sleep modes. Live idle current draw and multi-hour standby battery endurance benchmarks must be measured on physical Gemini PDA (x27) hardware after flashing.