2.9 KiB
Power buttons, status screen, offline charger and standby
The Mi 8 Lite (platina) supports lightweight server power management via
platina-power-chord and platina-status-screen using the physical PMIC power
button (pm8941_pwrkey), along with the legacy Power + Volume Up chord.
Button controls (power_key_mode=yes)
- Short-press Power (
< 3s): Restores full CPU frequencies (2.21 GHz/1.84 GHz), wakes the Tianma1080×2280panel (FBIOBLANK=0), and renders a live OLED status dashboard (clock, uptime, battery%/voltage/temp and 80% guard status, 4G LTE carrier/signal/IP, Wi-Fi/USB/EasyTier routes, CPU clock limits, load, and RAM usage). Refreshes every2sand auto-blanks toFB_BLANK_POWERDOWNafter12s, or immediately on a second short press. - Hold Power
>= 3s(fires right at3s, below the PMIC hard-reset timer):- On battery (
online == 0): Shows thePower offscreen for3sand runs/usr/local/sbin/platina-poweroff --force->/usr/sbin/poweroff. - With external charger/USB attached (
online == 1): Enters Offline Charger Mode (brings down cellular data, blanks display, clamps all CPU clusters to300 MHz, and keeps the 50–80% battery guard active).
- On battery (
- Offline Charger Mode (also entered automatically on boot when
/proc/cmdlinecontainsandroidboot.mode=chargerorandroidboot.bootreason=usb_chg):- Short-press Power: Shows the large battery charging percentage screen
for
5s, then turns the panel off. - Unplug external power: Automatically powers off cleanly via
/usr/sbin/poweroff. - Hold Power
>= 3s: Restores CPU clocks, exits charger mode into normal server operation, and startsplatina-cellular --auto.
- Short-press Power: Shows the large battery charging percentage screen
for
Crash-free runtime DVFS + panel-powerdown standby
On mainline kernel 7.2.12-sdm660, system-wide kernel s2idle (freeze)
causes WCN3990 (ath10k_snoc) wlan_process fatal crashes, post-SSR MPSS
ipa_bam.c assertions (dropping 4G), and mdss_ahb_clk warnings on resume.
Therefore /etc/local.d/disable-suspend.start keeps /sys/power/state locked
(chmod 000) while platina-power-chord implements crash-free runtime standby
using hardware cpuidle (pwr-power-collapse), panel powerdown
(FB_BLANK_POWERDOWN, fb0/blank=4), modem RRC_IDLE, and cluster DVFS
clamping after idle_suspend_seconds (60s default):
- Big cluster (
policy0): clamped to300 MHz(scaling_min_freq) - Little cluster (
policy1): clamped to633.6 MHz - 4G LTE, Wi-Fi, EasyTier, and SSH remain online with zero baseband resets and
restore full
2.21 GHz / 1.84 GHzimmediately when the Power key is tapped.
Diagnostics
rc-service platina-power-chord status
sudo platina-status-screen --json
sudo platina-status-screen --once --seconds 5
sudo platina-poweroff --preview
sudo python3 /usr/local/libexec/platina-image-runtime audit