[Android Software/Hacking General [Developers Only]] XuperLugia:
Hi there pika,

tried modifying screenstate_scaling script, but with no luck ;( the scripts is modified as follows:

#!/system/bin/sh
#
# mod version V51
# screenstate_scaling - switch CPU frequency governor on screen state change
# florian.schaefer@gmail.com (FloHimself)
# modifications by zacharias.maladroit and 'well.heeled.man'
# modifications & ideas taken from: ckMod SSSwitch by voku1987 and "battery tweak" (collin_ph@xda)
# for Changelog and experimental settings: see bottom part of this file

insmod /lib/modules/cpufreq_smartass2.ko; # Added in order to load the module
insmod /lib/modules/cpufreq_conservative.ko;

# =========
# Memory tweaks for non-screenstate-scaling usage
# =========
# (currently none)
# =========

# =========
# Description, howto:
# =========

# for uncommenting settings remove the preceding diamond/rhomb-sign (#) at the beginning of the line
# and remember to comment the other settings otherwise they will fight with each other and you might
# see inconsistent results

# ==============================================================
# ==============================================================
# Description of the governors:
# ==============================================================
# ==============================================================

# =========
# (1) battery-saving
# =========
# [might be laggy and slow- problems during wake-up/phone-answering or when screen is unlocked - due to powersave governor]
# =========
# choose conservative or ondemand governor with aggressive powersaving settings - while screen is ON
# choose powersave governor - while is OFF
# =========

# =========
# (2) interactive #
# =========
# [phone gets warm faster and experience is not overall consistent,
# interactive governor tweaked for power savings but still consuming more battery
# staying longer at higher frequencies]
# =========
# combine with conservative governor while screen is off ! [recommended]
# =========

# =========
# (3) smartass #
# =========
# [best compromise between super-smooth operation and battery savings while screen is off
# when idle while screen is on the battery consumption might be a tad bit high]
# =========
# combine with conservative governor while screen is off ! [recommended]
#
# can also be used while screen is ON and screen is OFF [AWAKE and SLEEP governor] - might result
# in higher battery consumption but smoother overall experience (fast wakeup when unlocking
# and answering the phone - might have some stability-issues though and "hang" at high
# frequencies for some time)
# =========

# =========
# (4) interactiveX #
# =========
# [phone gets warm faster and experience is not overall consistent,
# the phone might be consuming more battery
# staying longer at higher frequencies - this governor is suited as "one governor for all"
# to be used when screen is ON and when screen is OFF - AWAKE & SLEEP governor]
# =========

# =========
# (5) conservative #
# =========
# [multi-purpose governor - very battery-saving with default settings
# can be tweaked to jump to high frequencies fast while leaving out mid-frequencies
# when tweaked to be *very* aggressive & resulting in higher
# quadrant scores than with ondemand & acceptable experience still with
# power-efficiency in mind - in my opinion more consistent experience
# less micro-lags & thought-time than with ondemand governor]
# =========
# combine with conservative governor while screen is off ! [recommended]
# =========

# =========
# (6) ondemand #
# =========
# [kernel default and multi-purpose governor
# can be tweaked to be fast & power efficient
# it quickly jumps from lowest to highest frequency and meanwhile
# also uses mid-frequencies when applicable
# gets more attention from the upstream kernel devs and is continually optimised
# its "flaw" from my experience: it's not really smooth enough in demanding GUIs
# such as MIUI, TouchWiz, even ADWLauncher might show "micro lags"]
# =========
# combine with conservative governor while screen is off ! [recommended]
# =========

# ==============================================================
# ==============================================================
# step [1] choose AWAKE governor while screen is ON
# ==============================================================
# ==============================================================
# selection of AWAKE Governors:
# =========
# only keep ONE governor uncommented at a time !!!!:
# =========

#AWAKE_GOVERNOR="conservative"
#AWAKE_GOVERNOR="ondemand" # [no additional settings required, tweaking done in kernel-source]
#AWAKE_GOVERNOR="ondemandX"
#AWAKE_GOVERNOR="interactive"
#AWAKE_GOVERNOR="interactiveX"
#AWAKE_GOVERNOR="smartass"
AWAKE_GOVERNOR="smartassV2" # Modified in order to use the module

# ==============================================================
# ==============================================================
# step [2] choose SLEEP governor while screen is OFF
# ==============================================================
# ==============================================================
# selection of SLEEP Governors:
# =========
# only keep ONE governor uncommented at a time !!!!:
# =========

SLEEP_GOVERNOR="conservative"
#SLEEP_GOVERNOR="ondemand" # [no additional settings required, tweaking done in kernel-source]
#SLEEP_GOVERNOR="interactive" # NOT recommended
#SLEEP_GOVERNOR="interactiveX"
#SLEEP_GOVERNOR="smartass"
#SLEEP_GOVERNOR="powersave" # [no additional settings required, powersave only stays at 100 MHz]
#AWAKE_GOVERNOR="smartassV2"

# ==============================================================
# ==============================================================
# beginning of the screenstate-scaling loop
# ==============================================================
# ==============================================================

(while [ 1 ]
do

# ==============================================================
# ==============================================================
# ==============================================================
# settings for while the screen is on / usage
# ==============================================================
# ==============================================================
# ==============================================================

AWAKE=`cat /sys/power/wait_for_fb_wake`
if [ $AWAKE = "awake" ]; then
sleep 2 && echo $AWAKE_GOVERNOR > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;

echo "80" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold;

# ==============================================================
# ==============================================================
# step [3] tweaks to the governor while screen is ON (phone in use)
# ==============================================================
# ==============================================================
# ==============================================================
# limiting the max/min frequencies [not used by default]
# ==============================================================
# =========
# set maximum & minimum frequency to 100 & 1000 MHz (1 GHz)
# =========
#echo "1000000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
#echo "100000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

# =========
# (3) smartass #
# =========
# Smartass settings (slightly more battery friendly than Glitch Kernel defaults - peformance penalty unclear)
# =========

# echo "50" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/max_cpu_load # 76 # 47
# echo "35" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/min_cpu_load # 30 # 39
# echo "800000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/up_min_freq
# echo "400000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sleep_max_freq

# =========
# (5) conservative aka "One governor to rule them all"
# =========
# =========
# Conservative settings [SavagedZen governor-like] (recommended)
# =========

# echo "50" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold # 50 # 76 # 76
# echo "35" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold # 35 # 12 # 30 (higher will lead to noticable lags) # 35
# echo "50" > /sys/devices/system/cpu/cpufreq/conservative/freq_step # more aggressive ramping up (50)
###### echo "280000" > /sys/devices/system/cpu/cpu0/cpufreq/conservative/sampling_rate # 375000 # 500000

# =========
# (1) max battery # [with ondemand & powersave while phone in "sleep" [screen off] mode]
# =========
# [might have lags during wake-up/phone-answering or when screen is unlocked]
# =========

#SLEEP_GOVERNOR="powersave" # [no additional settings required, powersave only stays at 100 MHz]

# =========
# (1) max battery # [with conservative & powersave while phone in "sleep" [screen off] mode]
# =========
# Conservative settings [all frequencies using, noticably laggy when used while screen is on - needs time to ramp up] (compromise between speed/lags)
# =========

# echo "70" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold # 50 # 76 # 76
# echo "30" > /sys/devices/system/cpu/cpufreq/

But as far as it goes is not working, I added the insmod line in order to load it, and it's working since it's showed up in Voltage Control, showed but not used as when I load VC it's not used by default.

Any ideas over this? :confused: