[Galaxy S II General] alinefr:
screen_off_min_step

I've just installed Siyah Kernel (v 2.6.2) yesterday and started to play around with governors.

I started with kwerdenker scripts but I changed the governor to lulzactive in a attempt to get better battery juice. Also I added droidphile tweaks, so here are my scripts.

96undervolting:

#!/system/bin/sh

#customize voltages to you values
#All Steps in MHz
#Steps are: 1400 1200 1000 800 500 200
NORMAL_STEPS="1275 1175 1075 975 875 875"
#Added Step is for max_step higher than 1400Mhz
HIGHER_STEP="1425"
#Added Step is for min_step lower than 200Mhz
LOWER_STEP="850"

echo "kwerdenkers kernel adaptive UV init-script active. Checking kernel for UV support..."
#Checking stuff
if [[ -e /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table ]]; then
echo "Kernel supports undervolting! Checking frequencies table for number of speed steps..."
UV_COUNT=$(cat /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table | wc -l)

case $UV_COUNT in
6)
echo "6 speed steppings found"
echo $NORMAL_STEPS > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
;;
7)
echo "7 speed steppings found"
echo $HIGHER_STEP" "$NORMAL_STEPS > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
;;
8)
echo "8 speed steps found. Checking for Siyah kernel..."
if [[ $(uname -r | grep Siyah -) ]]; then
echo "Kernel found. Safe to use 8 step UV settings."
echo $HIGHER_STEP" "$NORMAL_STEPS" "$LOWER_STEP > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
else
echo "Other 8 step kernel found. Skipping UV for now for security reasons."
fi
;;
*)
echo "[!!] Found number of steppings with no correlating UV settings: "$UV_COUNT". No UV will be used! Please repot your kernel and the steppings to the author of this script."
;;
esac
else
echo "Kernel does not seem to support UV settings. Skipping UV."
fi

98underclock:

#!/system/bin/sh

checkgov=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors | grep lulzactive -)

echo "Setting scaling_max_freq to 800mhz"
echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "Setting scaling_min_freq to 100mhz"
echo 100000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "Setting governor to lulzactive (if available)"
if [[ -n "$checkgov" ]]; then
echo "lulzactive found"
echo lulzactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 90 > /sys/devices/system/cpu/cpufreq/lulzactive/inc_cpu_load
echo 1 > /sys/devices/system/cpu/cpufreq/lulzactive/pump_up_step
echo 2 > /sys/devices/system/cpu/cpufreq/lulzactive/pump_down_step
echo 50000 > /sys/devices/system/cpu/cpufreq/lulzactive/up_sample_time
echo 20000 > /sys/devices/system/cpu/cpufreq/lulzactive/down_sample_time
echo 5 > /sys/devices/system/cpu/cpufreq/lulzactive/screen_off_min_step
else
echo "lulzactive not found, using standard governor"
fi

My /sys/devices/system/cpu/cpu0/cpufreq/freq_table

# cat freq_table
1600 1400 1200 1000 800 500 200 100

My /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table

# cat UV_mV_table
1600mhz: 1425 mV
1400mhz: 1325 mV
1200mhz: 1275 mV
1000mhz: 1175 mV
800mhz: 1075 mV
500mhz: 975 mV
200mhz: 950 mV
100mhz: 950 mV

In my first attempt screen_off_min_step was set to 6. But I've got fast rebooting forever (dark screen, boot sound and lock screen without actually rebooting). When I changed it to 5 the phone was then stable.

So, I'm a bit confused.

As my table has 8 freqs, does 6 means 100 and 200 when screen is off? Maybe it was too low frequency for my GS2, even with screen off. Does it makes sense?

Thank you!