Linux CPU Speed


Tnego un equipo tope de gama, máxima velocidad, disco SSD grande, una gran resolución, display con mucho brillo, mucha RAM y todo maravilloso.....
Excepto, que cuando estoy trabajando con la batería, solo dura unas 3 hs. a veces menos...

Me puse a investigar y pude configurarlo correctamente con dos scripts, uno de MAX CPU y otro de SLOW CPU.

La idea es usar varios paquetes de gestión de CPU, cpufrequtils y especificarle que quiero.
En mi portátil estos valores funcionan correctamente, pero en otros dependiendo del Micro puede que las velocidades MIN y MAX deban ser otras.

MAX POWER
#!/bin/bash

echo "powersave" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "powersave" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo "powersave" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo "powersave" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo "powersave" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
echo "powersave" > /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor
echo "powersave" > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
echo "powersave" > /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor

echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 800000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo 800000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
echo 800000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
echo 800000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
echo 800000 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq
echo 800000 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
echo 800000 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq

echo 3600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 3600000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo 3600000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
echo 3600000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
echo 3600000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
echo 3600000 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq
echo 3600000 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq
echo 3600000 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq



LOW CPU SPEED
#!/bin/bash

echo "powersave" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "powersave" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo "powersave" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo "powersave" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo "powersave" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
echo "powersave" > /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor
echo "powersave" > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
echo "powersave" > /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor

echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 800000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo 800000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
echo 800000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
echo 800000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
echo 800000 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq
echo 800000 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
echo 800000 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq

echo 1200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1200000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo 1200000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
echo 1200000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
echo 1200000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
echo 1200000 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq
echo 1200000 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq
echo 1200000 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq

Comentarios

Entradas populares