This setup switches to "powersave" if the battery is lower than 75% and to "performance" if it is above and charging.
Copy the files to
- /etc/systemd/system/watch-power-cpufreq.service
- /usr/local/bin/watch-power-cpufreq.sh
and then run
sudo systemctl daemon-reload
sudo systemctl start watch-power-cpufreq.service
systemctl enable watch-power-cpufreq.service
Update: I added an installation script. Just do
curl -L https://gist.github.com/nknapp/8b4e10788b65ab9e921ef50e1a3ac60f/raw/install.sh | sudo bash
Fixed "WantedBy" to "multi-user.target". Added Restart policy