[TWEAK] Faux123 Kernel Tweaks - One (M7) Android Development

Hi,
For those of you who aren't using Faux123 Application for tweaking the kernel, I have made a init.d file for them. Just flash the zip and you will have the same tweaks (battery saver only).
Following are included:
CPU Control
Min clock - 162 MHz
Max clock - 1.7 GHz
CPU Governor - Intellidemand
mpdecision - Off
Eco Mode - On
Intellidemand gov control
Up Threshold - 75
Boost Frequency - 0
Two Phase Freq - 1350000
Sampling Rate - 50000
Optimal Freq - 1566000
Synchro Freq - 702000
GPU Control
GPU Governor - ondemand
GPU Clock - 320Mhz
GPU Vsync - On
I/O Scheduler Control
I/O Scheduler (eMMC) - FIOPS
Readhead Size (eMMC) - 1024
**************** Use Faux123 Application if you want to use the true power of this mighty kernel.
************************All credits goes to Faux123 and his mighty kernel*****************************

theintelligent said:
Hi,
For those of you who aren't using Faux123 Application for tweaking the kernel, I have made a init.d file for them. Just flash the zip and you will have the same tweaks (battery saver only).
Following are included:
CPU Control
Min clock - 162 MHz
Max clock - 1.7 GHz
CPU Governor - Intellidemand
mpdecision - Off
Eco Mode - On
Intellidemand gov control
Up Threshold - 75
Boost Frequency - 0
Two Phase Freq - 1350000
Sampling Rate - 50000
Optimal Freq - 1566000
Synchro Freq - 702000
GPU Control
GPU Governor - ondemand
GPU Clock - 320Mhz
GPU Vsync - On
I/O Scheduler Control
I/O Scheduler (eMMC) - FIOPS
Readhead Size (eMMC) - 1024
**************** Use Faux123 Application if you want to use the true power of this mighty kernel.
************************All credits goes to Faux123 and his mighty kernel*****************************
Click to expand...
Click to collapse
thanks! this is great. Can you also add snake charmer=on?

As per my findings, snake charmer is Faux's application thingy. But I will definitely take a look.

Has established, but my options which were before application Faux123 Kernel Tweaks have not changed.

Glad to see you here!!

Thanks

The app costs $4.99, which is kind of pricy.
Sent from my HTC One using xda app-developers app

dont think his going to be very happy when he sees this lol

Heh $4.99 is nothing for what our devs do for us
Sent from my HTC One using xda premium

i personally bought all of his apps even though i don't use them all, devs need support, threads like are kind of inappropriate and unfair.

chiho0516 said:
The app costs $4.99, which is kind of pricy.
Sent from my HTC One using xda app-developers app
Click to expand...
Click to collapse
riiiiiiiight

kennynguyen20 said:
i personally bought all of his apps even though i don't use them all, devs need support, threads like are kind of inappropriate and unfair.
Click to expand...
Click to collapse
Excuse me? In what way? Have you even looked at the file? There's absolutely nothing in there that anyone fooling around with their own init.d file couldn't have done. There is no custom code written in there by faux that someone else couldn't independently have written. Should he be credited for it? Absolutely. Is he owed any compensation for this? I really don't think so. Those who want to contribute (and make no mistake, his kernel is pretty great) can do so by purchasing his app or donating to him.
Take a look for yourself before jumping to conclusions:
Code:
#!/system/bin/sh
#
#
IO_SCH="fiops"
READ_AHEAD_KB="1024"
CURRENT_GOVERNOR="intellidemand"
MIN_FREQ="162000"
MAX_FREQ="1728000"
echo "Setting and Tweaking $IO_SCH I/O Scheduler"
STL=`ls -d /sys/block/stl*`
BML=`ls -d /sys/block/bml*`
MMC=`ls -d /sys/block/mmc*`
for i in $STL $BML $MMC $TFSR; do
echo $IO_SCH > $i/queue/scheduler
echo 0 > $i/queue/rotational
echo 1 > $i/queue/iosched/low_latency
echo 1 > $i/queue/iosched/back_seek_penalty
echo 1000000000 > $i/queue/iosched/back_seek_max
echo 1 > $i/queue/iosched/slice_idle
echo 8 > $i/queue/iosched/quantum
echo 1024 > $i/queue/nr_requests
echo 0 > $i/queue/iostats
echo 4 > $i/queue/iosched/fifo_batch
echo 2 > $i/queue/iosched/writes_starved
echo 1 > $i/queue/iosched/rev_penalty
echo 1 > $i/queue/rq_affinity;
done
echo "Optimizing Read Ahead"
VD=`ls -d /sys/devices/virtual/bdi/*`
for i in $VD; do
echo $READ_AHEAD_KB > $i/read_ahead_kb;
echo "Read ahead kb SET to $READ_AHEAD_KB";
done
echo "Stopping MPDECISION"
stop mpdecision
sleep 1
if [ -e /sys/module/intelli_plug/parameters/intelli_plug_active ]; then
echo "Activating IntelliPlug"
echo "1" /sys/module/intelli_plug/parameters/intelli_plug_active;
fi;
sleep 1
if [ -e /sys/module/intelli_plug/parameters/eco_mode_active ]; then
echo "Enabling ECO mode"
echo "1" > /sys/module/intelli_plug/parameters/eco_mode_active;
fi;
sleep 3
echo "Setting governor as $CURRENT_GOVERNOR"
chmod 0777 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo $CURRENT_GOVERNOR > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo $CURRENT_GOVERNOR > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo $CURRENT_GOVERNOR > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo $CURRENT_GOVERNOR > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
chmod 0644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
sleep 2
echo "Setting minfreq=$MIN_FREQ and maxfreq=$MAX_FREQ"
chmod 0777 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo $MIN_FREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 0644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 0777 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo $MAX_FREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 0644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
sleep 2
if [ $CURRENT_GOVERNOR == "intellidemand" ]; then
echo "Optimizing $CURRENT_GOVERNOR governor"
chmod 0777 /sys/devices/system/cpu/cpufreq/intellidemand/up_threshold
echo "75" > /sys/devices/system/cpu/cpufreq/intellidemand/up_threshold
chmod 0644 /sys/devices/system/cpu/cpufreq/intellidemand/up_threshold
chmod 0777 /sys/devices/system/cpu/cpufreq/intellidemand/boostfreq
echo "0" > /sys/devices/system/cpu/cpufreq/intellidemand/boostfreq
chmod 0644 /sys/devices/system/cpu/cpufreq/intellidemand/boostfreq
chmod 0777 /sys/devices/system/cpu/cpufreq/intellidemand/two_phase_freq
echo "1350000" > /sys/devices/system/cpu/cpufreq/intellidemand/two_phase_freq
chmod 0644 /sys/devices/system/cpu/cpufreq/intellidemand/two_phase_freq
chmod 0777 /sys/devices/system/cpu/cpufreq/intellidemand/sampling_rate
echo "50000" > /sys/devices/system/cpu/cpufreq/intellidemand/sampling_rate
chmod 0644 /sys/devices/system/cpu/cpufreq/intellidemand/sampling_rate
chmod 0777 /sys/devices/system/cpu/cpufreq/intellidemand/optimal_freq
echo "1566000" > /sys/devices/system/cpu/cpufreq/intellidemand/optimal_freq
chmod 0644 /sys/devices/system/cpu/cpufreq/intellidemand/optimal_freq
chmod 0777 /sys/devices/system/cpu/cpufreq/intellidemand/sync_freq
echo "702000" > /sys/devices/system/cpu/cpufreq/intellidemand/sync_freq
chmod 0644 /sys/devices/system/cpu/cpufreq/intellidemand/sync_freq
fi;
sleep 2
echo "Optimizing GPU"
MIN_GPU_CLK="320000000"
GPU_GOV="ondemand"
if [ -e /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0 ]; then
echo "Setting GPU Governor=$GPU_GOV @ $MIN_GPU_CLK"
chmod 0777 /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/gpuclk
echo $MIN_GPU_CLK > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/gpuclk
chmod 0644 /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/gpuclk
chmod 0777 /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/pwrscale/trustzone/governor
echo $GPU_GOV > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/pwrscale/trustzone/governor
chmod 0644 /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/pwrscale/trustzone/governor
fi;
sleep 1
if [ -e /d/clk/mdp_vsync_clk/ ]; then
echo "Enabling GPU VSync"
chmod 0777 /d/clk/mdp_vsync_clk/enable
echo "1" > /d/clk/mdp_vsync_clk/enable
chmod 0644 /d/clk/mdp_vsync_clk/enable
fi;

LiquidSolstice said:
Excuse me? In what way? Have you even looked at the file? There's absolutely nothing in there that anyone fooling around with their own init.d file couldn't have done. There is no custom code written in there by faux that someone else couldn't independently have written. Should he be credited for it? Absolutely. Is he owed any compensation for this? I really don't think so. Those who want to contribute (and make no mistake, his kernel is pretty great) can do so by purchasing his app or donating to him.
Take a look for yourself before jumping to conclusions:
Code:
#!/system/bin/sh
#
#
IO_SCH="fiops"
READ_AHEAD_KB="1024"
CURRENT_GOVERNOR="intellidemand"
MIN_FREQ="162000"
MAX_FREQ="1728000"
echo "Setting and Tweaking $IO_SCH I/O Scheduler"
STL=`ls -d /sys/block/stl*`
BML=`ls -d /sys/block/bml*`
MMC=`ls -d /sys/block/mmc*`
for i in $STL $BML $MMC $TFSR; do
echo $IO_SCH > $i/queue/scheduler
echo 0 > $i/queue/rotational
echo 1 > $i/queue/iosched/low_latency
echo 1 > $i/queue/iosched/back_seek_penalty
echo 1000000000 > $i/queue/iosched/back_seek_max
echo 1 > $i/queue/iosched/slice_idle
echo 8 > $i/queue/iosched/quantum
echo 1024 > $i/queue/nr_requests
echo 0 > $i/queue/iostats
echo 4 > $i/queue/iosched/fifo_batch
echo 2 > $i/queue/iosched/writes_starved
echo 1 > $i/queue/iosched/rev_penalty
echo 1 > $i/queue/rq_affinity;
done
echo "Optimizing Read Ahead"
VD=`ls -d /sys/devices/virtual/bdi/*`
for i in $VD; do
echo $READ_AHEAD_KB > $i/read_ahead_kb;
echo "Read ahead kb SET to $READ_AHEAD_KB";
done
echo "Stopping MPDECISION"
stop mpdecision
sleep 1
if [ -e /sys/module/intelli_plug/parameters/intelli_plug_active ]; then
echo "Activating IntelliPlug"
echo "1" /sys/module/intelli_plug/parameters/intelli_plug_active;
fi;
sleep 1
if [ -e /sys/module/intelli_plug/parameters/eco_mode_active ]; then
echo "Enabling ECO mode"
echo "1" > /sys/module/intelli_plug/parameters/eco_mode_active;
fi;
sleep 3
echo "Setting governor as $CURRENT_GOVERNOR"
chmod 0777 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo $CURRENT_GOVERNOR > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo $CURRENT_GOVERNOR > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo $CURRENT_GOVERNOR > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo $CURRENT_GOVERNOR > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
chmod 0644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
sleep 2
echo "Setting minfreq=$MIN_FREQ and maxfreq=$MAX_FREQ"
chmod 0777 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo $MIN_FREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 0644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 0777 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo $MAX_FREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 0644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
sleep 2
if [ $CURRENT_GOVERNOR == "intellidemand" ]; then
echo "Optimizing $CURRENT_GOVERNOR governor"
chmod 0777 /sys/devices/system/cpu/cpufreq/intellidemand/up_threshold
echo "75" > /sys/devices/system/cpu/cpufreq/intellidemand/up_threshold
chmod 0644 /sys/devices/system/cpu/cpufreq/intellidemand/up_threshold
chmod 0777 /sys/devices/system/cpu/cpufreq/intellidemand/boostfreq
echo "0" > /sys/devices/system/cpu/cpufreq/intellidemand/boostfreq
chmod 0644 /sys/devices/system/cpu/cpufreq/intellidemand/boostfreq
chmod 0777 /sys/devices/system/cpu/cpufreq/intellidemand/two_phase_freq
echo "1350000" > /sys/devices/system/cpu/cpufreq/intellidemand/two_phase_freq
chmod 0644 /sys/devices/system/cpu/cpufreq/intellidemand/two_phase_freq
chmod 0777 /sys/devices/system/cpu/cpufreq/intellidemand/sampling_rate
echo "50000" > /sys/devices/system/cpu/cpufreq/intellidemand/sampling_rate
chmod 0644 /sys/devices/system/cpu/cpufreq/intellidemand/sampling_rate
chmod 0777 /sys/devices/system/cpu/cpufreq/intellidemand/optimal_freq
echo "1566000" > /sys/devices/system/cpu/cpufreq/intellidemand/optimal_freq
chmod 0644 /sys/devices/system/cpu/cpufreq/intellidemand/optimal_freq
chmod 0777 /sys/devices/system/cpu/cpufreq/intellidemand/sync_freq
echo "702000" > /sys/devices/system/cpu/cpufreq/intellidemand/sync_freq
chmod 0644 /sys/devices/system/cpu/cpufreq/intellidemand/sync_freq
fi;
sleep 2
echo "Optimizing GPU"
MIN_GPU_CLK="320000000"
GPU_GOV="ondemand"
if [ -e /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0 ]; then
echo "Setting GPU Governor=$GPU_GOV @ $MIN_GPU_CLK"
chmod 0777 /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/gpuclk
echo $MIN_GPU_CLK > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/gpuclk
chmod 0644 /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/gpuclk
chmod 0777 /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/pwrscale/trustzone/governor
echo $GPU_GOV > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/pwrscale/trustzone/governor
chmod 0644 /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/pwrscale/trustzone/governor
fi;
sleep 1
if [ -e /d/clk/mdp_vsync_clk/ ]; then
echo "Enabling GPU VSync"
chmod 0777 /d/clk/mdp_vsync_clk/enable
echo "1" > /d/clk/mdp_vsync_clk/enable
chmod 0644 /d/clk/mdp_vsync_clk/enable
fi;
Click to expand...
Click to collapse
Friends these tweaks are all over the XDA forums including the Faux's kernel threads. I have only consolidated them. Btw I myself own Faux applications and they are great, of course.
This is not a place to fight rather it's a place to share knowledge. So calm down.

kennynguyen20 said:
i personally bought all of his apps even though i don't use them all, devs need support, threads like are kind of inappropriate and unfair.
Click to expand...
Click to collapse
come on dude !!! he has just gathered his settings into a zip file and just made it easier for users to simply flash it n apply the settings he is using...there is no harm to the dev's hard work behind his kernel n app !!!

dhingra_vinay_in said:
come on dude !!! he has just gathered his settings into a zip file and just made it easier for users to simply flash it n apply the settings he is using...there is no harm to the dev's hard work behind his kernel n app !!!
Click to expand...
Click to collapse
i just thought it might be better if he post the setting as a reply in faux's kernel thread instead of making a new one. Well, just my opinion

kennynguyen20 said:
i personally bought all of his apps even though i don't use them all, devs need support, threads like are kind of inappropriate and unfair.
Click to expand...
Click to collapse
kennynguyen20 said:
i just thought it might be better if he post the setting as a reply in faux's kernel thread instead of making a new one. Well, just my opinion
Click to expand...
Click to collapse
respect ur opinion but there are many noobs who just dont know how to edit the init.d script...

dhingra_vinay_in said:
respect ur opinion but there are many noobs who just dont know how to edit the init.d script...
Click to expand...
Click to collapse
i personally dont know how to edit init.d script as well so i bought his app, there are so much you can do.

kennynguyen20 said:
i just thought it might be better if he post the setting as a reply in faux's kernel thread instead of making a new one. Well, just my opinion
Click to expand...
Click to collapse
Well friend, you are right I thought of posting my init.d to that thread but I am not sure why I posted a new thread (there was a some reason, I forgot). Anyways I will post a link referring to this thread.
EDIT:
Posted
http://forum.xda-developers.com/showpost.php?p=42010742&postcount=1379

Related

[Q] Mangage CPU via init.d script -> need help

Hey guys,
I switched from my HD2 to a Sensation, now running Energy ROM with latest bricked beta kernel and I am very pleased with it.
I want to controll the cpu by writting my own init.d script, like I did eith my hd2, but as the sensation has 2 cores I'm not quite sure what to do.
What I got so far is this:
Code:
echo 192000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 1188000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo smartassV2 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
now I have 2 quesions:
1.) Do I need to do the same for cpu1? like this:
Code:
echo 192000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 1188000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo smartassV2 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 192000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo 1188000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo smartassV2 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
2.) I found this in bricked kernel thread:
Overclocking the second CPU is currently not supported by many apps. (They can't overclock what they can't see, aSMP)
To enforce this with Bricked:
Code:
echo 1 > /sys/devices/system/cpu/cpu1/online
echo 1782000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
CPU1 will shutdown after it is sure that it is not needed anymore. But you can also do:
Code:
echo 0 > /sys/devices/system/cpu/cpu1/online
Right after the both commands above. Then CPU1 will fall asleep.
Click to expand...
Click to collapse
what exactly does cpu1/online =1 do? can't I just set clocks and governor for cpu1 like in my code aboth or shold my script look like this:
Code:
echo 192000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 1188000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo smartassV2 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 1 > /sys/devices/system/cpu/cpu1/online
echo 192000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo 1188000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo smartassV2 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo 0 > /sys/devices/system/cpu/cpu1/online
thanks for your help in advance!
Alganon said:
Hey guys,
I switched from my HD2 to a Sensation, now running Energy ROM with latest bricked beta kernel and I am very pleased with it.
I want to controll the cpu by writting my own init.d script, like I did eith my hd2, but as the sensation has 2 cores I'm not quite sure what to do.
What I got so far is this:
Code:
echo 192000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 1188000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo smartassV2 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
now I have 2 quesions:
1.) Do I need to do the same for cpu1? like this:
Code:
echo 192000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 1188000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo smartassV2 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 192000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo 1188000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo smartassV2 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
2.) I found this in bricked kernel thread:
what exactly does cpu1/online =1 do? can't I just set clocks and governor for cpu1 like in my code aboth or shold my script look like this:
Code:
echo 192000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 1188000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo smartassV2 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 1 > /sys/devices/system/cpu/cpu1/online
echo 192000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo 1188000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo smartassV2 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo 0 > /sys/devices/system/cpu/cpu1/online
thanks for your help in advance!
Click to expand...
Click to collapse
There has been much discussion about the aSMP architecture and the fact that CPU1 will try to be off line (0) if possible and wake up when needed (1). I know someone played with:
echo 1 > /sys/devices/system/cpu/cpu1/online
followed by a (or similar chmod):
chmod 400 /sys/devices/system/cpu/cpu1/online
The latter was to try to stop the system switching it off again. TBH I don't know where that technique ended up.
Most folks just use O/C Daemon, FauxClock, SetCPU.... or even the one built into CM7.
You'd be better off asking in the Bricked or Energy forums, I'm sure folks there have tried and/or implmented something similar.
thx for the answer,
I've already postetd a link to this thread in bricked thread, but I didn't want to spam this thread with discussing something that's not kernel or rom related.
i'm fine with cpu1 being oflline when not needed. In fact I like the idea of conserving energy that way.
the quesions is, what happens when cpu1 kicks in? what scalings an governor does it use? the way I see it, the apps you mentioned, can only handle cpu0. and if cpu1 automagically uses the same settings as cpu0 I'm fine with that. But I wanted to make sure of it, so I thought the easiest way of knowing how this stuff is handled, is by writing the app/script that handles cpu myself...
Have a look at FauxClock, the sources are on Github. I use it with the Faux Kernel but I'm not certain how portable it is :-(( I'm sure I had it running when I tried the Bricked kernel, not 100% confident though.
One comment I noticed on his page was:
"- cpu1 does not want to stick. The app is doing it's job and writing the correct values, but for some reason it seems to get bumped back up to the highest frequency after a few seconds. I think this is more on the kernel side. More investigating needs to be done."
http://rootzwiki.com/topic/4550-app09-beta-snapdragon-dual-core-oc-control/
It might be of help, or then again....
I actually have this implemented in my own ROM...
What I did using dxixda's kitchen:
1) Unpack boot.img (option 20) using option "w" (kernel+ramdisk)
2) Open bootcomplete.rc and add this line to the end of the file:
Code:
for x in /system/etc/init.d/*.sh ; do /system/bin/sh $x ; done
3) Save the file
4) Recompile boot.img using option "b"
5) Flash boot.img via fastboot (fastboot flash boot boot.img)
Now you have to throw your commands in a text file and rename it to "script_name.sh", then chmod 777 the init.d folder and all the scripts within. Say, you want cpu0 to boot at 1.512GHZ.. the script will look like this:
Code:
!/system/bin/sh
echo 1512000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Make sure that your scripts in the init.d folder have the .sh extension or this won't work!!
Hope this answers your question
thx, sounds promising. Unfornunately I'm currently on a business trip, so it might take some days before I can actually test this...

[Q] Faux kernel init.post_boot.sh customization

This is, i´m reeally noob, and do it just for fun and have muy sensation the way I like, so I want to know just the basics to do that.
Just added stock frequencies to init.post_boot.sh of faux kernel, and I wondering, how to control the transitions or steps of the frecuency scaling, I found this lines, but really don´t know if they will work. Some of them are already in my file. But I don´t know whats the function of sampling_rate, up_threshold, and sampling_down_factor, and if they will work on intellidemand governor.
echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
echo 40000 > /sys/devices/system/cpu/cpu1/cpufreq/ondemand/sampling_rate
echo "60000" > /sys/devices/system/cpu/cpu0/cpufreq/conservative/sampling_rate
echo "60000" > /sys/devices/system/cpu/cpu1/cpufreq/conservative/sampling_rate
echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
echo 80 > /sys/devices/system/cpu/cpu1/cpufreq/ondemand/up_threshold
echo "95" > /sys/devices/system/cpu/cpu0/cpufreq/conservative/up_threshold
echo "95" > /sys/devices/system/cpu/cpu1/cpufreq/conservative/up_threshold
echo "1" > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo "20" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
chown system /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
chown system /sys/devices/system/cpu/cpu1/cpufreq/ondemand/sampling_rate
echo "192000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "192000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
chown system /sys/devices/system/cpu/cpu0/online
chown system /sys/devices/system/cpu/cpu1/online
chown system /sys/power/perflock
Thanks!

My init.d Script for CFQ scheduler.

Hi guys,
I used system tuner to create a script on set CFQ as default scheduler (as recommend for sense 4)
It does work however, looking at the file it looks over complicated and seems to repeat commands.
Can you guys have a look and see if it can be tidied up?
Feel fee to use this if it's something you need
#!/system/bin/sh
chmod 777 /sys/block/mmcblk0/queue/scheduler
echo "cfq" > /sys/block/mmcblk0/queue/scheduler
chmod 777 /sys/block/mmcblk1/queue/scheduler
echo "cfq" > /sys/block/mmcblk1/queue/scheduler
chmod 777 /sys/block/mmcblk1/queue/scheduler
echo "cfq" > /sys/block/mmcblk1/queue/scheduler
if [ ! -e /sys/block/mmcblk0/queue/scheduler]
then
sleep 60
fi
chmod 777 /sys/block/mmcblk0/queue/scheduler
echo "cfq" > /sys/block/mmcblk0/queue/scheduler
chmod 777 /sys/block/mmcblk1/queue/scheduler
echo "cfq" > /sys/block/mmcblk1/queue/scheduler
chmod 777 /sys/block/mmcblk1/queue/scheduler
echo "cfq" > /sys/block/mmcblk1/queue/scheduler
Sent from my SuperSensation.
ViperS ROM 1.0.1.
SebastianFM Overclocked Kernel v1.5
D-SHEL Undervoltage mod.
Turns out you only need first echo line.
Sent from my SuperSensation.
ViperS ROM 1.0.1.
SebastianFM Overclocked Kernel v1.5
D-SHEL Undervoltage mod.

Control CPU and many other features via Init.d

Control CPU without any custom application via Init.d :victory:
Disclaimer :
Code:
Please Note : You are solely responsible for what you do to your phone. I nor XDA are responsible for damage you may cause to your device if you mess up something
Here i present you a technique to control CPU and Dyn Fsync, Vibration on supported kernels & also Voltage.
I have attached the Init.d script you can change vdd, Turn on/off Dynamic Fsync, Change CPU Scaling levels.
Detailed Guide on how to use this is coming soon
Download the attached file rename it to just 99init no extension and save it give it 755 permission. & Restart and see i have edited this for my use and am on my personal build of Phoenix Kernel so experience and usage might change on other kernels.
Detailed Guide
echo 1 > /sys/module/rpm_resources/enable_low_power/L2_cache
echo 1 > /sys/module/rpm_resources/enable_low_power/pxo
echo 1 > /sys/module/rpm_resources/enable_low_power/vdd_dig
echo 1 > /sys/module/rpm_resources/enable_low_power/vdd_mem
echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu1/power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu2/power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu3/power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu2/standalone_power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu3/standalone_power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/idle_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/idle_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu2/standalone_power_collapse/idle_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu3/standalone_power_collapse/idle_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/idle_enabled
•>> Enables suspend and sleep modules.( i think so.. :silly: )
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
•>> This tweak sets ondemand as default governor.
echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
echo 4 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
echo 3 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
echo 918000 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
echo 918000 > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
•>> Sets advanced options of ondemand Gov
echo 1188000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1188000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 384000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
•>> Sets Min/Max frequencies respectively. for both the CPU's
chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chown system /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
chown system /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
chown root.system /sys/devices/system/cpu/mfreq
chmod 220 /sys/devices/system/cpu/mfreq
chown root.system /sys/devices/system/cpu/cpu1/online
chown root.system /sys/devices/system/cpu/cpu2/online
chmod 664 /sys/devices/system/cpu/cpu1/online
chmod 664 /sys/devices/system/cpu/cpu2/online
•>> Sets Permissions
echo 18 > /sys/devices/virtual/timed_output/vibrator/level
•>> Vibration Control on supported kernels, Supported in Phoenix Kernel
vdd=-62500
echo ${vdd} > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
echo "All voltages changed by ${vdd}" > /data/local/tmp/vdd.txt
•>> Voltage Control Script, It has been set to max UV by defaule i.e. -62 mV
Note : As the Name suggests its init.d script saved in etc/init.d folder set the permission of the script to 755.​
Added Detailed info
I have added detailed info on each individual script :good: , All of the above scripts have been tested on my Sony Xperia L C2104 running my personal build of Phoenix Kernel
you don't mention where to save it on the phone....
Its init.d script
getochkn said:
you don't mention where to save it on the phone....
Click to expand...
Click to collapse
Actually as the Name suggests its init.d script saved in etc/init.d folder set the permission of the script to 755.
Gonna try this!
Sent from my C2105 using XDA Premium 4 mobile app
try it
abielzuliom said:
Gonna try this!
Sent from my C2105 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Try it and report back
first we have to enable init.d dude with universal init.d app
yep
yash989 said:
first we have to enable init.d dude with universal init.d app
Click to expand...
Click to collapse
Yep if you are on a kernel that doesnt have init.d support which might be weird :silly:

[Tweak][Guide] Init.d Tweaks

Init.d Tweaks
(Needs ROM (Kernel) With init.d Access And Busybox, Open Empty File In Text Editor (Notepad ++ Or Similar), Insert Tweak You Want In Header,Save in /system/etc/init.d and name it Lomething Like 73tweaks)
1. Strict minfree handler tweak
Code:
echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree
2. Internet speed tweaks
Code:
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;
3. Vm management tweaks
Code:
echo "4096" > /proc/sys/vm/min_free_kbytes
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/panic_on_oom;
echo "0" > /proc/sys/vm/laptop_mode;
echo "0" > /proc/sys/vm/swappiness
echo "50" > /proc/sys/vm/vfs_cache_pressure
echo "90" > /proc/sys/vm/dirty_ratio
echo "70" > /proc/sys/vm/dirty_background_ratio
4. Misc kernel tweaks
Code:
echo "8" > /proc/sys/vm/page-cluster;
echo "64000" > /proc/sys/kernel/msgmni;
echo "64000" > /proc/sys/kernel/msgmax;
echo "10" > /proc/sys/fs/lease-break-time;
echo "500,512000,64,2048" > /proc/sys/kernel/sem;
5. Battery tweaks
Code:
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
6. EXT4 tweaks (greatly increase I/O)
(needs /system, /cache, /data partitions formatted to EXT4)
a) removes journalism
Code:
tune2fs -o journal_data_writeback /block/path/to/system
tune2fs -O ^has_journal /block/path/to/system
tune2fs -o journal_data_writeback /block/path/to/cache
tune2fs -O ^has_journal /block/path/to/cache
tune2fs -o journal_data_writeback /block/path/to/data
tune2fs -O ^has_journal /block/path/to/data
b) perfect mount options
Code:
busybox mount -o remount,noatime,noauto_da_alloc,nodiratime,barrier=0,nobh /system
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /data
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /cache
7. Flags blocks as non-rotational and increases cache size
Code:
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;
for j in $LOOP $RAM
do
echo "0" > $j/queue/rotational;
echo "2048" > $j/queue/read_ahead_kb;
done
8. microSD card speed tweak
Code:
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
9. Defrags database files
Code:
for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
done
9. Remove logger
Code:
rm /dev/log/main
10. Ondemand governor tweaks
Code:
SAMPLING_RATE=$(busybox expr `cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency` \* 750 / 1000)
echo 95 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo $SAMPLING_RATE > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
11. Auto change governor and I/O Scheduler
a) I/O Scheduler (Best: MTD devices - VR; EMMC devices - SIO) - needs kernel with these
Code:
echo "vr" > /sys/block/mmcblk0/queue/scheduler
or
Code:
echo "sio" > /sys/block/mmcblk0/queue/scheduler
b) Governor (Best: Minmax > SavagedZen > Smoothass > Smartass > Interactive) - needs kernel with these
Code:
echo "governor-name-here" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
12. Move dalvik-cache to cache partition (if it's big enough) to free up data partition space
Code:
CACHESIZE=$(df -k /cache | tail -n1 | tr -s ' ' | cut -d ' ' -f2)
if [ $CACHESIZE -gt 80000 ]
then
echo "Large cache detected, moving dalvik-cache to /cache"
if [ ! -d /cache/dalvik-cache ]
then
busybox rm -rf /cache/dalvik-cache /data/dalvik-cache
mkdir /cache/dalvik-cache /data/dalvik-cache
fi
busybox chown 1000:1000 /cache/dalvik-cache
busybox chmod 0771 /cache/dalvik-cache
# bind mount dalvik-cache so we can still boot without the sdcard
busybox mount -o bind /cache/dalvik-cache /data/dalvik-cache
busybox chown 1000:1000 /data/dalvik-cache
busybox chmod 0771 /data/dalvik-cache
else
echo "Small cache detected, dalvik-cache will remain on /data"
fi
13. Disable normalize sleeper
Code:
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
14. GPS.conf
(create or edit your /system/etc/gps.conf with a text editor)
a) European NTP server (replace for america or asia in your case)
Code:
NTP_SERVER=europe.pool.ntp.org
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
b) SE supl for A-GPS (better than Nokia's or Google's)
Code:
SUPL_HOST=supl.sonyericsson.com
SUPL_PORT=7275
Warning: Using these tweaks may brick your device. Use it with caution.
:good::good::good:
How can I know that my ROM / kernel support Init.d or not??
AK205 said:
How can I know that my ROM / kernel support Init.d or not??
Click to expand...
Click to collapse
Install Universal Init.d from Play Store and follow in-app instructions. Init.d support will be enabled on your device. Your device must be rooted first.
Build.prop tweaks by @bravonova
bravonova said:
Install Universal Init.d from Play Store and follow in-app instructions. Init.d support will be enabled on your device. Your device must be rooted first.
Click to expand...
Click to collapse
I make and init.d script and i copy your custom values to my init.d script. However, on net speed tweaks, the tcp_rmem and tcp_wmem didn't change the value at all even i edited it. Any help?
Should it be in text file or script file?
So we create a different text document containing each code for each tweak?? Not all In one document in the init.d folder??
Nice write up, bro. Thanks. Will have to try.
Guys so why aren't these enhancing tweaks and buildprop tweaks already available in our phones? Why aren't our phones optimized?
Tweaks good for one person or situation are not necessarily optimal for every case in general .
Medyredy said:
Guys so why aren't these enhancing tweaks and buildprop tweaks already available in our phones? Why aren't our phones optimized?
Click to expand...
Click to collapse
Can you help please?
Hello, I'm a newbie here. I wish to overclock my stock kernal, So it can be done through tweak? or I have to compile new overclock kernal from stock kernal source? Their's already a overclocked kernal for my device but its for cm11 and i want to use it on 4.1.2 JB stock ROM. Is their any simple way out?
Your help will be appreciated. Thanks .
use cm11 for s7392 or try
cm12 new developed
or stock i did give it to you before
choice is yours.......
i no longer have this device
rony raj said:
use cm11 for s7392 or try
cm12 new developed
or stock i did give it to you before
choice is yours.......
i no longer have this device
Click to expand...
Click to collapse
Thanks for suggesting new Cm12 kernal.
As of cm11, X264 encoding is important for me, plus their were some other minor bugs in that build. Though i agree its the best build compiled rom for Trend.
I will myself start some project after June~July.
What happened to your device though? You are among the few members who are guiding peoples on threads related to this device and i really appreciate it.

Categories

Resources