Overview
Forked and modernized by yinwanxi (based on the original project by Matt Yang), Uperf Game Turbo is a userspace governor and performance controller for Android.
Stock Linux kernel governors often react too slowly to sudden user interaction, leading to micro-stutters during app launches or intensive gaming. Uperf replaces reactive kernel boost routines with intelligent userspace scene detection. By listening directly to raw touch input events, SurfaceFlinger frame pacing, and cpuset transitions, it boosts frequencies and binds threads precisely when workload spikes occur.
Technical Architecture & How It Works
Userspace Telemetry & Sysfs Node Management
Uperf bypasses Android’s high-level framework to monitor hardware load with minimal latency:
- Direct Touch Polling: Reads event packets directly from
/dev/input/event*. When a touch contact or fling gesture is detected, Uperf immediately commands the CPU governor to ramp up clocks before Android’s UI rendering pipeline even requests a new frame. - SurfaceFlinger Analysis (
sfanalysis): Hooks into the Androidsurfaceflingercompositor process. It tracks frame production deadlines, immediately detecting rendering latency or buffer stalls and boosting GPU and CPU frequency targets to avoid dropped frames. - Cpuset & Thread Affinity Optimization: Automatically binds the active application’s UI thread and render thread to high-efficiency or performance core clusters (big/prime cores) while isolating background tasks onto little cores.
- Sysfs Node Abstraction: Employs chipset-specific JSON configurations tailored to individual SoC architectures (Snapdragon, Dimensity, Google Tensor, Exynos) to modulate frequency tables, energy-aware scheduling (EAS) parameters, and thermal margins.
Installation & Setup
Method 1: Magisk / KernelSU / APatch
- Download the latest
Uperf-Game-Turbo-*.ziprelease. - Flash the module via your root manager and reboot.
- After reboot, check
/sdcard/Android/yc/uperf/uperf_log.txtto confirm that the daemon has initialized and recognized your SoC platform.
Method 2: Standalone Shell Execution
Uperf does not require Magisk and can be installed on custom embedded environments or rooted stock ROMs:
- Extract the package to
/data/uperf. - Set execute permissions (
chmod 755 *.sh). - Run
sh /data/uperf/setup_uperf.shfollowed bysh /data/uperf/run_uperf.sh.
Configuration & Practical Usage
Power Mode Switching
Uperf provides five operational power profiles:
auto: Dynamically scales performance based on active foreground application demand.balance: Slightly smoother than stock OEM scheduling while conserving power.powersave: Minimizes energy draw while preserving essential UI fluidity.performance: Aggressive frequency scaling prioritized for competitive gaming.fast: Highly responsive profile optimized for touch response.
Changing the Default Power Mode
Edit the text file located at:
/sdcard/Android/yc/uperf/cur_powermode.txt
Replace the content with your preferred mode (e.g. balance or auto) and reboot.
Live Mode Switching
Switch modes dynamically from a root terminal without rebooting:
sh /data/powercfg.sh balance
(Also fully compatible with Scene / Omarea VTools for per-app automated mode switching).
Troubleshooting & Common Issues
- MIUI 12 Touchscreen Lockup: If the home screen stops responding to touch on MIUI 12 devices, delete
/data/adb/modules/uperf/enable_sfanalysisand reboot to disable the SurfaceFlinger hook while keeping userspace governor controls active. - Unsupported Hardware: If installation halts with an
unsupportedplatform warning, your device’s SoC lacks a pre-compiled JSON profile under/data/uperf/config/.
Frequently Asked Questions
Does Uperf increase battery consumption during device standby?
No. Uperf is designed with low standby overhead. In sleep states, its profiles reduce the number of active CPU cores woken by background alarms and use conservative frequency ramp-up curves, slightly improving standby battery life.
What should I do if my touch screen becomes unresponsive on MIUI 12?
This is a documented compatibility issue between MIUI 12's proprietary launcher and the SurfaceFlinger hook. To resolve it, delete /data/adb/modules/uperf/enable_sfanalysis and reboot your device.
