[Galaxy S II Original Android Development] karlesg:
I saw a script about manually setting a screen off profile here

The script is this

#!/system/bin/sh

#CPU Frequencies
AWAKE_MIN="100000"
AWAKE_MAX="1200000"
AWAKE_GOV="lulzactive"

SLEEP_MIN="100000"
SLEEP_MAX="500000"
SLEEP_GOV="conservative"

#CPU Frequency
FREQ_MANUAL="true"
FREQ_STEP_1="1600"
FREQ_STEP_2="1400"
FREQ_STEP_3="1200"
FREQ_STEP_4="1000"
FREQ_STEP_5="800"
FREQ_STEP_6="500"
FREQ_STEP_7="200"
FREQ_STEP_8="100"

#Misc
PROFILE="true"
LOGFILE="/sdcard/external_sd/sysvalues.log"
LOGMODE="1" # Logmode 0=Console only | 1=Startup | 2=Every Change #

#================================================= ===============================================#

if [ -f $LOGFILE ] ; then
rm -f $LOGFILE
fi
if [ "$LOGMODE" = "1" ] || [ "$LOGMODE" = "2" ] ; then
touch $LOGFILE
fi
###########################
# Setting CPU Frequencies #
###########################
if [ "$FREQ_MANUAL" = "true" ] ; then
if [ "$LOGMODE" = "1" ] || [ "$LOGMODE" = "2" ] ; then
echo "Set Frequency Table" | tee -a $LOG_FILE;
fi
echo "Set Frequency Table"
echo $FREQ_STEP_1" "$FREQ_STEP_2" "$FREQ_STEP_3" "$FREQ_STEP_4" "$FREQ_STEP_5" "$FREQ_STEP_6" "$FREQ_STEP_7" "$FREQ_STEP_8 > /sys/devices/system/cpu/cpu0/cpufreq/freq_table
fi
echo "Setting CPU to "$AWAKE_MIN"-"$AWAKE_MAX
echo $AWAKE_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo $AWAKE_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
####################
# Setting Governor #
####################
echo $AWAKE_GOV > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
####################
# Starting Profile #
####################
if [ "$PROFILE" = "true" ]; then
if [ "$LOGMODE" = "1" ] || [ "$LOGMODE" = "2" ] ; then
echo `date +%X`" - Profile activated" | tee -a $LOGFILE
fi
echo "Profile activated"
(while [ 1 ] ; do
AWAKE=`cat /sys/power/wait_for_fb_wake`
if [ "$AWAKE" = "awake" ]; then
chmod 644 /sys/devices/system/cpu/cpu1/online
echo "1" > /sys/devices/system/cpu/cpu1/online
chmod 444 /sys/devices/system/cpu/cpu1/online
echo $AWAKE_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo $AWAKE_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo $AWAKE_GOV > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
fi
SLEEPING=`cat /sys/power/wait_for_fb_sleep`
if [ "$SLEEPING" = "sleeping" ]; then
chmod 644 /sys/devices/system/cpu/cpu1/online
echo "0" > /sys/devices/system/cpu/cpu1/online
chmod 444 /sys/devices/system/cpu/cpu1/online
echo $SLEEP_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo $SLEEP_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo $SLEEP_GOV > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

fi
done &)
fi

Of course the script is about "lulzactive" governor which isn't an option in this kernel, but anyone can edit it and set different governors or values according to his preferences. For example instead of "lulzactive" someone can use "ondemand" "smartassV2" or whatever he likes.

Well I know **** about scripts :p but after reading it, I can't find any errors in it. This script should work. Also it disables the second core while screen is off.

But I haven't tried it yet and it's better someone with more knowledge about scripts from me to confirm that it actually works. Although as I said I can't find something wrong about it.

As we said earlier using setcpu to set profiles is a bad idea, so I think this script is a good alternative if someone wants to use a screen off profile and that's why I post it here.

P.S and 2 suggestions to the devs :)

1) I think it would be nice to add as an option lulzactive governor to your next version of the kernel. It's an interesting governor and quite promising.

2) Also I'd personally like if you could add as an option to disable all loggers in your kernel (just like in speedmod). Not by default but as an option in your post #11 through a CWM flashable zip, also with an option to re-enable if someone wants to. Personally I don't have a single problem with this rom/kernel, I don't use any app protectors, so I'd really like to have all logging disabled.

Yes I know you will call me crazy, I know the battery savings from this are minor and insignificant, but personally I just don't like the idea to have something enabled that I simply don't use and I can't find any need for it. :) And as I said not by default, but as an option if someone wants to do this at his own risk. You can clearly state that you don't recommend it, but I think you could give this option to a battery freak like me. :D