serverroom-components/limit-cpu-power.service

13 lines
318 B
SYSTEMD
Raw Normal View History

[Unit]
Description=Limit CPU power on startup
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=sh -c 'echo 90 | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct'
ExecStop=sh -c 'echo 100 | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct'
[Install]
WantedBy=multi-user.target default.target