Jump to content


Photo

[Guide][How To] Change Default I/o Scheduler & Cpu Governor

I/O Scheduler Scheduler CPU Governor Governor XT912 Droid Razr

  • Please log in to reply
19 replies to this topic

#1 PillClinton

PillClinton

    #FireGaryBettman

  • Members
  • PipPipPip
  • 441 posts
  • Twitter:530SharksFan
  • LocationNorCal

Posted 12 July 2012 - 02:24 PM

If you've ever tried to change your phone's default I/O scheduler and/or CPU Governor but found that the values did not stick after a reboot, hopefully this thread will help you out! With some @$$istance from

Please Login or Register to see this Hidden Content

here on DroidRzr &

Please Login or Register to see this Hidden Content

over at XDA, I have been able to accomplish what I originally set out to do and more. INSERT STANDARD DISCALAIMER HERE:


I'm not responsible for any damage you do to your phone!! Read instructions carefully!


Thanks to:

Please Login or Register to see this Hidden Content

for the guidance & good conversation.

Please Login or Register to see this Hidden Content

for the original thread on XDA & putting in the work & tweak time to make the extra governors/schedulers work on our Razrs!

Please Login or Register to see this Hidden Content

for the great writeup on governors/schedulers.

Before doing anything, if you'd like some background information on what governors & schedulers are, what they do, & which ones are available for our Razrs,

Please Login or Register to see this Hidden Content

.

To install additional some extra kernel modules, CPU governors, and I/O schedulers, read all directions and the rest of the thread carefully, make a backup, then flash both files from this post:

Please Login or Register to see this Hidden Content



Once you have successfully installed everything, to enable your choice of governors and schedulers to boot up as the defaults, follow these steps:

1.) Open up Notepad/

Please Login or Register to see this Hidden Content

or something similar

2.) Copy & paste the following into a new document:

insmod /system/lib/modules/symsearch.ko
insmod /system/lib/modules/cpufreq_pegasusq.ko
echo "pegasusq" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "sio" > /sys/block/mmcblk0/queue/scheduler


3.) Go to "Save As" and choose whatever name you want for the file.
4.) Under the "Save As Type" dropdown menu in Notepad, change from a text document (.TXT) and select "All Files". Using

Please Login or Register to see this Hidden Content

, under the "Save As Type" choose unspecified file type.

5.) Before you click save, make sure your file name ends with .sh (ie: GovSched.sh)
6.) Place the file you've just created on your INTERNAL SD CARD - It won't work if run from the SD-EXT!!
7.) If you don't already have a copy of

Please Login or Register to see this Hidden Content

downloaded (or some other app to run scripts) go download it from the

Please Login or Register to see this Hidden Content

.

8.) Using Script Manager: Menu -> Browser -> locate and select the script you created & open it as a Script/Executable
8.) Enable Superuser permission for the script and set it to run at boot. Click save.
9.) Reboot
10.) Profit!

To verify your settings worked correctly, use SetCPU, Rom Toolbox or the like.



I used the pegasusq governor & the SIO scheduler - this has given ME the best battery life. Depending on your own usage patterns, your mileage may vary. If you want to use something different, just edit the parts of the script I highlighted in red so that it reflects your choice of governor/scheduler.


Post in this thread if it worked for you, and if you found this useful, please hit the LIKE button!
  • cynnar, chiahead52, disturbed58 and 3 others like this

#2 Groundhound

Groundhound

    Member

  • Dedicated Supporter
  • PipPip
  • 132 posts

Posted 12 July 2012 - 02:35 PM

SetCPU
  • ibolski likes this

#3 FcHsChilD

FcHsChilD

    Member

  • Members
  • PipPip
  • 86 posts
  • LocationWellington

Posted 12 July 2012 - 02:37 PM

SetCPU

+1

Sent from my DROID RAZR using Tapatalk 2

#4 Memnoch73

Memnoch73

    ~The Devil~

  • Smod
  • 5,016 posts
  • Google+:memnoch73@gmail.com
  • LocationRochester, NY
  • Current Device(s):Pixel 3XL

Posted 12 July 2012 - 02:44 PM

Just stating the obvious but are you checking the apply on boot box??

Bluesig3_zpsfd248ca4.png

 


#5 PillClinton

PillClinton

    #FireGaryBettman

  • Members
  • PipPipPip
  • 441 posts
  • Twitter:530SharksFan
  • LocationNorCal

Posted 12 July 2012 - 03:00 PM

SetCPU


I'd prefer not to add another app if possible. Isn't there a file or a value in build.prop somewhere else that I can change?


Just stating the obvious but are you checking the apply on boot box??


Yes, definitely.

#6 disturbed58

disturbed58

    Member

  • Members
  • PipPip
  • 55 posts
  • LocationLancaster, PA

Posted 12 July 2012 - 03:30 PM

Is it possible to change the default I/O scheduler used by the system in a way that it sticks after rebooting? I've tried using Rom Toolbox but the values don't hold for me after a reboot. The same goes for the CPU governor. I'd like to set the values to noop for the scheduler & hotplug for the governor. Upon rebooting however, the values always return to deadline for the scheduler & interactive for the governor. Any tips?

I'm running the .211 OTA file & the .214 kernel I added with Matt's utility for my non-safe side. I'm running Eclipse 1.1 on my safe side. Also running the v6 Supercharger script, I'm wondering if it is because of something in that?


I have done it with a script through script manager, since you are running V6 I'm assuming you have script manager already.

Can you notice a difference with the v6 supercharger? It made a difference on my OG Droid, I wasn't sure if it would be noticeable with the Razr.

#7 PillClinton

PillClinton

    #FireGaryBettman

  • Members
  • PipPipPip
  • 441 posts
  • Twitter:530SharksFan
  • LocationNorCal

Posted 12 July 2012 - 08:17 PM

I have done it with a script through script manager, since you are running V6 I'm assuming you have script manager already.


Yes, I do have Script Manager, which script did you run for that? Do you have a copy you could share or link to?

I think the v6 Supercharger helps a bit with some of the launcher homescreen redraws. They happen less frequently since running that, and I use Apex Launcher Pro.

#8 JMSexton

JMSexton

    Member

  • Members
  • PipPip
  • 59 posts
  • Twitter:JarrettSexton
  • LocationMD/PA

Posted 12 July 2012 - 09:09 PM

I was going to ask about V6 too. I had it on my DX and could most definitely tell a difference, but wasn't sure if it would work, or work correctly, with the Razr Maxx....

Thanks!

Sent telepathically from my Droid X... I mean Razr Maxx

#9 disturbed58

disturbed58

    Member

  • Members
  • PipPip
  • 55 posts
  • LocationLancaster, PA

Posted 13 July 2012 - 05:03 AM

Yes, I do have Script Manager, which script did you run for that? Do you have a copy you could share or link to?

I think the v6 Supercharger helps a bit with some of the launcher homescreen redraws. They happen less frequently since running that, and I use Apex Launcher Pro.


It's possible that the v6 may be setting the but I haven't looked into it.

I use a script to load the extra kernel modules and io scheduler, check out post 2 in the thread

Please Login or Register to see this Hidden Content

. If you have any existing scripts running at boot you could just add the lines to it. I'm just learning scripts myself so I am no expert.

Adding these lines to a script running at boot should work
echo "hotplug" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

echo "noop" > /sys/block/mmcblk0/queue/scheduler

#10 PillClinton

PillClinton

    #FireGaryBettman

  • Members
  • PipPipPip
  • 441 posts
  • Twitter:530SharksFan
  • LocationNorCal

Posted 14 July 2012 - 10:06 AM

It's possible that the v6 may be setting the but I haven't looked into it.

I use a script to load the extra kernel modules and io scheduler, check out post 2 in the thread

Please Login or Register to see this Hidden Content

. If you have any existing scripts running at boot you could just add the lines to it. I'm just learning scripts myself so I am no expert.

Adding these lines to a script running at boot should work
echo "hotplug" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

echo "noop" > /sys/block/mmcblk0/queue/scheduler


Thanks for the suggestions! I'm trying out the extra kernel modules you linked to now. I'll let you know how it goes!

#11 PillClinton

PillClinton

    #FireGaryBettman

  • Members
  • PipPipPip
  • 441 posts
  • Twitter:530SharksFan
  • LocationNorCal

Posted 14 July 2012 - 10:33 AM

I use a script to load the extra kernel modules and io scheduler, check out post 2 in the thread

Please Login or Register to see this Hidden Content

. If you have any existing scripts running at boot you could just add the lines to it. I'm just learning scripts myself so I am no expert.


I installed the script & verified all of the new kernel/scheduler modules are present on my system. I selected new governor/scheduler in Rom Toolbox, but the values still don't stick after a reboot. I tried making an Init.D script to run on boot and got errors. I'm not sure what I'm doing wrong? Any tips?

Edit: Not really sure what to do with the scripts. I used the flashable zips to install everything. There are additional scripts present in init.d now, am I supposed to edit 1 of those or create a new one?

#12 garywojdan81

garywojdan81

    Droid Master

  • Members
  • PipPipPip
  • 633 posts
  • Twitter:gwojdan_81

Posted 14 July 2012 - 04:44 PM

I installed the script & verified all of the new kernel/scheduler modules are present on my system. I selected new governor/scheduler in Rom Toolbox, but the values still don't stick after a reboot. I tried making an Init.D script to run on boot and got errors. I'm not sure what I'm doing wrong? Any tips?

Edit: Not really sure what to do with the scripts. I used the flashable zips to install everything. There are additional scripts present in init.d now, am I supposed to edit 1 of those or create a new one?

Have you set permissions on the init.d scripts to make them executable? The only way I can ever get them to stick is to give them complete permission.

Sent from my XT912 using Tapatalk 2

#13 PillClinton

PillClinton

    #FireGaryBettman

  • Members
  • PipPipPip
  • 441 posts
  • Twitter:530SharksFan
  • LocationNorCal

Posted 16 July 2012 - 08:44 PM

SUCCESS! With some assistance from

Please Login or Register to see this Hidden Content

here on DroidRzr &

Please Login or Register to see this Hidden Content

over at XDA, I have been able to accomplish what I originally set out to do and more. I edited the original thread title & the OP to clarify with extra directions. Hopefully some others will find this useful!

#14 PillClinton

PillClinton

    #FireGaryBettman

  • Members
  • PipPipPip
  • 441 posts
  • Twitter:530SharksFan
  • LocationNorCal

Posted 25 July 2012 - 07:11 PM

Edited the OP to reflect my current setup.

#15 disturbed58

disturbed58

    Member

  • Members
  • PipPip
  • 55 posts
  • LocationLancaster, PA

Posted 08 August 2012 - 08:54 AM

Here are some additional tweaks for the Pegasusq governor. I tried the "Relaxed" settings and haven't noticed at difference in performance, but did notice better battery life when not using the phone.

Please Login or Register to see this Hidden Content



#16 smeekteek

smeekteek

    Member

  • Members
  • PipPip
  • 224 posts
  • Current Device(s):Droid Razr Maxx HD

Posted 14 August 2012 - 10:03 AM

Is there a guide somewhere that shows how to install the governors and schedulers?

#17 smeekteek

smeekteek

    Member

  • Members
  • PipPip
  • 224 posts
  • Current Device(s):Droid Razr Maxx HD

Posted 15 August 2012 - 05:31 AM

Bueller...Bueller...

#18 BigJArm

BigJArm

    Member

  • Developer
  • 212 posts
  • LocationIdaho
  • Current Device(s):Droid RAZR; Nexus 10

Posted 15 August 2012 - 11:12 AM

Is there a guide somewhere that shows how to install the governors and schedulers?


It's in the overclocking threads. It's pretty easy.

Sent from my DROID RAZR using Tapatalk 2

#19 disturbed58

disturbed58

    Member

  • Members
  • PipPip
  • 55 posts
  • LocationLancaster, PA

Posted 16 August 2012 - 01:39 PM

Is there a guide somewhere that shows how to install the governors and schedulers?


There is a link in the OP on how to install them.

#20 Maxxaholic

Maxxaholic

    Droid Master

  • Members
  • PipPipPip
  • 628 posts
  • LocationWashington, USA

Posted 23 August 2012 - 09:23 PM

IT WORKS! Thank you for this write up! Very helpful. I'm a n00b though what does that script do exactly? I can see all the governors in my SetCPU app. Do I have to change the script if I ever decide to use a different governor?





Also tagged with one or more of these keywords: I/O Scheduler, Scheduler, CPU Governor, Governor, XT912, Droid Razr

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users