Search This thread

gokhanmoral

Retired Senior Recognized Developer
Mar 16, 2006
3,744
25,415
48
Ankara
www.isyam.bilkent.edu.tr
Please leave non-development related posts to the discussion thread in general section: http://xdaforums.com/showthread.php?p=27389678

STOP! This kernel supports ONLY Samsung JellyBean or CM10.1 ROMs. It won't work on ICS, CM9.

siyahkernel-2.png

Sources :-
Sources at http://github.com/gokhanmoral/siyahkernel-sgs3
Ramfs at http://github.com/gokhanmoral/ramfs-sgs3
Toolchain at http://github.com/gokhanmoral/android_prebuilt
Simply clone all to a directory and run build_kernel.sh in the kernel directory​
Features :-
  • Samsung and CM10.1 support with a single kernel image
  • based on i9300 update9 sources
  • CPU OC/UC/UV
  • GPU OC/UC/UV (5 step GPU clock)
  • Audio enhancement and sound boosting for great headphone experience (partial-port of wm8994 based implementation from project-voodoo)
  • init.d support
  • Triangle-away app support
  • Auto-root
  • Adjustable charging speeds for AC and USB
  • Automatic EFS Backup
  • Samsung proprietary ExFat modules are loaded. Don't ask about ExFat support for aosp roms in this thread.
  • Kernel based gestures support by Tungstwenty. See http://xdaforums.com/showthread.php?t=1831254
  • NTFS automounting for USB sticks, mounted to /mnt/ntfs folder in Read Only mode.
  • mDNIe negative effect toggle with 4 consecutive press of home button
  • mDNIe values can be adjusted using the interfaces in /sys/class/misc/mdnie.
  • Almost everything is configurable via simple and free STweaks (included in the kernel or from Google Play)
  • Dual-booting. You can have Samsung JB and CM10 ROMs on a single device at the same time.
  • slide2wake (WIP, still incomplete)

Known Problems :-
  • No known problems.

Thanks To :-

  • Chainfire, AndreiLux, Tegrak, Entropy512, Netarchy, Pikachu, Tungstwenty, Codeworkx, XploDwilD
  • This part will be expanded. most of the patches I applied are coded by someone else. please remind me if I forget to give credits to anybody..


Changelog :-
See http://www.gokhanmoral.com/ for changelog.

Todo:
these are my future plans and some of them are dreams only...
  • fix bugs
  • add optional teamwin recovery
  • implement BFN (BackFlashNotification)
...

Video Review of v1.7rc1 by KingRamo
 
Last edited:

gokhanmoral

Retired Senior Recognized Developer
Mar 16, 2006
3,744
25,415
48
Ankara
www.isyam.bilkent.edu.tr
siyahkernel-ics-wide1.png
IRC support and chat:
Server: irc.FreeNode.net
Channel: #siyah-kernel
web client: http://siyah.twosx.net/ (thanks to omniwolf)

READ THESE FIRST

  • First thing you need to have before posting to this thread is respect. If you don't have it for others you will regret leaving a post as people in this thread don't like disrespect. The items below are just detailed description of what "respect" means in this context. If you have common sense you probably won't need to read all the following items but please do read them anyway.
  • Never report any bugs to CM9/CM10 thread if you use it together with SiyahKernel
  • Do not ask questions to me directly. This is a common thread, not my personal inbox. Ask your questions in the thread and do not target them to anyone.
  • Do not expect answers to all your questions. There are some questions which nobody knows the answer of.
  • Do not forget that this is a development thread. There is another thread in general section for those who wants to discuss battery life and chats. If your post does not include a feature request, bug report or suggestion it should be posted to the other thread.
  • Make sure you state your ROM, settings and any other relevant information while telling about your problem/a bug. "I have lag", "I had crash" or any similar posts will be ignored if you don't give any more details.
  • No ETA for new version. Even if I sometimes talk about release dates those may change and they change for some good reason or because of my real-life obligations.
  • Make use of "Search this Thread -> Advanced Search". If you humiliate people and waste their time by asking a question which is answered in the last 3 pages I guarantee that you will be treated as you deserve.
  • You need STweaks app to configure/change most of the features in this kernel. However it is not required if you don't want to modify anything.
  • Never ever discuss anything deep-sleep related in this thread. I do not make modifications to prevent sleep and 99% of deep sleep problems are application/ROM related. discuss it in general section. I do not want any positive ("this kernel sleeps like a baby") or negative ("There is a big problem with deep sleep. Please fix it") messages in my development thread.
  • I am not interested in any bug reports if you undervolt your device. I don't want ANY kind of undervolting related discussions or bug reports in this thread.
 
Last edited:

droidphile

Senior Member
Jul 19, 2011
1,119
7,103
Bangalore
Samsung Galaxy S20
FAQS and More

FAQS and More

In no particular order.

1. "How the heck do i flash the kernel.tar within device. I see a boot.img and recovery.img in the tar and not zimage like before?? I don't wanna increase flash counter by using odin from PC!"

A. Use mobile odin. (Paid on market, free on XDA).
Open the app, Click on "kernel", select the kernel.tar. Scroll down, select "flash firmware". Reboot.

2. "Why two mountable image files in tar?"
A. GS3 has separate kernel and recovery partition.
Kernel partition : /dev/block/mmcblk0p5
Recovery Partition: /dev/block/mmcblk0p6
Both partitions has a max size limit of 8 MB each.

3. "Does that mean i can flash only kernel/only recovery if i don't need the other?"
A. Yes. However, if recovery was modified to support a new feature in kernel, you may want to flash both.

4. "If i flash tar from Odin on PC, both kernel and recovery is flashed and i can't choose to flash only one?"
A. Yes, both are flashed.

5. "How to flash only kernel/only recovery with cwm flashable zip?"
A. If you know what you're doing, open updater-script in the zip and comment out the line that starts with write_raw_image for the one you don't need - kernel or recovery.

6. "Should i wipe cache and dalvik before flashing kernel?"
A. NO

7. "Best governor, best i/o scheduler for this kernel?"
A. Define best governor and best i/o scheduler!
Pegasusq is good enough to be responsive, battery friendly and quad core friendly if tweaked properly. Use any i/o scheduler. Sio/deadline are good.

8. "Why is Idle+Lpa default on STweaks and the recommended settings. In Siyah kernel for GS2, Aftr+Lpa was recommended!"
A. Aftr ofcourse saves more power than Idle if you consider what each of those low power state modes do. But combination of quad core architecture and pegasusq governor (or any external hotplugging logic combined with other governors) which need to respect rq values along with load thresholds makes it a little slower to turn off last 3 cores (if all the cores are ON obviously). AFTR requires that all cores except first (cpu0) be turned off - to kick in. So we're better off with Idle+Lpa.
However if you're using forced single core mode always (which is non sense in this powerful device), you can go for Aftr+Lpa.

9. "How do i overclock/underclock/undervolt GPU?"
A. Either use STweaks app or use a script
Ex:
#Frequency steps
echo 160 > /sys/module/mali/parameters/step0_clk
echo 266 > /sys/module/mali/parameters/step1_clk
echo 350 > /sys/module/mali/parameters/step2_clk
echo 440 > /sys/module/mali/parameters/step3_clk
echo 533 > /sys/module/mali/parameters/step4_clk


#Voltages
echo "875000 900000 950000 1025000 1075000" > /sys/class/misc/mali_control/voltage_control

10. "My device is not stable at 1.8 Ghz. But i still wanna overclock the device to possible maximum and show off to friends"
A. Try setting last frequency as 1750 mhz. (Modify 1.8 to 1.75 ghz with 1.7 ghz still in place)
Use kmemhelper interface. Put this line in your initd script.

kmemhelper -n exynos4x12_apll_pms_table -t int -o 0 14353152

11. "I OCed to 1.7/1.8 Ghz. My device is able to handle it. But i can't get high benchmark scores. Why?"
A. Your CPU is getting throttled during benchmark during benchmarking because of heating. This is a thermal safeguard measure. It might be getting throttled to 800 mhz or so.
Forget benchmarks, treat the overall responsiveness in daily usage as the criteria to determine if the device is fast enough for you or not.

12. "Any rule of thumb to increase life span of the battery? And I see percentage drops to 99 immediately after a charge till 100%"
A. Do not recharge to 100% often and even if you do, don't keep it plugged in 100% for long time. Best is to charge till 98%. And make sure charge does not drop below 10% while on normal use.
Charge dropping to 99% swiftly is a protection mechanism, not a fault with your battery or kernel or rom.

13. "I adjust the voltage by some mV in STweaks. I checked SetCpu and voltage has not changed!"
A. Voltage settings in STweaks follow VDD interface. They're applied ONLY during boot time. Why? The code is to reduce X mV specified by you in STweaks, for all voltages. If the settings is applied real time, it will cause reduction of voltage every time and instabilities.

14. "If I have no root, and flash this kernel using desktop odin will i get root?"
A. YES. However, if you don't see a CWM recovery, download and flash a recovery from Chainfire thread.

15. "Does the kernel backup EFS partition automatically?"
A. YES.

16. "Is there NTFS support?"
A. YES. Mounted to mnt/ntfs in Read only mode. Unmount and remount in Read Write mode if you need to.

17. "What voltage step does GS3 support while UV/OV?"
A. Regulator supports increments of +/-12.5 mV (Those who had GS2 will remember it's regulator supported +/- 25mV)

18. "Why is resetting STweaks 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>
There could be changes in Stweaks interface for a new build:-
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 STweaks.
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. Kernel already detects STweaks changes to reset profile automatically on first boot after flashing.

19. "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>

20. "How to know which modules are pre-loaded by kernel?"
A. Terminal or adb:
lsmod

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. "After flashing a new kernel i see there are some stuffs missing from STweaks"
A. Either the support for those missing tunables were removed or just the STweaks interface was removed. The parameters might still be accessible through scripts. Check the file path to make sure.

23. "Does notification LED cause wakelock and lot of drain?"
A. Hm Yes and No. CPU has to wake to help turn on notif led and to turn off when it's timeout. When LED is blinking, no wakelocks are held. Notif led is controlled by a diff h/w and not directly by CPU.

24. "How do I know if my modified charge current settings (using STweaks) are effective?"
A. Use CurrentWidget from playstore. Monitor the reading while charging.

25. "What happens if my smooth scaling frequency is greater than my scaling max frequency?"
A. Smooth scaling will be inactive/disabled.

26. "Can I flash this kernel on a non-international variant - At&T/Korean/Japanese...?"
A. NO. Don't risk 800 dollars. Dev might release different variants for these devices later.

27. "I tried setting a negative value for a symbol using kmemhelper interface. I see the value is not applied properly. What could be wrong"
A. The negative value might be detected my kmemhelper as an argument. To prevent that, use two minus signs (--) before the negative value.
Ex: "kmemhelper t int -n touch_boost_level -- -1" (This resets touch boost frequency to default).

28. "I wanna disable all the audio enhancement stuffs. How?"
A. In your script
echo 0 > /sys/class/misc/scoobydoo_sound_control/enable

29. "Least voltage for a CPU frequency I can undervolt to?"
A. 600 mV. Maximum = 1500 mV

30. "Does sound enhancements in stweaks applies to bluetooth headsets?"
A. NO. Only for wired headphones.

31. "Do we have temperature sensor in our CPU?"
A. YES

32. "I have this habbit of unknowingly pressing home button multiple times and that result in inverting colors on my screen."
A. Disable "mDNIe negative toggle under Screen tab in STweaks.

33. "I sometimes get unexpected reboots. What could be wrong?"
A. Number of reasons.
- Problem from ROM side - wrong dpi setting for an app, wrong build.prop tweaks, etc.
- Too much UV on CPU/GPU
- Too much CPU OC/GPU OC
- CPU/Battery heated up too much because of weather/benchmarking/faulty charger, etc

34. "I want to help dev debug an issue providing a kmsg. How to?"
A. After the problem (random reboot/freeze/lockup), do not pull out battery to recover. Just long press power button so that device can reboot. Then connect device to PC, (provided you have setup adb), type
adb pull /proc/last_kmsg
Save the file as .txt and post in the thread along with description of the problem and possible way to reproduce it.
If you can't use adb from pc, just copy last_kmsg file from /proc directory to internal sd, copy it to your PC and post in the thread.

35. "I'm not able to copy Person X's undervolting settings. Why? Sometimes, across different builds of Siyah, my UV settings are stable in one version and not in another. Why?"
A. One or more of the following
- Every device is different - diff grades of CPU
- CPU drivers might change across different builds
- Power requirements may differ depending on the temperature, altitude or the defaults.

36. "GPU OC/UC range?"
A. 54 to 700 mhz. With voltage range of 600mv to 1200mv at 25mv steps.


more might follow..
 
Last edited:

droidphile

Senior Member
Jul 19, 2011
1,119
7,103
Bangalore
Samsung Galaxy S20
Know the STweaks Tunables

You have a custom kernel and an app to control different tweaks. Read below to have a fair understanding of all the sliders and drop-downs in the app plus read some faqs.

Q. "What's STweaks?"
A. It's an app developed by GM to provide a simple interface for various kernel tweaks.
STweaks works using /res/uci.sh interface. (Universal Configurator Interface). Ideally when you run /res/uci.sh config you get an xml file. The app render that XML file to an UI. (The xml is customconfig.xml in /res/customconfig directory)

Q. "Where are profile files (default, performance etc) stored in my device?"
A. /data/.siyah with extension ".profile"
Contents are in the format <tunable> = <value>

Q. "How come STweaks takes a little long to load every time? Other CPU tuner apps like SetCPU opens faster!"
A. Stweaks needs to query the values of ALL tunables from the active profile file, then set the UI elements (sliders, checkboxes, dropdowns, etc) to match the values queried. Only after these it can expose itself for you. So yeah! Some time is needed.
It loads in about 2 seconds now.

Q. "So every tunable possible with SiyahKernel is included in STweaks?"
A. NO. That would make the app complicated and while some users like to have lotttsa tweaks in the app, some users prefer the opposite. So to be fair, STweaks will not be cluttered with way too many options.
For users who know what they're doing, there are scripts, and kmemhelper.

Q. "After flashing a new version of Siyah, I can't see STweaks in my app drawer. Help!!"
A. Using a Root File Explorer, copy STweaks.apk from /res directory to /system/app. Set permissions rw- r-- r--

Q. "I find that after flashing a new kernel version, while adjusting some tunables there's no effect."
A. In the app, under EXTRAS Tab, hit "Reset settings to default". Now reconfigure all your settings. Should be fine in most cases.

Q. "Sometimes, after flashing a new kernel build, i see all my settings are reset to kernel defaults. Is it normal?"
A. YES. It's just so that profile files contains all the tunables matching config XML in the latest build. If resetting is not done, some settings will not work.

Q. "Does that mean - every time I flash a new kernel build, I need to reset settings?"
A. NO

Q. "What should I change in STweaks to have best battery/best performance?"
A. Read below to know what each tunables do. If you still don't get it, don't change anything. Trust defaults. All will be good.


1) CPU Tab

Gentle_Fair_Sleepers:-
This is a CFS tweak. CFS aka Completely Fair Scheduler is your default Task Scheduler. Task Scheduler is responsible to manage task executions - decides what task to execute next from a queue. CFS scheduler tries to fairly distribute the CPU time among all tasks in such a way that each of them gets the same amount of the virtual run-time. CFS maintains two arrays - active and expired. Tasks once served from active array are placed in expired array. When there are no more tasks in active array, the two arrays are swapped. Sleeper Fairness means to consider sleeping tasks similar to the ones on the runqueue and credit the sleepers in a way that it would get CPU as if it were running. With Gentle_Fair_Sleepers enabled, sleeping tasks will get a little bonus time w.r.t to their virtual run time. While this may seem fair in some cases, disabling this tweak may possibly improve UI responsiveness:- may be because sleeping tasks are not given additional priority and the task that's responsible for UI do not sleep while screen is ON.

* Arch_Power:-
Another scheduler tweak. Helps in using specific ARM topology functions instead of generic functions. Benefits may include idle higher number of threads in a core, etc.

* CFS Tweaks:-
Three options which sets different value for your task scheduler's a) Minimum Granularity b) Latency c) Wake-up Granularity
A new "epoch" or a new time origin begins when scheduler swaps active and expired array.
Latency is the length of an epoch in nano seconds.
Minimum Granularity is the granularity of one epoch.
Wake Up Granularity is the ability of tasks being waken up to preempt the current task (5 ms by default). The larger the value the more difficult it is for the task to force the preemption.

- Samsung Defaults:- Leave it as Samsung defaults if you want higher benches.
-Linux Kernel Defaults:- My fav.
-Thunderbolt Scripts Defaults:- Pikachu's tweaks are aggressive low values for parameters. May improve UI responsiveness.

CPU Idle Modes:-
Leave it as Idle+Lpa. AFTR seems to be a difficult world to conquer for i9300.

* Smooth Scaling Level:-
Leave it as 1800mhz (which disables smooth scaling) if your governor has the parameter "freq_step" (ex: Pegasusq). Otherwise, the two concepts may conflict. Use smooth scaling for other supported governors. CPU driver scales CPU to frequency as defined by Smooth Scaling Level before jumping to Max Frequency.

Sched_mc:-
Leave it disabled = 0. 1 will overload first core, 2 will try to save power by biasing task-wakeups to semi-idle core.

CPU Undervolting:-
[Courtesy Andreilux for the info] 32 nm Exynos 4412 on our device decreases the need for higher voltages for transistors to switch and decreases voltage leakage. So they actually successfully switch more of the time compared to SiON on Galaxy S2 i9100 where leakage was big enough to not make a transistor switch and crash the system. In short, this is why GS3 supports higher UV compared to GS2. You might be lucky enough to UV more than 200mv on certain frequencies. Try on own risk.

Max CPU Lock:-
Defines no of cores to be used along with Pegasusq governor. Leave it quad core. You have beast of a phone. This parameter actually changes the max_cpu_lock parameter of your governor - pegasusq or lulzactiveq.


CPU Governor:-
Use Pegasusq.

CPU Max Frequency:-
Sensible OC for our device is 1.5 Ghz. You can try more and see what happens.

CPU Minimum Frequency:-
Use 200 or 100.


2) CPU_UV Tab
Like SetCPU or voltage control, sets voltage per CPU frequency. Note that the values DO NOT represent the actual voltage levels on the frequencies. If you UV in Stweaks and also use SetCPU to set voltage levels, SetCPU will over ride Stweaks.


3) GPU Tab

* Mali Touch Boost Level:-
If this option is enabled to any steps, when you touch on the screen/press soft back or menu keys/press homebutton - GPU voltage is set to the GPU step that match the step set by you here and frequency is set to that step. This may helps in better responsiveness of unlocking via lockscreen, etc. Note that, this doesn't mean GPU is locked to that forever. After one second, depending on thresholds and stepcounts, soon GPU is clocked down or up.
If Mali Touch Boost Level is disabled, GPU resumes at lowest frequency (your first step).

GPU Frequency Steps:-
Now we have frequency steps taken from Korean sources, as hard coded in clock-exynos4212 file. You won't find a formula to calculate valid frequency steps. (Unlike i9100 for which any GPU step was 800 divided by an integer)

GPU Voltage Levels:-
You may be able to UV a little more compared to GS2 if your ex device was GS2. Try and see. (Thanks to 32 NM SoC). Remember that you will know UV was too much only while GPU is being heavily used - like gaming.

GPU Thresholds:-
If you're not sure about this, use default thresholds. Wrong thresholds can cause lags.

* GPU Stay Counts:-
Stay count is the number of Seconds GPU should stay at a frequency level before it can scale up or down, overriding "load exceeds threshold condition". To avoid any possible stutters in gaming, use staycount = 1 second for the last step. May be for 4th step too, just to be sure.
If you don't find StayCount interface in the app, use script.
echo "0 0 0 0 1" > /sys/class/misc/mali_control/staycount_control
From left to right, each digit represents StayCount for lowest to highest GPU frequency steps.


4) AUDIO Tab

Speaker Tuning:-
Check to enable better bass response on speakers. Note that GS3 speakers don't play well with bass (even with open source audio HAL developed by codeworkx for CM10. So if you find sound distorting on speakers, uncheck this option instead of trying to play with some equalizer.

Speaker Amplification Offset:-
Default zero. Increase to amplify speaker volume. At level 5 or 6, speaker is most likely to distort playing ringtones/sounds.

Headphone Amplifier:-
Volume boost for your headphones. Level 0 = -57 dB. Level 63 = +6 dB which is the hardware maximum. Please take care of your hearing.

3D Effect:-
Stereo expansion may tighten the stereo field. In general, there are multiple techniques to achieve surround effect/3d effect/stereo expansion effect.

3D Effect Gain:-
Valid only if 3d effect is enabled. Higher value may not sound pleasant to most ears. 2-4 should do.

EQ Presets:-
Use inbuilt presets or use graphical equalizer bands to tune the 5 band equalizer.

Graphical Equalizer:-
The five band equalizer(with a range of -12dB to +12dB) is a hardware equalizer. So it controls all the sound coming from your headphones. Software equalizers such as inbuilt EQ of powerampp can only control the sound output 'formatted' by this 5 band h/w EQ. As you know, the first two bands - Lows/Bass. Middle one - Mids/Vocal and last two bands for - Highs/Treble.

Negative Digital Gain:-
Or dynamic range. Increase this to prevent distortion. It defines how much volume is to be digitally reduced from headphone amplification level.

FLL Tuning:-
Aka Anti Jitter is an audio enhancement technique as an internal clock optimization to reduce noise and produce a better quality sound.

DAC Oversampling:-
Increases dac oversample rate for a 48 khz rate and produce better outpund sound.

DAC Direct:-
Aka DAC ME, Bypass analog channels and redirect sound directly to output.

Mono Downmix/Force Mono:-
Force mono sound even if source is stereo.


5) SCREEN TAB

* MIN_BL, MIN_GAMMA, MAX_GAMMA:-
In simplest form, set this higher to have lower brightness at bright conditions on automatic-brightness settings. And vice-verse.
We have lowest brightness for a brightness level read from sensor less than min_bl. Any level higher than min_bl will be linearly mapped to min_gamma:max_gamma to interpret brightness of the display. Difference between min_gamma and max_gamma along with their values affect overall brightness response curve.

mDNIe Sharpness Tweaks:-
Makes thin fonts more readable. You're most likely to see weird display if you disable this option.

mDNIe Negative Toggle:-
If this is enabled, quickly pressing home key four times will invert all the colors on your scree. Useful for ex: Reading a webpage in the dark which has white background by default. By inverting colors to make it black, your eyes will strain lesser, plus it saves battery in such cases.

Touch Boost Level:-
Defines the frequency to which CPU is instantly ramped up to when we touch the screen. Advantage? UI responsiveness. Setting this too low might be a v bad idea on some devices.

Slide2Wake:-
If enabled, slide on screen in a straight fashion from left to right to wake your device. Helps prevent wear down of physical home/power buttons. If in doubt this drains more battery, leave it disabled.

FB Early Suspend Delay:-
Early suspend delay to run CRT off animation. If you're sure that Settings > Developer Options > Windows Animation Scale is 1x or higher (not 0.5x or off) and still can't get CRT-off animation to work, set this param to 100 ms or so.

6) MISC TAB

Android Logger:-
Enable disable android logger. Logger hardly uses any extra battery, and will be very useful if to pull a log after a crash or freeze. Leave it enabled.

* Insecure Adbd:-
Enables to run your Android Debugging Bridge Daemon (adbd) in root mode by default. Use "adb remount" command in a terminal to mount /system as r/w.

I/O Scheduler:-
Use any among deadline/sio/noop.

* Zram Size:-
Compressed swap space aka compcache aka zram allocates defined amount of space from your physical RAM as compressed swap space. You can debate all along to see if zram is useful on a fast device like GS3 with a fast flash storage inside. If in doubt, disable this option.

Notification LED Behavior:-
Force blinking/fading of notification LEDs. Useful for Sammy based roms. (aosp roms has blinking/fading setting inbuilt).

AC Charge:-
Charge current from your wall charger. Increase the value for faster charging at own risk. If you see currentwidget app displaying only 800/1000 mA (when you have set 1200 mA in stweaks) while connected to car charger - it's because the charger can not output more current than that.

USB Charge:-
Charge from usb charger. Increase at the risk of possible damage to PC motherboard. (if it's an old board)

Discrete Wakelock Status:-
Helps betterbatterystats app to report deleted and non-overlapping wakelocks. You may see new wakelocks like your mailclient-inbox-sync, etc if this option is enabled.

Remove Root:-
Some apps detect root and refuse to work if found (certain banking apps for example). To remove root, click this button, run your app and re-enable root when you're done.

Auto Install Root:-
Tries to install superuser apk and binary. If it fails, download latest superuser flashable zip from here and flash in recovery OR download SuperSU from playstore.


6) DUALBOOT TAB

Reboot into 2ndRom Utils:-
Reboots to alternate recovery where you can configure and play with dual boot options. This doesn't change your cwm recovery, but just runs an alternate recovery.

Reboot into 1stRom:-
As it says, reboot to 1st rom without displaying a timeout.

Reboot into 2ndRom:-
As it says, reboot to 2nd rom without displaying a timeout.

No boot logo:-
Check this to disable Siyah bootlogo displayed during dual-boot rom selection time out. (If you're dual booting, logo will be shown anyhow)

Default Rom:-
Specified the default rom (among 1st and 2nd) to which device will boot into, if no keys are pressed during boot. If 2nd rom is default, pressing home/vol down keys will boot 1st rom.

Hijack Recovery:-
We know the second rom utilities aka embedded recovery is a part of the kernel - it holds the same partition as kernel. You can use this button to flash the embedded recovery to main recovery partition (overwriting your existing recovery) so that 3 button method/booting to recovery using extended power menu will take you to Siyah recovery. This is NOT a dangerous operation. You can flash cwm/twrp recovery anytime if you need another recovery.

7) EXTRAS TAB

Reset Settings to Default:-
Reset the profile file, and resets all values in device files to kernel defaults.

Check for Updates:-
Checks and downloads a new build.

Flash Kernel:-
Flash a .tar kernel. Alternative to Mobile Odin!

* Indicates tunables removed from STweaks as of now.


Flashable Zips

Update: Find sample Stweaks Profiles as flashable zip here. http://xdaforums.com/showthread.php?t=2034981. Profiles after flashing will be available in the profile app.

Here are 5 Governor Tweaks scripts as flashable zips.

Flash remove_governor_tweaks zip to remove init.d script that contains governor tweaks. One governor zip can be flashed over another and it will just replace the previous. All governor tweak scrips contains tweaks for pegasusq and luzactiveq. Gamerstweaks is also a governor script that's similar to extremeperformance script but does some additional GPU tuning (for which there is no interface in Stweaks) to enhance gaming experience.

Since order of execution is like this:-
1) STweaks applies its settings
2) Init.d scripts are executed
3) Apps such as SetCPU applies its "set on boot" options,

Script applies the tweaks to the governor selected in Stweaks (depending on if it's pegasusq or lulzactiveq). So if you want pegasuq tweaks to be applied, make sure pegasusq is the default governor in stweaks, and same for luzactiveq.

I will keep updating zips while new kernel builds are released - if it changes any tunable.
 

Attachments

  • BatteryTweaksGovernor.zip
    140.8 KB · Views: 3,824
  • EvenMoreBatteryTweaksGovernor.zip
    140.8 KB · Views: 3,994
  • PerformanceTweaksGovernor.zip
    140.8 KB · Views: 2,481
  • ExtremePerformanceTweaksGovernor.zip
    140.8 KB · Views: 2,707
  • remove_governor_tweaks.zip
    139.7 KB · Views: 2,602
  • GamersTweaks.zip
    140.9 KB · Views: 2,652
Last edited:

droidphile

Senior Member
Jul 19, 2011
1,119
7,103
Bangalore
Samsung Galaxy S20
DualBoot FAQs

Dual Boot FAQs

* "Alternate Recovery" or "Embedded Recovery" is embedded recovery that's the part of kernel since 1.7.x versions when dual booting was introduced. It's the recovery you boot into using "Reboot to 2nd Rom Utils" in STweaks.
"Regular Recovery" or just "Recovery" is your CWM recovery in recovery partition (/mmcblkp06) which is accessed by 3-button method or "boot to recovery" in the extended power menu from your rom.


1. "Why would I wanna dual-boot?"
A. You don't have to.
Suppose you're more of an aosp rom fan. But misses the HDMI out, FM radio and love sammy camera more. Do a minimal installation of sammy rom and boot into it when in need of these features and use aosp rom otherwise.
Or you are a sammy rom fan but love the responsiveness and pure android feel of aosp roms.
And while you can dual boot two sammy or two aosp roms, it doesn't make any sense.

2. "What if I don't need dual booting?"
A. No issues. Kernel won't force to setup 2 roms. You can single boot as before. And if you don't want to see the Siyah logo as well, create a .nobootlogo file without any extension or content in internal SD.

3. "Will dual booting change my bootloader or do any dangerous stuff like setting my phone on fire?"
A. NO. Changes are at kernel and ramfs level only. Some space in your internal sd card is used, and also the unused hidden partition mmcblk0p10 is used to store cache of second rom. Dual booting doesn't repartition the filesystem or perform anything scary.

4. "I want to setup dual booting."
A. There are four situations:-
1) Sammy rom now. Want to use aosp as secondary.
2) Sammy rom now. Want to use aosp as primary.
3) Aosp rom now. Want to use sammy as secondary.
4) Aosp rom now. Want to use sammy as primary.
Special Cases:-
5) Use an existing nandroid backup as 2nd Rom (and existing rom as 1st)
6) Use an existing nandroid backup as 1st Rom (and existing rom as 2nd)

Prerequisites for any setup is
a) Flash latest Siyah
b) Atleast 90% battery left.
c) 2 GB free on internal SD.
d) Some spare time

1) Present sammy, setup aosp as secondary:-
i) Hit "Run 2nd Rom Utils" in Stweaks app from your current rom. This will run the embedded recovery in the kernel. Under dual boot options, wipe 2nd Rom data and cache+dalvik. Format 2nd Rom System.
ii) Using install zip to 2nd rom option, flash aosp rom as 2nd rom.
iii) Fix 2nd Rom permissions
iv) Flash Siyah again

2) Present sammy, setup aosp as primary:-
i) Hit "Run 2nd Rom Utils" in Stweaks app from your current rom. This will run the embedded recovery in the kernel. Under dual boot options, Clone 1st Rom to 2nd Rom.
ii) From recovery (your default cwm recovery which can be accessed from extended power menu or 3 button method), full wipe and install aosp rom zip as you'd normally do when you were single booting.
iii) Fix 2nd Rom permissions
iv) Flash Siyah again.

3) Present aosp, setup sammy as secondary:-
Same as (1), instead of flashing aosp to second, flash sammy to second.

4) Present aosp, setup sammy as primary:-
Same as (2), instead of flashing aosp to first Rom, flash sammy.

5) Restore the nandroid backup using "Restore as 2nd Rom" option in the embedded recovery. If there are problems while restoring, wipe 2nd Rom data, cache+dalvik, format second rom /system and try restoring.

6) Clone 1st Rom to 2nd Rom from embedded recovery then restore nandroid backup from your regular cwm recovery.

NOTE:
-To dual boot Two Aosp or Two Sammy roms, just follow (1) or (2) (depending on which one of them you want as primary/secondary), just flash Sammy instead of aosp or aosp instead of sammy.

5. "What things should I be taking care off while dealing with dual booting?"
A. - Make sure to fix permissions of second rom after setting up 2nd rom for the first time or else you're likely to see a black screen.
- If Wi-FI on aosp doesn't work, flash a sammy ICS rom (on to 1st rom or second rom depending on location of aosp) before flashing aosp rom.
- If NFC doesn't work, flash that NFC fix zip you can find on XDA which replaces ICS NFC firmware on aosp with JB NFC fw from sammy.
- Even if you're installing second rom for the first time, wiping data and cache+dalvik of 2nd rom and formatting system of 2nd rom is necessary; As it creates empty 1.5 gb system.img to be used as system partition for 2nd rom and also creates data directory of second rom in /.secondrom dir in the internal sd.

6. "How to boot into primary rom?"
A. Wait for the 3 second timeout or press volume up/power to skip the timeout. Or use the option in Stweaks if you're booted into second rom already.

7. "How to boot into secondary rom?"
A. During the 3 second timeout, press volume down or home button. Or use the option in Stweaks if you're booted into 1st rom already.

8. "Is kernel partition shared?"
A. Yes. Same kernel boots both roms.

9. "If I flash another kernel (that doesn't support db) do I lose dual booting?"
A. Yes

10. "I lost dualbooting after flashing another kernel. I didn't do anything to second rom files in sdcard/.secondrom. How can I get db back?"
A. Just flash the latest Siyah.

11. "Will there be any performance degradation on the rom used as secondary compared to primary?"
A. NO

12. "Will my phone run slow overall because of db?"
A. NO

13. "How to flash a newer version of 1st rom?"
A. As usual, just flash it from recovery. Flash Siyah again if Rom zip flashed another kernel.

14. "How to flash newer version of 2nd rom?"
A. Using stweaks, boot into 2nd Rom utils. Flash the rom using "Install zip to 2nd Rom" under dual boot options. Flash Siyah again if Rom zip flashed another kernel.

15. "Would upgrading 1st or second rom cause other rom to fail on boot?"
A. No. Partitions of other rom are not touched during upgrading.

16. "I miss the recovery I used before, so much.."
A. You can use any recovery. Alternate recovery can be just run using the option in STweaks.

17. "User apps of 1st rom are automatically available for second rom?"
A. NO. However, if you had backed them up using Titanium Backup or similar apps, just restore apps while on second rom.

18. "I wanna keep separate backup for apps in both the Roms, since I use one Rom for say entertainment and other productivity."
A. Setup different backup directory in Titanium Backup in 1st and 2nd rom.

19. "I don't see Stweaks app in second rom."
A. Delete /system/.siyah/stweaks-installed file in 2nd rom. Reboot to second rom.

20. "Do I need to anything special before flashing a newer Siyah?"
A. NO. Just flash kernel as tar or in recovery - whichever you used to do. Kernel image is copied to the unified kernel partition.

21. "How can I run same STweaks settings of 1st Rom in 2nd Rom?"
A. While on 1st rom, copy the file /data/.siyah/default.profile to /data/media/.secondrom/data/.siyah directory. If you modify STweaks settings in 2nd rom and want to avail same settings on first rom, do the other way around. (Copy "default.profile" from /data/media/.secondrom/data/.siyah to /data/.siyah while on 1st Rom)

22. "How do I remove everything related to DB and run single boot again?"
A. In recovery, under dual boot options - "delete 2nd Rom". OR Delete .secondrom directory in /data/media while on 1st Rom.

23. "If secondrom files are kept in /data/media, will wiping data in recovery erase second rom files?"
A. NO. /data/media is skipped in CWM recovery.

24. "I was using ExFat card on sammy rom without any issues. I have setup dual boot with aosp and now after booting into CM it says microSD card is corrupted."
A. Aosp roms doesn't support ExFat out of the box. The data was corrupted by aosp vold. Even if you boot back to Sammy rom, it still would be corrupted. To recover data, manually mount the card in recovery, copy contents to internal SD and reformat card to a Fat32.
Also try
chkdsk X: /f (where X is the drive letter of microsd), you may be able to copy data.

25. "I read somewhere that both rom data partition use the same space. Doesn't that mean my apps are shared across roms?"
A. NO. It just means they uses same partition. They're still different directories.
1st rom data = /data
2nd rom data = /data/media/.secondrom/data

26. "Will hitting "Reboot to 2nd Rom Utils" in STweaks change my recovery?"
A. NO. It just runs (not flash) an alternate recovery so that you can configure dualboot settings. Using extended power menu or 3 button method, you always lands in your own CWM recovery.

27. "How do I backup 1st Rom and 2nd Rom?"
A. To backup 1st Rom, do what you did to backup rom while you were single booting a while ago.
To backup 2nd Rom, use the feature embedded recovery, which can be accessed using "Reboot to 2nd Rom Utils" in STweaks app.

28. "I booted into recovery using 3 button method. But some dual-boot options are not working even though dev said they're implemented.
A. Use "Reboot to 2nd Rom Utils" in Stweaks app to boot to embedded recovery.

29. "DB architecture?"
A. Like you know, every rom has a /data, /system, /cache partition and a kernel to boot.
For primary rom, it's
mmcblk0p12 = /data
mmcblk0p9 = /system
mmcblk0p8 = /cache
And these won't change whether you're single booting or dual booting.

For secondary rom, data and system is stored in internal sd, cache in hidden partition. Note that internal sd in our device is mounted to /data/media.
We have data as a directory, System as an image in data/media/.secondrom. Cache in mmcblk10 which is hidden partition and not used otherwise.

- When second rom is booting, second rom data is bind mounted to mmcblk0p12 as /data/
- data/media/.secondrom/system.img partition is mounted as /system.
- mmcblk0p10 is mounted as /cache.

More FAQs will be added and the list will be updated as DB is improved.
 
Last edited:

so_ony

Senior Member
Dec 12, 2011
643
410
Berlin
Nice! I like your work on Galaxy S2 hope to see you here often and regulary updating your thread.! :) well done mate

Sent from my GT-I9300 using XDA
 
  • Like
Reactions: barisyavas

bungknees

Senior Member
Jun 11, 2010
910
276
Looking forward to this. Using 0.94b now and it is oh so smooth. I'm sure 1.0 will be even better.

Cheers gokhanmoral.
 

kloodee

Senior Member
Nov 24, 2005
271
47
Many thanks, the best kernal ever, is the focus on battery life on this release? can the kernal fix the high cell standby issue? i believe my device will keep your kernal until i sell the device !

Thank you
 

saberzaid

Senior Member
Apr 2, 2012
279
12
Where is the download link I opened the link above but there is no 1.0 only hv 94

Sent from my GT-I9300 using XDA
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1159
    Please leave non-development related posts to the discussion thread in general section: http://xdaforums.com/showthread.php?p=27389678

    STOP! This kernel supports ONLY Samsung JellyBean or CM10.1 ROMs. It won't work on ICS, CM9.

    siyahkernel-2.png

    Sources :-
    Sources at http://github.com/gokhanmoral/siyahkernel-sgs3
    Ramfs at http://github.com/gokhanmoral/ramfs-sgs3
    Toolchain at http://github.com/gokhanmoral/android_prebuilt
    Simply clone all to a directory and run build_kernel.sh in the kernel directory​
    Features :-
    • Samsung and CM10.1 support with a single kernel image
    • based on i9300 update9 sources
    • CPU OC/UC/UV
    • GPU OC/UC/UV (5 step GPU clock)
    • Audio enhancement and sound boosting for great headphone experience (partial-port of wm8994 based implementation from project-voodoo)
    • init.d support
    • Triangle-away app support
    • Auto-root
    • Adjustable charging speeds for AC and USB
    • Automatic EFS Backup
    • Samsung proprietary ExFat modules are loaded. Don't ask about ExFat support for aosp roms in this thread.
    • Kernel based gestures support by Tungstwenty. See http://xdaforums.com/showthread.php?t=1831254
    • NTFS automounting for USB sticks, mounted to /mnt/ntfs folder in Read Only mode.
    • mDNIe negative effect toggle with 4 consecutive press of home button
    • mDNIe values can be adjusted using the interfaces in /sys/class/misc/mdnie.
    • Almost everything is configurable via simple and free STweaks (included in the kernel or from Google Play)
    • Dual-booting. You can have Samsung JB and CM10 ROMs on a single device at the same time.
    • slide2wake (WIP, still incomplete)

    Known Problems :-
    • No known problems.

    Thanks To :-

    • Chainfire, AndreiLux, Tegrak, Entropy512, Netarchy, Pikachu, Tungstwenty, Codeworkx, XploDwilD
    • This part will be expanded. most of the patches I applied are coded by someone else. please remind me if I forget to give credits to anybody..


    Changelog :-
    See http://www.gokhanmoral.com/ for changelog.

    Todo:
    these are my future plans and some of them are dreams only...
    • fix bugs
    • add optional teamwin recovery
    • implement BFN (BackFlashNotification)
    ...

    Video Review of v1.7rc1 by KingRamo
    308
    siyahkernel-ics-wide1.png
    IRC support and chat:
    Server: irc.FreeNode.net
    Channel: #siyah-kernel
    web client: http://siyah.twosx.net/ (thanks to omniwolf)

    READ THESE FIRST

    • First thing you need to have before posting to this thread is respect. If you don't have it for others you will regret leaving a post as people in this thread don't like disrespect. The items below are just detailed description of what "respect" means in this context. If you have common sense you probably won't need to read all the following items but please do read them anyway.
    • Never report any bugs to CM9/CM10 thread if you use it together with SiyahKernel
    • Do not ask questions to me directly. This is a common thread, not my personal inbox. Ask your questions in the thread and do not target them to anyone.
    • Do not expect answers to all your questions. There are some questions which nobody knows the answer of.
    • Do not forget that this is a development thread. There is another thread in general section for those who wants to discuss battery life and chats. If your post does not include a feature request, bug report or suggestion it should be posted to the other thread.
    • Make sure you state your ROM, settings and any other relevant information while telling about your problem/a bug. "I have lag", "I had crash" or any similar posts will be ignored if you don't give any more details.
    • No ETA for new version. Even if I sometimes talk about release dates those may change and they change for some good reason or because of my real-life obligations.
    • Make use of "Search this Thread -> Advanced Search". If you humiliate people and waste their time by asking a question which is answered in the last 3 pages I guarantee that you will be treated as you deserve.
    • You need STweaks app to configure/change most of the features in this kernel. However it is not required if you don't want to modify anything.
    • Never ever discuss anything deep-sleep related in this thread. I do not make modifications to prevent sleep and 99% of deep sleep problems are application/ROM related. discuss it in general section. I do not want any positive ("this kernel sleeps like a baby") or negative ("There is a big problem with deep sleep. Please fix it") messages in my development thread.
    • I am not interested in any bug reports if you undervolt your device. I don't want ANY kind of undervolting related discussions or bug reports in this thread.
    145
    Know the STweaks Tunables

    You have a custom kernel and an app to control different tweaks. Read below to have a fair understanding of all the sliders and drop-downs in the app plus read some faqs.

    Q. "What's STweaks?"
    A. It's an app developed by GM to provide a simple interface for various kernel tweaks.
    STweaks works using /res/uci.sh interface. (Universal Configurator Interface). Ideally when you run /res/uci.sh config you get an xml file. The app render that XML file to an UI. (The xml is customconfig.xml in /res/customconfig directory)

    Q. "Where are profile files (default, performance etc) stored in my device?"
    A. /data/.siyah with extension ".profile"
    Contents are in the format <tunable> = <value>

    Q. "How come STweaks takes a little long to load every time? Other CPU tuner apps like SetCPU opens faster!"
    A. Stweaks needs to query the values of ALL tunables from the active profile file, then set the UI elements (sliders, checkboxes, dropdowns, etc) to match the values queried. Only after these it can expose itself for you. So yeah! Some time is needed.
    It loads in about 2 seconds now.

    Q. "So every tunable possible with SiyahKernel is included in STweaks?"
    A. NO. That would make the app complicated and while some users like to have lotttsa tweaks in the app, some users prefer the opposite. So to be fair, STweaks will not be cluttered with way too many options.
    For users who know what they're doing, there are scripts, and kmemhelper.

    Q. "After flashing a new version of Siyah, I can't see STweaks in my app drawer. Help!!"
    A. Using a Root File Explorer, copy STweaks.apk from /res directory to /system/app. Set permissions rw- r-- r--

    Q. "I find that after flashing a new kernel version, while adjusting some tunables there's no effect."
    A. In the app, under EXTRAS Tab, hit "Reset settings to default". Now reconfigure all your settings. Should be fine in most cases.

    Q. "Sometimes, after flashing a new kernel build, i see all my settings are reset to kernel defaults. Is it normal?"
    A. YES. It's just so that profile files contains all the tunables matching config XML in the latest build. If resetting is not done, some settings will not work.

    Q. "Does that mean - every time I flash a new kernel build, I need to reset settings?"
    A. NO

    Q. "What should I change in STweaks to have best battery/best performance?"
    A. Read below to know what each tunables do. If you still don't get it, don't change anything. Trust defaults. All will be good.


    1) CPU Tab

    Gentle_Fair_Sleepers:-
    This is a CFS tweak. CFS aka Completely Fair Scheduler is your default Task Scheduler. Task Scheduler is responsible to manage task executions - decides what task to execute next from a queue. CFS scheduler tries to fairly distribute the CPU time among all tasks in such a way that each of them gets the same amount of the virtual run-time. CFS maintains two arrays - active and expired. Tasks once served from active array are placed in expired array. When there are no more tasks in active array, the two arrays are swapped. Sleeper Fairness means to consider sleeping tasks similar to the ones on the runqueue and credit the sleepers in a way that it would get CPU as if it were running. With Gentle_Fair_Sleepers enabled, sleeping tasks will get a little bonus time w.r.t to their virtual run time. While this may seem fair in some cases, disabling this tweak may possibly improve UI responsiveness:- may be because sleeping tasks are not given additional priority and the task that's responsible for UI do not sleep while screen is ON.

    * Arch_Power:-
    Another scheduler tweak. Helps in using specific ARM topology functions instead of generic functions. Benefits may include idle higher number of threads in a core, etc.

    * CFS Tweaks:-
    Three options which sets different value for your task scheduler's a) Minimum Granularity b) Latency c) Wake-up Granularity
    A new "epoch" or a new time origin begins when scheduler swaps active and expired array.
    Latency is the length of an epoch in nano seconds.
    Minimum Granularity is the granularity of one epoch.
    Wake Up Granularity is the ability of tasks being waken up to preempt the current task (5 ms by default). The larger the value the more difficult it is for the task to force the preemption.

    - Samsung Defaults:- Leave it as Samsung defaults if you want higher benches.
    -Linux Kernel Defaults:- My fav.
    -Thunderbolt Scripts Defaults:- Pikachu's tweaks are aggressive low values for parameters. May improve UI responsiveness.

    CPU Idle Modes:-
    Leave it as Idle+Lpa. AFTR seems to be a difficult world to conquer for i9300.

    * Smooth Scaling Level:-
    Leave it as 1800mhz (which disables smooth scaling) if your governor has the parameter "freq_step" (ex: Pegasusq). Otherwise, the two concepts may conflict. Use smooth scaling for other supported governors. CPU driver scales CPU to frequency as defined by Smooth Scaling Level before jumping to Max Frequency.

    Sched_mc:-
    Leave it disabled = 0. 1 will overload first core, 2 will try to save power by biasing task-wakeups to semi-idle core.

    CPU Undervolting:-
    [Courtesy Andreilux for the info] 32 nm Exynos 4412 on our device decreases the need for higher voltages for transistors to switch and decreases voltage leakage. So they actually successfully switch more of the time compared to SiON on Galaxy S2 i9100 where leakage was big enough to not make a transistor switch and crash the system. In short, this is why GS3 supports higher UV compared to GS2. You might be lucky enough to UV more than 200mv on certain frequencies. Try on own risk.

    Max CPU Lock:-
    Defines no of cores to be used along with Pegasusq governor. Leave it quad core. You have beast of a phone. This parameter actually changes the max_cpu_lock parameter of your governor - pegasusq or lulzactiveq.


    CPU Governor:-
    Use Pegasusq.

    CPU Max Frequency:-
    Sensible OC for our device is 1.5 Ghz. You can try more and see what happens.

    CPU Minimum Frequency:-
    Use 200 or 100.


    2) CPU_UV Tab
    Like SetCPU or voltage control, sets voltage per CPU frequency. Note that the values DO NOT represent the actual voltage levels on the frequencies. If you UV in Stweaks and also use SetCPU to set voltage levels, SetCPU will over ride Stweaks.


    3) GPU Tab

    * Mali Touch Boost Level:-
    If this option is enabled to any steps, when you touch on the screen/press soft back or menu keys/press homebutton - GPU voltage is set to the GPU step that match the step set by you here and frequency is set to that step. This may helps in better responsiveness of unlocking via lockscreen, etc. Note that, this doesn't mean GPU is locked to that forever. After one second, depending on thresholds and stepcounts, soon GPU is clocked down or up.
    If Mali Touch Boost Level is disabled, GPU resumes at lowest frequency (your first step).

    GPU Frequency Steps:-
    Now we have frequency steps taken from Korean sources, as hard coded in clock-exynos4212 file. You won't find a formula to calculate valid frequency steps. (Unlike i9100 for which any GPU step was 800 divided by an integer)

    GPU Voltage Levels:-
    You may be able to UV a little more compared to GS2 if your ex device was GS2. Try and see. (Thanks to 32 NM SoC). Remember that you will know UV was too much only while GPU is being heavily used - like gaming.

    GPU Thresholds:-
    If you're not sure about this, use default thresholds. Wrong thresholds can cause lags.

    * GPU Stay Counts:-
    Stay count is the number of Seconds GPU should stay at a frequency level before it can scale up or down, overriding "load exceeds threshold condition". To avoid any possible stutters in gaming, use staycount = 1 second for the last step. May be for 4th step too, just to be sure.
    If you don't find StayCount interface in the app, use script.
    echo "0 0 0 0 1" > /sys/class/misc/mali_control/staycount_control
    From left to right, each digit represents StayCount for lowest to highest GPU frequency steps.


    4) AUDIO Tab

    Speaker Tuning:-
    Check to enable better bass response on speakers. Note that GS3 speakers don't play well with bass (even with open source audio HAL developed by codeworkx for CM10. So if you find sound distorting on speakers, uncheck this option instead of trying to play with some equalizer.

    Speaker Amplification Offset:-
    Default zero. Increase to amplify speaker volume. At level 5 or 6, speaker is most likely to distort playing ringtones/sounds.

    Headphone Amplifier:-
    Volume boost for your headphones. Level 0 = -57 dB. Level 63 = +6 dB which is the hardware maximum. Please take care of your hearing.

    3D Effect:-
    Stereo expansion may tighten the stereo field. In general, there are multiple techniques to achieve surround effect/3d effect/stereo expansion effect.

    3D Effect Gain:-
    Valid only if 3d effect is enabled. Higher value may not sound pleasant to most ears. 2-4 should do.

    EQ Presets:-
    Use inbuilt presets or use graphical equalizer bands to tune the 5 band equalizer.

    Graphical Equalizer:-
    The five band equalizer(with a range of -12dB to +12dB) is a hardware equalizer. So it controls all the sound coming from your headphones. Software equalizers such as inbuilt EQ of powerampp can only control the sound output 'formatted' by this 5 band h/w EQ. As you know, the first two bands - Lows/Bass. Middle one - Mids/Vocal and last two bands for - Highs/Treble.

    Negative Digital Gain:-
    Or dynamic range. Increase this to prevent distortion. It defines how much volume is to be digitally reduced from headphone amplification level.

    FLL Tuning:-
    Aka Anti Jitter is an audio enhancement technique as an internal clock optimization to reduce noise and produce a better quality sound.

    DAC Oversampling:-
    Increases dac oversample rate for a 48 khz rate and produce better outpund sound.

    DAC Direct:-
    Aka DAC ME, Bypass analog channels and redirect sound directly to output.

    Mono Downmix/Force Mono:-
    Force mono sound even if source is stereo.


    5) SCREEN TAB

    * MIN_BL, MIN_GAMMA, MAX_GAMMA:-
    In simplest form, set this higher to have lower brightness at bright conditions on automatic-brightness settings. And vice-verse.
    We have lowest brightness for a brightness level read from sensor less than min_bl. Any level higher than min_bl will be linearly mapped to min_gamma:max_gamma to interpret brightness of the display. Difference between min_gamma and max_gamma along with their values affect overall brightness response curve.

    mDNIe Sharpness Tweaks:-
    Makes thin fonts more readable. You're most likely to see weird display if you disable this option.

    mDNIe Negative Toggle:-
    If this is enabled, quickly pressing home key four times will invert all the colors on your scree. Useful for ex: Reading a webpage in the dark which has white background by default. By inverting colors to make it black, your eyes will strain lesser, plus it saves battery in such cases.

    Touch Boost Level:-
    Defines the frequency to which CPU is instantly ramped up to when we touch the screen. Advantage? UI responsiveness. Setting this too low might be a v bad idea on some devices.

    Slide2Wake:-
    If enabled, slide on screen in a straight fashion from left to right to wake your device. Helps prevent wear down of physical home/power buttons. If in doubt this drains more battery, leave it disabled.

    FB Early Suspend Delay:-
    Early suspend delay to run CRT off animation. If you're sure that Settings > Developer Options > Windows Animation Scale is 1x or higher (not 0.5x or off) and still can't get CRT-off animation to work, set this param to 100 ms or so.

    6) MISC TAB

    Android Logger:-
    Enable disable android logger. Logger hardly uses any extra battery, and will be very useful if to pull a log after a crash or freeze. Leave it enabled.

    * Insecure Adbd:-
    Enables to run your Android Debugging Bridge Daemon (adbd) in root mode by default. Use "adb remount" command in a terminal to mount /system as r/w.

    I/O Scheduler:-
    Use any among deadline/sio/noop.

    * Zram Size:-
    Compressed swap space aka compcache aka zram allocates defined amount of space from your physical RAM as compressed swap space. You can debate all along to see if zram is useful on a fast device like GS3 with a fast flash storage inside. If in doubt, disable this option.

    Notification LED Behavior:-
    Force blinking/fading of notification LEDs. Useful for Sammy based roms. (aosp roms has blinking/fading setting inbuilt).

    AC Charge:-
    Charge current from your wall charger. Increase the value for faster charging at own risk. If you see currentwidget app displaying only 800/1000 mA (when you have set 1200 mA in stweaks) while connected to car charger - it's because the charger can not output more current than that.

    USB Charge:-
    Charge from usb charger. Increase at the risk of possible damage to PC motherboard. (if it's an old board)

    Discrete Wakelock Status:-
    Helps betterbatterystats app to report deleted and non-overlapping wakelocks. You may see new wakelocks like your mailclient-inbox-sync, etc if this option is enabled.

    Remove Root:-
    Some apps detect root and refuse to work if found (certain banking apps for example). To remove root, click this button, run your app and re-enable root when you're done.

    Auto Install Root:-
    Tries to install superuser apk and binary. If it fails, download latest superuser flashable zip from here and flash in recovery OR download SuperSU from playstore.


    6) DUALBOOT TAB

    Reboot into 2ndRom Utils:-
    Reboots to alternate recovery where you can configure and play with dual boot options. This doesn't change your cwm recovery, but just runs an alternate recovery.

    Reboot into 1stRom:-
    As it says, reboot to 1st rom without displaying a timeout.

    Reboot into 2ndRom:-
    As it says, reboot to 2nd rom without displaying a timeout.

    No boot logo:-
    Check this to disable Siyah bootlogo displayed during dual-boot rom selection time out. (If you're dual booting, logo will be shown anyhow)

    Default Rom:-
    Specified the default rom (among 1st and 2nd) to which device will boot into, if no keys are pressed during boot. If 2nd rom is default, pressing home/vol down keys will boot 1st rom.

    Hijack Recovery:-
    We know the second rom utilities aka embedded recovery is a part of the kernel - it holds the same partition as kernel. You can use this button to flash the embedded recovery to main recovery partition (overwriting your existing recovery) so that 3 button method/booting to recovery using extended power menu will take you to Siyah recovery. This is NOT a dangerous operation. You can flash cwm/twrp recovery anytime if you need another recovery.

    7) EXTRAS TAB

    Reset Settings to Default:-
    Reset the profile file, and resets all values in device files to kernel defaults.

    Check for Updates:-
    Checks and downloads a new build.

    Flash Kernel:-
    Flash a .tar kernel. Alternative to Mobile Odin!

    * Indicates tunables removed from STweaks as of now.


    Flashable Zips

    Update: Find sample Stweaks Profiles as flashable zip here. http://xdaforums.com/showthread.php?t=2034981. Profiles after flashing will be available in the profile app.

    Here are 5 Governor Tweaks scripts as flashable zips.

    Flash remove_governor_tweaks zip to remove init.d script that contains governor tweaks. One governor zip can be flashed over another and it will just replace the previous. All governor tweak scrips contains tweaks for pegasusq and luzactiveq. Gamerstweaks is also a governor script that's similar to extremeperformance script but does some additional GPU tuning (for which there is no interface in Stweaks) to enhance gaming experience.

    Since order of execution is like this:-
    1) STweaks applies its settings
    2) Init.d scripts are executed
    3) Apps such as SetCPU applies its "set on boot" options,

    Script applies the tweaks to the governor selected in Stweaks (depending on if it's pegasusq or lulzactiveq). So if you want pegasuq tweaks to be applied, make sure pegasusq is the default governor in stweaks, and same for luzactiveq.

    I will keep updating zips while new kernel builds are released - if it changes any tunable.