legiond
daemon is made to solve the following problems:
We used to use path to trigger the fancurve-set script, which could result in reaching systemd limits.
We don’t have to trigger it every time, just need to make sure it gets triggered last time.
We observed that after running for a while, undervolt
and ryzenadj
tweaks to the cpu may not work.
To solve that, We introduce a systemd.timer
to run cpu tweaks every 30s.
Because we use legiond-ctl
, if a fancurve-set
task is to start, it will refresh the timer of legiond
.
This avoids non-essential fancurve-set
being run.
Now we use a 3s
delay to make sure it works fine.
Every power-state/power-profile change will reset the timer.
legiond
is divided into two parts, legiond
and legiond-ctl
.
legiond
is running as a systemd.service
, legiond-ctl
is a bridge between legiond-cpuset.service
and legiond-resume.service
with legiond.service
.
legiond-cli
send request to legiond
via Unix domain socket.
legiond
also check if power-state or power-profile change and automatically reload the config
sudo cp /usr/share/legion_linux/{*.yaml,legiond.ini} /etc/legion_linux/
Edit fancurve profile .yaml
to fit your needs.
Modify /etc/legion_linux/legiond.ini
with your favorate editor.
Enable systemd.service
:
systemctl enable --now legiond.service legiond-onresume.service legiond-cpuset.timer
- [X] fancurve control
- [X] cpu control
- [ ] freshrate control