Skip to content

Instantly share code, notes, and snippets.

@iagoalonsomrf
Last active September 13, 2023 13:38
Show Gist options
  • Save iagoalonsomrf/0d1039dff8cd9757c6fba0a30741b3e1 to your computer and use it in GitHub Desktop.
Save iagoalonsomrf/0d1039dff8cd9757c6fba0a30741b3e1 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
read -p "Set scaling governor to: " GOVERNOR
if [ "$GOVERNOR" == "performance" ] || [ "$GOVERNOR" == "powersave" ]
then
for i in {0..11}; do echo "$GOVERNOR" | sudo tee /sys/devices/system/cpu/cpu$i/cpufreq/scaling_governor; done
else
echo "Value $GOVERNOR is not a valid scaling governor"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment