diff --git a/limit-cpu-power.service b/limit-cpu-power.service new file mode 100644 index 0000000..ae77484 --- /dev/null +++ b/limit-cpu-power.service @@ -0,0 +1,12 @@ +[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 diff --git a/no-turbo.service b/no-turbo.service new file mode 100644 index 0000000..86b3654 --- /dev/null +++ b/no-turbo.service @@ -0,0 +1,11 @@ +[Unit] +Description=Disable Turbo Boost on startup + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=sh -c 'echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo' +ExecStop=sh -c 'echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo' + +[Install] +WantedBy=multi-user.target default.target