Kernel & sysfs Tweaks for the onn 12 Pro Tablet

← Back to rooting guide

Kernel & sysfs Tweaks

Root-only performance tuning for the onn 12 Pro Tablet — CPU governor, GPU governor, swappiness, and the zram trap that will brick your boot if you get it wrong.

These tweaks require Magisk root. If you haven't rooted yet, start with the onn 12 Pro rooting guide first.

CPU governor

Pin to schedutil (already default on this build) or force performance during interactive use:

su -c 'for c in /sys/devices/system/cpu/cpufreq/policy*/scaling_governor; do echo schedutil > $c; done'

GPU governor (Mali)

su -c 'echo performance > /sys/devices/platform/soc/13000000.mali/devfreq/13000000.mali/governor'

Swappiness

Lower = less zram thrash on this 4 GB device:

su -c 'echo 80 > /proc/sys/vm/swappiness'

zram — the boot-breaking gotcha

Do not touch zram from post-fs-data.sh. Rebuilding zram (swapoff /dev/block/zram0reset → bigger disksize) from an early Magisk module crashes init on boot. Run the reset from a late service.sh or a boot-completed script instead. If you get bitten, boot the other slot (fastboot --set-active=a) to recover, then delete the offending module from /data/adb/modules/.

Making tweaks persistent

The commands above are lost on reboot. Drop them in a Magisk module's service.sh so they run after the system is fully up:

# /data/adb/modules/onn-tweaks/service.sh
#!/system/bin/sh
# Wait for boot to complete
while [ "$(getprop sys.boot_completed)" != "1" ]; do sleep 1; done

# CPU governor
for c in /sys/devices/system/cpu/cpufreq/policy*/scaling_governor; do
    echo schedutil > "$c"
done

# GPU governor
echo performance > /sys/devices/platform/soc/13000000.mali/devfreq/13000000.mali/governor

# Swappiness
echo 80 > /proc/sys/vm/swappiness
← Back to rooting guide