I search in forum and write script
Code:
#!/system/bin/sh
echo '122880 800' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '245760 800' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '368640 800' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '460800 850' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '576000 850' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '652800 900' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '768000 900' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '806400 950' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '921600 950' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1024000 1000' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1113000 1050' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1209600 1050' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1305600 1100' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1401600 1150' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1516800 1200' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1612800 1250' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1708800 1300' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1804800 1350' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo 122880 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 1401600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "ondemandx" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
When I put it in init.d folder, set permissions, it not working! When I paste text in terminal emulator, all works.
What I do wrong? Searching forum and reading another threads not help!
Kernel - Alliance 1.1 kernel full, ROM - Spacious, smooth and light ICS
This is ready posted, search better mate
Sent from my Neo V with Supercharged ICS 4.0.4
Pandemic said:
This is ready posted, search better mate
Sent from my Neo V with Supercharged ICS 4.0.4
Click to expand...
Click to collapse
If I can find solution, I will not ask! Here is many posted how to do, but I can't find, why it not working for me!
Solved!
In notepad++ rewrite all spaces, all works now!
emm, may i know, i wrote a script file
#!/system/bin/sh
echo '1024000' > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo '1024000' > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
and saved it as ScalingCPU, then copy it to init.d folder. then, i set the permission: ticked all 9 columns.
is that so?
Related
What do you guys think of my voltages ? Please opinions required
#!/system/bin/sh
echo '122880 750' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '245760 800' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '368640 800' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '460800 850' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '576000 850' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '652800 850' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '768000 900' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '806400 900' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '921600 900' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1024000 950' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1113000 1000' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1209600 1050' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1305600 1100' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1401600 1100' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1516800 1150' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1612800 1200' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo 122880 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 1612800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Thanks!
Sent from my MT15i using xda premium
How so you use this? Which app do you use to control cpu and volts?
Hi There!!
Im Using [ROM][Mini/Mini Pro/Active/LwW]MiniCMSandwich Lite AOSP by Kamarush and I am really good with this now.
Problem is I dont want to use such too as SetXperia to Manage CPU, Voltage and I/O Scheduler.
So I am looking for some Init.d Scripts managing this. Has anyone out there got some helpful hints?!
Thx and Have a nice Day!
BlechMann said:
Hi There!!
Im Using [ROM][Mini/Mini Pro/Active/LwW]MiniCMSandwich Lite AOSP by Kamarush and I am really good with this now.
Problem is I dont want to use such too as SetXperia to Manage CPU, Voltage and I/O Scheduler.
So I am looking for some Init.d Scripts managing this. Has anyone out there got some helpful hints?!
Thx and Have a nice Day!
Click to expand...
Click to collapse
# I/O scheduler
echo "sio" > /sys/block/mmcblk0/queue/scheduler;
# Governor
echo "smartassV2" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;
# Max
echo "1401600" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
# Min
echo "245760" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
define frequencies of cpu, i/o and governor of your choice
Thank you man!!!!
So. What about the CPU Voltage - is there any way to undervolt by init.d - and is there any sense in it for getting more out of battery???!
Also I wonder how to manage swap file by init.d and what will I get out of it.
Sorry for the bad english!
Bye,
BlechMann
BlechMann said:
Thank you man!!!!
So. What about the CPU Voltage - is there any way to undervolt by init.d - and is there any sense in it for getting more out of battery???!
Also I wonder how to manage swap file by init.d and what will I get out of it.
Sorry for the bad english!
Bye,
BlechMann
Click to expand...
Click to collapse
From this table you can make your settings UNDERVOLT/overclock
note the frequency table used in the kernel
I do not use swap
Code:
echo "smartassV2" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "1401600" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "245760" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "122880 900" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "245760 900" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "368640 900" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "460800 950" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "576000 1000" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "652800 1050" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "768000 1050" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "806400 1100" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "921600 1150" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1024000 1200" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1113000 1200" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1200000 1200" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1305600 1250" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1401600 1250" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1516800 1300" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1612800 1300" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1708800 1350" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1804800 1400" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1900800 1475" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "2016000 1475" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
Thanks!! You re the man!!!
Is there a good way to read out system stats and check if everything is working fine?!!
An app???
Hi again!
So... new Try, new Problem.
I've set up the following:
In dir "/system/etc/init.d" ive put three files.
- 1CpuControl
- IOSchedulers
- 97tweaks (this one was there by default in kamarush's ROM)
1CpuControl:
#!/system/bin/sh
echo "smartassV2" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "806400" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "245760" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "122880 850" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "245760 850" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "368640 850" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "460800 900" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "576000 950" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "652800 1000" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "768000 1000" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "806400 1050" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "921600 1100" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1024000 1150" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1113000 1150" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1200000 1150" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1305600 1200" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1401600 1200" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1516800 1250" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1612800 1250" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1708800 1300" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1804800 1350" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1900800 1400" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "2016000 1400" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
2IOSchedulers
#!/system/bin/sh
echo "sio" > /sys/block/mmcblk0/queue/scheduler
In 97tweaks i just deleted the governer setting
Then rebooted and used the setxperia app to read out the System Information.
The Voltagetable is set correctly and the scaling_max_freq and scaling_min_freq are set correctly.
But the Governer still is set to OnDemand and I/O-Scheduler is still set to deadline
Anyone knows what went wrong?!
The Scripts are exactly set as posted above... Maybe the xperia tool is not able to read out the settings correctly???
Bye!!
BlechMann said:
Hi again!
So... new Try, new Problem.
I've set up the following:
In dir "/system/etc/init.d" ive put three files.
- 1CpuControl
- IOSchedulers
- 97tweaks (this one was there by default in kamarush's ROM)
1CpuControl:
#!/system/bin/sh
echo "smartassV2" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "806400" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "245760" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "122880 850" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "245760 850" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "368640 850" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "460800 900" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "576000 950" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "652800 1000" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "768000 1000" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "806400 1050" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "921600 1100" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1024000 1150" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1113000 1150" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1200000 1150" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1305600 1200" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1401600 1200" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1516800 1250" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1612800 1250" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1708800 1300" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1804800 1350" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1900800 1400" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "2016000 1400" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
2IOSchedulers
#!/system/bin/sh
echo "sio" > /sys/block/mmcblk0/queue/scheduler
In 97tweaks i just deleted the governer setting
Then rebooted and used the setxperia app to read out the System Information.
The Voltagetable is set correctly and the scaling_max_freq and scaling_min_freq are set correctly.
But the Governer still is set to OnDemand and I/O-Scheduler is still set to deadline
Anyone knows what went wrong?!
The Scripts are exactly set as posted above... Maybe the xperia tool is not able to read out the settings correctly???
Bye!!
Click to expand...
Click to collapse
Probably kernel doesn't have those governors and schedulers then, if these are not set.
Which kernel you have, the first or 2nd one?
Hi and thx 4 answering!
The 2nd one => "boot_mango_v2_lite.img"
With SetXperia App i can set "sio" and "smartassV2" successfully- so I think it must be possible... btw: do u know another app to read out the system stats???
What kernel are you using?
Bye
Nofrills Cpu control can also see that info.
Sent from my Xperia Live using xda premium.
Thank you!
NoFrills set up everything without any probs
really wanna know what the hell is wrong with my scripts.
Nah, but thank you anyway man!
BlechMann said:
Thank you!
NoFrills set up everything without any probs
really wanna know what the hell is wrong with my scripts.
Nah, but thank you anyway man!
Click to expand...
Click to collapse
check the script path using root explorer and see if it is compatible
spaces at the beginning and end of the script may cause errors
use notepad + + for editing
Ok.
Since there are no errors in the script itself it must be a lack of compatiblity
I've just copy&pasted them from the web and edited all spaces on phone with total commander. Maybe there is some error. But I kept thinking some string is not correct, because the voltage and min/max-freq were ok.
Thanks for help!
Bye!
Hi.
I have troubles with overclocking/undervolting my xperia mini pro (SK17i)
I use KRsH Kernel v3.0 ICS
for overclocking/undervolting i use System Tuner
I have problems with 768mhz frequency - my phone freezes even when I set much more voltage than on higher frequency step.
So I tryed to disable 768mhz from scaling frequencies. But executing the following script ends with error, no permission to execute the command to change available scaling frequencies.
is there any way to disable the 768mhz from available scaling frequencies?
Any help would be greatly appreciated.
Note: all frequencies besides 768mhz are stable.
Code:
#!/system/bin/sh
if [ -e /data/local/cpu_protection ] ; then
echo failed > /data/local/cpu_failed
chmod 777 /data/local/cpu_failed
exit
fi
echo "134400 184320 249600 364800 460800 576000 652800 806400 921600 1017600 1113600 1209600 1305600 1401600 1516800 1612800 1708800 1804800" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
echo applied > /data/local/cpu_protection
chmod 777 /data/local/cpu_protection
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "1708800" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "134400" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
#! 750 750 750 750 750 850 850 850 950 875 925 950 1000 1025 1075 1125 1200 1250 1300 1375 1425 1500
echo "134400 750" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "184320 750" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "192000 750" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "249600 750" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "364800 750" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "460800 850" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "576000 850" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "652800 850" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "768000 950" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "806400 875" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "921600 925" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1017600 950" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1113600 1000" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1209600 1025" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1305600 1075" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1401600 1125" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1516800 1200" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1612800 1250" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1708800 1300" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1804800 1375" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1900800 1425" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "2016000 1500" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
Come on guys, is here single soul able to help?
Perhaps problem with kernel. I recommend rage kernel.
Sent from my WT19i using xda app-developers app
Hmm, this is very strange,
I use for testing Stability test 2.5 and if i during scaling testing press home and launch GPS Time 0.6.3 my phone crashes after couple seconds, no matter what voltage or scaling frequencies I select.
Could anyone please test this app combination on his own phone?
Thanks in advance.
I am using this setting.
echo "0,1,4,6,13,15" > /sys/module/lowmemorykiller/parameters/adj
echo "4000,5000,6000,10000,15000,20000" > /sys/module/lowmemorykiller/parameters/minfree
I see other members using 1000,2000,... or lower for minfree.
If I use my value for my neo, firefox closes when I load some image heavy page.
If I use lower value for my neo, it reboots in the same situation.
It is pretty strange. Please give some advises.
p.s. my vm.min_free_kbytes is 4096, related?
For stable use system use and low battery drain
echo 0 > /proc/sys/vm/oom_kill_allocating_task
echo 1 > /proc/sys/vm/vfs_cache_pressure
echo 95 > /proc/sys/vm/dirty_ratio
echo 80 > /proc/sys/vm/dirty_background_ratio
echo 0 > /proc/sys/vm/block_dump
echo 1 > /proc/sys/vm/overcommit_memory
echo 80 > /proc/sys/vm/overcommit_ratio
echo 3 > /proc/sys/vm/page-cluster
echo 0 > /proc/sys/vm/panic_on_oom
echo 0 > /proc/sys/vm/dirty_expire_centisecs
echo 0 > /proc/sys/vm/dirty_writeback_centisecs
echo "10" > /proc/sys/fs/lease-break-time
echo 3 > /proc/sys/vm/drop_caches
Click to expand...
Click to collapse
for performance
echo 1 > /proc/sys/vm/oom_kill_allocating_task
echo 100 > /proc/sys/vm/vfs_cache_pressure
echo 10 > /proc/sys/vm/dirty_ratio
echo 4 > /proc/sys/vm/dirty_background_ratio
echo 0 > /proc/sys/vm/block_dump
echo 1 > /proc/sys/vm/overcommit_memory
echo 100 > /proc/sys/vm/overcommit_ratio
echo 3 > /proc/sys/vm/page-cluster
echo 0 > /proc/sys/vm/panic_on_oom
echo 3000 > /proc/sys/vm/dirty_expire_centisecs
echo 1000 > /proc/sys/vm/dirty_writeback_centisecs
echo "10" > /proc/sys/fs/lease-break-time
echo 3 > /proc/sys/vm/drop_caches
echo "256,512,4096,11120,25360,33300" > /sys/module/lowmemorykiller/parameters/minfree
Click to expand...
Click to collapse
you can copy this to file without extention end run into terminal/shell exec sh path_to_your_file
try this and give me a feedback. On rom i use it's give a very good scores
invidian1 said:
For stable use system use and low battery drain
for performance
you can copy this to file without extention end run into terminal/shell exec sh path_to_your_file
try this and give me a feedback. On rom i use it's give a very good scores
Click to expand...
Click to collapse
Can we make a file and put this init.d folder??
Sent from my MT11i using xda premium
vishal_android freak said:
Can we make a file and put this init.d folder??
Sent from my MT11i using xda premium
Click to expand...
Click to collapse
Of course, plese I added smartassv2 setting to this scripts too. But they will not work if you didn't choose smartassv2 as Your Governor. Delete ".txt" and push one of them to init.d folder.
Q&A for [BOTH][SCRIPT] Make it Last/Speed it UP!
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [BOTH][SCRIPT] Make it Last/Speed it UP!. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
Battery life script is not working
BytecodeMe said:
Okay guys, I made some kernel tweaks that work on any ROM, and on the ROMs I have tried, improve battery life/performance.
THE BATTERY SAVER SCRIPT WILL NOT IMPROVE QUADRANT SCORES!
THIS SCRIPT WILL BE UPDATED FREQUENTLY!
Last update 7/11
Latest update notes: Focused more on battery life.
Battery stats on Liquid Smooth 1.5 with script:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Prerequisites:
Have root access
An app that can run scripts on boot, like Script Manger, located here:
https://play.google....ptmanager&hl=en
INSTRUCTIONS:
If using Script Manager:
1. Navigate to file.
2.Open as Script/Executable.
3.Set it to run at boot and as SU.
4.Save
5. 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
Make it Last script:
Code:
#!/system/bin/sh
echo "500,512000,64,2048" > /proc/sys/kernel/sem
echo "3072" > /proc/sys/kernel/msgmni
echo "74000" > /proc/sys/kernel/msgmax
echo "3072" > /proc/sys/kernel/shmmni
echo "2268435456" > /proc/sys/kernel/shmmax
echo "16777216" > /proc/sys/kernel/shmall
echo "400000" > /proc/sys/kernel/sched_min_granularity_ns
echo "256" > /proc/sys/kernel/random/write_wakeup_threshold
echo "256" > /proc/sys/kernel/random/read_wakeup_threshold
echo "5" > /proc/sys/kernel/panic
echo "575810" > /proc/sys/kernel/threads-max
echo "1" > /proc/sys/kernel/panic_on_oops
echo "25" > /proc/sys/kernel/hung_task_timeout_secs
echo "600000" > /proc/sys/kernel/sched_latency_ns
echo "2000000" > /proc/sys/kernel/sched_wakeup_granularity_ns
echo "1" > /proc/sys/kernel/sched_compat_yield
echo "0" > /proc/sys/kernel/sched_child_runs_first
echo "0" > /proc/sys/kernel/hung_task_timeout_secs
echo "0" > /proc/sys/vm/oom_kill_allocating_task
#end of /kernel , start of /fs
echo "10240" > /proc/sys/fs/inotify/max_user_watches
echo "256" > /proc/sys/fs/inotify/max_user_instances
echo "32000" > /proc/sys/fs/inotify/max_queued_events
echo "15" > /proc/sys/fs/lease-break-time
echo "165164" > /proc/sys/fs/file-max
echo "1053696" > /proc/sys/fs/nr_open
#end of /fs, start of /vm
echo "0" > /proc/sys/vm/oom_kill_allocating_task
echo "4" > /proc/sys/vm/min_free_order_shift
echo "1" > /proc/sys/vm/overcommit_memory
echo "2" > /proc/sys/vm/panic_on_oom
echo "8" > /proc/sys/vm/page-cluster
echo "3" > /proc/sys/vm/drop_caches
echo "0" > /proc/sys/vm/oom_kill_allocating_task
echo "2048" > /proc/sys/vm/min_free_kbytes
echo "20" > /proc/sys/vm/vfs_cache_pressure
echo "80" > /proc/sys/vm/dirty_background_ratio
echo "90" > /proc/sys/vm/dirty_ratio
echo "3700" > /proc/sys/vm/dirty_writeback_centisecs
echo "2100" > /proc/sys/vm/dirty_expire_centisecs
echo "0" > /proc/sys/vm/laptop_mode
echo "0" > /proc/sys/vm/block_dump
echo "0" > /proc/sys/vm/swappiness
IF THESE SCRIPTS DON'T WORK, USE THIS ONE.
Find them HERE
STEP 1. Under File, select DOWNLOAD.
STEP 2. Find a way to get it to your phone,make sure it's not opened in any text editors, until it's on your phone.
STEP 3. Follow other instructions
All credit ofr the above script goes to housas08
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.
Credit to zepelinrox for minfreee and adj valueshttp://forum.xda-developers.com/showthread.php?t=991276
Credit to whirleyes for theKernel Modules.
GET THE SIO I/O SCHEDULER AND THE HOTPLUGX GOVERNOR HERE!
I HIGHLY RECOMMEND THEM FOR PERFORMANCE!
Speed it UP! script:
Code:
#!/system/bin/sh
# Load SIO I/O and hotplugx governor
insmod /system/lib/modules/cpufreq_hotplugX.ko
insmod /system/lib/modules/sio-iosched.ko
echo "700000" > /proc/sys/kernel/sched_latency_ns
echo "300000" > /proc/sys/kernel/sched_min_granularity_ns
echo "26188" > /proc/sys/kernel/sched_features
#writes more pages to disc, when given oppurtunity
echo "8" > /proc/sys/vm/page-cluster
#drop all cahces when given oppurtunity
echo "3" > /proc/sys/vm/drop_caches
#Keep 4MB in memory
echo "4096" > /proc/sys/vm/min_free_kbytes
#Dump Vfs cache less
echo "20" > /proc/sys/vm/vfs_cache_pressure
echo "80" > /proc/sys/vm/dirty_background_ratio
#How much dirty data there must be to write to disc
echo "90" > /proc/sys/vm/dirty_ratio
#How often writeback daemons wakeup to write data to disc.
echo "900" > /proc/sys/vm/dirty_writeback_centisecs
#How old 'dirty" data has to be to be written to disc
echo "800" > /proc/sys/vm/dirty_expire_centisecs
#^^^^^^Both expressed in 100th of second^^^^^^
echo "20" > /proc/sys/vm/swappiness
#faster sdcard read speed
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb
#enable multi threading
echo "1" > /proc/sys/kernel/multi_threading
# file system speedups
mount -o remount,noauto_da_alloc /system /system
mount -o remount,noauto_da_alloc /data /data
mount -o remount,noauto_da_alloc /cache /cache
# disable logcat - performance boost & save memory,comment, reboot for logcat.
rm /dev/log/main
#sets cpu governor to hotplug, is most intelligent
echo "hotplug" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "950" > /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency
#decreases sampling rate, stops lag and saves battery
echo "500000" > /sys/devices/system/cpu/cpufreq/hotplug/sampling_rate
echo "75" > /sys/devices/system/cpu/cpufreq/hotplug/up_threshold
echo "45" > /sys/devices/system/cpu/cpufreq/hotplug/down_threshold
echo "15" > /sys/devices/system/cpu/cpufreq/hotplug/hotplug_out_sampling_periods
echo "5" > /sys/devices/system/cpu/cpufreq/hotplug/hotplug_in_sampling_periods
#sets I/O scheduler to SIO, considered best
echo "sio" > /sys/block/mmcblk0/queue/scheduler
echo "sio" > /sys/block/mmcblk1/queue/scheduler
#Sets read and write on I/O sceduler to max.
echo "2048" > /sys/block/mmcblk0/queue/read_ahead_kb
echo "2048" > /sys/block/mmcblk1/queue/read_ahead_kb
#will merge tasks if able
echo "1" > /sys/block/mmcblk0/queue/nomerges
echo "1" > /sys/block/mmcblk1/queue/nomerges
echo "1" > /sys/block/mmcblk0/queue/low_latency
echo "1" > /sys/block/mmcblk1/queue/low_latency
echo "256" > /sys/block/mmcblk0/queue/nr_requests
echo "256" > /sys/block/mmcblk1/queue/nr_requests
echo "2048" > /sys/block/mmcblk0/bdi/read_ahead_kb
echo "2048" > /sys/block/mmcblk1/bdi/read_ahead_kb
echo "256" > /sys/block/zram0/bdi
#cache cleaner
rm -r /cache/*.apk
rm -r /cache/*.tmp
rm -r /data/dalvik-cache/*.apk
rm -r /data/dalvik-cache/*.tmp
#doesn't verify bus info, faster I/O
echo "N" > /sys/bus/hid/drivers/motorola/module/parameters/mot_pass_through_mt_input
echo "256" > /sys/class/bdi/default/read_ahead_kb
#faster scroll speed
echo "64" > /sys/bus/hid/drivers/magicmouse/scroll_speed
#performance boost in read/write when heap is at 4MB.
echo "4096" > /sys/block/mmcblk0/queue/optimal_io_size
echo "4096" > /sys/block/mmcblk1/queue/optimal_io_size
#better memory mangement
echo "2048,4096,43008,47104,51456,55808" > /sys/module/lowmemorykiller/parameters/minfree
#OOM fixes , shoould see awesome increase in multitasking
echo "0,3,6,10,12,15" > /sys/module/lowmemorykiller/parameters/adj
#net speed tweaks
echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse
echo "1" > /proc/sys/net/ipv4/tcp_sack
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle
echo "1" > /proc/sys/net/ipv4/tcp_window_scaling
echo "5" > /proc/sys/net/ipv4/tcp_keepalive_probes
echo "30" > /proc/sys/net/ipv4/tcp_keepalive_intvl
echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout
echo "404480" > /proc/sys/net/core/wmem_max
echo "404480" > /proc/sys/net/core/rmem_max
echo "256960" > /proc/sys/net/core/rmem_default
echo "256960" > /proc/sys/net/core/wmem_default
echo "4096,16384,404480" > /proc/sys/net/ipv4/tcp_wmem
echo "4096,87380,404480" > /proc/sys/net/ipv4/tcp_rmem
# Enable ZRAM compressed memory.
if [ -e /sys/block/zram0/disksize ] ; then
$LOG -p i "Enabling compressed RAM functionality (ZRAM)"
echo $((120*2048*2048)) > /sys/block/zram0/disksize
busybox mkswap /dev/block/zram0
busybox swapon /dev/block/zram0
fi
You will definitely see a boost in performance when running the following script.
For this to work, either run this code at boot with an app like ROM Toolbox.
Or run the attached file at boot with an app like Script Manager.
Thank you to PureMotive for the battery saving kernel tweaks to make compatible and tweak for this phone. and this thread by him
http://forum.xda-developers.com/showthread.php?t=1621808
If you can, please donate:
Donate!
Or at least leave me a thanks.
<<<<<<<<<<<<<<<
Enjoy!
Click to expand...
Click to collapse
The battery tweaks are not working on lg optimus l7 p705....
I"m using Mahdi Rom 4.4.4 and battery drains like crazy lost 1 % every 2 mins
I need an urgent fix plz help ??