Jump to content


Photo

Kernel Tweaks For Battery Life/performance

kernel battery life

  • Please log in to reply
124 replies to this topic

#1 BytecodeMe

BytecodeMe

    Private Pile

  • Superuser
  • 2,004 posts
  • Twitter:@BytecodeMe
  • LocationSan Diego, California
  • Current Device(s):Nexus 4, Droid Razr Maxx HD

Posted 20 June 2012 - 02:21 PM

*
POPULAR

Okay guys, I made some kernel tweaks that work on any ROM, and on the ROMs I have tried, improve battery life/performance.
ONLY THE PERFORMANCE SCRIPT WILL IMPROVE QUADRANT SCORES! You will see an increase in response time and snappiness.

THESE SCRIPTS WILL BE UPDATED FREQUENTLY!
Last update 7/11
NOTE: Run one script or the other, running both will cause issues in what values get applied.

Latest update notes: Battery life should be beautifully improved with dirty data tweaks for days!



Prerequisites:
Have root access
An app that can run scripts on boot, like Script Manger,located here:

Please Login or Register to see this Hidden Content



INSTRUCTIONS:
If using Script Manager:
1. Navigate to file.
2.Open as Script/Executable.
3.Set it to run at boot and as Superuser.(SU)
4. Reboot.
Make sure it looks like this:

Please Login or Register to see this Hidden Content

 

Please Login or Register to see this Hidden Content

  102.46KB   257 downloads

If using ROM Toolbox:
1. Select "Scripter"
2.Select new script
3. Copy and paste script into Scripter
4. Select "At Boot"
5. Reboot
Make sure it looks like this:

Please Login or Register to see this Hidden Content

 

Please Login or Register to see this Hidden Content

  146.57KB   382 downloads


Battery Saver script now in KOA AOKP!

Battery Stats:

Please Login or Register to see this Hidden Content

 

Please Login or Register to see this Hidden Content

  150.7KB   440 downloads

Please Login or Register to see this Hidden Content

 

Please Login or Register to see this Hidden Content

  140.51KB   304 downloads



Please Login or Register to see this Hidden Content




I HIGHLY RECOMMEND GETTING THE SIO I/O SCHEDULER AND THE HOTPLUGX GOVERNOR FROM THIS THREAD:

Please Login or Register to see this Hidden Content



Kernel Tweaks for Performance!
Latest update notes: Latest update notes: enabled ZRAM(compressed RAM), loads SIO I/O if available, also loads the hotplugx governor and SIO on boot. Ups read and write speeds all around, file system speedups, enables multi threading, tweaks to the hotplug and hotplugx governor, and more. You might get random reboots using this script, you might only get a coupke and then they will stop or they'll never stop. Inform me if you consistent random reboots.


Thanks to zeppelinrox for the minfree and adj values.

Please Login or Register to see this Hidden Content


Thanks to whirleyes for the kernel modules.

Please Login or Register to see this Hidden Content




Please Login or Register to see this Hidden Content




You will definitely see an increase in snappiness/response when running this on boot.

Thank you to PureMotive for kernel tweaks to make compatible with this phone, and this thread by him

Please Login or Register to see this Hidden Content



If you can, please donate:

Please Login or Register to see this Hidden Content



Or at least leave me a like. Over here >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

  • Bmplekan, mattlgroff, Nubia1 and 22 others like this

byte3plusrainbowsmallllllllller.png


#2 mikeramos90

mikeramos90

    n00b

  • Members
  • Pip
  • 17 posts

Posted 20 June 2012 - 02:29 PM

will this work on GB?

#3 BytecodeMe

BytecodeMe

    Private Pile

  • Superuser
  • 2,004 posts
  • Twitter:@BytecodeMe
  • LocationSan Diego, California
  • Current Device(s):Nexus 4, Droid Razr Maxx HD

Posted 20 June 2012 - 02:30 PM

I don't know as I'm on an ICS leak. You can try, and if my values are in place, then it works. If not, there is no easy way to make it compatible with GB, as I don't have the file paths.

byte3plusrainbowsmallllllllller.png


#4 HouseMD

HouseMD

    Vicodin Addict

  • Superuser
  • 294 posts
  • Twitter:DSLRVideoGuy
  • LocationCharlotte, NC

Posted 20 June 2012 - 02:31 PM

Will test tomorrow morning with 100% batt on the Razr Maxx. Will report back on this post later.

Posted Image

If you feel the need to buy me a beer, or help pay my bills, here's the link:http://bit.ly/O4ZnLW


#5 BytecodeMe

BytecodeMe

    Private Pile

  • Superuser
  • 2,004 posts
  • Twitter:@BytecodeMe
  • LocationSan Diego, California
  • Current Device(s):Nexus 4, Droid Razr Maxx HD

Posted 20 June 2012 - 02:33 PM

Thanks, for giving this a try, when I get my battery stats at the end of tomorrow(flashed a new ROM,the first battery cycle is terrible)
I'll post it in the OP for some assurance that it works. :)

byte3plusrainbowsmallllllllller.png


#6 fastfoodfred

fastfoodfred

    Member

  • Members
  • PipPip
  • 172 posts

Posted 20 June 2012 - 08:10 PM

is 'running this at boot' the same as using safestrap and flashing?

#7 BytecodeMe

BytecodeMe

    Private Pile

  • Superuser
  • 2,004 posts
  • Twitter:@BytecodeMe
  • LocationSan Diego, California
  • Current Device(s):Nexus 4, Droid Razr Maxx HD

Posted 20 June 2012 - 08:55 PM

No, this is not a flashable zip. You have to use an app like ROM Toolbox Pro or Script Manager to run this script on boot.

byte3plusrainbowsmallllllllller.png


#8 chuck24

chuck24

    Member

  • Members
  • PipPip
  • 42 posts

Posted 20 June 2012 - 09:29 PM

Download link?

Sent from my DROID RAZR using Tapatalk 2

#9 BytecodeMe

BytecodeMe

    Private Pile

  • Superuser
  • 2,004 posts
  • Twitter:@BytecodeMe
  • LocationSan Diego, California
  • Current Device(s):Nexus 4, Droid Razr Maxx HD

Posted 20 June 2012 - 09:32 PM

Download link?

Sent from my DROID RAZR using Tapatalk 2


It's in the OP, but here:

Please Login or Register to see this Hidden Content


byte3plusrainbowsmallllllllller.png


#10 chuck24

chuck24

    Member

  • Members
  • PipPip
  • 42 posts

Posted 20 June 2012 - 09:40 PM

Sorry... I'm on my phone and didn't see it.

Sent from my DROID RAZR using Tapatalk 2

#11 chuck24

chuck24

    Member

  • Members
  • PipPip
  • 42 posts

Posted 20 June 2012 - 09:49 PM

So i get this error while trying to run this. Any ideas?

Sent from my DROID RAZR using Tapatalk 2

Attached Files



#12 trikotret

trikotret

    Droid Elite

  • Members
  • PipPipPipPip
  • 1,461 posts
  • Current Device(s):Droid Razr HD

Posted 20 June 2012 - 09:51 PM

Anyway to check if script worked

Sent from my DROID RAZR using Tapatalk 2

#13 BytecodeMe

BytecodeMe

    Private Pile

  • Superuser
  • 2,004 posts
  • Twitter:@BytecodeMe
  • LocationSan Diego, California
  • Current Device(s):Nexus 4, Droid Razr Maxx HD

Posted 20 June 2012 - 09:56 PM

So i get this error while trying to run this. Any ideas?

Sent from my DROID RAZR using Tapatalk 2

It's because it has to be run on boot or shortly after boot. None of the values will take if you run it in mid session.

Anyway to check if script worked

Sent from my DROID RAZR using Tapatalk 2


You can try going into /sys/proc/vm/dirty_ratio and see if the value is at 90, or try checking any other value and see if it matches up with a script value.

SCRIPT NEWLY UPDATED,LOOK IN THE OP!

byte3plusrainbowsmallllllllller.png


#14 BytecodeMe

BytecodeMe

    Private Pile

  • Superuser
  • 2,004 posts
  • Twitter:@BytecodeMe
  • LocationSan Diego, California
  • Current Device(s):Nexus 4, Droid Razr Maxx HD

Posted 21 June 2012 - 07:00 PM

OP updated with new battery saving script and new script for performance!
Enjoy! :)

byte3plusrainbowsmallllllllller.png


#15 trikotret

trikotret

    Droid Elite

  • Members
  • PipPipPipPip
  • 1,461 posts
  • Current Device(s):Droid Razr HD

Posted 21 June 2012 - 07:03 PM

OP updated with new battery saving script and new script for performance!
Enjoy! :)



awesome. can u tell us noobs how to run this baby

#16 BytecodeMe

BytecodeMe

    Private Pile

  • Superuser
  • 2,004 posts
  • Twitter:@BytecodeMe
  • LocationSan Diego, California
  • Current Device(s):Nexus 4, Droid Razr Maxx HD

Posted 21 June 2012 - 07:16 PM

If using Script Manager:
1. Navigate to file.
2.Open as Script/Executable.
3.Set it to run at boot and as Superuser.(SU)
4. Reboot.

If using ROM Toolbox:
1. Select "Scripter"
2.Select new script
3. Copy and paste script into Scripter
4. Select "At Boot"
5. Reboot

Instruction added to the OP.
  • trikotret likes this

byte3plusrainbowsmallllllllller.png


#17 trikotret

trikotret

    Droid Elite

  • Members
  • PipPipPipPip
  • 1,461 posts
  • Current Device(s):Droid Razr HD

Posted 21 June 2012 - 07:18 PM

so run both files you have there

#18 BytecodeMe

BytecodeMe

    Private Pile

  • Superuser
  • 2,004 posts
  • Twitter:@BytecodeMe
  • LocationSan Diego, California
  • Current Device(s):Nexus 4, Droid Razr Maxx HD

Posted 21 June 2012 - 07:26 PM

No, they contradict each other in values. Run on or the other, do you want performance or battery life? Select one or the other based off what you said. :)
Also added to the OP. :)
  • trikotret likes this

byte3plusrainbowsmallllllllller.png


#19 trikotret

trikotret

    Droid Elite

  • Members
  • PipPipPipPip
  • 1,461 posts
  • Current Device(s):Droid Razr HD

Posted 21 June 2012 - 07:28 PM

No, they contradict each other in values. Run on or the other, do you want performance or battery life? Select one or the other based off what you said. :)
Also added to the OP. :)


I am greedy. I like to have both :lol:
  • BytecodeMe likes this

#20 BytecodeMe

BytecodeMe

    Private Pile

  • Superuser
  • 2,004 posts
  • Twitter:@BytecodeMe
  • LocationSan Diego, California
  • Current Device(s):Nexus 4, Droid Razr Maxx HD

Posted 21 June 2012 - 07:32 PM

I'll make a balanced one, in a couple of days then. But in all honesty, the performance script is pretty balanced. Not as good as it could be but, if you're undecided, I recommend the performance script. ;)

byte3plusrainbowsmallllllllller.png






Also tagged with one or more of these keywords: kernel, battery life

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users