Script {APP} CPU Sleeper, The Battery Saver Mod! 08/06/2012 Release 2.7

Search This thread

eugene373

Retired Recognized Developer
Aug 11, 2009
5,844
7,424
eb-productions.proboards.com
App Version:
CPU Sleeper
~Free to all XDA Memebers
~ Must Be Rooted to use App

What is it?
Its a fairly simple App that will put CPU 1/2/3 OFFLINE when the screen turns off. Once the screen comes back on, it will allow CPU 1/2/3 back ONLINE.

How does it work?
Since we have Dual & Quad core CPUs, we have a CPU 0 and a CPU 1/2/3, core 0/1/2/3, while the screen is off we really only need to have 1 core active "CPU0", this App will make sure CPU 1/2/3 shuts off while the screen is off, then resumes normal usage when the screen comes back on.

Compatibility?
Works with any Dual Core & Quad Core Devices!
~ICS
~Gingerbread

Battery Saving?
Battery savings all depends on Usage & idle times.

v2.7
App Download: CPUSleep.apk

v2.8 via Market
CPUSleep.apk
Version 2.8 Release Notes:
~ Fixed GPS Not Locking while App is installed
~ GNex Freeze Issue should be Fixed
~ JB Compatibility should be fixed regarding Sleep Of Death
~ Fix Quad Core Sleep Issue's
~ Better Handling of CPU2 & CPU3 on Quad Core's

Credits:
Handlerexploit for co-creation of this wonderful App.



Script Version!
Code:
This time I present to you a script that will in theory (and so far for me, in reality) save us some battery without having to risk our hardware with undervolting! I present to you...

[B]CPU Sleeper[/B]
[QUOTE]Honestly the Script can be made to work with any Dual Core / Quad Core! The Only Problem is you need to be Rooted!  
~ Currently the issue with CM9, is that the boot becomes incomplete while in init.d folder without Modification to the sysinit..  
 
~ however, with any rooted device you can download the script & continue to use it via a script manager app on every boot.  
 
~ With the Script Manager App, this script virtually can run on any Multi-Processor CPU  
 
Hope that clears things Up,  
~~Eugene[/QUOTE]

[U]What is it?[/U]
Its a fairly simple script that will put CPU 1 OFFLINE when the screen turns off. Once the screen comes back on, it will allow CPU 1 back ONLINE.

[U]How does it work?[/U]
Since we have dual core CPUs, we have a CPU 0 and a CPU 1, core 1 and core 2, while the screen is off we really only need to have 1 core active, this script will make sure CPU 1 shuts off while the screen is off, then resumes normal usage when the screen comes back on.

[B][COLOR="red"]WARNING! READ THIS![/COLOR][/B]
This script relies on init.d OR script manager! CM9, for some reason, tends to run this at the exact same time it runs some other script (I forget atm which) and it will clash, causing no boot! CM9 users MUST use the script manager version install! Flex Reaper appears to work fine with it as init.d. I strongly urge you to use the script manager version of this, NOT the flashable version. Always make a nandroid backup before modifying the system, including this!

[U][COLOR="Red"]Instructions[/COLOR][/U]
Available in 2 versions, script only version which you can place wherever you want and run however you want, or a CWM/TWRP flashable zip that will place the file for you in /system/etc/init.d and set permissions.

[I]Version 1: Flashable[/I]
Same as any of my flashable releases, I did most of the work for you!
Make a full backup
Download to external SD card
Install from SD card
Pick the cpu sleeper zip file
it'll be almost instant
reboot
Shouldn't be any need to clear caches or anything like that.

[I]Version 2: Script only[/I]
This can be run in 2 ways, via init.d support, or via script manager. Both are pretty similar, and can be done a number of ways, however this is the basis of how.

[U]Init.d supported kernel:[/U]
Make a backup!
Download the script file, making sure no extensions get added onto the file. Copy the file to /system/etc/init.d and set the permissions to the following:
XOX
XOX
XOX
Once done, reboot the system, and it will take effect when your system is finished rebooting.

[U]Script Manager[/U]
This method is probably the better method, and should work with any kernel/ROM. Download the script file, making sure no file extensions get added, and copy it to /system/etc. Set the file permissions to:
XOX
XOX
XOX
Once done, load up script manager, select browse as root (if it isn't already set from the crossix mod method in the guide) then browse to /system/etc and select the script file S98cpu_sleep, then select ROOT and BOOT options. After this is set, reboot system.


[U]What do I do if I can't boot after using this?[/U]
You made that backup, right? Ok, then here is what you do.
Hold the power button until the tablet powers off
Press and hold the volume down button, next to the screen lock switch
Press and hold Power (while holding volume down)
Once the recover kernel message comes up, release the buttons
In CWM go to advanced, mounts, mount system, then format system
In TWRP, go to wipe, then wipe system
In CWM go to restore, advanced restore, restore ONLY system
In TWRP select restore, then uncheck all so ONLY system is checked
After restoring system, wipe cache and dalvik cache, then reboot system.
System should boot normally.


[B]Downloads[/B]
Available in 2 versions, script only version which you can place wherever you want and run however you want, or a CWM/TWRP flashable zip that will place the file for you in /system/etc/init.d and set permissions.

Dual Core:
Download: [COLOR="Red"]Script Only - Recommend Install via Script Manager App[/COLOR]
[URL="http://d-h.st/N1N"]CPU Sleeper script only[/URL]

Quad Core:
Download: [COLOR="Red"]Script Only - Recommend Install via Script Manager App[/COLOR]
[url=http://www66.zippyshare.com/v/9249467/file.html]cpusleep[/url]

[COLOR="Red"]Download: ClockworkMod Recovery .zip for T989 / I727[/COLOR]
[url=http://www19.zippyshare.com/v/51836824/file.html]CPU_Sleeper.zip[/url]

Thanks to [COLOR="DarkGreen"]pio_masaki[/COLOR] for rewriting the OP
 
Last edited:

snguyen0730

Senior Member
Nov 29, 2010
610
126
What should it be once I copied it into inid? Like the name

Sent from Samsung Galaxy SIV
 

iwasblown

Senior Member
Sep 7, 2010
1,019
63
Will the phone function well with the asleep profile you created on the scary governor?

Sent from my SGH-T989 using xda premium
 
Last edited:

eugene373

Retired Recognized Developer
Aug 11, 2009
5,844
7,424
eb-productions.proboards.com
Can this be used on any ROM or Kernel?

Yes this can be used with any Multi-core Phone that supports init.d

Wow this is great Eugene is very impressive

Sent from my SGH-T989 using xda premium

Thanks,

this can be used with any kernel correct?

Yes this can be used with any Multi-core Phone that supports init.d

What should it be once I copied it into inid? Like the name

Sent from Samsung Galaxy SIV

You can just leave the naming the same, user preference.

Will the phone fiction well with the asleep profile you created on the scary governor?

Sent from my SGH-T989 using xda premium

Yes it will function correctly regardless of Gov selected, all we're doing is ensuring that cpu1 goes to sleep.
 

LoopDoGG79

Senior Member
Feb 26, 2012
6,459
1,347
Modesto, Cali
Keep trying to move to system etc inid but it doesn't stick

Sent from Samsung Galaxy SIV

Worked for me copy to this folder with root explorer (file on bottom )

62ef49e5-cadd-a768.jpg


Then change permissions to this.

62ef49e5-cb15-1ec6.jpg


Sent from AOKP Goodness :-D
 

suaverc118

Senior Member
Mar 19, 2012
7,775
2,332
I have it copied there but how do I set permissions here?? I

Sent from my SGH-T989 using xda premium
 

Attachments

  • uploadfromtaptalk1340918655981.jpg
    uploadfromtaptalk1340918655981.jpg
    42 KB · Views: 2,185

Top Liked Posts

  • There are no posts matching your filters.
  • 143
    App Version:
    CPU Sleeper
    ~Free to all XDA Memebers
    ~ Must Be Rooted to use App

    What is it?
    Its a fairly simple App that will put CPU 1/2/3 OFFLINE when the screen turns off. Once the screen comes back on, it will allow CPU 1/2/3 back ONLINE.

    How does it work?
    Since we have Dual & Quad core CPUs, we have a CPU 0 and a CPU 1/2/3, core 0/1/2/3, while the screen is off we really only need to have 1 core active "CPU0", this App will make sure CPU 1/2/3 shuts off while the screen is off, then resumes normal usage when the screen comes back on.

    Compatibility?
    Works with any Dual Core & Quad Core Devices!
    ~ICS
    ~Gingerbread

    Battery Saving?
    Battery savings all depends on Usage & idle times.

    v2.7
    App Download: CPUSleep.apk

    v2.8 via Market
    CPUSleep.apk
    Version 2.8 Release Notes:
    ~ Fixed GPS Not Locking while App is installed
    ~ GNex Freeze Issue should be Fixed
    ~ JB Compatibility should be fixed regarding Sleep Of Death
    ~ Fix Quad Core Sleep Issue's
    ~ Better Handling of CPU2 & CPU3 on Quad Core's

    Credits:
    Handlerexploit for co-creation of this wonderful App.



    Script Version!
    Code:
    This time I present to you a script that will in theory (and so far for me, in reality) save us some battery without having to risk our hardware with undervolting! I present to you...
    
    [B]CPU Sleeper[/B]
    [QUOTE]Honestly the Script can be made to work with any Dual Core / Quad Core! The Only Problem is you need to be Rooted!  
    ~ Currently the issue with CM9, is that the boot becomes incomplete while in init.d folder without Modification to the sysinit..  
     
    ~ however, with any rooted device you can download the script & continue to use it via a script manager app on every boot.  
     
    ~ With the Script Manager App, this script virtually can run on any Multi-Processor CPU  
     
    Hope that clears things Up,  
    ~~Eugene[/QUOTE]
    
    [U]What is it?[/U]
    Its a fairly simple script that will put CPU 1 OFFLINE when the screen turns off. Once the screen comes back on, it will allow CPU 1 back ONLINE.
    
    [U]How does it work?[/U]
    Since we have dual core CPUs, we have a CPU 0 and a CPU 1, core 1 and core 2, while the screen is off we really only need to have 1 core active, this script will make sure CPU 1 shuts off while the screen is off, then resumes normal usage when the screen comes back on.
    
    [B][COLOR="red"]WARNING! READ THIS![/COLOR][/B]
    This script relies on init.d OR script manager! CM9, for some reason, tends to run this at the exact same time it runs some other script (I forget atm which) and it will clash, causing no boot! CM9 users MUST use the script manager version install! Flex Reaper appears to work fine with it as init.d. I strongly urge you to use the script manager version of this, NOT the flashable version. Always make a nandroid backup before modifying the system, including this!
    
    [U][COLOR="Red"]Instructions[/COLOR][/U]
    Available in 2 versions, script only version which you can place wherever you want and run however you want, or a CWM/TWRP flashable zip that will place the file for you in /system/etc/init.d and set permissions.
    
    [I]Version 1: Flashable[/I]
    Same as any of my flashable releases, I did most of the work for you!
    Make a full backup
    Download to external SD card
    Install from SD card
    Pick the cpu sleeper zip file
    it'll be almost instant
    reboot
    Shouldn't be any need to clear caches or anything like that.
    
    [I]Version 2: Script only[/I]
    This can be run in 2 ways, via init.d support, or via script manager. Both are pretty similar, and can be done a number of ways, however this is the basis of how.
    
    [U]Init.d supported kernel:[/U]
    Make a backup!
    Download the script file, making sure no extensions get added onto the file. Copy the file to /system/etc/init.d and set the permissions to the following:
    XOX
    XOX
    XOX
    Once done, reboot the system, and it will take effect when your system is finished rebooting.
    
    [U]Script Manager[/U]
    This method is probably the better method, and should work with any kernel/ROM. Download the script file, making sure no file extensions get added, and copy it to /system/etc. Set the file permissions to:
    XOX
    XOX
    XOX
    Once done, load up script manager, select browse as root (if it isn't already set from the crossix mod method in the guide) then browse to /system/etc and select the script file S98cpu_sleep, then select ROOT and BOOT options. After this is set, reboot system.
    
    
    [U]What do I do if I can't boot after using this?[/U]
    You made that backup, right? Ok, then here is what you do.
    Hold the power button until the tablet powers off
    Press and hold the volume down button, next to the screen lock switch
    Press and hold Power (while holding volume down)
    Once the recover kernel message comes up, release the buttons
    In CWM go to advanced, mounts, mount system, then format system
    In TWRP, go to wipe, then wipe system
    In CWM go to restore, advanced restore, restore ONLY system
    In TWRP select restore, then uncheck all so ONLY system is checked
    After restoring system, wipe cache and dalvik cache, then reboot system.
    System should boot normally.
    
    
    [B]Downloads[/B]
    Available in 2 versions, script only version which you can place wherever you want and run however you want, or a CWM/TWRP flashable zip that will place the file for you in /system/etc/init.d and set permissions.
    
    Dual Core:
    Download: [COLOR="Red"]Script Only - Recommend Install via Script Manager App[/COLOR]
    [URL="http://d-h.st/N1N"]CPU Sleeper script only[/URL]
    
    Quad Core:
    Download: [COLOR="Red"]Script Only - Recommend Install via Script Manager App[/COLOR]
    [url=http://www66.zippyshare.com/v/9249467/file.html]cpusleep[/url]
    
    [COLOR="Red"]Download: ClockworkMod Recovery .zip for T989 / I727[/COLOR]
    [url=http://www19.zippyshare.com/v/51836824/file.html]CPU_Sleeper.zip[/url]
    
    Thanks to [COLOR="DarkGreen"]pio_masaki[/COLOR] for rewriting the OP
    16
    I'll be posting 2.7 Update tonight free for XDA Members.

    Also, I released v2.8 today:
    Version 2.8 Release Notes:
    ~ Fixed GPS Not Locking while App is installed
    ~ GNex Freeze Issue should be Fixed
    ~ JB Compatibility should be fixed regarding Sleep Of Death
    ~ Fix Quad Core Sleep Issue's
    ~ Better Handling of CPU2 & CPU3 on Quad Core's


    My Goal is to have 2.7 posted with-in the hour!
    ~Eugene
    14
    Okay boys & Girls....

    The new App is complete...

    While Phone is Asleep the Cores are offline & the PID isn't geting killed..

    Also, it's no longer running a Script, but coded into the App it's self to run the commands.

    Start on Reboot is Fixed now & you will need to open Superuser app & turn Off Notification, due to the way the app runs..

    New App Download: CPUSleep.apk

    Superuser > Menu > Preference > unselected Notification

    knFb4.png
    10
    Okay guys, The App is now Posted & will work for every Dual / Quad Core on GB / ICS

    ~Froyo is unverified working...

    Enjoy the App,
    ~Eugene

    Can a Mod Please Move this Thread to App & Theme's
    10
    okay guys, I'll be posting v1.9 shortly & v2.0 will be hitting the market...



    I rewrote the script & now it appears the everything is fixed & working correctly.
    ~ heat Issues while talking on the Phone
    ~ Awake battery drains
    ~ Load Averages Drop now & don't stick to 10 / 11 average
    ~ Lag seems to be gone while answer calls.
    ~ Jumping from Screen Off & Screen On is smoother