Systemd service to change EPP based on charging state and battery capacity
Currently, it only supports AMD processors and is being tested on my laptop powered by an AMD Ryzen 7 7840HS that runs Fedora 40. I don't have an Intel machine to learn about
intel_pstate
. If you have an Intel machine and would like to contribute, please do so (see #4).
Set Energy Performance Preference based on charging status and battery capacity.
Default behavior if cpu_performance_config.conf
is not edited:
performance
if battery capacity is greater than 50, else sets to balance_performance
.balance_performance
if battery capacity is greater than 50, else sets to power
.amd_pstate_epp
scaling driver must be installed/enabled. Running cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
will return amd-pstate-epp
if it is enabled.Clone the repository and change into the directory.
git clone https://github.com/realKarthikNair/EPP-systemd
cd EPP-systemd
Customize thresholds and EPP by editing cpu_performance_config.conf
if needed. The file is self explanatory.
Run install-and-enable.sh
after making it executable to install the service and enable it.
chmod +x install-and-enable.sh
./install-and-enable.sh
Run uninstall.sh
after making it executable to uninstall the service.
chmod +x uninstall.sh
./uninstall.sh