Introduction: The Quest for Ultimate Android Battery Life
In the realm of custom Android ROMs and kernels, optimizing battery life is often the holy grail for enthusiasts. While custom ROMs offer a leaner experience, it’s the kernel that truly dictates how your device’s CPU, GPU, and other components manage power. At the heart of CPU power management lies the ‘governor’—an algorithm that determines how the CPU scales its frequency and voltage based on workload. Choosing the right governor can drastically impact both performance and, more critically, battery endurance. This expert-level guide will dive deep into benchmarking various custom kernel governors on a Snapdragon 865-powered device, helping you identify the optimal configuration for maximizing battery life without crippling performance.
We will outline a rigorous methodology, discuss popular governor choices, and provide actionable steps to conduct your own comprehensive battery life benchmark. Prepare to unlock the full potential of your device’s power efficiency.
Understanding CPU Governors: The Brains Behind the Brawn
A CPU governor is essentially a policy manager for your processor. It constantly monitors system load and adjusts the CPU’s clock speed (frequency) and voltage levels accordingly. The goal is to provide just enough power for the current task, conserving energy when idle and ramping up quickly during demanding operations. Different governors employ distinct strategies:
- Ondemand: A traditional, reactive governor. It scales up CPU frequency aggressively when load increases and slowly scales down.
- Conservative: Similar to Ondemand but less aggressive. It ramps up CPU frequency more gradually, aiming for better battery life at the expense of a slight delay in peak performance.
- Interactive: Often considered a good balance, it’s more intelligent than Ondemand. It uses touch events and screen state to anticipate demand, scaling up quickly but also scaling down efficiently.
- Powersave: Forces the CPU to its lowest possible frequency, prioritizing extreme battery savings over all performance. Useful for specific, low-demand scenarios.
- schedutil: A modern, performance-oriented governor that’s deeply integrated with the Linux kernel’s scheduler. It uses scheduler statistics to make more informed decisions about frequency scaling, often leading to excellent responsiveness and efficiency on modern CPUs.
- Other Governors (e.g., performance, bioshock, elementalx): Many custom kernels introduce their own optimized governors or tweaks to existing ones, often aiming for specific blends of performance and efficiency.
Benchmarking Methodology: Precision is Key
Accurate benchmarking requires a controlled environment and consistent testing procedures. Here’s how we’ll approach it:
1. Device Preparation
- Device: A Snapdragon 865-powered device (e.g., OnePlus 8 Pro, Samsung Galaxy S20, Xiaomi Mi 10).
- Custom ROM: A clean installation of a stable custom ROM (e.g., LineageOS, Pixel Experience) with root access (Magisk recommended). This ensures minimal background interference from OEM bloatware.
- Custom Kernel: A custom kernel that allows for governor selection (e.g., Franco Kernel, ElementalX, a custom compiled kernel). Ensure it’s stable and compatible with your ROM.
- Clean Slate: Perform a factory reset before starting, or at least clear data for all user apps. Disable auto-updates, cloud backups, and unnecessary syncs.
- Controlled Environment: Test in a location with consistent Wi-Fi signal, stable ambient temperature, and no cellular activity if possible (airplane mode with Wi-Fi on).
- Initial Charge: Always charge the device to 100% and let it cool down before starting each test run.
- Screen Brightness: Set to a fixed, moderate level (e.g., 50%) and disable adaptive brightness.
2. Tools Required
- Kernel Auditor / EX Kernel Manager: For easily changing CPU governor and monitoring stats.
- ADB (Android Debug Bridge) on PC: For collecting `dumpsys batterystats` data.
- Battery Historian: A Google tool (Python-based) to visualize battery usage from `dumpsys batterystats` data.
- Benchmark App (Optional): PCMark Work 3.0 or AccuBattery for more objective data, though a fixed usage pattern is sufficient for relative comparisons.
3. Test Scenarios
We’ll focus on three key usage patterns to simulate real-world scenarios:
- Idle Drain (8 hours): Device left untouched with Wi-Fi on, screen off. This measures background efficiency and deep sleep effectiveness.
- Light Usage (4 hours): 1 hour of web browsing (Chrome), 1 hour of social media (Twitter/Reddit), 2 hours of light ebook reading.
- Moderate Usage (2 hours): 1 hour of YouTube 1080p video playback, 1 hour of casual gaming (e.g., Sudoku, basic puzzle game).
Setting Up Your Benchmarking Environment
Before you begin, ensure your device is rooted and you have a custom kernel installed. For this guide, we’ll assume you’re using Kernel Auditor to manage governors.
Step 1: Install Kernel Auditor (or EX Kernel Manager)
Download and install Kernel Auditor from the Google Play Store. Grant it root access when prompted.
Step 2: Understanding Governor Controls
Open Kernel Auditor. Navigate to ‘CPU’ section. Here you’ll find options for ‘CPU governor’ and ‘CPU min/max frequency’. For this benchmark, we will only change the governor. Keep min/max frequencies at their defaults for each governor to ensure fair comparison unless you’re intentionally testing specific frequency ranges.
# Example of changing governor via shell (for advanced users)SUsysctl kernel.sched_min_granularity_ns=10000000 # Adjust schedutil params for modern CPUs, if desired# For schedutil:echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor# For interactive:echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor# For ondemand:echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor# You would need to repeat for cpu1, cpu2, etc., or use a loop. Most kernel managers do this automatically.
The Governors Under Test
We’ll test the following popular governors:
- schedutil: The modern, scheduler-integrated choice.
- interactive: A long-standing, balanced option.
- conservative: Known for prioritizing battery by slower scaling.
- powersave: The ultimate battery saver (for comparison).
Execution: Step-by-Step Benchmarking
For each governor, follow these steps meticulously:
- Select Governor: Open Kernel Auditor, go to CPU, and select the governor you wish to test (e.g., `schedutil`). Apply the setting.
- Reboot Device: A reboot ensures all kernel settings are properly applied and system state is reset.
- Charge to 100%: Plug in your device and charge it fully. Let it rest for 10-15 minutes after reaching 100% to normalize battery temperature.
- Start Test Scenario: Execute the chosen test scenario (Idle, Light, or Moderate Usage) for its specified duration. Ensure no other apps interfere.
- Record Initial Data: Note down the start time and initial battery percentage (which should be 100%).
- During Test: Avoid checking the device frequently. If needed, use another device to time the segments of light/moderate usage.
- End Test & Record Data: After the test duration, note the end time and final battery percentage.
- Collect `dumpsys batterystats`: Connect your device to your PC via USB and execute the following ADB commands in your terminal:
adb shell dumpsys batterystats --resetadb shell dumpsys batterystats > batterystats_output.txt
The first command resets the battery stats, and the second dumps the current stats into a text file on your PC. You’ll perform `dumpsys batterystats –reset` before each governor test and `dumpsys batterystats > batterystats_output.txt` at the end.
<ol start=
Android Mobile Specs & Compare Directory
Are you researching mobile hardware properties, processor SoCs, GPU chipsets, or RAM configurations? Access our complete specs catalog to compare up to 5 devices side-by-side!
Compare Devices Specs →