Documentation
On this page

Configuration

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.

SysctlType, accessWhat
kern.mapple_nextbootargsstring, anyone reads, root writesthe 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_srcstring, readbootrec or payload: where the next line comes from
kern.mapple_nextbootargs_origstring, readthe payload’s line as first seen
kern.mapple_bootrecopaque, anyone reads, root writesthe record’s raw 4 KiB block, stored with only the volume check
kern.mapple_linkopaque, read and writethe 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_linkstateint, readUSB: 0 no host, 1 standard, 2 Mapple link active
kern.mapple_trace_pidint, read and writethe pid whose failing file-system calls are logged; 0 none

Devices

SysctlType, accessWhat
kern.mapple_torchint, read and writethe torch: 0 off, 1 to 3 = 25, 37.5, 50 mA; reads 0x100 while overheated. Needs mp_torch_steps=1
kern.mapple_lowpowerint, read and writeLow Power Mode, from powerd through mappled (the battery service’s driver; see the catalogue)
kern.mapple_chargelimitint, read and writestop charging at this percentage; 100 is off
kern.mapple_wifi_rxholesint, read and writethe Wi-Fi receive path’s hole switch (no description in the code)
kern.mapple_bt_quirksstring, read and writethe Bluetooth bridge’s quirks (no description in the code)
kern.mapple_sensorsstring, reada line per sensor of the hub: name, present, enabled, samples, milliseconds since the last

GPU and surfaces

SysctlType, accessWhat
kern.mapple_gpu_memorystring, readGPU memory per process, imports and pages wired for the GPU
kern.mapple_gpu_dropmapsint, read and writeGEM_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_linearint, read and writeMetal driver: every render target linear (no AFBC or tiling)
kern.mapple_gpu_surf_copyint, read and writeMetal driver: IOSurfaces copied in and out, never imported
kern.mapple_gpu_surf_maintint, read and writeafter 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_uncachedint, read and writenew IOSurfaces write-combined
kern.mapple_gpu_bocacheint, read and writeMesa’s buffer cache: stale buffers dropped at fetch and submit too (0: only when one is put back, as upstream)
kern.mapple_gpu_pressureint, read and writethe Metal driver empties Mesa’s buffer cache at a memory-pressure notification
kern.mapple_gpu_surf_debugopaque, anyone reads and writesan IOSurface’s pages and first bytes, as DRAM and as the CPU sees them
kern.mapple_surf_liststring, readevery 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