Update scaling-governor.sh

revert changes
This commit is contained in:
tteckster 2022-10-29 23:21:13 -04:00 committed by GitHub
parent 8e331fcbff
commit f777a968ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 38 additions and 46 deletions

View File

@ -22,11 +22,11 @@ function header_info {
" "
} }
show_menu(){ show_menu(){
CL=$(echo "\033[m") CL=`echo "\033[m"`
GN=$(echo "\033[32m") GN=`echo "\033[32m"`
BL=$(echo "\033[36m") BL=`echo "\033[36m"`
YW=$(echo "\033[33m") YW=`echo "\033[33m"`
fgred=$(echo "\033[31m") fgred=`echo "\033[31m"`
header_info header_info
CK=$(uname -r) CK=$(uname -r)
IP=$(hostname -I) IP=$(hostname -I)
@ -57,50 +57,42 @@ show_menu() {
} }
clear clear
show_menu show_menu
while [ $opt != '' ]; do while [ $opt != '' ]
do
if [ $opt = '' ]; then if [ $opt = '' ]; then
exit exit;
else else
case $opt in case $opt in
1) 1) echo "conservative" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
echo "conservative" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
clear clear
show_menu show_menu
;; ;;
2) 2) echo "ondemand" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
echo "ondemand" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
clear clear
show_menu show_menu
;; ;;
3) 3) echo "userspace" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
echo "userspace" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
clear clear
show_menu show_menu
;; ;;
4) 4) echo "powersave" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
echo "powersave" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
clear clear
show_menu show_menu
;; ;;
5) 5) echo "performance" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
echo "performance" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
clear clear
show_menu show_menu
;; ;;
6) 6) echo "schedutil" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
echo "schedutil" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
clear clear
show_menu show_menu
;; ;;
x) x)exit;
exit
;; ;;
\n) \n)exit;
exit
;; ;;
*) *)clear;
clear show_menu;
show_menu
;; ;;
esac esac
fi fi