1if [[ "`id -u`" -ne "0" ]]; then 2 echo "WARNING: running as non-root, proceeding anyways..." 3fi 4 5stop thermal-engine 6stop mpdecision 7stop perfd 8 9# Set CPU cores frequency to 1200 MHz 10cpubase=/sys/devices/system/cpu 11gov=cpufreq/scaling_governor 12 13cpu=0 14S=1200000 15while [ $((cpu < 2)) -eq 1 ]; do 16 echo 1 > $cpubase/cpu${cpu}/online 17 echo userspace > $cpubase/cpu${cpu}/$gov 18 echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_max_freq 19 echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_min_freq 20 echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_setspeed 21 cpu=$(($cpu + 1)) 22done 23