Skip to content

LLJY/ryzen-autopwr

Repository files navigation

ryzen-autopwr

Automatic power profile switching for AMD Ryzen APUs based on AC/battery state.

Features

  • Instant profile switching via udev + systemd
  • Resume-aware (applies correct profile after suspend)
  • Concurrent execution protection (flock)
  • JSON configuration
  • Logging

Installation

makepkg -si

Dependencies

  • ryzenadj - Ryzen power management tool
  • ryzen_smu-dkms-git - Kernel module (required)
  • jq - JSON parser

Configuration

Edit /etc/ryzen-pwr.conf:

{
    "ac": {
        "power_limit": 55000
    },
    "battery": {
        "power_limit": 20000,
        "max_freq": 4300000
    }
}

Usage

sudo ryzen-pwr ac        # Apply AC profile
sudo ryzen-pwr battery   # Apply battery profile
sudo ryzen-pwr auto      # Auto-detect and apply
ryzen-pwr status         # Show status

How It Works

Trigger Service Action
AC plug ryzen-pwr-ac.service AC profile
AC unplug ryzen-pwr-battery.service Battery profile
Resume ryzen-pwr-resume.service Auto-detect

Logs

/var/log/ryzen-pwr/

License

GPLv2

About

Automatically applies APU power profiles on AC or on battery

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages