Skip to content

v2.0 - Runtime Control & Configuration Management

Choose a tag to compare

@DiabloPower DiabloPower released this 05 Dec 01:54
· 161 commits to main since this release
ebfa252

๐Ÿš€ What's New in v2.0

This major release transforms cpu_throttle from a simple daemon into a production-ready thermal management solution with full runtime control and configuration management.

โœจ New Features

Runtime Control System

  • Unix Socket Control - Change daemon behavior on-the-fly without restart
  • cpu_throttle_ctl utility - Command-line interface for daemon control
  • No sudo required - Socket permissions set to 0666 for easy access
  • Control commands: set-safe-max, set-safe-min, set-temp-max, status, quit

Profile Management

  • Save/Load Profiles - Store frequency configurations for different scenarios (gaming, powersave, etc.)
  • Profile Commands - save-profile, load-profile, list-profiles, delete-profile
  • Per-User Storage - Profiles stored in ~/.config/cpu_throttle/profiles/

Configuration System

  • Global Config File - /etc/cpu_throttle.conf for system-wide defaults
  • CLI Override - Command-line arguments take precedence over config file
  • Logging Levels - --verbose, --quiet, --silent flags for output control
  • PID File - /var/run/cpu_throttle.pid for proper service management

๐Ÿ”ง Improvements

Enhanced Installer

  • Multi-Distro Support - Auto-detection for Debian, Fedora, Arch, openSUSE, Alpine (+ Ubuntu, RHEL, CentOS)
  • Automatic Dependencies - Detects package manager and installs build tools automatically
  • Smart Updates - Backs up existing services, handles version upgrades cleanly
  • Service Verification - Confirms successful startup after installation

Better Throttling Logic

  • Proportional Thresholds - All temperature thresholds scale with --temp-max setting
  • Improved Hysteresis - 10% frequency range prevents oscillation
  • Mobile CPU Optimized - Default thresholds: 75ยฐC/82ยฐC/88ยฐC/95ยฐC

๐Ÿ› Bug Fixes

  • Fixed incorrect frequency calculation formulas (was using wrong proportional math)
  • Corrected temperature thresholds for mobile CPUs (previously too aggressive)
  • Eliminated all compiler warnings (buffer sizes, macro conflicts)
  • Fixed macro naming collision (LOG_* constants vs macros)

๐Ÿ“ฆ What's Included

Main Binaries:

  • cpu_throttle - Main daemon with runtime control support
  • cpu_throttle_ctl - Control utility for runtime configuration

Source Files:

  • cpu_throttle.c - Daemon source code
  • cpu_throttle_ctl.c - Control utility source
  • install_cpu-throttle.sh - Multi-distro installer with dependency handling

Bash Alternative (Legacy):

  • install_dynamic-tlp.sh - Modernized Bash version (updated formulas, hysteresis, thresholds)

๐Ÿ“– Documentation

Comprehensive README updates:

  • Runtime control examples and workflows
  • Profile management guide
  • Configuration file format
  • Multi-distro build instructions
  • Technical architecture details
  • Command-line reference

๐Ÿ”„ Migration from v1.x

No breaking changes! Existing installations continue to work. New features are opt-in:

  • Config file is optional (defaults used if not present)
  • Runtime control is additional functionality (daemon works standalone)
  • Profiles are per-user (no system-wide changes required)

To upgrade: Simply run the new installer - it handles everything automatically:

# Download and run installer
# Download installer and source files
wget https://github.com/DiabloPower/burn2cool/releases/download/v2.0/install_cpu-throttle.sh
wget https://github.com/DiabloPower/burn2cool/releases/download/v2.0/cpu_throttle.c
wget https://github.com/DiabloPower/burn2cool/releases/download/v2.0/cpu_throttle_ctl.c
chmod +x install_cpu-throttle.sh
./install_cpu-throttle.sh

# or with git

# Clone repository (includes all source files)
git clone https://github.com/DiabloPower/burn2cool.git
cd burn2cool
./install_cpu-throttle.sh

# The installer will:
# โœ… Auto-detect existing service
# โœ… Stop running daemon automatically
# โœ… Backup old service file with timestamp
# โœ… Compile and install new version
# โœ… Restart service with new version

๐Ÿ“ฅ Installation

Quick Start (Standalone):

wget https://github.com/DiabloPower/burn2cool/releases/download/v2.0/cpu_throttle
chmod +x cpu_throttle
sudo ./cpu_throttle

๐ŸŽฎ Quick Example

# Create gaming profile
cpu_throttle_ctl set-safe-max 4000000
cpu_throttle_ctl save-profile gaming

# Create power-saving profile  
cpu_throttle_ctl set-safe-max 2000000
cpu_throttle_ctl save-profile powersave

# Switch on-the-fly (no daemon restart!)
cpu_throttle_ctl load-profile gaming