-
-
Save roguepullrequest/c0ba4940ade6b388016cbba208da3e98 to your computer and use it in GitHub Desktop.
Bash script to enable / disable turbo on the CPU in Linux. Change permissions: sudo chmod a+x switch-turbo.sh
Run the script: sudo ./switch-turbo.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
status=$(cat /sys/devices/system/cpu/intel_pstate/no_turbo) | |
if [ $status = 0 ]; then | |
echo "Switching CPU-turbo: OFF" | |
echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo | |
else | |
echo "Switching CPU-turbo: ON" | |
echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment