[INITSCRIPT] screenstate_scaling - switch CPU freq governor on screen state change

Search This thread

BL4zD

Senior Member
Oct 19, 2010
358
49
seems like it's becoming time to write a completely new governor for mobile devices that takes into account screen state as well as cpu load.
 

hawkeyexp

Senior Member
May 26, 2006
220
40
Hi guys,

i tried it out with CM7 Nightly Build 30 on Bravo but it stocks on splashscreen. Im looking what's the reason or does anybody have the same problem ?
permissions etc. are correct - when removing script via recovery device boots correctly....
 

ch33kybutt

Retired Recognized Developer
Oct 25, 2008
635
812
@Flo ... Great work on screenstate_scaling! Just wanted to say thanks, and hope you don't mind, but I've combined your script with collin_ph's battery saver and hardcore's VM speedmods and come up with something called SS4N1 (Screen State for Nexus One). It has a config script "sscfg" which can be run from adb or terminal and enables users to make changes on-the-fly. Source is available in the update zip in my signature.

Keep on keeping on ... ;)
 
  • Like
Reactions: FloHimself
A

AspenTree

Guest
Hi guys,

i tried it out with CM7 Nightly Build 30 on Bravo but it stocks on splashscreen. Im looking what's the reason or does anybody have the same problem ?
permissions etc. are correct - when removing script via recovery device boots correctly....

Same ..

Sent from my HERO200 using XDA Premium App
 

hawkeyexp

Senior Member
May 26, 2006
220
40
hi,

since tried the script a while is gone and i restartet testing with the following result:

when i try to write a value to the governor it get the following message:

echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
cannot create /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor: directory nonexistent

has anybody a solution for it ??
 

chalomadek

Member
Jun 14, 2011
40
9
hi,

since tried the script a while is gone and i restartet testing with the following result:

when i try to write a value to the governor it get the following message:

echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
cannot create /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor: directory nonexistent

has anybody a solution for it ??

put "powersave" else powersave
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    Attached init script changes the CPU frequency governor based on the screen state:
    Code:
    screen on -> interactive governor
    screen off -> powersave governor

    Don't use this with SetCPU!

    Thanks NeoPhyTe.x360 for the idea...

    Edit:
    This script is released to public domain, so it can be freely used for derivative works without permission!
    1
    Hi FloHimself

    I uploaded your script in my thread and referred to this very thread

    hope that is OK with you

    Thanks for this fine script ! :)


    (I would click on your "thanks" button but all buttons on the first page of this thread disappeared or aren't available :confused: )

    Thank you for using the script! :)
    This should be public domain, so go ahead and use it, edit it, publish it! ;)

    Egypte would anyone want to use this script, the whole ideale of these governors is to dynamically adjust the frequencies.

    You are right, but there are different governors for different demands. Two such (conflicting!) demands are speed and power saving. Maybe you want speed when the screen is on and the phone is in use, but you want power saving when the screen is off and the phone is not in use.
    1
    @Flo ... Great work on screenstate_scaling! Just wanted to say thanks, and hope you don't mind, but I've combined your script with collin_ph's battery saver and hardcore's VM speedmods and come up with something called SS4N1 (Screen State for Nexus One). It has a config script "sscfg" which can be run from adb or terminal and enables users to make changes on-the-fly. Source is available in the update zip in my signature.

    Keep on keeping on ... ;)