Auto-EPP is a Rust program that automatically manages the Energy Performance Preference (EPP) settings for AMD CPUs using the amd-pstate-epp driver. It adjusts the EPP based on whether the system is running on battery or AC power.
- Automatically switches between performance and power-saving EPP states
- Configurable EPP states for AC and battery power
- Continuously monitors power source changes
- Ensures the CPU governor is set to "powersave"
- Rust programming language (latest stable version)
- Linux system with an AMD CPU supporting the amd-pstate-epp driver
- Root privileges for execution
- Clone the repository:
git clone https://github.com/hambosto/amd-epp.git
cd amd-epp
- Build the project:
cargo build --release
- Copy the binary to a system directory:
sudo cp target/release/amd-epp /usr/local/bin/
Edit the configuration file at /etc/amd-epp.conf
to set your preferred EPP states:
[Settings]
epp_state_for_AC=balance_performance
epp_state_for_BAT=power
Available EPP states can be found by running:
cat /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences
Run the program with root privileges:
sudo amd-epp
It's recommended to set up auto-epp as a systemd service to run automatically at boot.
- Create a systemd service file:
sudo nano /etc/systemd/system/amd-epp.service
- Add the following content:
[Unit]
Description=amd-epp - Automatic EPP Changer for amd-pstate-epp
After=network.target network-online.target
[Service]
Type=simple
User=root
ExecStart=/usr/bin/amd-epp
Restart=on-failure
[Install]
WantedBy=multi-user.target
- Enable and start the service:
sudo systemctl enable amd-epp.service
sudo systemctl start amd-epp.service
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
- Original Python script by jothi-prasath
- All contributors to the Rust crates used in this project