serverroom-components/limit-cpu-power.service

12 lines
318 B
Desktop File

[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