Here are the init.d scripts that I have been using for Siyah. Please note that 95% of the scripts were done by Pikachu's thunderbolt scripts and I have modified then to my liking. Thanks to Pikachu for the hard work he has put in for the developement of our devices. For those that will use these scripts please use them with caution! I am not responsible for any damage done to your phone! You are free to use these as you wish, adjust them to your liking. The s70darkyzipalign, s98cfs, s98systemtweak should be universal for all setups and you do not need to adjust these init.d scripts. The one you need to be aware of is the s98bolt1 and screenstate_scaling script. The s98bolt1 script has cpu freq. steps set at max 1504 min 100. Scaling @ max 1304 min 200. The voltages for these steps are pretty aggressive and may not work for your device so please PLEASE adjust them accordingly. This script will also set ondemand/sio as default. You can replace those as you wish. GPU is set for 40, 133, 267mhz. (Andreilux's settings, Thanks Andrei) Sched_mc and AFTR have been enabled for some extra power saving.
Screenstate_scaling have been modified to set as Ondemand as wake governer and Powersave as sleep governer. You can adjust these as well. The scripts are pretty self explantory and you can adjust these values using root explorer and using the menu in root explorer to "open in text editor". Or you can you wordpad or notepad++ on your pc and adjust them. Save the scripts to your phone. Using root explorer copy the init.d scripts to /etc/init.d. Paste in this directory and set permissions as rwx,rwx,rwx and reboot.
I am sure I missed some things as I'm kind of in a hurry. Please pm me if you have any questions or need help. I have used this setup for quite some time now without any problems. Battery life has been amazing without sacrificing performance. Oh please do not use VC to save boot settings as these will clash. Everything in the init.d scripts will do the same as VC as long as you adjust them accordingly. Good luck and happy flashing/modding!
P.S. After downloading the file remove the .txt extension in the files before using. Thanks!
Here is the link to the Originator and Creator of these awesome scripts. Thanks Pikachu!
http://forum.xda-developers.com/showthread.php?p=18285859
PHP:
I just want to make sure before I utilize these. I need to use a file manager to place these in /etc/unit.d folder without the .txt correct?
Should I remove the existing scripts as well?
Edit: do these scripts completely take the place of voltage control and setcpu? I wanted to get all of my questions out of the way
These seem awesome. Can't wait to try them out
moustro said:
I just want to make sure before I utilize these. I need to use a file manager to place these in /etc/unit.d folder without the .txt correct?
Should I remove the existing scripts as well?
Edit: do these scripts completely take the place of voltage control and setcpu? I wanted to get all of my questions out of the way
Click to expand...
Click to collapse
Everything you posted is correct. Please keep in mind the voltage settings are a little extreme. If you think or know your phone can handle the UV then just drop them in without modifying. But if you're not sure add +25 mv to each step.
I almost gaurantee your phone will sleep like a baby. And fly like the wind when in use.
Thanks for the scripts!
I've also found an interesting script at 9100 Siyah Kernel topic ( http://forum.xda-developers.com/showthread.php?t=1263838&page=1813 )
I got sleep of death by using below script so you may want to check voltages setting before using it.
Code:
#!/system/bin/sh
# ******************
# 1°) I/O Schedulers
# ******************
# Set i/o scheduler (Valid values are: noop, deadline, cfq, bfq, sio, vr, anticipatory)
echo bfq > /sys/block/mmcblk0/queue/scheduler;
# ************************************************
# 2°) Scaling Governor & Smooth Scaling Parameters
# ************************************************
# Set scaling governor, according to available governors in your kernel
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;
# Smooth scaling parameters to control any governor jumping to higher frequency directly.
echo 2 > /sys/devices/system/cpu/cpu0/cpufreq/smooth_target;
echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/smooth_offset;
echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/smooth_step;
# ****************************************************************
# 3°) Deepsleep Levels
# cpulevel = 4 (100Mhz - 800Mhz, default), 5 (100Mhz - 500Mhz)
# buslevel = 0 (400MHz, default), 1 (266MHz), 2 (133MHz)
# ****************************************************************
# Set deep sleep frequency & bus speed:
echo 5 > /sys/devices/system/cpu/cpu0/cpufreq/deepsleep_cpulevel;
echo 2 > /sys/devices/system/cpu/cpu0/cpufreq/deepsleep_buslevel;
# ****************************
# 4°) CPU Frequency & Voltages
# ****************************
# Set frequency steps according to the number of steps in your kernel.
echo "1600 1400 1200 1000 800 500 200 100" > /sys/devices/system/cpu/cpu0/cpufreq/freq_table;
# Set voltages for frequency steps. Changes possible at +/-25mV steps
echo "1350 1275 1150 1050 950 900 850 800" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table;
# Sets global scaling min&max frequencies as 100 and 1000 mhz
echo 100000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo 1200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
# ************************************
# 5°) GPU Clock, Voltages & Thresholds
# ************************************
# Set GPU clocks (Valid values are: 100 114 133 160 200 267 300 400 )
echo "40 133 267" > /sys/class/misc/gpu_clock_control/gpu_control;
# Set GPU Up and Down thresholds
echo "90% 25% 90% 45%" > /sys/class/misc/gpu_clock_control/gpu_control;
# Set GPU voltages (Changes possible at +/-50mV ie at 50000 steps)
echo "850000 900000 950000" > /sys/class/misc/gpu_voltage_control/gpu_control;
# ======================================================
# 6°) Hot Plug Thresholds, Sampling Interval & Frequency
# ======================================================
# Set second core kick-in threshold for screen-on state
echo 35 > /sys/module/pm_hotplug/parameters/loadl;
echo 80 > /sys/module/pm_hotplug/parameters/loadh;
# Set second core kick-in threshold for screen-off state
echo 90 > /sys/module/pm_hotplug/parameters/loadl_scroff;
echo 100 > /sys/module/pm_hotplug/parameters/loadh_scroff;
# Set hot plug sampling intervals for screen-on state
echo 400 > /sys/module/pm_hotplug/parameters/rate;
echo 400 > /sys/module/pm_hotplug/parameters/rate_cpuon;
# Set hot plug sampling intervals for screen-off state
echo 1000 > /sys/module/pm_hotplug/parameters/rate_scroff;
# Set frequency below which second core will not be turned on, regardless of thresholds.
echo 524288 > /sys/module/pm_hotplug/parameters/freq_cpu1on;
# ===================
# 7°) Bus Frequencies
# ===================
# Set bus frequencies for highest-to-lowest cpu frequencies and enable static bus frequency scaling
#echo "0 0 0 1 1 2 2 2" > /sys/devices/system/cpu/cpu0/cpufreq/busfreq_static;
#echo enabled > /sys/devices/system/cpu/cpu0/cpufreq/busfreq_static;
# ====================================
# 8°) Schedule Multi Core & Idle Modes
# ====================================
# Enable sched_mc
echo 1 > /sys/devices/system/cpu/sched_mc_power_savings;
# Enable AFTR
echo 3 > /sys/module/cpuidle/parameters/enable_mask;
# =============================
# 9°) Brightness Curve Settings
# =============================
# Brightness settings (Possible values for min_bl = 0 to 255 | min_gamma = 0 to 24 | max_gamma = 0 to 24)
echo 20 > /sys/class/misc/brightness_curve/min_bl;
echo 1 > /sys/class/misc/brightness_curve/min_gamma;
echo 24 > /sys/class/misc/brightness_curve/max_gamma;
# =================================
# 10°) Touch Sensitivity Parameters
# =================================
# Set touch sensitivity (Possible values are between 40 to 80. Lower value = higher sensitivity)
echo 40 > /sys/devices/virtual/sec/sec_touchscreen/tsp_threshold;
# ===================
# 11°) Charge Current
# ===================
# Set AC, Misc & USB charge current (Do not set Ac & Misc more than 1000mA or Usb more than 450)
echo "950 950 450" > /sys/devices/virtual/misc/charge_current/charge_current;
# =======================================
# 12°) Switch Hotplug/DualCore/SingleCore
# =======================================
# Set Dynamic hotplug mode
echo on > /sys/devices/virtual/misc/second_core/hotplug_on;
echo on > /sys/devices/virtual/misc/second_core/second_core_on;
# ===================
# 13°) Disable logger
# ===================
if [ ! -d /data/.siyah ];
then
mkdir /data/.siyah;
chmod 777 /data/.siyah;
fi;
touch /data/.siyah/disable-logger;
# ====================
# 14°) Graphic tunings
# ====================
setprop debug.sf.hw 1; # HARDWARE RENDERING (GPU)
setprop video.accelerate.hw 1;
setprop debug.performance.tuning 1;
# Set deep sleep frequency & bus speed:
echo 5 > /sys/devices/system/cpu/cpu0/cpufreq/deepsleep_cpulevel;
echo 2 > /sys/devices/system/cpu/cpu0/cpufreq/deepsleep_buslevel;
See the echo 5, change that to 4. And your SOD's will be gone!!
Steve you are the man! Thank you for bundling these scripts all in one place. Everything is smooth and my phone is sleeping like a baby so far.
moustro said:
Steve you are the man! Thank you for bundling these scripts all in one place. Everything is smooth and my phone is sleeping like a baby so far.
Click to expand...
Click to collapse
What ROM are you using?
Can these scripts be used on Unnamed?
Unit.d generator in the i9100 forum works great for this.
Must script manager be used to give these scripts root access to work?
Sent from my i777.
desiromeo719 said:
What ROM are you using?
Can these scripts be used on Unnamed?
Click to expand...
Click to collapse
Miui 2.1.13
I believe these scripts are universal and can run on siyah or entropy dd. Can someone else confirm this?
Sorry guys for the late reply. Busy at work. Yes these scripts are universal for any ROM. Just make sure your kernel supports init.d. Siyah and Entropy both support them.
moustro said:
Miui 2.1.13
I believe these scripts are universal and can run on siyah or entropy dd. Can someone else confirm this?
Click to expand...
Click to collapse
No, some of them depend on tunables in Siyah I haven't ported over yet.
Personally, I would not recommend putting voltage settings in a script that you distribute to the public, as voltages are device-unique.
I'm also a firm believer in a number of small separate scripts with descriptive names, instead of a "megascript" that does it all - harder to analyze and harder to pick and choose.
I'll take a look at the specific script contents when I have some time.
thx for clarifying entropy. i did state specifically about the voltages and they have been modified to my likings. so for now use for siyah kernel. and once again pls adjust the voltages to values that your phone can handle. some phones can only take a -25 mv from stock voltages. s98bolt1 and screenstate should be used as a base only. adjust them to your liking. the other scripts are system tweaks and are universal for most roms.
Sent from my SGH-I777 using xda premium
Thanks for this post Steve. Im sure once I get a handle on these tweaks and applying them I will greatly benefit from them!
No problem. Trying to help out anyway I can. I know all these scripts can be confusing and a headache. I noticed a lot of people asking how to make scripts and OC and UV settings so why not make them avail for the general public. It's just a good base to start off with for siyah users. If anyone has or needs any help in reading the scripts and how to adjust them let me know.
I could ask ya a million questions..but I wont lol. Just trying to do lots of reading here..and on Google to learn about scripts..init.d..OC and UV. Sometimes I think I got it...but then i get all confused. The only script I have now is the V6. That one just seemed like I could handle since it basically walks ya through the entire process. And to be honest..not even sure i notice a difference.
jasvncnt1 said:
I could ask ya a million questions..but I wont lol. Just trying to do lots of reading here..and on Google to learn about scripts..init.d..OC and UV. Sometimes I think I got it...but then i get all confused. The only script I have now is the V6. That one just seemed like I could handle since it basically walks ya through the entire process. And to be honest..not even sure i notice a difference.
Click to expand...
Click to collapse
Trust me, it made a difference. It's nothing flashy, and nothing some people would notice, but it did.
Nice post stevehkim, I may give these are try.
Sent from my SGH-I777 using xda premium
If I may..s70darkyzipalign, s98cfs, s98systemtweak...Are theses kinda like OC and UV or just minor system tweaks? I tried opening them and taking a look...but have no idea what im looking at. I admit, I am not the smartest person thats for sure
They, from their titles, are system tweaks. I haven't looked through them, so I can't tell for sure.
Edit: Steve, you might want to post a brief description of what each script does, which can be run independently, which need to be run together, and most importantly how to implement them.
Just a suggestion to cut back on confusion and potential fights
Sent from my SGH-I777 using xda premium
Related
I've tried a lot of performance-boosting and battery-saving mods, but none of them worked well together. It was a case of exclusive-OR, i.e. either set only for performance-boost OR only for battery-saving.
So I adapted 2 existing scripts (screenstate_scaling and battery tweak) and came up with SS4N1, which combines the best of both worlds ... performance-boost whenever I use my N1, and battery-saving whenever my N1 is idle.
SS4N1 : ScreenState for Nexus One
auto-switch the following settings based on screen-state (AWAKE/SLEEPING)
virtual memory
cpufreq governor
cpu scheduler
undervoltage
performance tweaks on startup
dialer optimization
remount partitions with noatime
storage/IO tuning
UI/homescreen optimization
network performance tuning
ability to enable/disable any or all of the above features
adapted from screenstate_scaling ([email protected]) & battery tweak ([email protected])
ROMs
Only tested for CM7 & MIUI, but should work with other AOSP ROMs that provide init.local.rc capability.
How to check ROM:
- Open adb shell or terminal session
- Type cat /init.rc | grep init.local.rc
- If no result, then your ROM is unsuitable for SS4N1
- If result is import /system/etc/init.local.rc or similar, then ROM is suitable
Click to expand...
Click to collapse
Kernels
SS4N1 has been available for a while now on IntersectRaven's kernel thread. Thanks again to IntersectRaven for letting me bum off his thread until now . Should also work with other N1 kernels by Redstar, Pershoot, Wildmonks and Cayniarb (Tiamat).
I'm using SS4N1 now with bbedward's Savaged-Zen kernel for Evo, as I compiled this awesome kernel for N1 with -0fast optimization using an experimental GCC 4.7.0 toolchain. Check below for download link.
Excerpt on overclocking from wildmonk ...
"Most users should be able to handle 1152MHz without any problems but some won't on 1190MHz. You'll know when your CPU can't handle a certain speed if you start to experience a sudden decrease in performance, lag, force closes, and spontaneous reboots."
Click to expand...
Click to collapse
How to enable SS4N1
Via adb shell or terminal session
SS4N1 is initially DISABLED by default. You must start an ADB shell or Terminal session then run the configuration script: sscfg
> Choose [1] Enable SS4N1
> Follow on-screen instructions to customize (refer to screenshots below)
> Exit with [6] *** Apply changes and exit ***
> Check logcat for SS4N1 entries
Via CKZTools SS4N1 GUI by zyr3x
CKZTools : ScreenState Gui for Nexus One
Click to expand...
Click to collapse
DOWNLOADS from my mediafire site
[MOD/SCRIPT] SS4N1
[KERNEL] Savaged-Zen for N1 (2.6.38.8, 128-1190, BFS/CFS, SWAP, NOOP, HAVS, AXI, HW3D)
Code:
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards, thermonuclear war,
* or you getting fired because the alarm app failed. Please do some research if
* you have any concerns about features included in these ROMs, mods & kernels
* before flashing! YOU are choosing to make these modifications, and if you
* point the finger at me for messing up your device, I will laugh at you.
*/
Changelog for SS4N1
# ===============
# SS4N1 changelog
# ===============
# Initial
# + port script from Spica to N1
#
# 20110329
# + added SD Card Speed Fix in TWEAK_STORAGE section
#
# 20110403
# + changed deprecated oom_adj to oom_score_adj for MAX_PHONE function and sscfg
#
# 20110403A
# + added auto-check of kernel version for oom-killer parameter for MAX_PHONE function and sscfg
# + updated check for cpufreq up_threshold for Auto Switch function
#
# 20110404
# + changed from init.d script to init.local.rc service to fix "hung-on-X" when not running dt-a2sd
#
# 20110505
# + modified to apply UV for Hybrid-AVS (Tiamat, SavagedZen, new-IR) and Customizable-AVS (old-IR)
#
# 20110519
# + added option for new interactiveX governor
# + removed tweaks for TCP/IP redirects
#
# 20110525
# + disabled dewonkifier feature in all preset profiles (thx 2 jyxent!)
# + tuned preset profiles to more conservative undervolt values
# + added option to display HAVS Min & Max VDD levels (CPU voltage table)
# + added option to display misc information (CPU info, kernel version, etc)
Yes finally! Thank you for bringing your expertise here! The all-in-one script perfect for everything! I've been a fan of this script for a long time now!
sir*mez said:
Yes finally! Thank you for bringing your expertise here!
Click to expand...
Click to collapse
You're most welcome! Not sure if I have the time to update this thread regularly, but I'll try my best as always.
Does it work with MIUI Roms?
aakaashjois said:
Does it work with MIUI Roms?
Click to expand...
Click to collapse
The last time I tried a few months back, yes it did.
ch33kybutt said:
The last time I tried a few months back, yes it did.
Click to expand...
Click to collapse
Thanks! It works, and quite well too!
aakaashjois said:
Thanks! It works, and quite well too!
Click to expand...
Click to collapse
Thanks for letting me know. I've updated OP and added MIUI in ROMs section.
What gains have you seen with this mod?
hotweiss said:
What gains have you seen with this mod?
Click to expand...
Click to collapse
That's the thing about this mod, it's ultimately up to the user to decide what type of profile they want. I put no stock in so-called benchmarks but UI is smooth and lag-free (especially with BFS kernel) whenever I use it and I get less than 1% battery decrease per hour overnight when phone is idle (from 100% to 96% in 7 hours).
Thanks ch33kybutt, it was about time you started your own thread for this great script! I've been using it since it's first incarnation, on MIUI alone with great success. Battery life is better, phone runs very smooth and the best thing is that you can set a different CPU governor for AWAKE/SLEEP modes plus all those tweaks.
I'd like more control over the audio volume, I feel as it's not loud enough; is it possible to add a tweakable audio boost function? Something that would make the ringtones ring louder?
Audioboost is built into the kernel upon compiling. But I think there's a volume hack app floating around the dev section that you can use.
ch33kybutt said:
Audioboost is built into the kernel upon compiling. But I think there's a volume hack app floating around the dev section that you can use.
Click to expand...
Click to collapse
Thanks for answering! I know about the app, I was wondering if that tweak can also be implemented in ss4n1.
Installation instructions?
Sent from my Nexus One using XDA App
PnkPwrRngr said:
Installation instructions?
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
- Download latest zip
- Save to sdcard
- Boot phone to recovery and install zip
- Check OP for "How to enable SS4N1"
Hmmm....I think I may have to look into this one!
Seems interesting. Don't know how I missed this being posted 3 days ago.
ch33ky, are the settings in picture 8 your optimal settings?
I'm not 100% confident in making my own settings yet and I'd like to use that as a guide.
I actually set mine to whatever your first picture shows but before saving I realized picture 8 had different settings and since I flashed your kernel as well I figured I'd try out your settings..
uoY_redruM said:
ch33ky, are the settings in picture 8 your optimal settings?
I'm not 100% confident in making my own settings yet and I'd like to use that as a guide.
I actually set mine to whatever your first picture shows but before saving I realized picture 8 had different settings and since I flashed your kernel as well I figured I'd try out your settings..
Click to expand...
Click to collapse
I'm actually using the settings in pic 2 right now.
ch33kybutt said:
I'm actually using the settings in pic 2 right now.
Click to expand...
Click to collapse
How are they working for you? Picture8 settings are causing a pretty bad delay when loading multiple web pages at once and when typing it is falling WAY behind me. I have to stop every few seconds and let it catch up.
uoY_redruM said:
How are they working for you? Picture8 settings are causing a pretty bad delay when loading multiple web pages at once and when typing it is falling WAY behind me. I have to stop every few seconds and let it catch up.
Click to expand...
Click to collapse
That's probably because you're using SavagedZen governor in awake-mode. SavagedZen cpu governor is more attuned to battery-savings than performance-boost. Try switching to interactive governor instead.
EASY ENGLISH: Differences between this module and the others:
- allows to set max CPU freq when screen is off (to save battery),
- allows to set starting CPU freq when phone awakes (to speed up awake process),
- allows set/change almost all aspects of governor (to suite needs),
- should be a bit more responsive when parameters are well chosen.
Note: Don't use DSP Manager when this governor is enabled (it consumes more CPU then player itself). When screen goes off - sound will be distorted. Use player with equalizer build-in instead.
Governor have some predefinied values - more info in "Available settings".
Start:
The goal was bring 'smartass' governor to work with X8 and also make some improvements.
What Is A CPUFreq Governor?
==============================
Most cpufreq drivers (in fact, all except one, longrun) or even most
cpu frequency scaling algorithms only offer the CPU to be set to one
frequency. In order to offer dynamic frequency scaling, the cpufreq
core must be able to tell these drivers of a "target frequency". So
these specific drivers will be transformed to offer a "->target"
call instead of the existing "->setpolicy" call. For "longrun", all
stays the same, though.
How to decide what frequency within the CPUfreq policy should be used?
That's done using "cpufreq governors". Two are already in this patch
-- they're the already existing "powersave" and "performance" which
set the frequency statically to the lowest or highest frequency,
respectively. At least two more such governors will be ready for
addition in the near future, but likely many more as there are various
different theories and models about dynamic frequency scaling
around. Using such a generic interface as cpufreq offers to scaling
governors, these can be tested extensively, and the best one can be
selected for each specific use.
Click to expand...
Click to collapse
SMARTASS GOVERNOR - is based on the concept of the interactive governor.
I have always agreed that in theory the way interactive works - by taking over the idle loop - is very attractive. I have never managed to tweak it so it would behave decently in real life. Smartass is a complete rewrite of the code plus more. I think its a success. Performance is on par with the "old" minmax and I think smartass is a bit more responsive. Battery life is hard to quantify precisely but it does spend much more time at the lower frequencies.
Smartass will also cap the max frequency when sleeping to 245Mhz (or if your min frequency is higher than 245 - why?! - it will cap it to your min frequency). Lets take for example the 600/245 kernel, it will sleep at 245. No need for sleep profiles any more!
Click to expand...
Click to collapse
Info:
- information about governors is here,
- more information about 'smartass' governor is here,
- how different governors work is explained here: [Q] SetCPU governors (explained).
Prerequisites:
- X8,
- Baseband x15
- desire to replace SetCPU - when used only for 'ScreenOff' profile.
Manual installation:
- push ax8_smartass.ko to /system/lib/modules
- run the following command
Code:
insmod /system/lib/modules/ax8_smartass.ko
echo "smartass" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Available settings:
Note: there is no need to add following commands without changed value. The values are already implemented in module.
- up_rate_us:
The minimum amount of time to spend at a frequency before we can ramp up.
Default value:
Code:
echo "24000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/up_rate_us
- down_rate_us:
The minimum amount of time to spend at a frequency before we can ramp down. Default value:
Code:
echo "49000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/down_rate_us
- up_min_freq:
When ramping up frequency with no idle cycles jump to at least this frequency.
Zero disables. Set a very high value to jump to policy max freqeuncy.
Code:
echo "0" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/up_min_freq
- sleep_max_freq:
When sleep_max_freq>0 the frequency when suspended will be capped by this frequency. Also will wake up at max frequency of policy to minimize wakeup issues.
Set sleep_max_freq=0 to disable this behavior.
Default value:
Code:
echo "122880" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sleep_max_freq
- sleep_wakeup_freq:
The frequency to set when waking up from sleep.
When sleep_max_freq=0 this will have no effect.
Default value:
Code:
echo "600000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sleep_wakeup_freq
- awake_min_freq: When awake_min_freq>0 the frequency when not suspended will not go below this frequency.
Set awake_min_freq=0 to disable this behavior.
Default value:
Code:
echo "0" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/awake_min_freq
- sample_rate_jiffies:
Sampling rate, I highly recommend to leave it at 2.
- ramp_up_step:
Freqeuncy delta when ramping up.
zero disables and causes to always jump straight to max frequency.
Default value:
Code:
echo "220000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/ramp_up_step
- ramp_down_step:
Freqeuncy delta when ramping down.
zero disables and will calculate ramp down according to load heuristic.
Default value:
Code:
echo "160000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/ramp_down_step
- max_cpu_load:
CPU freq will be increased if measured load > max_cpu_load.
Default value:
Code:
echo "75" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/max_cpu_load
- min_cpu_load: CPU freq will be decreased if measured load < min_cpu_load.
Default value:
Code:
echo "25" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/min_cpu_load
- sleep_rate_us: Sleep rate when screen is off
Code:
echo "500000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sleep_rate_us
Release history:
v002:
- sleep_max_freq set to 122880 - more battery saving,
- sleep_wakeup_freq set to 600000 - faster wake up,
- ramp_down_step set to 160000 - to slow down decreasing CPU freq,
- when screen is off - governor acts like its 'conservative' version, just checks CPU loads using 500ms rate,
- added sleep_rate_us parameter - sleep rate when screen is off can be changed using this parameter.
v001:
- just initial version fixed to work with X8.
Sources at: GitHub
Very nice Andy! Apparently we found ourselves a new Module Man
i don't really know what this is all about, its some kind of an AI for cpu governor?
i like the kuyadroid setting(its use native cm setting not setcpu), so its gonna be an setup on cm setting?
Downloading to make some tests
As I can see it is a custom CPU governors, like one "Do it yourself"
Maybe now some people stop complaining about battery life in every ROM. Thx AnDyX
biscoitu said:
Downloading to make some tests
As I can see it is a custom CPU governors, like one "Do it yourself"
Click to expand...
Click to collapse
It is rather - get abandoned project ('erasmux') and refresh it . I tried to resolve one of annoying issue:
12. Using smartass the CPU frequency does go above 352Mhz (with screen off)
Intentional to keep standby battery life under control.
13. Using smartass the CPU frequency is always at its max (or always at 352Mhz when screen is off)
See "Monitoring the CPU frequency" in the "Advanced subjects".
Click to expand...
Click to collapse
I will test it now and I let know how it compares to 'ondemand' tomorrow.
so in plain english(sorry im a noob) this changes the CPU freq scaling behavior? does it improve preformance?
Aashrey99 said:
so in plain english(sorry im a noob) this changes the CPU freq scaling behavior? does it improve preformance?
Click to expand...
Click to collapse
I will add better explanation soon.
Nice module AnDyX I'm gonna check it. Did you have to hijack many calls?
doixanh said:
Nice module AnDyX I'm gonna check it. Did you have to hijack many calls?
Click to expand...
Click to collapse
Only two
But your:
Code:
kallsyms_lookup_name_ax = (void*) OFS_KALLSYMS_LOOKUP_NAME;
is irreplaceable
AndyX...Is this an AI SetCPU??....when we push it to out phone..it will auto config or we config ourself?
lukewong01 said:
AndyX...Is this an AI SetCPU??....when we push it to out phone..it will auto config or we config ourself?
Click to expand...
Click to collapse
Module has predefinied value - I changed info and explained this in main post.
Well this is an instant success!!!!! My stock SE 2.1 is much more responsive now. Menus are smoother and apps start up faster and dont lag much.
I haven't tested it on any custom ROM yet, but i'll do that today. Will report back soon.
Thanks for the awesome module!
AnDyX said:
Module has predefinied value - I changed info and explained this in main post.
Click to expand...
Click to collapse
hmm...i just have 1 question on my mind...i just wanna know we need to customize the value ourself or just push it to our phone and insmod and thats it?
lukewong01 said:
hmm...i just have 1 question on my mind...i just wanna know we need to customize the value ourself or just push it to our phone and insmod and thats it?
Click to expand...
Click to collapse
Just push - module has predefined values as standing in 1st post, after that you can tweak it if you want and share opinion.
khartaras said:
Very nice Andy! Apparently we found ourselves a new Module Man
Click to expand...
Click to collapse
yeah, that's the first thing that came to my mind when i noticed this thread. when doixanh focused on improving his rom, there is a new module-star rising up
thanks, andyx! i haven't tried it yet, but i'll sure test it in a few days. actually, i came up with a simmiliar idea, but i have no programming/scripting/whatever skills (ability to write a "hello world" prog in pascal doesn't count, does it? LOL)
Does this module has conflict with the other modules if i push it or it will work with itself? I mean if this is safe in all ROM without conflicts from racht or dx modules?
i have one question: if i reboot my x8, will i have to insmod it again ??? or can i add these 2 lines in hwconfig ??? thanks for reply
deedii said:
Does this module has conflict with the other modules if i push it or it will work with itself? I mean if this is safe in all ROM without conflicts from racht or dx modules?
Click to expand...
Click to collapse
This module adds completely new functionality, so should work in all ROM-s.
Oh thanks much andyx.x0x0
this thing works well! applications start quickly and everything runs smoothly. Thank you very much for all your modules AnDyX. You're doing really useful and necessary moduls and I'm use all your modules.
Good job!
Im looking for an init.d script to set the cpu gov to performance...i know this can be done using setcpu just wondering how to make a script. I had one on my X2 that would set Gov to performance, looking for one for razr.
This is ont one from the X2, will this work? also will it work for both cores?
Code:
#!/system/bin/sh
echo 1 > /sys/devices/system/cpu/cpu1/online
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo 312000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 312000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo 1200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1200000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
It will, but it would suck your battery really, really fast.
And you should set 1200000 as max_freq if you want to use the real CPU's max freq.
kholk said:
It will, but it would suck your battery really, really fast.
And you should set 1200000 as max_freq if you want to use the real CPU's max freq.
Click to expand...
Click to collapse
Ya i wouldn't use those freq values that was just the code copied from X2
mattfox27 said:
Ya i wouldn't use those freq values that was just the code copied from X2
Click to expand...
Click to collapse
download Linpack... run a multi-threaded benchmark in mot_hotplug governor, then switch to performance and run a multi-threaded benchmark. Why do you want to run in performance mode? I think we'll discover that the least amount of cycles on these batteries as possible, will be desired.
tekahuna said:
download Linpack... run a multi-threaded benchmark in mot_hotplug governor, then switch to performance and run a multi-threaded benchmark. Why do you want to run in performance mode? I think we'll discover that the least amount of cycles on these batteries as possible, will be desired.
Click to expand...
Click to collapse
I don't know, im just messing around with phone...
Hey guys,
To those who are still yet unlocked but rooted, I thought I share my experience after tweaking and fine tuning my ATP. I have tested these settings for the last 3 weeks and it appears to be stable and fast. Most of these tweakings are based on various mods/suggestions found on this forum but I have changed some values/settings and picked and mixed others during the fine tuning process.
Tweak 1:
The sio.sh scheduler.
Possibly the best scheduler for my experience. Less lags and less apps complaining of anr's. Our ATPs run noop by default.
To do it (using automated script to be run as startup; e.g. using SManager)
insmod /system/lib/modules/sio-iosched.ko
echo sio > /sys/block/mmcblk0/queue/scheduler
The tweaked script is attached (which combined Tweak 1 and Tweak 2)
Thank you to batoo for compiling this (I think this is by far a big lifesaver) – and to the original developer which I believe the name is Miguel Bolton.
Tweak 2:
Various VM values
The suggested workaround were these (the tune.sh)
swappiness = 0
dirty background ratio =50
dirty ratio = 70
dirty expire centisecs = 20000
dirty writeback centisecs = 20000
However I have changed mine to (with my added comments after //)
swappiness = 0
dirty background ratio =5
dirty ratio = 5
//don't want to be waiting until there are lot of processes' dirty caches before pdflush is done. So we handle this in a more graceful way by chewing a little at at time considering we already have slow io
dirty expire centisecs = 1000
//let's write dirty page to the disk and not wait too long if the ratio above has not been achieved
dirty writeback centisecs = 1000
This is reflected in the script as below:
VM values changed
echo 0 > /proc/sys/vm/swappiness
echo 5 > /proc/sys/vm/dirty_background_ratio
echo 5 > /proc/sys/vm/dirty_ratio
echo 1000 > /proc/sys/vm/dirty_expire_centisecs
echo 1000 > /proc/sys/vm/dirty_writeback_centisecs
The tweaked script is attached.
Thank you to batoo for first sharing tweaks.
Tweak 3:
Changing the default values we run Powersave – Balanced – Performance. What I think is, because core throttling is a clever thing, pushing up current Powersave to 1.2, Balanced to 1.4 and Performace to 1.6 shouldn't affect battery life that much. I am running Balanced on battery and I seemed not to lose that much battery life < 1.30hour loss and most of the time much less.
To do this, I modified the scripts in /system/etc so the appropriate one is “invoked” when the respective mode is chosen (changed scripts uploaded).
Tweak 4:
build.prop.
I have only cherry picked and commented out other settings which I think wouldn't confer any additional benefits. My modified build.prop (for ww sku) that is, is attached.
Thank you to seanzscreams for first sharing this tweaks.
It would be good to have some input from experts/devs in here on what they think especially the vm tweaks above.
Disclaimer:
I am not an android expert or a developer. It works well for me. Whilst I don't think how any of these scripts can brick your Prime, the advice is of course, do it at your own risk.
maxfac1234 said:
Hey guys,
To those who are still yet unlocked but rooted, I thought I share my experience after tweaking and fine tuning my ATP. I have tested these settings for the last 3 weeks and it appears to be stable and fast. Most of these tweakings are based on various mods/suggestions found on this forum but I have changed some values/settings and picked and mixed others during the fine tuning process.
Tweak 1:
The sio.sh scheduler.
Possibly the best scheduler for my experience. Less lags and less apps complaining of anr's. Our ATPs run noop by default.
To do it (using automated script to be run as startup; e.g. using SManager)
insmod /system/lib/modules/sio-iosched.ko
echo sio > /sys/block/mmcblk0/queue/scheduler
The tweaked script is attached (which combined Tweak 1 and Tweak 2)
Thank you to batoo for compiling this (I think this is by far a big lifesaver) – and to the original developer which I believe the name is Miguel Bolton.
Tweak 2:
Various VM values
The suggested workaround were these (the tune.sh)
swappiness = 0
dirty background ratio =50
dirty ratio = 70
dirty expire centisecs = 20000
dirty writeback centisecs = 20000
However I have changed mine to (with my added comments after //)
swappiness = 0
dirty background ratio =5
dirty ratio = 5
//don't want to be waiting until there are lot of processes' dirty caches before pdflush is done. So we handle this in a more graceful way by chewing a little at at time considering we already have slow io
dirty expire centisecs = 1000
//let's write dirty page to the disk and not wait too long if the ratio above has not been achieved
dirty writeback centisecs = 1000
This is reflected in the script as below:
VM values changed
echo 0 > /proc/sys/vm/swappiness
echo 5 > /proc/sys/vm/dirty_background_ratio
echo 5 > /proc/sys/vm/dirty_ratio
echo 1000 > /proc/sys/vm/dirty_expire_centisecs
echo 1000 > /proc/sys/vm/dirty_writeback_centisecs
The tweaked script is attached.
Thank you to batoo for first sharing tweaks.
Tweak 3:
Changing the default values we run Powersave – Balanced – Performance. What I think is, because core throttling is a clever thing, pushing up current Powersave to 1.2, Balanced to 1.4 and Performace to 1.6 shouldn't affect battery life that much. I am running Balanced on battery and I seemed not to lose that much battery life < 1.30hour loss and most of the time much less.
To do this, I modified the scripts in /system/etc so the appropriate one is “invoked” when the respective mode is chosen (changed scripts uploaded).
Tweak 4:
build.prop.
I have only cherry picked and commented out other settings which I think wouldn't confer any additional benefits. My modified build.prop (for ww sku) that is, is attached.
Thank you to seanzscreams for first sharing this tweaks.
It would be good to have some input from experts/devs in here on what they think especially the vm tweaks above.
Disclaimer:
I am not an android expert or a developer. It works well for me. Whilst I don't think how any of these scripts can brick your Prime, the advice is of course, do it at your own risk.
Click to expand...
Click to collapse
Nothing against, but my recommendation is try to read something about dirty ratio function.
Btw my opinion for this is that advance user will change these values without advice and beginner or non linux skilled user will not modify ATP sources...
BTW guys ALL of you who has not unlocked device (like me) I really DON'T recommend you to modify build.prop at all.
This post is not offensive or personal, only my opinion.
Sent from my Transformer Prime TF201 using Tapatalk 2
/// JellyBeanX-kernel ///
DISCLAIMER
Me, XDA-Developers.com and anyone else doesn't take any repsonsibilty for damages on your device!
Rooting your device will void your warranty!
Don't play with settings you aren't familiar with, you could burn your device!!
Click to expand...
Click to collapse
READ THIS: READ BEFORE YOU ASK and HELP TO KEEP THIS THREAD MORE CLEAN! BUT ALSO BETTER ASK ONCE MORE BEFORE YOU MESS UP YOUR PHONE! If you find something missing in this OP/FAQ, please PM me and I will add it. Thank you!
This kernel is built of the Kexec Project which was initiated first by Kholk & [mbm] and finished by the STS-Dev-Team (Hashcode, Dhacker). Using this kernel will provide addtional features to your RAZR.
If you want to support me and my work just leave me a beer.
You can find the FAQ at the bottom of this post!
LATEST CHANGES
--> DETAILED CHANGELOG JBX-kernel Hybrid 4.4 <--
Kernel Guide (by Placca) version 1.8!!
Check the FAQ section at the bottom of this post to download it! It will make many things easier for you and help you to understand the kernel and its features!
FEATURES
JBX-Kernel Hybrid
Battery Friend toggle (a battery friendly mode)
Intelli-Plug (Kernel side replacement for msm MPDecisions) by Faux123 + patches by me (no hotplugging when screen is ON)
Dynamic Hotplug: Second core will be turned off ONLY while screen is off - independent from selected governor. (Not needed when using Intelli-Plug)
Optimized OPP Table for smooth CPU scaling
Frequencies: 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300
Modifed Smartreflex driver (Custom Sensor for detecting n-Value).
Smartreflex Tuning Interface: Set min/max calibrated voltage
Overclocking using Live OC (mine runs stable at a maximum frequency of 1,498ghz!)
hwmod, uart, IRQs - cleanups from pre-kexec config to safe power
CPU: lower voltages for CORE and IVA. Give CORE the abbility to scale up to higher voltage if needed
Dynamic fsync control: FSYNC interval is dynamic depending on screen state (SCREEN OFF: synchronous, SCREEN ON: asynchronous)
HTC's Asynchronous Fsync port - read explanation in FAQ*
Dynamic page-writeback: Page writeback interval is dynamic depending on screen state.
Frandom v2
JRCU / Tiny RCU (currently JRCU in use)
Raised voltage limits for mpu a bit
Raised the temperature limits from 64c* to 74c* (degrees)
optimized CRC32 algorithm (better code generation)
Optimized LZO compression
RW Readahead dynamically depending on storage device (automatic detection of the best value)
zRAM support
GPU has 4 scaling steps and OC to 384mhz (Base freq: 102 mhz --> 154 mhz, 307 mhz, 384 mhz)
GPU Control: Governors, Frequencies
Multicore Power Saving Mode Control
ARCH Dependant Power feature
Gamma Control
Front Buffer Delay Control (draw in x msecs on early suspend)
Screen/Display: Modified OMAPDSS for sharpness and lightning colors
OMAPDSS: Added variable clock rate and OPP - allows the screen to scale down power and voltage
lowmemkiller: Heavy modified for R/W Speed and efficient performance
ZCACHE, ZSMALLOC, XVMALLOC backported from 3.4, 3.7 and 3.10 (ZCACHE currently not in use)
Custom Voltage Support
IO-Schedulers: SIOPlus, Fifo, Row, VR, Noop, Deadline, CFQ, BFQ
ROW Scheduler is heavily tweaked to be the fastest one!
Deep Idle
ARM Topology
Many improvements in overall OMAP PM
SELinux permissive
GREAT performance!
battery life!
Support for Trickster Mod Kernel Control App (Download from Gplay)
*]Too much stuff to list here. See "Sources" below and check my Github
CAUTION
This is a work in progress! Some of the current features are still not in final stat. If you are facing issues report back here and DON'T spam the threads of the rom you're using!
Be careful with some settings such like Voltage and Overclocking!!! If you aren't experienced with these things, dont play with 'em!
Click to expand...
Click to collapse
REQUIREMENTS
NOTE: This will NOT work on Stock(-based) Roms!!
Rooted device
Must use a Kexec Rom (CM, AOKP, AOSP)
Recovery (BMM, SS)
REMOVE any kernel modules you used before
DEACTIVATE ANY CPU tweaks, onboot settings etc otherwise your phone may not boot!
CAUTION: The kernel needs a clean setup related to CPU tweaks / Settings, etc...Keep your device as clean as possible regarding to Tweaks, CPU special settings, etc. The Kernel brings its own CPU settings and after you can boot it succesfully, you can set it like you want!
This kernel may not work on all roms! Check and report.
INSTRUCTIONS
NOTE: CLICK here for a detailled Installation Guide (about the Aroma Installer, the features to select and more)
Download zip file from below
Reboot into recovery
Flash the kernel (BMM users: DON'T use the "Flash Kernel" Option! This is a usual zip file!)
Reboot
Download Trickster Mod App from Gplay! Read the FAQ to learn about playing with kernel features!
Enjoy!
NOTE: For updates you can use the built-in OTA UpdateMe App!
DOWNLOAD
JBX-Kernel 3.0.8 Versions:
0.8.x ==> Android 4.2.2
1.x == > Android 4.3
2.x == > Android 4.4
JBX-Kernel 3.0.31 Versions:
3.x == > Android 4.4
4.x == > Android 5.X
NOTE: CF-Server is currently down! Use "[email protected]" on dtrailer.de (right after clicking on the big blue DOWNLOAD button above!
XPERIMENTAL BUILDs
These builds include features without promises to work.
CAUTION: There is no promise that these version are stable/working/whatever! Use at your own risk!!
---> XPERIMENTAL Builds [Dev-Host] <---
---> XPERIMENTAL Builds [CF] <---
Click to expand...
Click to collapse
Something went wrong?
If you think you have set wrong "on-boot-values" in Trickster Mod flash this:
TRICKSTER RESET: http://dtrailer.de/kernel/trickster_reset.zip
FAQ
CAUTION: This FAQ and the whole OP, additional informations about Governors, IO Schedulers and detailed informations about the usage of Trickster Mod and this kernel can be viewed in the awesome Kernel Guide by Placca!
Kernel Guide 1.7
- installation guide (was a top priority )
- latest changelogs added
- few more supported ROMs in the Requirements sections
- few typos and formatting issues as always
PDF: https://www.mediafire.com/?7zaddcmvtxfk9ry
CHM: https://www.mediafire.com/?g3ck1bf1k3a3j38
CLICK THE BUTTON BELOW TO OPEN THE FAQ!
Please check the following points if you don't know how to use the features of the kernel or you are facing any kind of issues.
INDEX
1. Kernel Features
1.1 Smartreflex (Turn ON/OFF, adjust min/max range)
1.2 Live OC (Realtime Overclocking)
1.3 Custom Voltage (EMIF)
1.4 GPU Overclock & GPU Governor (UPDATED)
1.5 Gamma Control
1.6 Battery Friend
1.7 Suspend Governor (CURRENTLY DISABLED)
1.8 IVA Overclock
1.9 DPLL Cascading
1.10 HDMI toggle
1.11 Intelli-Plug
1.12 Dynamic Fsync VS. Asynchronous Fync
2. Issues
1.1 How can I change the smartreflex minimum/maximum voltage
What is Smartreflex?
SR is compareable with an CPU governor but not for scaling frequencies but for voltages. That means SR has a fixed range of voltage (min/max) and calculates the optimal voltage for each CPU frequency. In example on light use of the CPU it scales down to lower voltage - on heavy use it can sclae to higher voltage. This is an efficient system to save power! Compared to EMIF which uses the hardcoded voltages it saves more power because it's variable. EMIF cannot vary between the values.
This interface has a hardcoded range of 830mV min to 1450mV max. Usually there is no need to adjust these values but irt can be usefull in example when using high overclocked frequencies above 1,5ghz! Usually SR cannot handle frequencies above 1,5ghz and I have hardcoded the maximum range of 1,45mV which should allow SR to handle it. In prior times the users had to turn off SR when OCing above 1,5ghz which causes the CPU to eat more power. But you can try around and report your results.
CAUTION: Don't raise the maximum SR voltage too high! It can burn your board = no phone anymore! I recommend to not use higher values than 1490mV! As already mentioned: THe default value should be enough!
ANd also: USUALLY THERE IS NO NEED TO CHANGE ANYTHING ON SR! IF YOU DON'T KNOW WHAT YOU'RE DOING, PLEASE LEAVE IT ALONE!
Ok, now let's see how to do this:
Turn ON/OFF SR
1. Open Trickster Mod
2. Head to the "Specific section"
3. Scroll down to "Smartreflex"
4. You can toggle ON/OFF SR for each component (IVA, CORE, MPU)
Usually I recommend to keep SR ON because it saves power! But in some cases when overclocking the CPU (MPU) the device could freeze - whether you OCed too much or SR couldn't handle the frequency! In this case you can try to raise the vmax value of SR a little bit (CAREFULLY!) and try again. If it sitll freezes and you're sure that you didn't OC too much, turn SR OFF at least for MPU!
Maximum Voltage
Currently there is no app which supports the feature of adjusting the SR vmax value, because I wrote this feature some days ago.
But in the next Trickster Mod version this option will be supported!
example:
# To read the current vmax value. Replace XXX with one of the following:
sc_core - for core max sr voltage
sr_iva - for iva max sr voltage
sr_mpu - for mpu max sr voltage (mpu is most related for CPU scaling)
cat /sys/kernel/debug/smartreflex/XXX/vmax
# You will get an output, e.g. for mpu = 1450000 (1450mV)
# To set a new value, do the following command (replace XXX with a value like above - BE CAREFUL! USUALLY THE DEFAULT VALUE ENOUGH AND YOU CAN LEAVE IT UNTOUCHED!)
echo XXX > /sys/kernel/debug/smartreflex/XXX/vmax
Minimum Voltage
It's easy because Trickster Mod supports it!
1. Open Trickster Mod
2. Head to the "Specific section"
3. Scroll down to "Smartreflex"
4. Below each SR component (IVA, CORE, MPU) there is displayed a value (usually 830 default) which means this is the lowest scalable voltage for this component. You can try to decrease this value for the case you want to UV a bit more - or raise it a bit for the case you think that the set range is too low and causes freezes on your device.
1.2 How do I use Live OC (Live OVerclock)?
This feature allows you to overclock the CPU in realtime. It works with a multiplier value set by the user. The default multplier value is "100", which means: No OC! If you want to raise the OC frerquency, just raise this value step by step.
FOr my device the maximum working OC value is "111" which means the maximum frequency is running at 1498mhz!
NOTE: Keep in mind that you tunr Smartreflex OFF for higher freqs than 1500mhz - or raise the maximum SR voltage range for "MPU" a little bit and test if it works.
Ok, how to use Live oC in action:
Open Trickster Mod App and swipe to the tab "Specific". There you will find something like this:
Code:
MPU OC [100]
DON'T TOUCH THE "CORE OC" SECTION, IT WILL CAUSE FREEZES!
Now slowly increase the value "100" to something higher, e.g. "105". Tap the hook in the right upper corner to confirm. To see your new set of frequencies you can now whether close and restart Trickster Mod or just use any monitoring app like Cool Tool which will show your frequencies in real time. That's it!
CAUTION: You can damage your phone forever!!!! This feature allows you to set very high frequencies (also up to 2,0ghz...) - That DOESN'T mean that your phone can run these frequencies!
If your phone freezes or crashes you have probably set too high OC - or your voltage is too low.
1.3 How do I use Custom Voltage (EMIF)?
NOTE: This only adjusts the fixed voltage! When you have Smartreflex ON it can still vary! You have to see the bigger picture: This voltage value sets the "middle point" for voltages. Smartreflex is still able to increase or decrease the voltage. When Smartreflex is OFF the CPU will stay on this voltage you set here and probably eats also more power.
How does EMIF works together with Smartreflex:
Code:
-------
| CPU |
-------
|
------------------ ------------------
|Voltage 1015 mV | ---->| SMARTREFLEX ON| = 1015mV +/- "vmax"/"vmin"
------------------ -------------------
|
--------------------
|SMARTREFLEX OFF| ----> 1015mV FIXED! No changes!
-------------------
Thi smeans if you change the voltage for a scaling step (OPP) while SR is ON, SR will adjust the voltage from this value, means: mV-Value +/- SR vmin/vmax. WHen SR is OFF it will stay on this mV as a fixed value.
How to adjust the voltage?
Well, this feature can be used with all generic apps which are supporting voltage settings. But we are prepared well, you can adjust voltages also with the "Trickster Mod App".
When you open the app, head to the tab "Specific" and below the "Live OC Section" you will find your voltage table, which looks like this:
Code:
<-->
1200 [1398]
1000 [1388]
900 [1371]
...
..
..
Now just tap the arrows in the right upper above the first voltage value and just type or tap (per direction) a value, e.g. "-25". To apply it, confirm by tapping the hook in the right upper corner of your screen. That's it, your new voltage values are now set and applied. And also mind here: If your phone freezes you porbably have set it too low.
CAUTION: NEVER SET HIGHER VOLTAGE THAN 1490mv here!!!!! Or you might damage your phone FOREVER!
This voltage is not the same like Smartreflex! But it's still voltage! Just be carefull!!
1.4 How can I use GPU OC and GPU Governor?
GPU Overclock doesn't work like Live OC! You cannot really set custom frequencies for the GPU, but you can select and set the maximum frequency from a hardcoded range!
For the GPU there are the following available frequencies:
154mhz (FIXED!)
307mhz
384mhz
416mhz
The minimum frequency of 154 is FIXED! This means you cannot change it because the GPU needs a minimum speed to run with. But the kernel allows you to select the maximum speed. This can be usefull for playing games and also for saving power . In example when not playing games you don't need the GPU to run at 416mhz! Set it to 307mhz in this case and save power.
When you open Trcikster Mod and head to the "specific section tab", you will find "GPU MAX FREQUENCY" and it's currently set maximum frequency. Tap on it to select your preferred one:
- 154 Mhz
- 307 MHz
- 384 MHz
That's it. The new setting will be your new maximum GPU frequency.
Below there's another option called "GPU Governor". Just tap on it and select your prefered one.
NOTE: If you want to track current GPU frequencies and watch governor's behavior, just switch to Trickster's "Informations" - Tab and watch the frequencies clock.
1.5 How can I use Gamma Control?
What is gamma? The gamma setting sets the color range for the screen. You can compare it to the contrast. We all know that the touchscreen eats most of the power compaerd to all other components in a smartphone! A lower brightness causes less power consumption and a lower gamma or contrast range alos helps a little bit to save power.
In this kernel you can choose from a range of "5 - 10" while "5" is very bright while "10" is very dark. The default setting is "5" BUT CAUTION: Trickster Mod will display a range of "0" to "10" and the default setting will be shown as "0". This is caused by the fact that this feature was ported from the Gnex device where you can choose from a higher range. The only sideeffect is that the values "0" - "5" won't show any difference.
How to set the gamma value?
Well, once again open Trickster Mod and swipe to the tab on the right end. Just select your preferred value by using the slider.
Alternately you can use sysfs by terminal or adb:
OMAP Gamma interface:
echo i > /sys/devices/platform/omapdss/manager0/gamma
Replace i with 0-10 of your choice.
1.6 What is "Battery Friend and how to use it?
Battery Friend is a simple toggle (ON/OFF) which sets your device into a battery friendly mode without the need to play with all settings in Trickster Mod /sysfs until you find a good setting. In fact it does the job for you.
What does it affect?
NOTE: Doesn't lock anyx frequencies anymore!
locks dynamic Fsync enabled
locks Fsync disabled
Doesn't allow any OC (Live OC will not have any effect, Core OC is not allowed in this kernel)
Increases the dirty ratio interval to 90% (starts working at this value)
Enables Dynamic Hotplug: This doesn't allow hotplugging during device is active - and it will always turn CPU1 OFF during suspend! It also prevents from conflicts when user uses a hotplug governor (which isn't a good idea though) - but hotplug governors are causing higher battery drain!
Dynamic Page-writeback always enabled
How to toggle Battery Friend:
For now the only way is via terminal, adb shell or root explorer (text editor)
For terminal and adb:
Code:
echo 1 > sys/kernel/battery_friend/battery_friend_active /* Enable */
echo 0 > sys/kernel/battery_friend/battery_friend_active /* Disable */
For Root Explorer
Open Root Explorer
Navigate to sys/kernel/battery_friend/
Open "battery_friend_active" with Text Editor
Change "0" to "1" and safe the file to enable
Change "1" to "0" and safe the file to disable
1.7 Suspend Governor Control (CURRENTLY DISABLED)
Suspend Governor Control is a kernel module written by me. You can use it to set your preferred Screen-Off-governor.
For now it's only supported by sysfs (Trickster Mod will support all my current and upcoming features as soon as it gets updated with its new UI mode!
How to set suspend governor
Open a terminal or use adb shell
Code:
su
echo "x" > /sys/kernel/suspend_gov/suspend_gov
Replace x with one of these values:
0 = Ondemand
1 = Ktoonservative
2 = Conservative
3 = OndemandX
NOTE: No matter what governor you use for suspend mode, if Battery Friend is enabled the second core will be turned off during suspend!
1.8 IVA Overclock
What is IVA OC?
IVA OPPs are controlling the CPU load for sound events. It could be useful (in some cases) when you get sound related laggs. Just set the maximum frequency to highspeed. This will allow more CPU power for sound events but also will cause higher battery consumption.
How to use IVA OC?
If you want to check the current IVA frequency. Just type in Terminal or ADB:
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/iva_clock
You will get an output like this:
Code:
132 Mhz
2. You can whether enable IVA highspeed: 130 - 430 Mhz ["1"] or enable IVA normal speed: 130 - 332 Mhz ["0"]
320 Mhz max: echo "0" > sys/devices/system/cpu/cpu0/cpufreq/iva_freq_oc
430 Mhz max: echo "1" > sys/devices/system/cpu/cpu0/cpufreq/iva_freq_oc
1.9 DPLL Cascading
DPLL: Davis–Putnam–Logemann–Loveland (DPLL) algorithm
To get more info about this please see wiki
But to sum it up shortly: It helps to use/stream media (music) in a low power mode.
NOTE: DPLL Cascading will be available to be switched easily via Trickster Mod App soon!
How to switch DPLL?
DPLL is ENABLED by default!
Open Trickster Mod -> Speicific Tab --> DPLL (soon)
sysfs:
Turn off:
Code:
echo 0 > /sys/kernel/dpll/dpll_active
Turn on:
Code:
echo 1 > /sys/kernel/dpll/dpll_active
1.10 HDMI toggle
Some users are facing a RAZR-sepcific problem: HDMI cable is detected, even though there is no cable plugged!
Therefor I included a toggle to switch HDMI wether ON or OFF. Additinally there's an init.d script included within the AROMA Installer you can select during the installation of JBX-Kernel.
To enable/disable HDMI on-the-fy:
sysfs:
Turn off:
Code:
echo 0 > /sys/kernel/hdmi/hdmi_active
Turn on:
Code:
echo 1 > /sys/kernel/hdmi/hdmi_active
1.11 Intelli-Plug
For intelli-plug hotplugging is now only allowed when the device enters sleep.
To enable hotplugging universally just change the value of the following entry whether to 1 (on) or 0 (off):
Code:
sys/module/intelli-plug/parameters/int_hotplug
1.12 Dynamic Fsync VS. Asynchronous Fsync
* HTC's Asynchronous Fsync and Dynamic Fsync:
Asynchronous fsync (called "afsync" or "async fsync") from HTC is ported into this kernel. By default it's enabled and dynamic fsync is disabled (and as well it isn't needed anymore). But just to test a little bit around to see which one of both features is the better one - for battery & performance. But currently Tricktser Mod doesn't support a toggle for afsync, so I had to find another way to use Trckster. Finally I did it like this:
The dynamic fsync toggle in Trickster Mod is now serving both functions - the dynamic fsync AND the asynchronous fsync! How? By default Dynamic Fsync is disabled, and Afsync is enabled. If you now enable Dynamic fsync using the toggle, Afsync will be automatically disabled, so both functions are not conflicting each other - and this way we have a working toggle for both of them.
2. If anyone has the following issues:
Issue
Media Process FC
No SD-Card in File Explorer
My CPU Settings (frequencies, etc) won't be saved (it sets itself back to Kernel default after screen off)
My phone freezes/reboots always when I try to set options in Trickster Mod
The device is lagging very hard
Solution
Media FC: Open App settings, head to "Download Manager" and "Media Storage" and hit the "delete data" button. Reboot. Now it shouldn't give any FCs anymore and after a little bit of waiting it will find all Media (Pictures, Videos, etc..)
No SD-Card: Reboot into recovery, go to "Mounts & Storage", tick "mount int" or "mount ext".
USB: Make sure the screen is ON while plugging the cable in.
CPU Settings: This is a bug which cannot be solved at the moment. Temporary solution: In Trickster Mod just activate the "Frequency Lock" and your settings will persist.
Trickster Mod:: Open App settings, Trickster Mod and select "uninstal updates". Now it should work.
Crashes, Freezes, lagging, something doesn't work, etc
There are too many reasons which could cause crashes! So here is a checklist for you to look for. Check each point and try the following workaround:
- Your rom has CPU tweaks (e.g. Kernel modules, init.d folder, etc)
- You have set custom CPU settings (e.g. custom frequencies with apps like No-Frills CPU Control, Set-CPU, Antutu, etc...)
- You have undervolted too low
- You have overclocked too high
- You have applied higher "Core OC" value in Trickster Mod App
- You are running any other kernel tweaks which are regarding to the CPU and/or performance (e.g. Kernel modules by Whirleyes eventually set by init.d, etc..)
- After setting some settings (e.g. in Trickster Mod) your device doesn't boot anymore
- adb doesn't work / shows only "device offline"
- You are facing hard lagging
If any point here matches your setting, please revert from it:
- Remove any CPU init.d script from /System/etc/init.d
- Uninstall any CPU controling app (e.g. Set-CPU, No-Frills, etc..)
- Remove all extra kernel modules from system/lib/modules (e.g. cpu_control.ko, cpufreq_smartass2.ko, etc..)
- Unset any custom settings from any other kernel / CPU - tweaking app which is NOT Trickster Mod
- Maybe your governor causes issues. Hotplug is know for bugs at the moment...I'm going to fix it..
- NEVER set your CPU Settings (e.g. in Trickster Mod App) on boot!!!! - before you aren't sure that your settings are safe!!!
- You may flash the kernel again after reverting related settings
- to make adb work / show device online, download latest SDK platform-tools and confirm access on device (4.2 security feature of Android)
- Don't use any task killers, memory killers, seeder apps! They may conflict with the kernel/Rom settings.
If none of these suggestions work for you your rom may be incompatible. Please report it here that I can add the rom to the list of imcompatible roms
If you have any issue, please read this:
First check:
- is it really a kernel issue?
- did I see this bug with the roms original kernel?
- what are the people in the rom thread saying?
- what are the people in the kernel thread saying?
- can I find this issue on a bug list?
- how about my settings? Is it my fault it crashed?
- can I find something useful in the kernel FAQ?
- Is it maybe a well known issue and can be solved
withing seconds? Just like wifical.sh?
- Where to repeat that issue? Rom or kernel?
I know it's sometimes difficult to track the issues, and we can't know for sure if it's caused by the rom or by the kernel, but if you try at least to get some information you might find an answer sometimes. If you are able to understand logs, you may report whatever you find.
All this helps to keep the threads more clear. Thank you.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
DONATE
If you like my work and want to support me, I'd enjoy a little beer or coffee. You can find my beer mug below my username
SOURCE
3.0.8 Base:
JBX-Kernel 4.2.2
JBX-Kernel 4.4
CREDITS
Kholk & [mbm] - Kexec inital Release
Hashcode & Dhacker - Making Kexec stable and initiating compatible kernels
Motorola - 3.0.8 Kernel Source
Surdu_Petru - Sharing Knowledge and helping with problems
nithubhaskar - Hints and answering my questions
Ezekeel, Imoseyon - Custom Voltage, Live OC, Temp Control, Gamma Control Source Code
faux123 - Some features, like Intelli-Plug, Intellidemand, Intelliactive
bigeyes0x0 - Trickster Mod App
Team Trickster - Great support and adding new features from my suggestions
Placca - Awesome kernel guide
Nice! Waiting for the download link :laugh:
Hi !
Great work here !!!
Thanks & good luck :good:
just to make sure nothing bad happens:
in bmm you flash this as a "flash zip file" or "flash kernel" (bmm has this option)
im guessing as "flash zip file" (like flashing a rom or gapps) but i thought i'd make sure...
pseudoheld said:
just to make sure nothing bad happens:
in bmm you flash this as a "flash zip file" or "flash kernel" (bmm has this option)
im guessing as "flash zip file" (like flashing a rom or gapps) but i thought i'd make sure...
Click to expand...
Click to collapse
.img: flash kernel
.zip: zip flash file
Someone correct me if I'm wrong.
You flash it as a zip the same way you do with roms and gapps.
Sent from my XT910 using Tapatalk 2
Sounds good
Gesendet von meinem XT910 mit Tapatalk 2
Holy mama, dtrail ready drop the big bomb here...
Sent from my XT910 using Tapatalk 2
How many improvements in this period for this device.
Thanks for your hard work
damn dtrail you're teasing us!
upload it already
Stay tuned... Sorry for the late, but I just make sure you'll get a working package...Didn't think it would take so long...
dtrail1 said:
Stay tuned... Sorry for the late, but I just make sure you'll get a working package...Didn't think it would take so long...
Click to expand...
Click to collapse
Fine! I'm waiting for downloading haha
Waiting for it!
Sent from my XT910 using xda app-developers app
How will we get back on default/Stock rom....
Anyone has any idea via SS?
or should we use RSDLite?
Still waiting!
Awesome work!
How long should it take? I think you you're making a joke of it to make us wait ...
Gesendet von meinem XT910 mit Tapatalk 2
Eh...now uploaded, Thanks!!
Sent from my XT910 using xda premium
Running
Tested on JBX and LiquidSmooth :thumbup:
Gesendet von meinem XT910 mit Tapatalk 2
Merlinos1 said:
Running
Tested on JBX and LiquidSmooth :thumbup:
Gesendet von meinem XT910 mit Tapatalk 2
Click to expand...
Click to collapse
Really? I got it to work on CM Nightly, but it wouldn't install on LiquidSmooth Official. Did you do it on a clean install?
No, just flashed over existing system...
Try Wipe Cache & Dalvik
{
"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"
}
Gesendet von meinem XT910 mit Tapatalk 2