Skip to content

DigiJLinux/Orange-pi-5plus-kernel-overclock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mali G610 MP4 Performance Enhancement Kernel Modules

This directory contains custom kernel modules designed to maximize the performance of the Mali G610 MP4 GPU found in the Rockchip RK3588 SoC (Orange Pi 5/5+).

⚠️ WARNING

These modules implement overclocking and advanced hardware manipulation that can:

  • Cause system instability
  • Increase heat generation significantly
  • Potentially damage your hardware
  • Void your warranty

Use at your own risk! Ensure adequate cooling and monitor temperatures closely.

Modules Overview

1. mali_g610_performance.c

Main performance enhancement module

Features:

  • Enhanced Operating Performance Points (OPP) table with overclocked frequencies
  • Custom devfreq governor optimized for Mali G610 MP4 architecture
  • Advanced frequency scaling algorithm
  • Thermal management integration
  • Performance boost modes
  • Runtime configuration via /proc/mali_g610_perf

Frequency levels:

  • 200 MHz @ 0.85V (Power Save)
  • 400 MHz @ 0.90V (Balanced Low)
  • 600 MHz @ 0.95V (Balanced)
  • 800 MHz @ 1.00V (Performance)
  • 1000 MHz @ 1.05V (Gaming - stock max)
  • 1100 MHz @ 1.10V (Extreme - 10% overclock)

2. mali_g610_sysfs.c

Advanced sysfs interface for real-time control

Provides /sys/kernel/mali_g610/ interface with:

  • gpu_frequency - Read/write current GPU frequency
  • gpu_voltage - Read/write current GPU voltage
  • gpu_temperature - Real-time temperature monitoring
  • gpu_utilization - GPU load percentage
  • memory_bandwidth - Memory bandwidth usage
  • power_consumption - Estimated power consumption
  • performance_stats - Comprehensive performance summary
  • force_max_performance - Emergency performance boost
  • opp_table - Available operating points

3. mali_g610_overclock.h

Header with advanced overclocking definitions

Contains:

  • Register definitions for RK3588 GPU control
  • Overclocking profiles from mild to extreme
  • Safety limits and thermal thresholds
  • Hardware abstraction macros
  • Performance monitoring structures

Installation

Prerequisites

# Install kernel headers
sudo apt update
sudo apt install linux-headers-$(uname -r)

# Check required kernel features
make check-config

Build and Install

# Build modules
make

# Install modules
sudo make install

# Load performance module
sudo make load

# Load sysfs interface (optional)
sudo modprobe mali_g610_sysfs

Load at Boot

# Add to modules load list
echo "mali_g610_performance" | sudo tee -a /etc/modules
echo "mali_g610_sysfs" | sudo tee -a /etc/modules

# Create module options (optional)
echo "options mali_g610_performance boost_enabled=1" | sudo tee /etc/modprobe.d/mali_g610.conf

Usage

Performance Profiles

The main module provides several performance profiles accessible via the devfreq governor:

# Check current governor
cat /sys/devices/platform/fb000000.gpu/devfreq/fb000000.gpu/governor

# Switch to custom Mali G610 governor
echo "mali_g610_performance" | sudo tee /sys/devices/platform/fb000000.gpu/devfreq/fb000000.gpu/governor

Runtime Configuration

Configure performance parameters via proc interface:

# View current configuration
cat /proc/mali_g610_perf

# Adjust parameters
echo "upthreshold=80" | sudo tee /proc/mali_g610_perf
echo "downdifferential=10" | sudo tee /proc/mali_g610_perf
echo "thermal=90" | sudo tee /proc/mali_g610_perf

Real-time Monitoring

Monitor GPU performance via sysfs:

# Check current frequency
cat /sys/kernel/mali_g610/gpu_frequency

# Monitor temperature
watch cat /sys/kernel/mali_g610/gpu_temperature

# View comprehensive stats
cat /sys/kernel/mali_g610/performance_stats

Manual Overclocking

Advanced users only!

# Set custom frequency (1.1 GHz)
echo 1100000000 | sudo tee /sys/kernel/mali_g610/gpu_frequency

# Set voltage (1.1V - dangerous!)
echo 1100000 | sudo tee /sys/kernel/mali_g610/gpu_voltage

# Emergency maximum performance
echo 1 | sudo tee /sys/kernel/mali_g610/force_max_performance

Performance Improvements

Expected performance gains with these modules:

Configuration Frequency Voltage Performance Gain Risk Level
Stock 1000 MHz 1.0V Baseline Safe
Gaming Profile 1000 MHz 1.05V +5-10% Low
Extreme Profile 1100 MHz 1.1V +15-25% Medium
Manual Max 1200 MHz 1.2V +30-40% High

Thermal Management

The modules include comprehensive thermal protection:

  • 80°C: Safe operating temperature
  • 85°C: Automatic throttling begins
  • 90°C: Critical temperature limit
  • 95°C: Emergency shutdown

Monitor temperatures closely:

# Continuous temperature monitoring
watch -n 1 cat /sys/kernel/mali_g610/gpu_temperature

Troubleshooting

Module Won't Load

# Check kernel logs
dmesg | grep mali_g610

# Verify kernel config
make check-config

# Check dependencies
lsmod | grep panfrost

Performance Not Improving

# Verify governor is active
cat /sys/devices/platform/fb000000.gpu/devfreq/fb000000.gpu/governor

# Check if frequencies are actually changing
cat /sys/devices/platform/fb000000.gpu/devfreq/fb000000.gpu/cur_freq

# Monitor with stress test
glmark2-es2-wayland --annotate

System Instability

# Reduce overclock immediately
echo 1000000000 | sudo tee /sys/kernel/mali_g610/gpu_frequency
echo 1000000 | sudo tee /sys/kernel/mali_g610/gpu_voltage

# Unload modules
sudo rmmod mali_g610_performance mali_g610_sysfs

Integration with Arm-Pi Tweaker

These modules integrate seamlessly with the Arm-Pi Tweaker GUI:

  1. Automatic Detection: The GPU manager detects loaded modules
  2. Enhanced Profiles: Additional overclocked profiles become available
  3. Real-time Monitoring: Live frequency, voltage, and temperature display
  4. Safety Controls: Automatic thermal protection and voltage limits

Benchmarking

Test performance improvements:

# OpenGL ES benchmark
glmark2-es2-wayland --benchmark=terrain --annotate

# Vulkan benchmark (if supported)
vkmark

# Memory bandwidth test
tinymembench

# Stress testing
stress-ng --gpu 1 --timeout 300s

Development

Adding New Profiles

Edit mali_g610_opp_table[] in the performance module:

static struct {
    unsigned long freq;
    unsigned long volt;
    const char *name;
} mali_g610_opp_table[] = {
    // Add your custom profile here
    { 1150000000, 1150000, "custom_extreme" },
};

Debugging

Enable debug output:

# Build with debug symbols
make debug

# Enable debug messages
echo 8 > /proc/sys/kernel/printk

License

GPL v2 - See individual source files for details.

Contributing

Contributions welcome! Please:

  1. Test thoroughly on your hardware
  2. Document temperature and stability results
  3. Follow kernel coding style
  4. Include safety warnings for overclocking features

Disclaimer

This software is provided "as is" without warranty. The authors are not responsible for any hardware damage or data loss. Overclocking voids warranties and may permanently damage your device.

About

a kernel modul for overclocking the orange pi 5 plus

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published