Configuration Guide
Configuration File Structure
Dimensity GPU Governor uses multiple configuration files to control its behavior:
/data/adb/gpu_governor/config/config.toml
- Custom configuration/data/adb/gpu_governor/config/gpu_freq_table.toml
- GPU frequency table configuration/data/adb/gpu_governor/game/games.toml
- Games list configuration/data/adb/gpu_governor/log/log_level
- Log level setting
Custom Configuration
Users can customize GPU governor behavior by modifying /data/adb/gpu_governor/config/config.toml
. The configuration file contains global settings and detailed parameters for four modes (powersave, balance, performance, fast).
Global Configuration
mode
: Set default mode, available values:powersave
,balance
,performance
,fast
idle_threshold
: Idle threshold (percentage), system is considered idle when GPU load is below this value
Mode Configuration
Each mode has the following configurable parameters:
margin
: Marginaggressive_down
: Whether to use aggressive down-frequency strategysampling_interval
: Sampling interval (milliseconds)gaming_mode
: Gaming optimization, enables special memory optimization for gamesadaptive_sampling
: Whether to enable adaptive samplingmin_adaptive_interval
: Minimum adaptive sampling interval (milliseconds)max_adaptive_interval
: Maximum adaptive sampling interval (milliseconds)up_rate_delay
: Up-frequency delay (milliseconds)down_rate_delay
: Down-frequency delay (milliseconds)
GPU Frequency Table Configuration
Frequency table file is located at /data/adb/gpu_governor/config/gpu_freq_table.toml
:
# GPU Frequency Table
# freq unit: kHz
# volt unit: uV
# ddr_opp: DDR OPP level
[[freq_table]]
freq = 218000
volt = 45000
ddr_opp = 999
[[freq_table]]
freq = 280000
volt = 46875
ddr_opp = 999
[[freq_table]]
freq = 350000
volt = 48750
ddr_opp = 999
# More frequency points...
Configuration Parameters:
- freq: GPU frequency (kHz)
- volt: Voltage (μV)
- ddr_opp: DDR OPP level (999 means no adjustment, 0-3 represents different levels)
Preset Configuration Files
The module provides multiple preset configuration files:
config/mtd1000.toml
- Dimensity 1000 seriesconfig/mtd1100.toml
- Dimensity 1100 seriesconfig/mtd1200.toml
- Dimensity 1200 seriesconfig/mtd8100.toml
- Dimensity 8100 seriesconfig/mtd8200.toml
- Dimensity 8200 seriesconfig/mtd9000.toml
- Dimensity 9000 series
Preset Frequency Table Format
Each preset configuration file uses TOML array format to define frequency tables for specific processors:
freq_table = [
{ freq = 219000, volt = 45000, ddr_opp = 999 },
{ freq = 280000, volt = 46875, ddr_opp = 999 },
{ freq = 351000, volt = 48750, ddr_opp = 999 },
{ freq = 402000, volt = 50000, ddr_opp = 999 },
{ freq = 487000, volt = 52500, ddr_opp = 999 },
{ freq = 555000, volt = 55625, ddr_opp = 0 },
{ freq = 642000, volt = 57500, ddr_opp = 0 },
{ freq = 721000, volt = 58125, ddr_opp = 0 },
{ freq = 800000, volt = 59375, ddr_opp = 0 },
{ freq = 852000, volt = 60000, ddr_opp = 0 }
]
Different processor series have different frequency ranges and voltage configurations. The module will automatically select matching frequency table configuration based on device model.
Games List Configuration
Games list configuration file is located at /data/adb/gpu_governor/game/games.toml
, containing game package names and corresponding modes. The module will automatically scan installed games on device during installation and generate this configuration file.
Note: Installation script will check if games list file already exists, and will not overwrite it if it exists, to preserve user's game preferences.
Log Level Setting
Log level setting is saved in /data/adb/gpu_governor/log/log_level
file, default is info
level. It can be set through three methods:
- Use interactive menu
./action.sh
to select log level - Adjust through WebUI interface settings page
- Directly edit
/data/adb/gpu_governor/log/log_level
file
Log level changes take effect immediately after saving, no need to restart the module.
Configuration Hot Reload
The module supports configuration hot reload, all configuration changes (such as frequency table, games list, log level etc.) take effect in real time without restarting the module. This is thanks to the module's multithreaded monitoring architecture.