Created
October 7, 2015 22:38
-
-
Save zviryatko/7e6f26f248aaeb58d932 to your computer and use it in GitHub Desktop.
Change governor
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 | |
# Put this file to any your local $PATH directory. | |
let n=$((`nproc` - 1)) | |
if [[ $(cpufreq-info --governors) =~ $1 ]] | |
then | |
for i in `seq 0 $n` | |
do | |
`sudo cpufreq-set -c $i -g $1` | |
done | |
else | |
echo "There is no governors called: $1"; | |
fi |
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
# Edit this file via `visudo -f /etc/sudoers.d/cpufreq | |
%sudo ALL=NOPASSWD: /usr/bin/cpufreq-set |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment