Sysctls
The kern.mapple_* sysctls: what they read and write, and who may.
The kernel’s own controls, all under kern.. Each name that began as viva_ still exists beside the mapple_ one for the programs that
were built for it; the code says the old names go at release 1.
Boot settings and the link
| Sysctl | Type, access | What |
|---|---|---|
kern.mapple_nextbootargs | string, anyone reads, root writes | the next boot’s command line: the record’s when it applies, else the payload’s; writing stores it in the record (empty, or the payload’s line, disables it) |
kern.mapple_nextbootargs_src | string, read | bootrec or payload: where the next line comes from |
kern.mapple_nextbootargs_orig | string, read | the payload’s line as first seen |
kern.mapple_bootrec | opaque, anyone reads, root writes | the record’s raw 4 KiB block, stored with only the volume check |
kern.mapple_link | opaque, read and write | the USB link’s status commands from user space: the command text in, the reply (at most 8 KiB) out. Everyone may run the read-only ones (stat, gpu [status|freq|dvfs|lat|calls|clocks|kv], disp [kv], bat, cpu, wifi [status|sta]); root may run the other gpu, disp, bat, cpu and wifi subcommands. Never peek, poke, pmic, i2c, push, pull, run, panic or reboot |
kern.mapple_linkstate | int, read | USB: 0 no host, 1 standard, 2 Mapple link active |
kern.mapple_trace_pid | int, read and write | the pid whose failing file-system calls are logged; 0 none |
Devices
| Sysctl | Type, access | What |
|---|---|---|
kern.mapple_torch | int, read and write | the torch: 0 off, 1 to 3 = 25, 37.5, 50 mA; reads 0x100 while overheated. Needs mp_torch_steps=1 |
kern.mapple_lowpower | int, read and write | Low Power Mode, from powerd through mappled (the battery service’s driver; see the catalogue) |
kern.mapple_chargelimit | int, read and write | stop charging at this percentage; 100 is off |
kern.mapple_wifi_rxholes | int, read and write | the Wi-Fi receive path’s hole switch (no description in the code) |
kern.mapple_bt_quirks | string, read and write | the Bluetooth bridge’s quirks (no description in the code) |
kern.mapple_sensors | string, read | a line per sensor of the hub: name, present, enabled, samples, milliseconds since the last |
GPU and surfaces
| Sysctl | Type, access | What |
|---|---|---|
kern.mapple_gpu_memory | string, read | GPU memory per process, imports and pages wired for the GPU |
kern.mapple_gpu_dropmaps | int, read and write | GEM_CLOSE drops the process’s CPU mappings of the buffer that are still in place; 0 leaves them until the process exits |
kern.mapple_gpu_linear | int, read and write | Metal driver: every render target linear (no AFBC or tiling) |
kern.mapple_gpu_surf_copy | int, read and write | Metal driver: IOSurfaces copied in and out, never imported |
kern.mapple_gpu_surf_maint | int, read and write | after a GPU job a surface’s CPU lines are dropped: 0 at the next CPU access, 1 at once, 2 never |
kern.mapple_gpu_surf_uncached | int, read and write | new IOSurfaces write-combined |
kern.mapple_gpu_bocache | int, read and write | Mesa’s buffer cache: stale buffers dropped at fetch and submit too (0: only when one is put back, as upstream) |
kern.mapple_gpu_pressure | int, read and write | the Metal driver empties Mesa’s buffer cache at a memory-pressure notification |
kern.mapple_gpu_surf_debug | opaque, anyone reads and writes | an IOSurface’s pages and first bytes, as DRAM and as the CPU sees them |
kern.mapple_surf_list | string, read | every live IOSurface: size, format, users, maker, GPU jobs; totals |
Source: bsd/dev/mapple_sysctl.c, mtk_torch.c, mtk_bt.c, mt6631_wifi.c, bsd/dev/arm/systemcalls.c and
iokit/Kernel/arm/ (BQ27Z561Battery.cpp, MappleGPU.cpp, MappleGPUUserClient.cpp, MappleSurface.cpp) of the kernel at 76b737c.
Applies to realme 8i (spaced), release 1 · Updated 15 November 2026