Tweaks Performance Games with GLTools - Lenovo A7000 Guides, News, & Discussion

first you need to have an application gltools with install through Google play store valuable $ 2.99
1. After install open the application then install through recovery mode
2. go to recovery mode and install install_gltools.zip which is in sdcard then reboot
3. open the application gltools and select games that want in tweaks
4. Change the section
-) Enable Custom Settings = Yes
-‎) Anti-aliasing = Disable (forced)
-‎) Use lower render = 0.5x
-‎) Optimize GSLS = Yes
-‎) Enable texture decompress = all
-‎) Enable texture recompress = all
-‎) Downscale textures = 0.25x
-‎) Use fake GPU info = Yes
-‎) Use fake CPU/RAM info = Yes
-‎) Template GPU = Adreno 320
-‎) Template RAM = 2Gb
Information:
1. Adreno320 (graphic standard results)
2. Mali400mp (texture slightly sharp and smooth)
3. Tegra 3 (Texture is sharper, smoother, and better rendered)
4. Powervr sgx 544mp (Same as adreno 320)
For Deletion GLTools:
1. Go to recovery mode and install uninstall_gltools.zip
2. reboot and delete the GLTools app

Related

[REF][ICS] Kernel Stuffs - How is ICS Kernel Different | updated may-28-2012

Hello again to all the people suffering from Obsessive Kernel Flashing Disorder. After i wrote an essay in this thread and bored the readers to death, here is a new thread as a reference to ICS kernel related stuffs. ICS is not a 100% different. But there are differences. Idea here is to understand "How is 3.0 ICS Kernels different from 2.6.35 GB Kernels". Additions, deletions, modifications?
Index:
Post 1: Understanding all the Kernel Tunables
Post 2: Exclusive Features - Dual Booting and BLN Breathing
Post 3: All New Governor - Pegasusq. Parameter Explanations, Sample Tweaks, How to Tweak
Post 4: Kmemhelper Binary Interface - Enjoy Virtual Kernel Hacking
Post 5: Miscellaneous FAQs on Kernel from Different Angles
To begin with we will understand some of the tunables in ICS kernels, taking Gokhanmoral's Siyah kernel as a reference. (Yes, the info here are also valid for other ICS kernels for SGS2). Universal Configurator Interface app ExTweaks has the following tunables with Siyah kernel.
Note: All the tunables explained below may not be available for your current kernel build. Devs tend to experiment by removing some interfaces and adding them back later.
TAB 1 - CPU: Task Scheduler, Hotplugging, Smooth Scaling, Idle States
1) CFS Tweaks:
CFS is the default task scheduler. A task/CPU scheduler does process scheduling, ie manages how the threads, processes or data flows are given access to system resources. (I/O scheduling is different. I/O scheduler schedules I/O requests) CFS uses a binary search tree instead of run-queue method to maintain a timeline of future task execution. Note: Results of task scheduler tuning are experienced only during multi tasking, not during benchmarks.
a) GENTLE FAIR SLEEPERS
Significance: Android UI Interactivity.
Sleeper Fairness is a concept used by CFS which treat sleeping/waiting tasks as if they were in a run queue. This implies tasks which spend most of the time waiting for an user input and such will get a fair share of CPU when they need it. Disabling Gentle Fair Sleepers could improve UI responsiveness.
Tweaking Via Script:
#disable
echo "NO_GENTLE_FAIR_SLEEPERS" > /sys/kernel/debug/sched_features
#enable
echo "GENTLE_FAIR_SLEEPERS" > /sys/kernel/debug/sched_features
b) ARCH POWER
Significance: ARM Topology Awareness.
Arch Power patch causes arch dependent power functions to be used instead of generic high resolution timer ticks and double ticks.
Tweaking Via Script:
#disable
echo "NO_ARCH_POWER" > /sys/kernel/debug/sched_features
#enable
echo "ARCH_POWER" > /sys/kernel/debug/sched_features
2) Hotplug Mode:
Significance: ON/OFF behavior of CPU cores.
Hotplugging as we know dynamically activates second CPU core ON on load conditions and turns second core OFF on low load conditions. Best practice is to use hotplugging instead of single/dual core modes and tweak settings in such a way that until about 800 mhz, only first core is active. This is energy efficient since voltage increase is steep for frequencies above 800mhz. So static power consumption increases sharply and it's better to have two cores handling tasks from here on. According to a test, having only one core online roughly saves about 55% power compared to two cores online. But it's not worth using single core for all frequencies since the device is capable of more.
Sample Value: CPU Hotplug
Tweaking Via Script:
#HOTPLUG
echo "on" > /sys/devices/virtual/misc/second_core/hotplug_on
echo "on" > /sys/devices/virtual/misc/second_core/second_core_on
#SINGLE CORE:
echo "off" > /sys/devices/virtual/misc/second_core/hotplug_on
echo "off" > /sys/devices/virtual/misc/second_core/second_core_on
#DUAL CORE:
echo "off" > /sys/devices/virtual/misc/second_core/hotplug_on
echo "on" > /sys/devices/virtual/misc/second_core/second_core_on
3) load_h0, load_l1:
Significance: Thresholds to ON/OFF second CPU core
Load-High-0 and Load-Low-1 are UP/DOWN thresholds to turn ON and turn OFF second core. When load on first core is greater than loadh0, second core comes online. When average load on both cores is less than loadl1, second core goes offline. Do not overload first core before turning second core on aka do not use high thresholds. See Q&A at the bottom of the post
Sample Values: Less Aggressive: load_h0 50, load_l1 20. More Aggressive: load_ho 30 load_l1 20.
ICS hotplugging logic is different from GB hotplugging. To get the same responsiveness as in gingerbread, use more aggressive(reduced) load_h0 thresholds.
Valid Values: 0 to 100%
Tweaking Via Script:
echo "30" > /sys/module/stand_hotplug/parameters/load_h0
echo "20" > /sys/module/stand_hotplug/parameters/load_l1
4) min_rq, load_rq:
Significance: Enhance hotplugging via CPU Run Queue and Process Priorities
ICS has multiple hotplugging concepts. What's normally used is Standalone Hotplug. We also have the one like GB's (remember loadh, loadh_scroff, loadl, etc). min_rq - Minimum Run Queue and load_rq Load on Run Queue are two parameters to increase multi thread awareness of ICS hotplugging. With these parameters we achieve the goal of turning of second core if fewer task threads are running - even if load is high.
If no of threads running on a Core is less than min_rq and load of that Core is less than load_rq, second core is turned off. Note that the load threshold considered here is for only one core (unlike load_l1 which takes average load on cores to make turning-off-second-core decision).
Example: Let min_rq=2 and load_rq=40%. Suppose both cores are online. Average load on cores has not dropped below load_l1 so it's still not time to turn off second core. But say only one thread is running on second core and load on that core is 30%. Then second core will be turned off.
Sample Values: min_rq 2, load_rq 20%
Valid Values: min_rq: 0, 1 and 2. load_rq: 0 to 100%
Tweaking Via Script:
echo "2" > /sys/module/stand_hotplug/parameters/min_rq
echo "20" > /sys/module/stand_hotplug/parameters/load_rq
5) rate:
Significance: Hotplug Sampling Interval
Every rate jiffies, load is sampled and if found to be more than loadh0, second core is turned ON. One jiffy is the time taken to complete one tick of the system timer. Sgs2 timer frequency is 200hz. So the value divided by 200 gives the equivalent seconds or in other words, one jiffy = 5 milliseconds in GS2 terms.
Sample Values: rate 100.
Valid Values: 50 to 1000 jiffies, in terms of 50s.
Tweaking Via Script:
echo "100" > /sys/module/stand_hotplug/parameters/rate
6) freq_min:
Significance: Cut-off frequency for second core to turn ON
'Threshold' frequency for second core to turn ON during hotplugging. If current frequency <= freq_min, second core will not turn on even if the load has crossed loadh0. CPU runs efficiently if only single core is used until about 800 mhz and both the cores after 800.
Sample Value: freq_min 800000
Valid Values: All the values in freq_table
Tweaking Via Script:
echo "800000" > /sys/module/stand_hotplug/parameters/freq_min
7) CPU Idle States:
Significance: Power saving CPU idle modes that are 'encountered' between screen-off and deep-sleep.
Unlike 8 idle states supported by Nexus OMAP4, GS2 Exynos supports only 3: IDLE, AFTR, LPA.
IDLE - Clock is gated but power on CPU core remains (static power consumption still active)
AFTR - Clock is gated, power on CPU cores removed and L2 cache power remains. Static power consumption mostly eliminated.
LPA - Cache power removed.
AFTR or LPA cannot be entered if second core is active.
Sample Values: Idle Mode 3 (AFTR+LPA), to save battery.
Valid Values: 0, 1, 2, 3
Tweaking Via Script:
#AFTR+LPA
echo "3" > /sys/module/cpuidle_exynos4/parameters/enable_mask
#IDLE+LPA
echo "2" > /sys/module/cpuidle_exynos4/parameters/enable_mask
#AFTR only
echo "1" > /sys/module/cpuidle_exynos4/parameters/enable_mask
IDLE only
echo "0" > /sys/module/cpuidle_exynos4/parameters/enable_mask
8) Sched_mc:
Significance: Increases multi-core awareness!?
Sched_mc aims to schedule tasks between multiple cores in the CPU. Sched_mc can be a) OFF (value 0), b) load balance (value 2) the cores by keeping the load even between them or c) power-save balance (value 1) by loading first core until it's 100% loaded. Hotplugging does load balancing already by taking care of thresholds, run queues, process priorities, cut-off frequency, etc. So there's no use of sched_mc = 1. Powersave balancing which overloads first core will increase the time to relieve first core (as compared to same task balanced between both the cores). This will cause delay to hit deep-idle states, since only first core can enter AFTR/LPA states.
Disable sched_mc. There could be only one situation where load balancing or weird-overloading of first core can be useful - when we use dual core mode. Sched_mc is valid only when both cores are online. If someone uses dual-core mode sched_mc is worth a try to handle task-loads across cores.
Sample Values: sched_mc 0
Valid Values: 0, 1, 2
Tweaking Via Script:
#disable sched_mc
echo "0" > /sys/devices/system/cpu/sched_mc_power_savings
#enable first core overloading
echo "1" > /sys/devices/system/cpu/sched_mc_power_savings
#load balancing
echo "2" > /sys/devices/system/cpu/sched_mc_power_saving
9) smooth_target, smooth_offset, smooth_step:
Significance: CPU Throttling
These params helps in 1) Throttling CPU at higher temperatures 2) Control Ondemand based governors' urge to jump to maximum frequency too often by jumping the CPU to an intermediate frequency first. If we're not interested in either of them, leave it as 0 0 0. NOTE: Smooth scaling is enabled only for Ondemand and Pegasuq governors.
Sample Values: smooth_target 2, smooth_offset 2, smooth_step 2
Valid Values: 0, 1, 2, 3, 4 (for all three params)
Tweaking Via Script:
echo "1" > /sys/devices/system/cpu/cpu0/cpufreq/smooth_target
echo "2" > /sys/devices/system/cpu/cpu0/cpufreq/smooth_offset
echo "2" > /sys/devices/system/cpu/cpu0/cpufreq/smooth_step
10) smooth_level:
Significance: Intermediate Step Before Scaling Max Freq
smooth_level is a standalone parameter to control smooth scaling. When ondemand/pegasusq governors instruct CPU driver to scale CPU up to max frequency, CPU driver first scales CPU to smooth_level then on next sampling to highest frequency. Only goal here is to save some battery.
Sample Values: smooth_level 800mhz
Valid Values: Level number of any frequency between your scaling min frequency and scaling max frequency.
Tweaking Via Script:
#Level 8 in 18step freq table is 800mhz
echo "8" > /sys/devices/system/cpu/cpu0/cpufreq/smooth_level
11) CPU Step Counts:
Significance: Set of Available Frequencies aka 'Tightness of Freq Table'
Some are O.K with Samsung defaults of 5 frequency steps, some users need a 1400 on top, some needs a 1600 too. Some would like to set intermediate frequencies in between. To satisfy everyone, we have configurable CPU Frequency Table to echo custom frequency steps. Possible step counts (selectable from ExTweaks) are
5 - Samsung default: Good old 200-500-800-1000-1200.
6 - Sammy default plus 1400 mhz: 200-500-800-1000-1200-1400
7 - 6 Step plus 1500: 200-500-800-1000-1200-1400-1500
8 - 6 Step plus 100 in the 'bottom' and 1600 on 'top': 100-200-500-800-1000-1200-1400-1600
9 - 8 Step plus 1500: 100-200-500-800-1000-1200-1400-1500-1600
18 - All possible 18 steps.
Note: Any number of steps between 3 and 18 is possible (use script). Only condition is 500,800 and 1000 should be present in the list.
Sample Values: Select any step count you like
Valid Values: 1600, 1500, 1400, 1300, 1200, 1100, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 50, 25. (In Mhz. Note that you echo to the table as Khz)
Tweaking Via Script:
echo "1600 1400 1200 1000 800 500 200 100" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
12) Scaling Min & Max Frequencies:
Significance: Frequency Range to be Used from Frequency Table
Any governor will scale CPU up and down between scaling_min_frequency and scaling_max_frequency. We change value of these two to UC/OC
Sample Values: scaling_min_frequency 200 and scaling_max_frequency 1200
Valid Values: Any frequencies from frequency table. Only condition is scaling_max_freq should be greater than scaling_min_frequency.
Tweaking Via Script:
echo 200 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 1200 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
TAB 2 - GPU: GPU behavior. This matters more than CPU UV w.r.t Screen-On power savings!
1) GPU Frequency Steps:
Significance: Configurable GPU Frequency Steps
There are plenty of frequencies supported by the MALI400. Valid frequencies are 800 divided by an integer not greater than 20. I would recommend using energetically efficient GPU freqs. Note that any Nth step can not be less than (N-1)th step.
Sample Values: 160 200 267. If you want more frames, use 200 267 400.
Valid Values: 400 267 200 160 133 114 100 89 80 73 67 62 57 53 50 47 44 42 40
Tweaking Via Script:
echo "160 200 267" > /sys/class/misc/gpu_clock_control/gpu_control
2) GPU Voltages:
Significance: Set enough voltage to support your underclocked or overclocked GPU frequency steps.
GPU Undervolting (if not taken care of) has some worse side effects compared to CPU UV. Your game and navigation app will crash. I'd recommend to use stock voltages. Or just a -50mV UV for each step.
Sample Values: 950 1000 1050
Valid Values: 800mV to 1200 mV at 50mV steps.
Tweaking Via Script:
echo "900000 950000 1000000" > /sys/class/misc/gpu_voltage_control/gpu_control
3) GPU UP and DOWN Thresholds:
Significance: When should GPU scale up and down across GPU frequency steps.
The four thresholds are threshold to switch to second step, switch back to first step, switch to third step, switch back to second step. We do not want GPU to scale up immediately after scaling down to a frequency. This implies the thresholds are overlapping load-evaluations. Use up-thresholds of the range 80-90. To calculate down-thresholds in such a way that overlapping is prevented, for a set of two freqs, find out what percentage of higher frequency is lower frequency, and reduce 5-10 % from the resultant value. Ex: for 160 to 200, 160 is 80% of 200. Reducing 10% gives 70%.
(If you like the 'good old' two frequency step, set Threshold-2-UP to 100 so that only First two steps are used and third step will never be active)
Sample Values: 85 70 85 65 (For GPU steps 160 200 267). OR 85 65 85 55 (For GPU steps 200 267 400).
Valid Values: 0 to 100%
Tweaking Via Script:
echo "85% 70% 85% 65%" > /sys/class/misc/gpu_clock_control/gpu_control
4) GPU Stay Counts:
Significance: Delaying next sampling/stay at a GPU step for longer time.
Staycount is the no of cycles to stay at each GPU step. It is recommended to leave it as default 1 1 1. A check in dvfs part make sure that changing frequencies happens only after staycount expires - regardless of load crossing thresholds.
For example : Staycount of 1 0 2 for 160 200 267 steps implies => i) A transition from 160 to 200 happens only a after a minimum of 1 second even if load on 160 exceeded the threshold before 1 second expired. ii) A transition from 200 to 267 or 160 can happen anytime load crosses threshold. iii) A transition from 200 to 267 happens only a after a minimum of 2 seconds even if load on 160 exceeded the threshold before 2 seconds expired.
Sample Values: 1 1 1
Valid Values: 0, 1, 2, 3, 4, 5 Seconds
Tweaking Via Script:
echo "1 1 1" > /sys/class/misc/gpu_clock_control/gpu_staycount
TAB 3 - SCREEN: Touch sensitivity, Brightness curve
1) Touch Move Sensitivity:
Significance: Improving touch sensitivity
Supported values are between 0 and 20. Lower value is more responsive. But setting it too low will cause swipes to be registered as clicks.
Sample Value: 7 pixel
Valid Values: 0 to 20 pixels
Tweaking Via Script:
echo "7" > /sys/devices/platform/s3c2440-i2c.3/i2c-3/3-004a/mov_hysti
#Another touch sensitivity parameter is tsp_threshold which can take the values between 40 and 80 at steps of 10. Lower value is more responsive.
echo "50" > /sys/devices/virtual/sec/sec_touchscreen/tsp_threshold
2) min_bl, min_gamma, max_gamma:
Significance: Brightness Response Curve.
If you don't want lowest brightness to be very low, use 30 1 20 which are stock values. We will have lowest brightness or zero gamma for brightness level read from sensor < min_bl (30 here). Brightness levels above that is linearly mapped to [min_gamma:max_gamma] ( [1:20] here). To decrease minimum brightness level (some users find the lowest brightness level too bright in dark conditions), increase min_bl.
Sample Values: 30 1 20 (for stock experience) OR 50 0 15 (for low lowest brightness level and low highest brightness levels)
Valid Values: min_bl 0 to 150, min_gamma 0 to 20, max_gamma 0 to 20
Tweaking Via Script:
echo "30" > /sys/class/misc/brightness_curve/min_bl
echo "1" > /sys/class/misc/brightness_curve/min_gamma
echo "20" > /sys/class/misc/brightness_curve/max_gamma
3) Gamma Shift
Significance: Gamma Correction
Gamma in the simplest form is a non linear operation to code and decode luminance of display systems. If display is not properly gamma encoded, human eye will not be able to differentiate highlights and details. Keep in mind that brightness perception of human eye is non-linear (ie, relationship between perceived brightness and luminance is non linear). Better perception is achieved at lower luminance level.
Use negative values for darker image system and positive values for brighter.
Sample Values: 0 (stock) or -15 (darker)
Valid Values: -50 to +50 (at steps of 1)
Tweaking Via Script:
echo "0" > /sys/class/lcd/panel/user_gamma_adjust
4) Vibration Intensity
Significance: Vibration Intensity for Notifications
You can change the intensity of vibration for calls, notifications, htpic feedback, etc. Change is most likely noticable only in aosp/aokp roms.
Sample Values: 6 (stock) or 2 (low intensity)
Valid Values: 0 to 6 pixels(at steps of 1)
Tweaking Via Script:
echo "6" > /sys/devices/platform/tspdrv/vibrator_level
TAB 4 - BLN: Backlight Notification and LED Timeout Settings
1) BLN
Significance: Notification for Missed Calls, SMSes, Emails, etc
GS2 doesn't have led notification built in. Instead the capacitive touch keys were hacked to lit up when some notification arrives.
Tweaking Via Script:
#ON
echo "1" > /sys/class/misc/notification/notification_enabled
#OFF
echo "0" > /sys/class/misc/notification/notification_enabled
2) Notification Timeout
Significance: Timeout for an Active BLN Notification
Timeout can be anything from a minute. Set it according to your taste and need.
Sample Values: 10 minutes
Valid Values: 1 minute to 2 hours to anything
Tweaking Via Script:
#In milli secs. Minutes*60*1000. Ex: For a 15 minute timeout set 15*60*1000 = 900000
echo "600000" > /sys/class/misc/notification/notification_timeout
3) BLN Effect
Significance: Pattern of Notification - breathe, static lights or blink
Breathing effect is achieved by supplying a lower to highest voltage at a particular step to backlight with a small pause/sleep in between. This is breathe Up. To breathe Down, voltage is supplied in the reverse order with a pause in between.
Tweaking Via Script:
#enable steady/static lights
echo "0" > /sys/class/misc/notification/breathing
#enable breathing/blinking
echo "1" > /sys/class/misc/notification/breathing
#breathing config - Min Voltage, Max Voltage (in mV), period/pause in between voltage changes (millisec), voltage step (mV)
echo "2500 3300 70 50" > /sys/class/misc/notification/breathing_steps
echo "3300 2500 70 50" > /sys/class/misc/notification/breathing_steps
#blinking config - set same voltages as min and max. It blinks
echo "2500 2500 500 100" > /sys/class/misc/notification/breathing_steps
echo "3300 3300 500 100" > /sys/class/misc/notification/breathing_steps
4) LED Timeout
Significance: Timeout for Backlights to stay On after touching buttons/screen
In Samsung roms, system settings can be used to achieve the same. Leave extweaks settings disabled for sammy roms. Since aosp roms do not have led timeout settings by default, use extweaks/script. If you want it always enabled, use settings in the rom.
Tweaking Via Script:
#backlights always off
echo "0" > /sys/class/misc/notification/led_timeout
#backlights turns off after a timeout after a touch. Unit - millisec
echo "1500" > /sys/class/misc/notification/led_timeout
5) LED Fadeout
Significance: Fadeout effect instead of LEDs normally turning off after touching buttons/screen.
Lights fading out can be an eye candy.
Tweaking Via Script:
echo "1" > /sys/class/misc/notification/led_fadeout
6) LED on Touch
Significance: Turn ON LEDs on Touching Screen
This is samsung default behavior but aosp/aokp roms miss this feature. If you like capacitive buttons to lit up on screen touch (along with buttons touch), enable this option.
Tweaking Via Script:
echo "1" > /sys/class/misc/notification/led_on_touch
7) Test BLN
Significance: Test BLN to see if everything works as you expected
Testing can be achieved by a script too like given below.
Tweaking Via Script:
SLEEPING=`cat /sys/power/wait_for_fb_sleep`
if [ "$SLEEPING" = "sleeping" ]; then
sleep 1
echo "1" > /sys/class/misc/notification/breathing_steps
8) LED Voltage Levels
Significance: Brightness of Touchkey Light
Minimum of 2550mV is required to lit up touchkey. Default is 3000mV. Max is 3300mV.
Tweaking Via Script:
echo "3000" > /sys/devices/virtual/sec/sec_touchkey/touchkey_brightness
TAB 5 - MISC: Governor, Scheduler, Miscellaneous Tweaks
1) Backup EFS: Backup your precious EFS partition to use in the future to recover a lost IMEI.
2) Android Logger: Enable/Disable Logging. Leave it enabled. Would be helpful to produce logcat and last_kmesg when you have a crash or freeze.
3) Default Ondemand Suspend Freq: Max frequency that will be used during screen-off state if Ondemand is the active governor. 500000 (500 mhz) is the most sensible value.
4) Default CPU Governor: Use whichever you like. Ondemand is good enough.
5) Default I/O Scheduler: Use whichever you like. I use sio/bfq.
6) Charge Current: Since it was proved that i9100 Li-ion battery charge current can only be either of 450mA and 650mA, leave it at AC:650, MISC:450,USB:450 OR AC:650 MISC:650 USB:450
Tweaking Via Script:
echo "650 650 450" > /sys/devices/virtual/misc/charge_current/charge_current
7) Reset Fuel Gauge Chip: After a low-battery reboot if the battery shows very low and incorrect percentages since true battery capacity failed to accurately synchronize with the fuel gauge, press the button and wait for sometime. An alternative is to charge full->discharge full->charge full.
8) Remove Root: Some apps detects root and refuse to work if found. In such cases, or if some apps are freezing in a while, remove root and re-install root. Pressing the button will remove Superuser.apk and SU binary.
9) Install Root: Tries to install root after a removal. Copies Superuser.apk and SU binary. If this fails, check 'Auto-Install Root' and reboot.
Randomly Asked Questions:
Q. "Why don't you just give a set of battery friendly or performance friendly tweaks to be used with ExTweaks app instead of lengthy sentences and crap?"
A. Three reasons: 1) Every device is different. 2) What i think are battery friendly/performance friendly settings may not please you. 3) It's useless to copy a setting without understanding what it does.
So i'm trying to give an almost accurate picture of effect of changing values of tweakable parameters. Then you will know what value and settings is best whether you're a battery-freak, performance-freak, 'I want it to be balanced'-freak. You will never have to ask in a thread "What is the best settings for this kernel".
Q. "What are the power domains i should be aware of so that i can think this way: Tweak settings related to each domain to make the most out of my kernel"
A. CPU cores (and L2 cache), GPU, Memory Interface and Audio/Video IP blocks
Q. "How about a short brief algorithm which explains working of hotplugging where i can see how are each parameters used."
A. Note the parameters with red font color. Those are the tweakable hotplug parameters mentioned above.
FUNCTION: standalone_hotplug()
Takes three parameters: load, min_rq, and minimum_cpu_run_queue_length
WORKING:
if ( both cores online AND [average_load < load_l1 OR current_cpu_frequency <= freq_min] ) RETURN HOTPLUG_OUT
else if ( only first core online AND average_load > load_h0 AND current_frequency > freq_min) RETURN HOTPLUG_IN
else if (both cores online AND min_rq < 2 AND load on the core corresponding to minimum_cpu_run_queue_length < load_rq) RETURN HOTPLUG_OUT;
SAMPLING PART:
Retrieve the value returned by standalone_hotplug by passing current load, min_rq and calculated minimum_cpu_run_queue_length
if (HOTPLUG_IN was returned AND second core is OFF)
Turn ON second CPU
Next sampling at 4 times the value of rate
else if (HOTPLUG_OUT was returned AND second core is ON)
Turn OFF second CPU
Next sampling at the value of rate
Exclusive Features
We will explore some of the exclusive features in ICS kernels, ofcourse brought in by XDA devs and not Samsung themselves.
Any feature is best explained through answers for different kind of questions. Atleast, that's what i believe
We have dual-booting and bln breathing to start with. Features are originally brought in by gokhanmoral and is available in a few kernels like Siyah as of now.
1. Dual Booting
1) "So what's dual booting?"
A. Option to boot into either of two ICS roms - aosp or sammy. Immediately after the boot logo, there is a 3 seconds time-out where you can boot into secondary rom by pressing the home key/volume down key. To boot into primary rom, wait for 3 seconds time-out to complete. If you don't like to wait - touch the screen, or press power key or press volume up key.
2) "What's the basic architecture behind dual booting?"
A. Any rom will have /system, /data, /cache partitions and requires a kernel to boot. Primary rom has all these partitions on the same location and partitions as if you were single-booting. ie, /dev/block/mmcblk0p09 for /system and rootfs for /data and /cache. Secondary rom uses a hidden partition (/dev/block/mmcblk0p12) for /system and sdcard to store /data and /cache partitions. They're stored in /sdcard/.secondrom directory as mountable ext4 block device images (data.img and cache.img).
Kernel partition is shared, so same kernel boots both the roms. If you switch from Siyah to a different kernel, dual booting will not be available even though there's a clone of secondary rom. Internal sdcard, external plastic sdcard, /efs, /emmc, other kernel related virtual filesystem directories, etc are shared among roms.
3) "I have just one rom now. How do i setup one more rom to dual boot?"
A.
-To use current rom as primary: Assuming the other rom is downloaded and copied to phone memory
Easy Method
i) Flash latest Siyah that supports dual boot.
ii) Wipe data and cache of second rom using format /secondrom_cache and format /secondrom_data options under dual boot menu in recovery.
iii) Flash rom zip as second rom directly using "Install zip to 2ndROM from internal SD" or "Install zip to 2ndROM from external SD" under dual-boot options in Recovery.
Old/Alternative Method if Easy Method fails
i) Flash latest Siyah that supports dual boot.
ii) Nandroid backup your existing rom.
iii) Full wipe, install the rom you need to dual boot into.
iv) Boot into that rom, perform initial setups, flash whatever zip you need to flash on that rom - gapps, themes, mods, etc.
v) Flash latest Siyah on this rom.
vi) Boot into recovery, under dual-boot options, select "Clone Primary ROM to Secondary". Be patient and wait about 6-7 minutes. Now the new rom is secondary rom.
vii) Within recovery, restore nandroid backup. Now, the existing rom becomes primary.
viii) Just to be sure, flash latest Siyah again.
-To use current rom as secondary: Assuming the other rom is downloaded and copied to phone memory
Easy Method
i) Flash latest Siyah that supports dual boot.
ii) Boot into recovery, under dual-boot options, select "Clone Primary ROM to Secondary". Now your existing rom becomes secondary.
iii) Full wipe and install the Rom you want to use as primary.
iv) Flash latest Siyah just to be sure.
Alternative Method
i) Flash latest Siyah that supports dual boot.
ii) Wipe data and cache of second rom using format /secondrom_cache and format /secondrom_data options under dual boot menu in recovery.
iii) Flash rom zip as second rom directly using "Install zip to 2ndROM from internal SD" or "Install zip to 2ndROM from external SD" under dual-boot options in Recovery.
iv) Select "Swap 1st Rom and 2nd Rom" under dual-boot options in recovery.
Now you have two roms. Press home key to boot into second rom when time-out is displayed.
4) "How much time was it to clone a rom?"
A. There's /system, /data/ and /cache to clone. 2 GB data + 103mb cache + 513 mb system = 2.6 gb
Shell prompt read speed = 7mb per second.
Total Time = 2.6*(1024/7) = 380 secs = 6/7 minutes.
5) "If i reboot to recovery from power-off state using 3 button method, to which rom's recovery it's booted into?"
A. Unified kernel, same recovery. And remember - flashing zips to second rom is not possible as of now.
6) "Any solution to flashing zips to secondary rom?"
A.
Yes. Use Install zip to 2ndROM from internal SD" or "Install zip to 2ndROM from external SD" under dual-boot options in Recovery.
Alternative 1:
If you know what the updater script in the zip is doing, you can do that manually using Root Explorer (replacing/copy files, setting permissions, etc).
Alternative2:
i) Swap 1st Rom and 2nd Rom using Dual-boot options in recovery. Now your 2nd rom becomes primary for time being.
ii) Install zips like normal.
ii) Swap again.
7) "Should i have same versions of kernels on both roms? If not, from which rom should i flash the kernel"
A. Flash kernel from any rom (if cwm app/darkyota is used). Both uses the same kernel partition anyway.
8) "Will i get a prompt to dual-boot if i'm not using dual boot, as in i haven't cloned any rom to use as secondary?"
A. NO
9) "I don't like waiting for 3 seconds to boot into primary rom."
A. Touch the screen/press volume up key immediately upon prompt.
10) "How to undo dual booting?"
A. Use "Remove 2ndRom" from dual-boot options in recovery.
11) "How to remove secondary rom if "Remove 2ndRom" in touch recovery fails for some reason?"
A. Format 2nrom /system partition from dualboot options in recovery, remove data.img and cache.img under /sdcard/.secondrom directory manually by booting into primary rom. Also delete /secondrom directory.
12) "So if at all i format /sdcard, my second rom is gone?"
A. Yes
13) "Is the size of /system partition of secondary rom re-sizable from user space?"
A. NO
14) "Can i have both aosp roms/both samsung roms/first aosp, second samsung/first samsung,second aosp?"
A. Yes
15) "Can i have one GB rom and second ICS rom?"
A. No
16) "Why?"
A. Kernel partition is shared between roms. Dual boot functionality is implemented in ICS kernel. ICS kernel can run only ICS roms.
17) "Can i have different kernels for the two roms?"
A. NO. Kernel partition is shared.
18) "USB mass storage works?"
A. Yes. Both cards will be mounted for primary and secondary roms. MTP works too.
19) "If i had the same /data partition shared between roms, i could use same apps on both roms."
A. Data partition can not be shared as they're incompatible between roms. (Sometimes dev asks you to perform full wipe even if you're switching between versions of the same rom right). Even if they were shared, separate dalvik caches has to be used and hence every boot will take a long time to rebuild dalvik.
20) "How do i swap primary and secondary roms?"
A.
Easy Way:
In recovery, select "Swap 1stRom and 2ndRom". It may take upto 20 minutes. Be patient and watch the progress bar.
Difficult way: If the "swap" in recovery fails,
i) Select "Backup secondary rom" under dual boot options.
ii) Under original Backup and Restore option, select "Backup" to nandroid backup your primary rom.
iii) Under dual boot options, "Restore as secondary rom" or "Restore as secondary rom from internal sd" and select the nandroid backup of what was actually your primary rom.
iv) Under original Backup and Restore option, select "Restore" to restore the rom you backed up as secondary.
21) "How to upgrade primary rom?"
A. As usual, goto recovery, wipe whatever you need to wipe and install the new version. Remember to flash latest Siyah after upgrading if the Rom comes with a different kernel.
22) "How to upgrade secondary rom?"
A. Use "Install zip to 2ndROM from internal SD" or "Install zip to 2ndROM from external SD" under dual-boot options in Recovery. to flash the Rom zip. If any wipe is required, use format /secondrom_cache, format /secondrom_dalivkcache, format /secondrom_data and format /secondrom_system under Mounts & Storage in recovery.
Alternative 1, if the above fails:
Temporarily convert secondary rom to primary (by swapping them in recovery), flash rom zip revert primary back to secondary by swapping again. Remember to flash latest Siyah after upgrading. (This is just to be sure. Flashing zip to second rom does not change kernel)
23) "How to replace secondary rom with another?"
A.
Easy Way:
i) Wipe second rom partitions using format /secondrom_cache, format /secondrom_dalivkcache, format /secondrom_data and format /secondrom_system.
ii) Install Rom zip using Install Zip to 2ndROM from internal SD or external SD from dual-boot options in recovery.
Difficult Way:
Perform the steps to setup dual boot as if you had only one rom which is going to be used as primary rom.
24) "How to replace primary rom with another?"
A. Normal procedure - wipe, install from recovery.
25) "Are init.d scripts and extweaks profiles shared across the roms so that i can make changes by booting into any rom and the other rom automatically inherits the settings?"
A. NO. Roms have differet /system partitions so different init.d directories. Roms uses different /data partitions so different extweaks settings since extweaks profiles are stored under /data/.siyah. Configure both separately. Initramfs scripts are shared anyway because Roms use the same kernel.
26) "Can i use titanium to backup and restore apps on both roms?"
A. Yes. With the default settings of titanium backup, it uses /sdcard/TitaniumBackup directoryto backup apps. Assume you have the same app installed in both roms and you backed up the app from both roms. Then when you restore app+data, the last backup is restored. (regardless of from which rom was it backed up last. Because the app database is overwritten for each backup). If you want to maintain exclusiveness between apps in the two roms, use a different backup directory in second rom. Reason for exclusivity could be - you need different settings for same app in the roms OR you have reached level 2 of a game in rom1 and level 6 in rom2 and you need to maintain that, etc.
27) "What're the Dual Boot options available in touch recovery?"
A.
i) View Current Status
Displays secondary rom info if found.
ii) Clone 1stRom to 2ndRom
First time, you will have only one rom. You may clone it as secondary rom (so that another rom can be used as primary). Note that what was Primary rom will remain as Primary after this. In short - you will copy of same rom and 1st and 2nd.
iii) Clone 2ndRom to 1stRom
Whatever has been cloned as second Rom is cloned to first rom. Note that what was Second rom will remain as Second after this. In short - you will copy of same rom and 1st and 2nd.
iv) Remove 2ndRom
Remove second Rom by Deleting /system, /data and /cache partitions of second rom. You will have normal booting.
v) Swap 1stROM and 2ndROM
Swaps primary and secondary roms by exclusively overwriting /system /data and /cache of both roms. This is a time consuming process. Be patient.
vi) Backup 2ndROM
Nandroid backup secondary rom to external sd.
vii) Restore as secondary rom
Restore any nandroid backup as secondary rom from external sd.
viii) Backup 2ndROM to internal SD
Nandroid backup secondary rom to internal sd.
ix) Restore as 2ndROM from internal sd
Restore any nandroid backup as secondary rom from internal sd.
x) init second rom data
Initialize /data parition of secondary rom to resize the partition to make it bigger in case you run out of space for apps. Init also wipes all the data in /data partition. So your existing apps in secondary rom will be gone.
xi) wipe second rom davik cache, xii) fix permissions in second rom - self explanatory
xiii) Install Zip to 2ndROM from Internal SD xiv) Install Zip to 2ndROM from External SD- self explanatory
xv) Wipe options for Second ROM can be found under Mounts and Storage - / format /secondrom_cache, format /secondrom_dalivkcache, format /secondrom_data and format /secondrom_system.
Mounting partition options for 2nd ROM can also be found there.
28) Why is "cloning 1stROM to 2ndROM" slower than "cloning 2ndROM to 1stROM"?
A. While cloning primary to secondary, it writes data.img and cache.img to internal sd card. While cloning secondary to primary, the images are written to device memory or rootfs. This is faster than writing to a mounted storage.
29) "Why can't internal SD be mounted with secondary rom whether it's sammy or aosp?"
A. It works now.
/data and /cache partitions of secondary rom resides in the internal sd. (/sdcard/.secondrom). So internal sd can not be unmounted to mount it to the PC. MTP works for internal SD too. Even though slower, that's the only option we got.
30) "After setting up Second Rom, i don't see a prompt to boot into second rom".
A. Try wiping Second Rom Cache and Dalvik.
31. "Before wiping 2ndROM data/cache, i had some free space on internal sdcard. During wipe it failed and that space has dissipated. Even after a successful wipe, the space is still lost."
A. Try (1). If it fails, try (2)
1) Delete files in /sdcard/.secondrom directory.
2) The space was occupied by lost.dir in /sdcard. Delete contents in that directory and you have the space back now.
32. "What's happening when i wipe /data and /cache of 2ndROM during the first time setup of dual boot?"
A. Two empty mountable EXT4 images - data.img and cache.img are created in /sdcard/.secondrom. While flashing zips to second rom, /data and /cache of second rom needs to be mounted in respective mmcblk. This empty .img files helps zip flashing without having the trouble to create them first.
33. "Will flashing a rom zip to second rom (when i already have dual booting) change kernel? I may lose dual boot if so."
A. NO. Flashing kernel is prevented for second rom if the zip contains a kernel.
34. "I lost dual booting after i flashed primary rom via odin". I flashed kernel again. I could see files in /sdcard/.secondrom. But no dual boot. Help"
A. Some carrier branded firmwares and such may wipe and push some apks and csc stuffs to the hidden partition used as /system of second rom. About 100 MB is used i think. After first reboot, it's never used again, but now you have lost /system of second rom even though data and cache are intact in SD.
Copy data.img and cache.img of secondrom from /sdcard/.secondrom to PC. Then modify your zip installer of your second rom to install only /system of second rom. (Edit updater-script in the zip to comment out lines that write to /data).
Now full wipe second rom /data and /cache. Format second rom /system. Flash the modified zip to second rom. Copy back and replace data.img and cache.img from your PC. Second rom should be intact now.
2. BLN Breathing
Q. What's bln breathing?
A: With BLN apps like bln control pro, we could set lights to be statically lit or blink when a notification arrives. A third effect could be achieved - breathing. Lights can follow a pattern to Fade In and Fade Out. Infinite possibilities exist for pattern since the tunables that control breathing can be set from the user space.
Q. How is breathing achieved?
A: A series of incidents using three principles: Vary LED voltage level from a Min to Max and then Max to Min, Pause between voltage changes, Supply a different voltage as next voltage defined by a voltage step.
Q. Make it more clear?
A. Let's take an example.
echo "2500 3300 70 50" > /sys/class/misc/notification/breathing_steps
echo "3300 2500 70 50" > /sys/class/misc/notification/breathing_steps
First two parameters defines star and end voltages/ min and max voltage (unit millivolts). Third parameter is the period or pause (in milliseconds) between voltage changes. Last parameter is the voltage step in millivolts.
As you notice, there's on more echo statement which reverse the voltage limits. This is because breathing is asymmetric. So commands for Fade IN (light on) and Fade OUT (light off) need to be written separately.
Some points to note:
-2550 is the minimum voltage to turn LEDs On.
-3300 is the maximum voltage that's supported by regulator.
-2500 is the minimum voltage supported by kernel as the least among valid voltage.
-Period should be echoed as milli seconds.
-Voltage step should be a multiple of 50.
Small Tutorial: Suppose you need a pattern - short, long, short breathes. Let's call this .._ When a notification arrive, it will repeat until notification times out .._ .._ .._
#First enable breathing:
echo "1" > /sys/class/misc/notification/breathing
#Reset existing pattern:
echo "reset" > /sys/class/misc/notification/breathing_steps
#Now echo as many FADE INs and FADE OUTs you need. The file will parse all these without overwriting. (If you cat the file, it may return only last echoed line. Don't worry)
echo 2600 3300 30 150 > /sys/devices/virtual/misc/notification/breathing_steps //short breathe achieved using lower period and higher voltage steps
echo 3300 2600 30 150 > /sys/devices/virtual/misc/notification/breathing_steps //fade out for short breathe by swapping voltage limits
echo 2500 3300 60 50 > /sys/devices/virtual/misc/notification/breathing_steps //long breathe achieved by increasing period and decreasing voltage step
echo 3300 2500 60 50 > /sys/devices/virtual/misc/notification/breathing_steps //fade out for longer breathe
echo 2600 3300 40 150 > /sys/devices/virtual/misc/notification/breathing_steps //another short breathe
echo 3300 2600 40 150 > /sys/devices/virtual/misc/notification/breathing_steps //fade out
echo 2500 2500 400 50 > /sys/devices/virtual/misc/notification/breathing_steps //Having same voltage limit (that too 2500 which won't turn on led) and some period means a pause between breathing cycles. This will give a relaxed effect.
Q. How can i achieve blinking?
A. Echo same voltage as min and max voltage for Fade in and Fade out effects.
echo "2500 2500 500 100" > /sys/class/misc/notification/breathing_steps
echo "3300 3300 500 100" > /sys/class/misc/notification/breathing_steps
Reducing the period to a smaller number say 100, gives you a faster blinking - a pulse effect.
New Governor(s)
Pegasusq Governor
Let's see what is pegasusq governor from Samsung which claims to be a multi core aware governor.
Some Basics to Remember Before Reading On:
Some patience is required to understand a governor.
Pegasusq is basically an ondemand based governor which also controls hotplugging.
Run Queue: We know mutiple processes can run at once on our device. These active processes are placed in an array called a run queue along with their priority values. (Priority is used by the task scheduler to determine which process is to run next) To ensure each process has a fair share of resources, each one is run for some time period then paused and placed back into the run queue. When a program is stopped to let another run - the program with the highest priority in the run queue is then allowed to execute.
Talking w.r.t to Android O.S and GS2 CPU, each core is given a run queue, which maintains both an active and expired array of processes. The scheduler selects the next process from the active array with highest priority. When a process' time period expires, it is placed into the expired array with some priority. When the active array contains no more processes, the scheduler swaps the active and expired arrays.
Wall Time is the total up time of CPU. Idle Time is the total idle time of the CPU. The difference (wall time minus idle time) gives CPU Busy Time. Load on CPU is calculated as percentage of Busy Time on Up Time. (Doesn't it make a lot of sense). Now you know exactly how is load measured.
Governor doesn't scale CPU but tells the CPU driver to do so.
Sampling means to evaluate load.
Smooth scaling is also done by CPU driver, not by governor.
Switching to pegasusq will deactivate Stand Hotplug since we don't need two logics to do the same thing at the same time and create conflicts.
Switching to a different governor from Stand hotplug will re-activate Stand Hotplug since we need a logic to control hotplugging.
Use scripts or SetCpu to change governor tunables.
Gokhanmoral modified pegasusq (originally authored by Samsung for quad core devices) in Siyah kernel to be dual core friendly.
Parameters:-
1) sampling_rate - Measured in uS and actual meaning being Sampling Interval, this factor determines how often the governor should poll for CPU usage in terms of frequency and load percentage to make scaling decisions - either scale CPU Up or scale it Down.
UNIT: Miscroseconds
2) up_threshold - Measured as percentage, when load on CPU is equal to above up threshold, CPU is scaled Up. Lower value - early scale up, and vice-verse.
UNIT: Percentage
3) sampling_down_factor - Acts as a multiplier for sampling interval for re-evaluating the load when CPU is truly busy and is on highest clock frequency (policy max). Setting to 1 makes no difference and causes CPU to immediately scale down from highest frequency. Sampling down factor is NOT valid for lower frequencies and low load conditions. Note that CPU is scaled up to max frequency when max_load_freq is greater than up_threshold*current frequency. (or to cur_freq + (freq_step * policy.max_freq) whichever is smaller) Max_load_freq is an arbitrary frequency calculated as the maximum of load_frequencies. Load_frequency is an arbitrary frequency which describes the frequency the device theoretically needs to handle 100% load, calculated as load*average_frequency.
To sum up, use non-zero sampling_down_factor to avoid governor jumping down to lower frequency even on high CPU load.
UNIT: Positive Integer
4) down_differential - After spending sampling_down_factor*sampling_rate micro seconds at maximum frequency on high load, governor samples the load again to calculate an approx target frequency to scale-down-to which should not trigger up_threshold in the next sample. (Triggering up threshold may cause jumping to max frequency again). Max_load_freq is checked against (up_threshold - down_differential) * current frequency. If found to be smaller, CPU is scaled down to a target frequency as described above. Down_differential also act as the factor to prevent aggressive scale down.
Higher value of down_differential corresponds to delayed scaling down.
UNIT: Positive Integer
5) freq_step - Defines how much as a percentage of maximum frequency, governor should increase CPU frequency each time CPU load reaches up_threshold.
UNIT: Percentage
6) cpu_up_rate - No of samples to evaluate load to scale CPU Up. After cpu_up_rate samples are finished for a frequency, CPU scale-Up logic is executed. In other words - before scaling Up, cpu_up_rate*sampling_rate micro seconds are spend at a frequency.
UNIT: Positive Integer
7) cpu_down_rate - No of samples to evaluate load to scale CPU Down. After CPU_down_rate samples are finished for a frequency, CPU scale-Down logic is executed. In other words - before scaling Down, cpu_down_rate*sampling_rate micro seconds are spend at a frequency.
UNIT: Positive Integer
8) hotplug_freq_1_1 - Up threshold frequency to turn second core On, when some other conditions is also met. ie If (minimum frequency greater than or equal to hotplug_freq 1 1 and run queue length is greater than hotplug_rq_1_1) Hotplug IN Second Core. Higher value correpsonds to delay in turning on second core.
UNIT: Kilo Hertz
9) hotplug_freq_2_0 - Down threshold frequency to turn second core Off, when some other conditions is also met. ie If (maximum frequency less than hotplug_freq 2 0 and run queue length is less than or equal to hotplug_rq_2_0) Hotplug OUT Second Core. Lower value correpsonds to delay in turning off second core.
UNIT: Kilo Hertz
10) hotplug_rq_1_1 - Threshold run queue length for second core to turn on.
UNIT: Positive Integer
11) hotplug_rq_2_0 - Threshold run queue length for second core to turn off.
UNIT: Positive Integer
12) freq_for_responsiveness - Until freq_for_responsiveness, Up Threshold considered for sampling load is up_threshold_at_min_freq. Also during the part where CPU is at maximum load frequency, governor need to find the optimal frequency as the next frequency - which should not trigger up_threshold in the next sampling. When such a frequency_next is found to be a) less than freq_for_responsiveness b) will not trigger down_threshold in the next sample, then the optimal frequency is set to freq_for_responsiveness.
13) up_threshold_at_min_freq - This threshold is used as up threshold while sampling at frequencies less than freq_for_responsiveness. Above that, normal up_threshold is used. This gives us an option to make scaling aggressive/relaxed until a frequency and normal for higher frequencies. Again, during calculation of optimal frequency which should not trigger up policy, down threshold to consider is difference between up_threshold_at_min_freq and down_differential
14) ignore_nice_load - Setting to 1 causes governor to ignore load resulted by nice processes while making scaling decisions. Nice processes are the one i/o scheduler refers to as low priority process.
UNIT: Boolean 1 or 0
15) io_is_busy - Setting to 1 causes treating i/o wait time as CPU busy time. I/O busy is just an indication that CPU is performance critical, and system is not actually idle. IO wait time is excluded from the CPU idle time value is 1.
UNIT: Boolean 1 or 0
16) max_cpu_lock - If set to zero, hotplugs in and out second core when appropriate. Otherwise specifies no of cores to be considered for hotplugging. Leave it as default 0.
UNIT: Integer 0/1/2
17) hotplug_lock - Hotplugging second core is cancelled if it's value is greater than zero. The value should be greater than value of max_cpu_lock for a non-zero value. Leave it as 0.
UNIT: Integer 0/1/2
18) *cpu_up_freq - Calculated as minimum of (its current value and maximum frequency), this tunable is actually not used by the governor.
UNIT: Kilo Hertz
19) *cpu_down_freq - Calculated as maximum of ( its current value and minimum frequency), this tunable is actually not used by the governor.
UNIT: Kilo Hertz
20) *up_nr_cpus - Calculated as minimum of (its current value and num of possible cpus), this tunable is used by the governor to indirectly make Hotplugging decisions, but may not be useful for a 2 core CPU.
UNIT: Integer 1/2
21) dvfs_debug - Set to 1 to enable governor logging. If you're an enthusiast, this may be useful to view the impact of the values for governor tunable set by inspecting the log.
UNIT: Boolean 1 or 0
* - Parameters removed in siyah kernel since they're not actually used in the governor code.
Sample Tweaks:-
Assuming - i) You have 18 steps freq table ii) Scaling min is not greater than 200 mhziii) Scaling max is not less than 1000 mhz
Aggressive
Code:
echo "75" > /sys/devices/system/cpu/cpufreq/pegasusq/up_threshold
echo "65" > /sys/devices/system/cpu/cpufreq/pegasusq/up_threshold_at_min_freq
echo "40000" > /sys/devices/system/cpu/cpufreq/pegasusq/sampling_rate
echo "2" > /sys/devices/system/cpu/cpufreq/pegasusq/sampling_down_factor
echo "10" > /sys/devices/system/cpu/cpufreq/pegasusq/down_differential
echo "60" > /sys/devices/system/cpu/cpufreq/pegasusq/freq_step
echo "400000" > /sys/devices/system/cpu/cpufreq/pegasusq/freq_for_responsiveness
echo "10" > /sys/devices/system/cpu/cpufreq/pegasusq/cpu_up_rate
echo "20" > /sys/devices/system/cpu/cpufreq/pegasusq/cpu_down_rate
echo "400000" > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_1_1
echo "300000" > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_2_0
echo "200" > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_1_1
echo "150" > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_2_0
echo "0" > /sys/devices/system/cpu/cpufreq/pegasusq/ignore_nice_load
echo "1" > /sys/devices/system/cpu/cpufreq/pegasusq/io_is_busy
echo "0" > /sys/devices/system/cpu/cpufreq/pegasusq/max_cpu_lock
echo "0" > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_lock
Relaxed
Code:
echo "90" > /sys/devices/system/cpu/cpufreq/pegasusq/up_threshold
echo "80" > /sys/devices/system/cpu/cpufreq/pegasusq/up_threshold_at_min_freq
echo "60000" > /sys/devices/system/cpu/cpufreq/pegasusq/sampling_rate
echo "1" > /sys/devices/system/cpu/cpufreq/pegasusq/sampling_down_factor
echo "5" > /sys/devices/system/cpu/cpufreq/pegasusq/down_differential
echo "20" > /sys/devices/system/cpu/cpufreq/pegasusq/freq_step
echo "300000" > /sys/devices/system/cpu/cpufreq/pegasusq/freq_for_responsiveness
echo "15" > /sys/devices/system/cpu/cpufreq/pegasusq/cpu_up_rate
echo "15" > /sys/devices/system/cpu/cpufreq/pegasusq/cpu_down_rate
echo "500000" > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_1_1
echo "300000" > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_2_0
echo "350" > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_1_1
echo "200" > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_2_0
echo "0" > /sys/devices/system/cpu/cpufreq/pegasusq/ignore_nice_load
echo "1" > /sys/devices/system/cpu/cpufreq/pegasusq/io_is_busy
echo "0" > /sys/devices/system/cpu/cpufreq/pegasusq/max_cpu_lock
echo "0" > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_lock
My Settings: I don't want unnecessary power drain, and don't want lag to save extra juice. Scaling from 200 to 1200 with every frequency that's multiple of 100 in the table.
Code:
echo "80" > /sys/devices/system/cpu/cpufreq/pegasusq/up_threshold
echo "40" > /sys/devices/system/cpu/cpufreq/pegasusq/up_threshold_at_min_freq
echo "40000" > /sys/devices/system/cpu/cpufreq/pegasusq/sampling_rate
echo "2" > /sys/devices/system/cpu/cpufreq/pegasusq/sampling_down_factor
echo "5" > /sys/devices/system/cpu/cpufreq/pegasusq/down_differential
echo "40" > /sys/devices/system/cpu/cpufreq/pegasusq/freq_step
echo "200000" > /sys/devices/system/cpu/cpufreq/pegasusq/freq_for_responsiveness
echo "10" > /sys/devices/system/cpu/cpufreq/pegasusq/cpu_up_rate
echo "20" > /sys/devices/system/cpu/cpufreq/pegasusq/cpu_down_rate
echo "400000" > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_1_1
echo "300000" > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_2_0
echo "300" > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_1_1
echo "200" > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_2_0
echo "0" > /sys/devices/system/cpu/cpufreq/pegasusq/ignore_nice_load
echo "1" > /sys/devices/system/cpu/cpufreq/pegasusq/io_is_busy
echo "0" > /sys/devices/system/cpu/cpufreq/pegasusq/max_cpu_lock
echo "0" > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_lock
Once again, note that stand hotplug is disabled when pegasusq is active. After setting your values, just make sure you didn't configure pegasusq wrong where only one core is on all the time or both cores are online all the time. Open tegrak second core app and make sure second core turns on when needed and turns off when done.
Points to Note While Tweaking Pegasusq:-
1) Actual sampling interval is not the value of sampling_rate since load is evaluated after cpu_up_rate number-of-samples while scaling up and cpu_down_rate times number of samples while scaling down. So don't go for big values for sampling_rate. You're not saving battery but causing lags.
2) Always make sure that directly related parameters are rightly configured. For example a sampling_rate of 50000, cpu_up_rate of 10, cpu_down_rate of 20 means load is sampled after 10*50000=1000000=1 second for scale up and 20*50000=2 seconds for scale down.
3) Let value of down_differential always be between 5 and 10. Atleast 5 and 15. The difference between upthreshold and down_differential is considered as the percentage against current frequency to find a frequency to scale down to when CPU was on max_load_frequency. (This max_load_frequency is not your scaling_max_frequency. It's an arbitrary freq which is something smaller than that)
4) We know frequency jumps straight to max a little too often with ondemand based governors. One situation where this could happen is when max_load_freq is found to be greater than up_threshold percentage of current frequency. (If current frequency + (freq_step * policy.max_freq) is smaller than max frequency, it will jump to this frequency instead). So it's better not to go with very low up_threshold.
5) sampling down factor is the number of samples to spend at highest CPU frequency before re-evaluating the load. Setting to 1 may be battery friendly but also causes scale down even if CPU was very busy. A trade-off value is 2. High sampling_down_factor is not recommended. We don't need CPU to stay at highest freq forever.
6) Setting freq_step = 100% voids the reason for it to exist. Let it be something between 20% and 50% / 60% depending on your need. Note that smooth_scaling and freq_step does the same thing. Use only one of them at a time.
7) Hotplug up frequency (hotplug_freq_1_1) should be greater than hotplug down frequency (hotplug_freq_2_0). Also, hotplug_down frequency should be greater than your scaling minimum frequency. Else second core might not turn off after it kicks in.
8) Hotplug runqueues values affects second core activate/deactivate decisions based on no of threads running or no of processes kept in run queue. Let their values be between 200 and 350. If you need second to turn on quickly and turn off slowly, use low values for up rq and down rq.
9) freq_for_responsiveness is the frequency that aids in recalculating a frequency_next to scale down to from maximum frequency. When i) that frequency_next is found to be less than value of freq_for_responsiveness and ii) if by scaling down to that frequency, next sample won't cause a scale down, then the frequency_next is set to freq_for_responsiveness. (This prevents scaling down to a low frequency where next sample will cause a scale up). A frequency in the bottom half of your frequency table is a sensible value for this parameter. To disable use of this param, set it to your scaling minimum frequency.
10) up_threshold_at_min_freq is the up threshold for frequencies below freq_for_responsiveness. Value of this should depend on how low or high your freq_for_responsiveness is. If you need relaxed scaling till freq_for_responsiveness, use higher values for up_threshold_at_min_freq. And vice-verse.
Kmemhelper Binary - Virtual Kernel Hacking
kmemhelper
Warning: Slightly advanced topic. It's not so easy to understand, not so difficult either.
kmemhelper is a binary which you may use in scripts or adb to change values of some global static variables which in turn changes some parameters. Now, what's so special about it? We don't need to wait for device files and misc files as interfaces to parse the values we echo - to change some settings. Instead, the global static symbols in the kernel can be directly controlled by kmemhelper and create wonders.
Examples include changing smooth scaling param, change bus frequencies, change CPU internal voltages, change different touch thresholds and parameters, change touch frequencies, etc. Possibilities are quite large, provided you know the name of the variables, their type and valid values. You can find kmem binary in /system/xbin. Permissions should be 755.
Without waiting for change in kernel code to support certain settings changes, we simply use kmemhelper to have better control on many settings and features.
Working:
kmemhelper takes atleast four arguments.
Ex: kmemhelper -n smooth_level -t int
Modifier n refers to Name of the symbol. Modifier t refers to Type of the symbol. Above example echoes back the value of the variable "smooth_level" which is an integer. If you need to set a value for this variable, specify it as the last argument.
kmemhelper -n smooth_level -t int 8
This set smooth_level to 8 which is L8 in the frequency table. In an 18 steps frequency table, this is 800 mhz.
If the static variable is a structure or single dimensional/multi dimensional arrays, we should use offsets to specify the variable(s) we're changing. Modifier o specifies offset.
Syntax is
PHP:
kmemhelper -n <var_name> -t <var_type> -o <offset_value> <new_variable_value>
PHP:
Ex: kmemhelper -n mxt224_data -t char -o 59 50
This line changes value of a character variable to 50, in struct mxt224_data. The character variable is at 59th byte offset in the struct.
Calculating Offset:
Depending on the position and type of variable in a struct/array, we need to calculate offset correctly before using them.
Offset sizes are:-
int - 4
short - 2
char - 1
pointers - 4
Suppose there's a
struct Xyz
{
int a;
char b;
int c;
short d;
}
To refer "a" use offset 4. To refer to b use offset 4+1=5, for c 9, d 11 etc.
For example in mxt224_data which is a struct defined in arch/arm/mach-exynos/mach-u1.c symbol to change the value of touch threshold can be referred as:
kmemhelper -n mxt224_data -t char -o 58 35
This changes value of touch threshold which is MXT224_THRESHOLD_BATT_INIT located at offset 58 in the struct to 35%.
I want to learn about more Configurable Symbols:
You can find them all by cating kallsyms
cat /proc/kallsyms
Suppose you found an interesting variable and you need to know more about it. What you can do is download the kernel source, navigate to its root directory and search for this variable name.
find /path/to/possible/dir/in/kernel -depth -exec grep <varname> {} +
Now you know the file which contains the symbol/variable. After browsing code and understanding what it does and it's possible values, use kmemhelper in a script to change the values.
Sometimes, on different builds, the names of some symbols may change especially if there are similar variables with different suffixes. In such cases, kallsysms can be used to find the exact symbol name.
Example: LVL=`cat /proc/kallsyms|grep " level\."|awk '{print $3}'`;kmemhelper -n $LVL -t int
As you can see kallsyms content is read to retrieve all symbols. We narrow down results by searching for symbols containing "level" in their names. We pipe this result to awk '{print $3}' which apply print action to all the lines for the third column. Now LVL will contain the symbol name which defines touch frequency (Frequency to which CPU jumps when the screen is touched). Symbol name may be level.23175. We use kmehlper to view the value. It may retun 11 which is L11 = 500mhz in the frequency table.
We use the same command to set a new value to change the touch frequency.
LVL=`cat /proc/kallsyms|grep " level\."|awk '{print $3}'`;kmemhelper -n $LVL -t int 14
This changes touch frequency to 200. If the scaling minimum frequency is 200 mhz, frequency won't jump on screen touch. (Look in voltage control or setcpu to confirm). This could save some battery.
Other Useful Symbols:
For mxt224_data struct, change these variables to alter touch responsiveness.
# offset 59: MXT224_THRESHOLD_BATT_INIT - touch threshold on battery
ex: kmemhelper -n mxt224_data -t char -o 59 50
# offset 60: MXT224_THRESHOLD_CHRG - touch threshold on charging
kmemhelper -n mxt224_data -t char -o 60 55
# offset 61: MXT224_NOISE_THRESHOLD_BATT - noise threshold battery
kmemhelper -n mxt224_data -t char -o 61 30
# offset 62: MXT224_NOISE_THRESHOLD_CHRG - noise threshold charge
kmemhelper -n mxt224_data -t char -o 62 40
# offset 63: MXT224_MOVFILTER_BATT - movfilter battery
kmemhelper -n mxt224_data -t char -o 63 11
# offset 64: MXT224_MOVFILTER_CHRG - movfilter charging
kmemhelper -n mxt224_data -t char -o 64 46
# offset 67: MXT224E_THRESHOLD_BATT - touch threshold battery for mxt224e chip
kmemhelper -n mxt224_data -t char -o 67 50
# offset 77: MXT224E_MOVFILTER_BATT - movfilter battery for mxt224e chip
kmemhelper -n mxt224_data -t char -o 77 46
-Smooth Scaling (Defined in arch/arm/mach-exynos/cpufreq.c)
symbol: smooth_level which is an integer
Takes frequency level values as input to define the smooth scaling frequency of governor.
-Bus Frequency (Defined in arch/arm/mach-exynos/busfreq.c)
symbol: exynos4_asv_volt which is an array of integers.
Takes voltage in mv as input
NOTE
1) If you echo wrong value, or specify wrong offset (thus pointing to a different symbol), it may cause crash/reboot.
2) To prevent echoing back the value to console while we're setting a symbol value , use output console as /dev/null 2>&1
Example: kmemhelper -n smooth_level -t int 8 > /dev/null 2>&1
if we use only > it will output stdout to that file
we have 3 standard i/o - stdin (0), stdout(1), stderr(2)
2>&1 implies to redirect error to out first, so that everything will be directed to /dev/null.
I will try adding more useful symbols with their purpose, type, offset and possible values.
Misc Faqs on Kernel Stuffs
Kernel users ask a lot of questions - be it development thread or discussion thread. With this post, i hope to aggregate many such questions and even more questions along with answers. I have arranged them randomly - in no particular order. There will be basic and advanced questions. Some answers may be short some may be too long. Try "ctrl+F" in your browser and search for a keyword. You may find the answer you're looking for.
1) "Is it possible to have different default governors for recovery and rom?"
A. Yes.
2) "Governor in recovery?"
A. Ondemand. Not changeable from userspace.
3) "Is there a separate I/O sheduler in recovery? Can it be diff from rom default?"
A. Yes, it can. To support huge amount of writes to sdcard (for ex: with dual boot options), devs may use a different i/o scheduler in recovery. Noop would be apt.
4) "Governor while charging phone when it's off?"
A. The governor is virtually powersave. Because while phone is off and is on charging - device and kernel is ON but there's no background processes running. So frequency will be locked to 200/100 mhz - depending on your lowest frequency.
Also, charging when device is on in airplane mode is almost equal to charging when device is off. Except cell radio, other background processes in airplane mode shouldn't be hogging CPU too much.
5) "Why is resetting extweaks profile recommended sometimes after a kernel flash?"
A. Your profiles are stored under /data/.siyah with ".profile" extension. ".active.profile" file under the same directory stores the name of your active profile. Contents in profiles are in the format "parameter"="<default_value> format. Sometimes there will be change in extweaks interface :-
i) Some new tunables were added
ii) Some tunables were removed
iii) Transposition of some tunables
iv) Default value of some tunable was changed.
When such a change occurs, your profiles should know it too so that it can contain all the parameters. That's why you have to reset profiles after a new kernel flash if it changes something in extweaks.
Resetting simply copies .profile files from /res/customconfig to /data/.siyah . You can do it manually using a file manager to avoid a reboot to recovery and back to rom. From recent versions, Gokhan auto detect changes in extweaks configuration between your existing & new kernel version to auto reset extweaks profile. The check is achieved by md5 sum checks between existing /res/customconfig/customconfig.xml and new one.
6) "How to change mount point for NTFS-sticks from /mnt/ntfs to another location for NTFS usb disks?"
A. Mounting ntfs sticks are managed by /sbin/hotplug script which is called on every plugging and unplugging operations and it includes usb sticks.
We can have an initd script which mounts rootfs in rw and replace that script to modify the location. Script should
1. mount -o remount,rw /
2. rm /sbin/hotplug
3. echo some lines to /sbin/hotplug to create the string you have prepared
4. chmod 755 /sbin/hotplug
7) "What happens if i set single/dual core mode and is on pegasusq?"
A. At the moment, pegausq override the setting and force system to dynamic hotplug mode. Anyhow, it is supposed to respect single core/dual core mode setup and behave like pure ondemand. Dev may make changes in the governor soon.
8) "I feel brightness is still high even at lowest brightness level while reading in dark?"
A. Reduce gamma using extweaks.
9)" Which hotplug logic is used with pegasusq?"
A. Stand hotplug which was introduced on ics which is multi thread aware. (Other hotplug logic is legacy hotplug which is default on gingerbread and is also available in ICS)
10) "Bln and testmode was working perfectly until a new kernel flash. Now there seems to be a problem."
A. Open extweaks. Disable bln - apply changes, enable bln - apply changes, reboot.
11) "What exactly is smooth scaling?"
A. Ondemand governor jumps straight to max frequency a little too often. We can control this by setting a smooth scaling frequency to which the CPU will scale to first before scaling to maximum frequency. A little power saving is the target here. Note that CPU driver does smooth scaling - not governor. When CPU driver is requested by governor to scale up to max frequency, it first scales to smooth frequency, and only in the next sampling to highest frequency. Smooth scaling atm is active for ondemand and pegasusq.
12) "What happens if i set smooth scaling freq to more than my scaling max frequency?"
A. Cpu driver will jump freq to that before scaling to max freq. So make sure you set it below max freq.
13) "How to insert a module that's available in /system/lib/modules?"
A. Safe to be root. In terminal or adb
su
insmod /lib/modules/<module_name.ko>
14) "How to know which modules are pre-loaded by kernel?"
A. Terminal or adb:
lsmod
15) "Why do i feel there's more wake up lag with ICS compared to gingerbread?"
A. ICS kernels has a resume time of 1000ms (one second) compared to 650ms in gingerbread. This time is just to resume the kernel from deep sleep. Note that a little more time is required to resume other background processes.
16) "I'm finding it difficult to underclock to below 800 mhz. Why?"
A. Frequency on GS2 is locked to 800mhz while entering and exiting deep sleep. Boot-loader resumes at 800mhz. Configuring this frequency at kernel level to something lower could cause a lot of SODs on many devices. Anyhow - your underclocking frequency shouldn't be below 800 mhz because of the mentioned reason.
17) "What is screen touch frequency?"
A. It's the frequency the CPU driver jumps CPU to when the screen is touched. Open voltage control/setcpu. Touch the screen and don't take off the finger. You can see CPU at 500mhz. This is the default in most of the custom kernels. Samsung default was 1000 mhz.
18) "Can i change touch screen frequency?"
A. Yes. With kmemhelper interface on supported kernels like Siyah.
You need to lower the frequency. Ideally to your scaling minimum frequency whether it's 100 or 200mhz. First find the level number of frequency from your freq table. Example: if you use 18 steps frequency table, L0=1600 L1=1500 L2=1400..... L14=200mhz L15=100mhz
Put this line in one of your init.d scripts
TF=`cat /proc/kallsyms|grep " level\."|awk '{print $3}'`;kmemhelper -n $TF -t int 14
Replace the last parameter - 14 with the level number of frequency you want to set. After executing this line, open voltage control again, touch screen and hold. You will see frequency did not jump and stayed at 200mhz.
19) "What are the basic things i should take care of when i echo my custom frequency steps to scaling_available_frequencies table?"
A. 1) Valid frequencies are 1600, 1500, 1400, 1300, 1200, 1100, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 50, 25 in Mhz.
2) Valid frequency is a multiple of four
3) If you're undervolting via an app or script,make sure you set proper voltages and enough voltage steps depending on your frequency step count. Wrongly parsed voltages may result in a non-booting device.
4) ExTweaks settings are applied only during initial boot stage. Any settings that uses frequency level numbers - L0, L1, etc etc should be properly configured to work with your new frequency steps. Best examples are Smooth Scaling parameters and governor settings (like lulzactive screen_off_min_step. Value is 5 in a 7 Step freq table points to a max cap of 500 mhz and max cap of 800mhz in a 9 step table.
5) You can not skip frequencies - 500, 800 and 1000 when you're echoing custom frequency steps.
20) "Why should Not we use high thresholds for hotplugging unlike we did on gingerbread"?
A.We have multiple hotplugging logics on ICS. One is Stand Hotplug (default in most of the ICS kernels) another one is Legacy Hotplug (this was also the logic in gingerbread).
In legacy hotplug (remember loadh, loadl, load_scroff, loadl_scroff etc on GB), the thresholds directly mapped to the current load percentages. At any frequency, if load on CPU is greater than loadh, second core will kick in.
But equations are different in stand hotplug. Stand hotplug aims to calculate load using current load and current frequency. It will make more sense looking at the load calculation equation.
Average Load = (current_frequency * load) / max_performance [where max_performance = max_frequency * no_of_cpus]
Ex: Assume current frequency = 500 mhz load = 70% and max frequency = 1200 mhz
=> average_load = (500*70) / (1200*2) = 23%.
From this it's obvious that second core would kick-in at a 70% load on CPU running at 500mhz only if load_h is set to 23% or less.
Let's calculate theoretically what's the max value for load_h that's valid.
To calculate highest average load, current frequency should be maximum (it should equal max freq) and load should be max (100%).
Highest Average Load = (MaxFreq*100) / (MaxFreq*2) = 50%. So theoretically, load_h can have a max value of 50%. You set anything above, second core won't turn on and the setup will work like single core mode. Practically, the values should be even lesser. I recommend using load_h= 25% and load_l = 10%.
21) "I don't see an init.d folder in my rom. I wanna create some initd scripts. What to do?"
A. Using a root explorer create init.d directory under /system/etc. Set perm 777.
22) "Difference between tar and cwm versions of kernels?"
A. No significant difference. Tar just has the raw kernel image - zimage which you can flash using cwm app/recovery/even adb. Zip has the same zimage with installation script that writes raw image to kernel partition.
23) "After flashing a new kernel i see there are some stuffs missing from extweaks"
A. Either the support for those missing tunables were removed or just the extweaks interface was removed. The parameters might still be accessible through scripts. Check the file path to make sure.
24) "How to know which hotplugging logic is used in the current kernel build?"
A. Navigate to /sys/module using a file explorer. If you find stand_hotplug directory, Stand Hotplug logic is used. If you find pm_hotplug directory instead, Legacy Hotplug is used.
Many more questions to come......
WOW
Why don't you build your own kernels?
sahibunlimited said:
WOW
Why don't you build your own kernels?
Click to expand...
Click to collapse
Because i like to spend my GS2-time tweaking and using the device rather than endlessly coding, making improvements and listen to mixed feedbacks from users
EDIT: After 10 minutes of opening thread, someone gave me a 1 star as first rating.
good stuff
I'll keep this handy the next time I finetune my own kernel.
Keep up the good work!
droidphile said:
Because i like to spend my GS2-time tweaking and using the device rather than endlessly coding, making improvements and listen to mixed feedbacks from users
EDIT: After 10 minutes of opening thread, someone gave me a 1 star as first rating.
Click to expand...
Click to collapse
Informative as always. Keep it up mate and very helpful as always threads that you make. Hopefully this becomes a sticky as it deserves to be. Thank you
Great thread mate, as its previous twin it will become another legend soon!
Sent from my SGS2 - Powered by CM9
Great info mista D. Im learning a lot thx to you man. Keep up with the excellent contributions. Topics like this got me stuck to xda. Thanks!
Sent from my GT-I9100 using XDA
Hmm.. seems legit.
Thanks for info. Great learning from you. =)
you are simply the best when it comes to kernels, your knowledge on kernels is outstanding!
Great topic !
A very best of ! Thanks for all those informations mate
Cheers
thank you
thank you very much for this, very well written and easy to understand, time to start putting some tweaks into action
I'm curious, all that:
echo XXX > /sys/devices/......
Where did you find those commands? Exist some kind of reference or is from a file in the kernel source?
droidphile said:
Because i like to spend my GS2-time tweaking and using the device rather than endlessly coding, making improvements and listen to mixed feedbacks from users
EDIT: After 10 minutes of opening thread, someone gave me a 1 star as first rating.
Click to expand...
Click to collapse
The one star guys is probably an ignorant idiot that didn't understand any word here. Awesome job.
Envoyé depuis mon GT-I9100 avec Tapatalk
i was hoping for a thread like this for a long time have tried extweaks in every position but now i know what i am actually doing
thanks!
hjuo said:
I'm curious, all that:
echo XXX > /sys/devices/......
Where did you find those commands? Exist some kind of reference or is from a file in the kernel source?
Click to expand...
Click to collapse
Some of the locations are same as in GB kernels. Rest we can search and find out. And yeah, even sources can help. For example, file that's responsible for hotplugging on ics is stand-hotplug.c; and there's a stand_hotplug directory under sysfs...
Great work, man. Very thorough, very informative.
screamworks.

[ROM][JB] Slim-JB

{
"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"
}
Download here : SlimJB
If you get su lost message, just reboot to cwm and again reboot to system. It will fix the problem.
So what is my rom ?
Basically tweaked for performance and battery
Stock based (I love stock UI)
Custom kernel tweaked for balance between performance and battery
Stripped un-needed stuff from the kernel. Small size
Custom SlimJB scripts to further enhance the rom
Comes with OTA update feature
Find out other features..
How to install :
The normal method
Download, place in sdcard. Aroma is self- explanatory..
In cwm, mount all partitions. Somehow the script doesn't do it..
Just make sure you wipe cache and do a factory reset before installation.
In aroma, choose installation method as default
How to use Goo Manager :
Goo Manager will automatically scan for updates on every boot and every 24 hours. You can change this in the app settings.
To update using Goo Manager, just click on the notification. The download will be automatically started. You can also see the changelog in the app.
To manually check for updates, open the app and click on check for updates.
DO NOT INSTALL OPEN RECOVERY. If the app asks you, just choose that you have a recovery installed.
Edit : Since our param driver is bugged, goo manager won't be able to install the update. You will have to manually install it.
( Kernel Features )
fs: CIFS module
fs: Fsync control (Combined dyn fsync control)
fs: Mount noatime and nodiratime by defualt [franciscofranco]
fs/aio: Asynchronous io performance improved
mm: SLUB memory allocator
arm: ThumbEE
arm: Optimzed rwsem algorithm [ezekeel]
arm: Remove old version sha1
arm/vfp: Build with neon
arm/crypto: ARM AES and SHA-1 crypto
arm/topology: Linaro lastest patches
ab8500_asoc: Sound control
ab8500_bm: Charger control
ab8500_chargalg: Charge cycle control
ab8500_chargalg: Real charged notification
lib: Optimzed CRC32 algorithm [ezekeel]
lib: GNU C version memcpy
net: More choices of TCP congestions
rcu: jRCU [Joe Korty]
swap: swap supports
zram:: zram supprots for android
mali: Utilization control
mali: PP scheduler tweakable
mali: PM sampling rate tweakable
mali: L2 cache max reads writable
mali: Disable mali state tracking
block: 8 io schedulers
snvet: Reduce the waketime 6s -> 1s
sched: Enable arch_power by default
sched: ARM multi-core schduler
debug: Remove Samsung debug code [Adi_Pat]
debug: Disable KGDB [Adi_Pat]
debug: Remove frame pointer [Adi_Pat]
debug: Fixed mismatches [Adi_Pat]
debug: Android logger as module (free 4mb RAM)
mxt224e: Sensitivity improved by defualt
mxt224e: Touch booster control
max224e: Touch sensitivity control
bcmdhd: PM_FAST by default
kernel:Lzop compression
ramdisk: Custom bootanimation supports [diego-ch,thank you!]
ramdisk: Lzop compression
ramdisk: Init.d scripts
ramdisk: ClockworkMod Recovery 6.0.2.8 [diego-ch]
ramdisk: T.W.R.P Recovery 2.4.4.0 [TeamWin]
cpufreq: 12 cpu governors
cpuidle: Deeper sleep state
makefile: Useful optimization flags
toolchain: Linaro GCC 4.6.2
How to tweak the kernel furthermore :
In short :
Same as CoCore E
In long :
Here are some intructions/tips about how to play with the kernel.
Terminal is needed.
If you want to change the values,it needs su permission.
If you get 'Permisson denied',you need su permisson.
You can cd to the folder first,then do echos.
( Boot time )
CoCore-E boots faster than stock normally.
How to check boottime?
* TWRP kernel boottime is longer(around 8000ms).Because of that big ramdisk!
( Bootanimation )
Put bootanimation.zip in /system/media/.
Recommend you changing the permission to 0666.
If there is no bootanimation.zip,kernel will show you Samsung's.
( CPU governors )
* OnDemand has been patched cpu idle detection
* PegasusQ is taken from SiyahKernel (new version)
* Personaly,I use PegasusQ/OnDemand(Q)/HotPlug
* To be honest,most of custom governors are based on ondemand/interactive
* OndemandQ is a new governor.It will hotplug cpu when screen turns off only.
* If you mind the battery life time,choose HotPlug.It hotplugs cpu frequently.
* Interactive updated to linux-android-3.4 [Thanks!Aditya!]
* Zzmoove is new version(0.3),i havent tested fully.
( IO schedulers )
* Please choose them by yourself
* Personaly.i use SIO.
( Deepest sleep state )
Stock deepest is 3.Now it is 4 by default.
Deepest supported is 5.
To change:
* PegasusQ(hotplug governors) works badly with 5
* OnDemand works well with 5
* Please note that it wont increase the using time but standby time.
To check the cpuidle state:
( zRAM SWAP )
[zRAM]
zRAM is optimized for Android.
It is not lazy anymore.
Using zRAM will take a little CPU,because it needs to compress/decompress memory.
Setup disksize first: (example: 96mb= 96×1024×1024)
* Lager size more RAM will be compressed.
Enable:
Code:
mkswap /dev/block/zram0
swapon /dev/block/zram0
To check how many does it use:
* You can get other info in its sysfs
[SWAP]
Format/resize your SdCard via computer first.
Enable:
( Init.d script )
Please install busybox in system first
I recommend you install busybox via apps
Create a new folder named 'init.d' in /system/etc
Set the permisson of init.d foler to 0777(rwxrwxrwx) (at least has read and exec permission)
Set the owner to 0.0 (root root)
Put some scripts (any name you like) in init.d folder with permisson 0777 (rwxrwxrwx) (at least has read and exec permission)
Scripts with right permisson will be runned when system boots.
( Charger control )
Please note that this control can damage your battery/phone.
If your battery/phone damaged,read the top of #1 post.
Lower current makes the charging longer,but protects battery.
Too high current can burn your battery!
I recommend you that dont set the max limited current over 900mA.
To change the AC max limited current: (range: 100 - 1100) (default: 600)
To change the USB max limited current: (range: 50 - 1100) (default: 500)
* Your values wont be applied immediately.They will be applied when plug charger.
* I recommend you input some values like 300,350,600...
* The value(s) that is not in range will be reverted to stock default value(s).
* Increase USB current properly can implement USB fast charging
To get the charging current:
When you plug charger:
( Charge cycle control )
To increase the recharge times:
(Default: 3)
* 5 is recommended.If you want more recharging.
* This probably can make phone charge deeper,do it once a month if you want.
( Real charged notification )
Well,please let me call it notification.
To be honest,it needs to check manually.
* You can use Rootexplorer to view this file.
* When it says "First full charging reached",then the UI should show you charged 100%
But it is not the real full charged.
* When it says it is the real full charged,you can unplug the charger.
* When you are charging and do a reboot will reset the counter.
* According to my experiments,it needs 1-2 hours to charge to real full.
( Sound control )
Please note that listening to too high volume music over 1 hour can damage your ears.
Or makes your speaker/headset overload.
(5.0+) Sound control has been enhanced.Please read it carefully.
Switch to sound control folder:
cd /sys/mo*/snd_soc*/p*
Use RootExplorer to view this folder,you will see a lot files.
Sound hacks wont take effects immediately.It depends on powering on/off ab8500 asoc.
Stop music for 5s to let ab8500 asoc shut down fully,then turn on music.
You need to enable XXXXX_con first,then tweak the XXXXX_bit.
After enabling XXXXX_con,it will be applied when codec powers on or it wont.
How do i check whether it has shuted down or not?
dmesg | grep codec
If you get "Disable ab850x",it has been powered off.
I will explain how to calculate the binay values below.
If we echo 0000 to something,system will consider it as 0.
But that doesnt matter.
'(default)' means that is my default setting in sound control.
[AnaGain3] (Headset audio path):
Ana stands for 'analong'.This is analong gain.
To enable control:
To tweak volume: [volume 0(default, +31dB) > 34 > 68(stock) > 85 > 87]
* Most values(except 0,34,68,85) will make the volume lost balance.
* If you hear too much noise with 0,34 is recommended.
* It is nice to use 0 with large speakers(audio output)
[HsXDigGain] (Headset Digital Gain)
HsL means left channel.HsR is the right.
To enable control:
To tweak:
* 0000: +8 dB gain (default)
* 0001: +7 dB gain
* ....: -1 dB step
* 0111: +1 dB gain
* 1000: 0 dB gain
* 1001 to 1111: -inf dB gain (mute)
* If you use +31 dB AnaGain3 + +8 dB DigGain,the result will higher than +39dB!
* Be careful,when the volume is too high,codec will power off automatically.
* Experience the differences between digital gain and analong gain by yourself.
[HsLowPow] (Headset low power mode)
This lowpow mode is enabled by driver normally.
If you want high performance audio instead of LPA(low power audio),
You can disable it.
To enable control:
To tweak:
* 0: Normal Operation (default)
* 1: Hs drivers in Low Power
[HsDacLowPow] (Headset DAC low power mode)
DAC is Digital-to-Analong Converter.
This lowpow mode is enabled by driver normally.
To enable control:
To tweak:
* 00: Normal Operation (default)
* 01: Hs DAC drivers in Low Power
* 10: Hs DAC in Low Power
* 11: Hs DAC and Hs DAC drivers in Low Power
[HsHP] (Headset high pass filter)
This high pass filter is enabled by driver normally.
If you want more low freq sound,disable it.
To enable control:
To tweak:
* 0: Headset high pass filter disabled (defualt)
* 1: Headset high pass filter enabled (offset cancellation enabled)
[ClassDDithHPGain]
ClassD is a kind of amplifier.
According to the documents,our ClassDs only relate to Handsfree(speaker).
To enable control:
To tweak:
* Gain control for the high pass component of dithering filter
* 0000: Minimum gain
* ....:
* 1010: Maximum gain (default)
[ClassDDithWGain]
* Gain control for the white component of dithering filter
* 0000: Minimum gain
* ......:
* 1010: Maximum gain
[ClassDHiVol]
This is a gain of speaker.But +2dB only.
echo 1 > classdhivol_con
Say 1(default) to enable:
* In fact,our speaker is right channel only!
[MicXGain] doesnt work...I will add more in the future.
How to calculate the binary values?
We use HsXDigGain as example.
The gain step is "+1".
In binary: So the values will like these:
0+1 = 1 | 0001: +7 dB
1+1 = 10 | 0010: +6 dB
10+1 = 11 | 0011: +5 dB
11+1 = 100 | 0100: +4 dB
..... | ......
[Experts!]:
This method can work on any ab850x codec platform!
Play music,reduce the volume.
Now we are going to edit the codec registers.
E.G:
AnaGain3:
HsDigGain: (left/right channel)
Disable all lowpow mode:
* These hacks will restore when codec power off.
( Touch Booster control )
What is touch booster?
It can jump the cpufreqs(in fact,not only cpufreqs) to high value when you touch to improve the experience of touching.
Disabling this can save some power.
To disable: (default: enable)
To change the boost freq: (default: 800000) (Vaild: 200000,400000,800000,1000000)
( Touch Sensitivity control )
If you play some games like Temple Run,higher sensitivity might help.
To change: (stock: 22) (default: 17) (range: >0)
* Lower value,higher sensitivity.
* Turn on/off screen to apply the changes
* Parameter "threshold" to check the changes
* When charging,the threshold will be forced replace by threshold_chrg
* With high sensitivity,your touches can be applied even screen coveres something.
( Fsync control )
To disable fsync: (0=disable 1=enable)
* Disabling fsync can improve io performace,
but it can make the data which hasnt been written lose when a sudden poweroff comes.
* Disabling fsync or enabling dyn_fsync will make param driver fail to store data
That means your "reboot recovery" will be failed.
To enable dynamic fsync:
* Dynamic fsync will sync all buffers when screen turns off,
* If there is a heavy io load,the screen might stick for seconds.
* This is an experiment feature.
( WiFi suspend pm control )
To enable: (default: disable)
* Enable=PM_FAST (Faster) Disable=PM_MAX (Powersave)
( Mali GPU )
Mali debug level
Disabling can speed up a bit
* Higher level,more messages will be printed in dmesg,system will slow down
Mali L2 max reads control: (Stock:28kb,Default:48kb(max))
* Some values will slow down graphics
* If not sure,keep default
Mali PM sampling rate: (Default: 1000ms)
Mali PP scheduler tweaks: (Default: disable)
* Enabling this,Some places will over ahead,choose by your self
Mali Utilization sampling rate: (Stock:500ms,Default:1000ms)
How often report a mali utilization.
* Keep this default if unsure.
Mali Utilization control
(Default: low_to_high 192 high_to_low 64)
This probably will relate to the smoothness.
Our driver will report a mali utilization frequently.
This utilization(range: 0~255) means the load of mali.
If utilization is bigger than low_to_high,driver will request higher hardware performance(highest APE/DDR OPP).
If utilization is smaller than high_to_low,the driver will store the requested OPP(uses low OPP).
OPP can be understood as freq simply.
To check mali utilization values:
Then you will see the utilization it reports.
When it says SIGNAL_HIGH,it will request highest OPP.
When it says SIGNAL_LOW,it will request lowest OPP.
Press Ctrl+C to stop printing.
In my Temple Run,it seldom reaches low_to_high(192).
That means you can reduce low_to_high to trigger higher OPP requirement.
For smoothness and less powersaving:
Set low_to_high between 100-192.
( TCP congestions )
Supported:
To check all the available options:
To change to other option:
* I use YeAh
* In fact,every congestion is disigned for different environments.
* Google to learn deeper!
( EGL Driver )
To remove sw egl driver:
Edit /system/lib/egl.cfg
To
* According to my feelings: after removing sw egl driver,UI is faster
( Service Mode )
In dialer, type:
Secret code:*#197328640*# (service mode)
Secret code:*#9900*# (SysDump)
In SysDump:
Disable fastdormancy might help 3G standby time (Depends on your mobile base station)
* Google to learn more
RAM DUMP is a debugger.Most of us wont use it.So disable it. (Tap it,every tap will make a reboot,until it shows you "Disable....",then tap disable,it is disabled)
* Google to learn more about secret code
( Multi-core scheduler )
What is it? How does it work?!
(Default: 2) (Echo 0/1/2)
0 : No power saving load balance.
1 : Fill one thread/core/package first for long running threads.
2 : Also bias task wakeups to semi-idle cpu package for power savings.
( Logcat )
Well,we have made android logger(logcat) as module to free more RAM.
Some guys request logcat.
Now we provide you a workaround:
Create a new init.d script:
Then you can use logcat command.
Almost tweaks will be restored to default after reboots.
So you can make your tweaks as init.d scripts to apply them when boots. :laugh::laugh::laugh:
Kernel How-To's :
( FAQ )
Q: What firmware does this kernel support?
A: All ROM bases on stock firmwares,all stock firmwares.
Q: Why my phone lags a lot!
A: Please check the cpu load.If it always goes very high,some apps are using cpu!And please check that you are not in PowerSaving mode.
Q: Why my phone lags after booting in some minutes?!
A: Media Scanner is running in the background. More media files(especially HD videos),more time it will take
Q: Why my phone cannot go to deep sleep when screen is off!!!
A: Fix it yourself. It is app(s) taking the wakelock. Not kernel.
Q: Do I need to wipe anything when flashing this kernel?
A: NO
Q: My phone rebooted suddenly!!! What can i do?!
A: Give me /proc/last_kmsg and logcat. Will try my best to fix.
Q: Hey!Your kernel has issue!No-fills CPU shows me a wrong freqs!Fix it!
A: This is NOT issue.Every I9070 kernel will have this problem.Because No-fills will show you Dynamic Min/Max scaling freqs,DVFS(dynamic voltage and frequency system) will adjust Min/Max freq according to system load.
Open SetCPU,it shows you real freqs.Or check sysfs directly.
How can i forget the credits...
Cocafe for the Cocore kang
Adi_Pat for misc support
Diego-ch for mental support
R_a_z_v_a_n for testing my script
Frapeti and Fedevd for motivating me
Callmeventus for the idea
Shaaan.. can i flash another kernel with this rom ?
Dikirim dari GT-I9070 memakai XDA Developer app
Great! Thanks for the ROM... List of features?
GaYoung28 said:
Shaaan.. can i flash another kernel with this rom ?
Dikirim dari GT-I9070 memakai XDA Developer app
Click to expand...
Click to collapse
Yeah. You can
Like this rom! Hope I can install it soon! P.s. Is it debloated?
Not really. Some useless apps have been removed though.
Next releases may have the option to select apps as per the user requirements while installing.
Nice! I wanna test!!!!
I'll try it and give you feedback
Does it have "ripple lockscreen mod"? Or can I install on it? Is it deoxeded?
R: [ROM][JB] Slim-JB
Great! Also i love stock ui =D
What about ram usage? Average free ram with 2-3 apps opened?
Thank you!
Inviato dal mio S Advance
Inviato dal mio S Advance
where his kennel
Jacopo97 said:
Does it have "ripple lockscreen mod"? Or can I install on it? Is it deoxeded?
Click to expand...
Click to collapse
Already has the ripple mod..
I do not respond to tech support via PM
Shaaan.. can i flash over other custom rom?
Dikirim dari GT-I9070 memakai XDA Developer app
So... What did u 'develop' in this?
Sent from my GT-I9070 using xda premium
R: [ROM][JB] Slim-JB
sameer4344 said:
So... What did u 'develop' in this?
Sent from my GT-I9070 using xda premium
Click to expand...
Click to collapse
He made a kernel and he tweaked a lot i think
Inviato dal mio GT-I9070 con Tapatalk 2

Severe Stuttering in Facebook and some apps

Hi,
I'm experiencing heavy stuttering on Facebook/Messenger app and some applications while scrolling.. not sure why. I only experience this though in FB app and while opening some applications.
I already set my kernel settings to performance mode but to no avail. Is this a ROM problem?
I'm using Wanamlite v1.5 and KT-SGS4 kernel.
Current Settings: (KTweaker)
General Screen
governor = ktoonservativeq
scheduler = SIO
Min Mhz = 189
Max Mhz = 1998
Voltage Screen
UV'd 50mv across the board for CPU and 50 for GPU
Extras Screen
Screen OFF Profile Mhz = 486
Disable Screen Off Mhz Call = Enabled
GPU Max Mhz = 504
Screen OFF GPU Max Mhz = 200
GPU governor = simple
Internal Read Ahead = 2048
External Read Ahead = 2048
General -> Governor Adjustments Screen
sync_extra_cores=1
touch_boost_cpu = 1242
touch_boost_cpu_all_cores=1
up_threshold = 70
sampling_rate = 40000
sampling_rate_screen_off = 80000
ALL THE REST ARE STOCK
Click to expand...
Click to collapse
Any clues in this? I already performed wipe data/cache/dalvik, hard-reboot, re-installation of apps, enabling of force-gpu-rendering but to no avail
found the solution.. I lowered the Internal Read Ahead and External Read Ahead from 2048 to 512.

[Q] [KERNEL] KT-SGS4 - MJ5 - KTweaker

Hi today i just flashed that awesome kernel.After some usage i saw that my device when comes out of sleep (turning on display) has some lag and spike for a couple of seconds.The same thing happens if i got a call or a text message.I use the configurations of OP i quote them below so you can see if you dont know the specifications.any chance that i can fix that?thnx
General Screen
governor = ktoonservativeq
scheduler = bfq
Min Mhz = 189
Max Mhz = 1998
Voltage Screen
UV'd 50mv across the board for CPU and 75 for GPU (use menu button for hidden menu option to globally subtract)
Extras Screen
Screen OFF Profile Mhz = 486
Disable Screen Off Mhz Call = Enabled
Screen OFF Profile Sched = noop
GPU Max Mhz = 504
Screen OFF GPU Max Mhz = 200
GPU governor = simple
Internal Read Ahead = 2048
External Read Ahead = 2048
General -> Governor Adjustments Screen
sync_extra_cores=1
touch_boost_cpu = 1242
touch_boost_cpu_all_cores=1
up_threshold = 80
sampling_rate = 40000
sampling_rate_screen_off = 90000
disable_hotplugging_chrg = 1
ALL THE REST ARE STOCK
Maybe it's worth a try to use SmartASSH3 Governor with active Auto Hotplug. It feels little bit snappier...
i will give it a try thanks
Help
Can someone plz provided me a download link for kt kernel for s4 gt-i9500... I'm running on resussrection remix Android 5.1.1 I checked ktoonsez website but nothing seems to be working ...ktweaks is installing but kernel is not installing.. I checked with set cpu... Plz help

★ Kernel Profile Sharing Thread for LG G3 ★

Introduction:
Hey there, this thread is all about sharing profile setups for our beloved G3.
Feel free to share your settings too or PM me and i link it straight to the second post ​
A few things explained:
Android Modders Guide ( thanks to @gsstudios )
Explanation of LMK & Adj and Minfree settings ( thanks to @Papa Smurf151 )
What is ZRAM and how does it work??? ( thanks to @-CALIBAN666- )
How to apply Synapse Profiles:
Code:
- Unzip
- Move .tgz file to your Internal storage > Synapse > saved_profiles
- Profile > Profiles > choose .tgz file > press "check-mark" and not "X" > choose "restore profile"
- Synapse will restart and then press "X"
- Check all values and if you have to change something press "check-mark"
How to reset Synapse Profiles:
Code:
tools > clear synapse data > restart device > start synapse > choose "check-mark" = stock values
--= Android 5.x.x Profiles =--
gr3ud´s synapse profiles:
R21 Profile with EuphoriaOS & 777 Kernel ( thanks to @777jon )
--> Old/Experimental/Beta Profiles - Android 5.1.1 @ 777Kernel (R21)
--> Old/Experimental/Beta Profiles - Android 5.1.1 @ 777Kernel (R15 - R20)
--= Android 6.x.x Profiles =--
gr3ud.6.0.1.V1 - Alucard + Alucard Hotplug
http://pastebin.com/jEKAmYVZ
CPU:
- MSM Limiter: Disabled
- min: 300MHz
- max Freq: 2457 MHz
- Governor: Alucard
- CPU Tunables:
> cpus_down_rate: 4
> cpus_up_rate: 1
> freq_responsiveness: 2256
> sampling_rate: 50000
- Multicore Powersaving: Disabled
- CPU Boost: Interval: 0ms / Sync Threshold: Disabled / Input Interval: 1000ms / Input Boost: 1958 MHz
CPU Voltage (optional for extra battery):
- Global Offset: -25 (stable, tested with Antutu)
HOTPLUG:
- Alucard Hotplug
- Sampling Rate: 50%
- Prevent to Suspend: Disabled
- Minimum CPUs Online: 4
- Maximum CPUs Online: 4
- Max Cores Screen Off: 2
THERMAL:
(optional) Thermal Compound Cooling Mod -> https://www.youtube.com/watch?v=PH5wCeootNI
- Intellithermal Enabled
- Core Control OFF
- Freq Throttle Temp = 75°c
- Core Throttle Temp = 80°c
GPU:
- min. freq.: 330
- max. freq.: 547
- Governor: msm-adreno-tz
- Simple GPU Algorithm: Enabled
- Laziness: 10
- Ramp Threshold: 0
- Adreno Idler: Disabled
SCREEN ("personal preference/vibrant colors"):
- Saturation Intensity: 60
- Screen Value: 120
- Screen Contrast: 148
I/O:
- Internal Storage: ZEN (128 kB)
- Rotational Storage: Off
- Add Random: Off
- I/O Stats: Off
- RQ Affinity: 0
KSM:
- Disabled
LMK:
- Adaptive Low Memory Killer: Disabled
Virtual Memory:
- Laptop Mode 1 = more performance but can cause random reboots (use this only with stable builds)
- Z-RAM: Disabled
Misc Controls:
F-Sync: Disabled = more performance but can cause random reboots and data loss ( use this only with stable builds)
★ souler456´s profile - Slim + IntelliPlug ★
http://forum.xda-developers.com/showpost.php?p=66659439&postcount=343 ( thanks to @souler456 )
1st
gr3ud said:
List of shared profiles:​
My profile with 777 Kernel (R21) + Euphoria-OS 1.1 (Android 5.1.1) (thanks to @777jon ):
- Performance Profile (aka " almost Nexus smooth")
- Not very battery friendly (~3h - 5h SOT with default 3000 mAh battery)
- I don't know how it works out for "Gamers" because i just run simple 2D games when i got the time for that.
- Please don't expect too much, this works for me and my daily usage.
- Enjoy
Setup Values:
CPU:
min: 345 MHz
max: 2457 MHz
MSM Limiter: Disabled
Debug Mask: OFF
Suspend Min Frequency: irrelevant but 345 MHz
Resume Max Frequency: irrelevant but 2457 MHz
Suspend Max Frequency: irrelevant but 2457 MHz
Suspend Defer Time: irrelevant but 0
Input Boost Frequency: 2457 MHz
Boost interval: 5000 ms
Min Input Interval : 100ms
Maximum CPUs Boosted: 4
Multi-core Power Saving: OFF
Arch Power: OFF
CPU Governor(0-3): Nightmare
HOTPLUG:
Msm Hotplug Driver: Enabled
min: 4
max: 4
boost: 4
Screen Off: 2
Boost Lock: 5000 ms
Down Lock Duration: 5000 ms
History Size: 1
Fast Lane Load: 0
Offline Load: 0
Suspend Defer Time: 0
Thermal: ( I use "thermal paste/copper shim mod" so you may choose higher values without)
Intellithermal: Enabled
Core Control : Enabled
Frequency Throttle Temperature: 80c
Core Throttle Temperature: 85c
I/O:
Read-ahead Size: 1024 KB
I/O scheduler: zen
CRC Control: OFF
MMC Clock Scaling Control: ON
Add Random: OFF
I/O Stats: OFF
Rotational: OFF
No Merges: All
RQ Affinity: Disabled
NR Requests: 128
GPU:
GPU min Frequency: 27 MHz
GPU max Frequency: 657 MHz
GPU Governor: Performance
All Add-on´s : Off
GAMMA:
Saturation: 270
Memory(experimental): (beta = ** stock values)
Z-RAM: 0 MB
Dirty Background Ratio: 80% (**5%)
Dirty Ratio: 90% (**40%)
Dirty Expire Centisecs: 200 cs
Dirty Write-back Centisecs: 500 cs
Drop Caches: ON
Extra Free KB: 49050 kB (**43200 kB)
Laptop Mode: ON
Swappiness: 60% (**10%)
VFS Cache: 10% (**100%)
Misc:
TCP: cubic - westwood or what you desire.
How to test:
Run net speed tests with each protocol at least 3 times to compare the average with this Speedtest App
Power Suspend Mode: LCD Hooks
FSYNC: ON
ADV:
Krait-C States: All ON
KSM: ON
Pages to Scan: 128
Scan Delay Interval: 750
Deferred Timer: OFF
Gentle Fair Sleepers: OFF
Adaptive LMK: OFF
Build.PROP:
Wifi Scan: 300 sec
VM Heapsize: 512 MB
Allow purging of assests: OFF
Tools:
SELinux Status: Permissive
--------------------------​
Click to expand...
Click to collapse
Nice to see you made a thread bro
Well, this is the perfect place to share your "imagination". Great
Sent from my LG-D855 using Tapatalk
? ? ? much appreciated effort here ? ? ?
Thank you for creating a profile thread!
Got 40066 in Antutu yesterday on your 30th October set up.
Got this today with the 31st October.
Might not sell my G3 for a OnePlus X now.
johnnzey said:
Got 40066 in Antutu yesterday on your 30th October set up.
Got this today with the 31st October.
Might not sell my G3 for a OnePlus X now.
Click to expand...
Click to collapse
Hey mate glad to hear, i would personally wait for custom 6.x.x ROMs/Kernels for our device tho before moving on
To all others, thanks for your kind words i appreciate it
But without @m1trand1r and @metalgearhathaway motivating words + all the other dudes that dig my work, this thread would not exist :good:
Cheers.
Just applied your settings, great! Never had such a smooth G3! Thanks for the update!
What settings do you use for Marshmallow?
@6th_Hokage
Well since Synapse does not play nice for me and i generally have some weird issues with custom kernels on 6.x.x ROMs (Overheating,BSODs,Crashes,Random Reboots,etc) i decided to use the ROMs respective kernel.
I�´m trying Broken OS right now and they know their stuff pretty well.
They have Kernel Adiutor inbuilt so i basically switched just a few things...like:
- zzmove CPU gov with profile 8 and its inbuilt hotplug, changed the "punch freq" to 2457MHz
- CPU Boost/Interval 5000ms, Sync/Boost Freq. @ 2457MHz
- GPU min/max 587MHz with msm adreno gov
- I/O: row or zen @ 512kB
- Kernel Sampage Merging with 300 pages / 1000 ms scan
- I disabled Adaptive LMK
- Enabled Laptop Mode
- Entropy: Read 128 / Write 256
...and that's pretty much it, its not battery friendly but i don't care for battery life, still got 4hs of SOT with that setup... Lionheart works well too on 6.x.x also does smartmax , so yeah, its butter smooth as i like it for now, i miss KCAL stuff tho, but this ROM (BrokenOS) is still in alpha phase so there will be much more stuff added in the next releases from what i�´ve read on G+
I�´m also waiting for Eliminater74�´s own Kernel Manager, then i will play around with hes kernel i guess so stay tuned :good:
Also, some users mentioned that my 5.1.1 profile works very well for them on 6.x.x maybe give it a shot.
edit:
I forgot to mention that i also disable the default hotplug with Lionheart or smartmax to have all 4 cores permanent online for a little extra performance boost.
Thanks bro. Good job.
*Android 6.x.x update*
http://pastebin.com/jEKAmYVZ
Thank you for the excellent kernel setup for Marshmallow. My G3 is so much smoother than before. I give it a two thumbs up.
**Android 7.x.x Update**
CPU:
- MSM Limiter: Disabled
- min: 300 MH
- max Freq: 2457 MHz
- Governor: Nightmare
- Multicore Powersaving: Disabled
- CPU Boost: Interval: 0ms / Sync Threshold: Disabled / Input Interval: 2500ms / Input Boost: 2265 MHz
HOTPLUG:
- All Disabled
THERMAL:
(optional) Thermal Compound Cooling Mod -> https://www.youtube.com/watch?v=PH5wCeootNI
- Delete "Thermal-Engine" under system/bin
- Intellithermal Enabled
- Core Control Disabled
- Freq Throttle Temp = 75°c
- Core Throttle Temp = 80°c
GPU:
- min. freq.: 330
- max. freq.: 578
- Governor: msm adreno-tz
- Simple GPU Algorithm: Disabled
- Adreno Idler: Disabled
SCREEN ("personal preference/vibrant colors"):
- Saturation Intensity: 55
- Screen Value: 125
- Screen Contrast: 140
I/O:
- Internal Storage: bfq
- Read-ahead: 512 kB
- Rotational Storage: On
- Add Random: Off
- I/O Stats: Off
- RQ Affinity: 0
KSM:
- Disabled
LMK:
- Adaptive Low Memory Killer: Disabled
Virtual Memory:
- Laptop Mode = Disabled
- Z-RAM = 500 MB (16/2GB model only)
Misc Controls:
F-Sync = Enabled
gr3ud said:
**Android 7.x.x Update**
CPU:
- MSM Limiter: Disabled
- min: 300 MH
- max Freq: 2457 MHz
- Governor: Nightmare
- Multicore Powersaving: Disabled
- CPU Boost: Interval: 0ms / Sync Threshold: Disabled / Input Interval: 2500ms / Input Boost: 2265 MHz
HOTPLUG:
- All Disabled
THERMAL:
(optional) Thermal Compound Cooling Mod ->
- Delete "Thermal-Engine" under system/bin
- Intellithermal Enabled
- Core Control Disabled
- Freq Throttle Temp = 75°c
- Core Throttle Temp = 80°c
GPU:
- min. freq.: 330
- max. freq.: 578
- Governor: msm adreno-tz
- Simple GPU Algorithm: Disabled
- Adreno Idler: Disabled
SCREEN ("personal preference/vibrant colors"):
- Saturation Intensity: 55
- Screen Value: 125
- Screen Contrast: 140
I/O:
- Internal Storage: bfq
- Read-ahead: 512 kB
- Rotational Storage: On
- Add Random: Off
- I/O Stats: Off
- RQ Affinity: 0
KSM:
- Disabled
LMK:
- Adaptive Low Memory Killer: Disabled
Virtual Memory:
- Laptop Mode = Disabled
- Z-RAM = 500 MB (16/2GB model only)
Misc Controls:
F-Sync = Enabled
Click to expand...
Click to collapse
thank you,,with those do you get decent battery..
jlb1959.01 said:
thank you,,with those do you get decent battery..
Click to expand...
Click to collapse
It's okay, was not really my intention to save battery juice.
gr3ud said:
It's okay, was not really my intention to save battery juice.
Click to expand...
Click to collapse
thanks,looking for mid point settings,both perform and some kind of battery..thanks again..
jlb1959.01 said:
thanks,looking for mid point settings,both perform and some kind of battery..thanks again..
Click to expand...
Click to collapse
Hmm try my 6.x.x alucard profile then, had some good experience with it. No problem btw you welcome
gr3ud said:
Hmm try my 6.x.x alucard profile then, had some good experience with it. No problem btw you welcome
Click to expand...
Click to collapse
I will try it,,much appreciated..

Categories

Resources