| Crates.io | power-rules-daemon |
| lib.rs | power-rules-daemon |
| version | 1.0.0 |
| created_at | 2025-08-03 20:39:46.319159+00 |
| updated_at | 2025-08-04 12:22:28.198002+00 |
| description | A daemon for defining power rules for the power-profiles-daemon. |
| homepage | |
| repository | https://github.com/zeioth/power-rules-daemon |
| max_upload_size | |
| id | 1780090 |
| size | 77,125 |
<your-package-manager-install-command> power-profiles-daemon
cargo install power-rules-daemon
Create the service ~/.config/systemd/user/power-rules-daemon.service
[Unit]
Description=Power Rules Daemon
After=graphical-session.target
[Service]
ExecStart=%h/.cargo/bin/power-rules-daemon
Restart=on-failure
[Install]
WantedBy=default.target
And enable both power-profiles-daemon and power-rules-daemon with:
systemctl --user daemon-reload
systemctl --user enable --now power-profiles-daemon.service
systemctl --user enable --now power-rules-daemon.service
Now you can add your rules to ~/.config/power-rules/config.toml
Most users will use this daemon for gaming with rules like
[config]
default_profile = "balanced" # Profile to use when no rules are triggered atm.
polling_interval = 5 # Amount of seconds before checking if a rule is triggered.
pause_on_manual_change = 180 # If the user manually changes the power profile (through the desktop environment gui, for example), the daemon is paused for n minutes.
# While a steam game is executed
[[rule]]
name = "steamapps/common"
profile = "performance"
# While launchers are executed
[[rule]]
name = "lutris"
profile = "performance"
[[rule]]
name = "heroic"
profile = "performance"
[[rule]]
name = "gamehub"
profile = "performance"
[[rule]]
name = "retroarch"
profile = "performance"
Rules are applied by order from above to below of the config file.
If no rules are currently triggered, default_profile will be the one used.
Distributing this program in a linux distro is very easy! The installer should just:
cargo install power-rules-daemonpower-profiles-daemon.This progaram was originally a proposal to replace the program game-performance on CachyOS. And now it can be used on any distro!