[FAQ] Franco Kernel & FKU APK Learner's Lounge - Android General

{
"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"
}
The purpose of this thread is to have a place where people can discuss Franco's kernel and the application Franco Kernel Updater and ask questions here. I will provide some FAQs and their answers here also. This thread is more aimed at those who may inexperienced at making software modifications to their devices and I will warn you once you have unlocked your boot loader your warranty may be void and ultimately you as the end user are responsible for your device. This way the development threads can be kept clean, easy to follow and not miss important information which can easily get lost in the jungle of posts. I will allow off topic in this thread for general kernel / app / settings related chitter chatter too.
I personally want to thank everyone involved, each who I have mentioned and others who I might of missed (sorry if I have!) for each person has played their role and contributed information and advice to other members of XDA, perhaps unregistered lurkers too! This is a summery of the best information I could find and been putting together over a number of weeks and I am sharing my knowledge as others shared with me back when I was new and inexperienced, enjoy my thread!
Moderator Disclaimer
This thread isn't aimed to be an advertisement but a place to learn.
Information about the kernel
People generally change kernels for battery savings and to add features the stock one doesn't offer. Franco's kernel has several advantages over the stock one in terms of battery saving saving features, one of my favourite being the removal of MPdecision which in lay-mans terms changes the min and maximum speed the CPU can run at based upon live battery temperature checks. Franco's hot plug driver always keeps 2 cores online and always them to scale from 300mhz to 2.3ghz and based upon load conditions will online cores 3 and 4 if required. When you touch the screen the screen the CPU speed is boosted to approximately 1.5ghz for just over a quarter of a second and when load is reduced the CPU speed is able to lower quickly back to lower speeds thanks to his tuned interactive governor. Franco has created a governor for the GPU named interactive which works very much like how the CPU equivilant does. Franco has added some newer drivers for WiFi which also helps reduce idle battery drain while your on a busy WiFi network. Franco has also added an interface where you can boost microphone, speaker and headphone gain levels for audio enthusiasts as well as an interface to allow screen calibration and load pre set profiles to improve your experience with how your display looks! There's clock speed control, voltage control, governor control, hot plug control. You get the idea its full of cool features which can be controlled with the paid Franco.Kernel Application (see later in the thread for most infos)!
Our Developer
Franco is a no nonsense kind of guy, not a fan of buzz words and often tells it as it is kind of guy. He works exclusively on the nexus line. Generally the phones see more attention than tablets and owns and supports all the nexus phones and tabs from Galaxy Nexus right through to the latest Nexus 5. Special thanks to @JNewms for being Franco's tester while he was awaiting shipment of his Nexus 5 so we didn't miss our favourite kernel in that time!
AllYourBasesAreBelongToUs
So to actually run Franco's kernel you need to install it, there's a few ways;
1 use the FKU application to auto flash or download a zip (see below)
2 flash zip manually in recovery, navigating to the file and installing it
3 flashify application on play store by @cgollner using the application to navigate to the file and reboot into it. This is very handy for .img files
4 fastboot flash boot (filename here).img (requires working adb and fastboot aswell as drivers from Google SDK manager
Guide to fast boot
Franco Kernel Updater (FKU) application help
So you may want to know where you can access Franco's application, it can be bought through google play store. The app will allow you to download and flash a kernel to your device, it will allow to make a whole range changes to the kernel settings but bear in mind it already comes with settings for the best balance between performance and battery life automatically pre-set.
2 Android Pit bear in mind this version might not be as up to date as the Google Play Store Version.
3 But i don't want to pay for an app! Don't sweat it there is a free version on google play store. This free version will only download and flash kernels, you cannot configure the kernel settings in this one but you can use scripts / init.d if you are comfortable working at that level. Please bear in mind this isn't compatible with with all Franco's supported devices yet like the One Plus One.
4 You can find the IMGs and Zips to download and flash the kernel from Franco's server
Beta Version APK
There is a beta tester programme which Google introduced some time around when Jelly Bean was launched. Franco allows users to test the new features which don't always work as its for testing purposes and to gain feed back before the regular app is released to the main public. The beta application updates are managed through Google play store so when a new beta version is pushed you download it through the play store as a normal app update. Beta testing can only take place for downloads from Google Play Store not any other download site.
Sounds good how do i join?
There's three things you need to do before you can get on the beta programme
1 Purchase the paid application as its this one which gets updated
2 You need to be prepared to join Google+ and become part of Franco.Kernel community
3 Click here and choose to become a tester then follow the link to update via play store.
Please note this system is designed by Google not Franco. Some people feel this forces people into using a social media which they might not want to use but unforntunatly its the only way to join the beta programme. The good thing is your Google account used to sign in on your device will have G+ account asosiated with it already and G+ ships with most roms these days.
Applicationz Management
There's been a fair amount of discussion about the per app mode service being killed by swiping away the fku app from recent apps (multi task key), this is due to a bug Google introduced in 4.4.1 but wasn't really made apparent till 4.4.2 arrived.
It is best practice to not swipe away apps from your recent as in doing so you will kill any back ground service an app is running. Android manages RAM different than windows, you don't need loads of free ram for a smooth operating system. If you want to exit an app its best to press the home key or if you really to actually fully close it use back key. Exiting an app using back key shouldn't kill its back ground service.
Whatz is the Per App Modez?
You can set the behaviour you might like for certain apps to either limit max - min CPU speeds, gov controls. Anything you want to be different than the normal CPU set up that you use. Hence, per app mode. Good for gaming or light apps, or if you under clock normally it could give you full speed with the camera for instance, be creative!
(Nexus 5 Only)
@Tzfardaya has kindly taken the time to make a dedicated thread about per app modes, sharing kernel settings and per app modes by downloading and importing other peoples settings for other guys try on their own devices.
Can I Greenify FKU appz?
You can but this will prevent the per app mode service from running in the back ground. That service doesn't hurt your battery or ram even if you don't use it. If your per app mode settings aren't getting applied and you use Greenify double check you haven't disabled it 'by accident'.
What doez this button do?
If you long press any item it will explain its purpose then you can choose to set it on boot if you so desire
How do I set on boot in the app?
Press the phone icon to the right of an item so that two arrows appear. This means it is set on boot. Press it again to un-set on boot to return to default settings after a reboot. Check out the image above.
If you have anything set on set on boot and your using SuperSu with notifications you should actually see one / two Franco kernel updater has been granted super user permissions toast notifications appear. If super user notifications are disabled I find easily within a minute they are set just double check back very shortly after if your not sure.
I'm new here whatz the best settingz for battery and performancez?
The default values will always have the best balance between performance and battery life. How ever feel free to play with various settings to your own preferences.
Device Specific FAQs
I'll post some repetitive questions and answers here, click link for your specific device. A huge thanks to @ApriliaM3 for the extra posts to help get this much more organised!
Universal
One Plus One
Nexus 5
Nexus 7 2013
Nexus 4
Nexus 10
Nexus 7 2012
Galaxy Nexus
Change Log for this thread

Universal
Cyanogen Romz
Devices which don't use CAF display drivers like Galaxy Nexus and Nexus 7 2012 and the One Plus One are void from the below statement.
franciscofranco said:
Currently does not work with recent CyanogenMod nightlies or any rom has uses CM sources as a base because they made underlying changes that are now incompatible with Kernels that don't follow their path.
Click to expand...
Click to collapse
Cyanogen often use different drivers than stock / aosp and ROMs based off cyanogen pull their commits from their github and sources so they don't have to work on these things them selves so those rom devs can work on their features. Cyanogen have a tendency of doing things in their own way. To my knowledge CM roms only work with their shipped kernels.
Franco Kernel work on X Y Z romz?
Franco kernel is designed to run on stock / aosp roms only. Or in the case of the One Plus One where its intended for only Cyanogen Mod 11s. This does not include any unofficial stock type roms like the Android L preview available for certain nexus devices. So to reiterate that again, this kernel is only for the stock rom your device shipped with or upgraded via OTA and compatibility with other roms is purely coincidental. There are some unofficial ports that will add compatibility to certain roms or add extra features. These unofficial ports don't offer any official Franco support and for trouble shooting use the thread the developer set up.
2 Corz always onlinez Y? Quad core specific devices only
It is normal for 2 cores to always be online, its like that by Franco's design. It is meant to save battery in the long run as turning cores off and on again all the time is taxing on the battery according to Franco. It also helps keeps things running smoother. Cores 3 + 4 will activate when system load requirements are met.
Thermal Throttle
Thermal throttle is a system put in place to basicly stop your phones internal chips from cooking them selves! When a temperature reading reaches a condition the CPU limits its performance until the temperature reaches safe levels again. You might notice lags in games while this is happening as thermal throttle only really tends to take place during prolonged CPU intensive operations like gaming or during a reboot. You can see if thermal throttle is taking place if your CPU speeds are limited, check back after a few minutes with your screen being off and things should return to normal. You can increase the temperature at which thermal throttle takes place but personally I don't advice this in case you increase the level too much much and you can cause perminant damage or burn your CPU and require potential expensive repairs. Ambient air temperature can influence the chances of being throttled.
Ma batteryz life suckz!
More often than not bad battery life is from a poor managed application running riot. These applications run in the back ground and stop your phone from resting in low power mode (deep sleep). You can use Better Battery Stats (BBS) to track down the process taking place. Please search to find your answer don't post in the kernel thread asking about wake locks use Google or BBS thread and ask.
Colour Profilez
On any device (to my knowledge) changing any colour multiplyer or gamma level doesn't effect the battery at all.
Fast Chargerz
On nexus 5 and nexus 7 2013 USB fast charge mode won't show AC charging in battery stats, it will only ever report USB. The current way its implemented is that during the USB connection data exchange can take place too, meaning you will be charging at the faster speed and also manage your files on another machine. Rest assured it is working and for proof you can check proc/kmsg.
Antutu Rebootz My Phone Halp!
Antutu has a bug where it crashes around 21% of completing its benchmark. Its not just Franco kernel this effects check out the play store reviews.
I got random rebootz!
If you have an unexpected reboot often it means something wrong has happened and this triggered the reboot for some reason or an other. If you wanted to be helpful then use a file manager and navigate to /proc and find last k-msg and upload it to http://pastie.org. This is a report containing information about what your system was doing before the system shut down. Battery pulls cant generate this report. It is best to post these messages with proc/last k-msg attached to the main kernel thread as Franco needs to see them, he said he probably wont monitor this thread so could easily get missed.
Mirrorz plz
Franco's server is here you can download imgs and zips. Obviously mirrors of the paid application are not allowed and against XDA rules and disrespectful to any dev. It costs less than most pints of beer in the UK. Don't be so stingy!
Return to stock romz
Franco's kernel changes these system files below, so to change them back you can remove the .bak extension, or fastboot system.IMG and boot.IMG from a Google factory image which is probably easier and faster.
franciscofranco said:
1 - Rename /system/lib/hw/power.msm8974.so.bak to /system/lib/hw/power.msm8974.so
2 - Rename /system/bin/thermal-engine-hh-bak to /system/bin/thermal-engine-hh
3 - Reboot to the boot loader and flash stock Kernel by downloading the Nexus images and then fastboot flash boot boot.img
4 - If you're using those Moto X dalvik patches you gotta reflash stock system.img, just use the images you just downloaded from 2) and do fastboot flash system system.img
5 - ???
6 - Profit.
Nexus images, google it and its the first hit.
Click to expand...
Click to collapse
What about OTAz?
Your device will only download an OTA update on a stock rom (not custom roms) and it won't install with a different kernel installed. You will loose root permissions after any successful installation but you can gain it again by flashing the latest SuperSu in custom recovery (see next section below). To get any OTA to install successfully you need 100% stock files which the OTA plans to update, with the matching kernel, boot loader and radio. The updater script checks all these files and will abort if it detects (through md5 checks) if any one part doesn't match what it expects. Generally speaking its easier to fastboot system.img and boot.img to return all the files to original state. Flashing system.img and boot.img will not wipe your personal data / apps / stuff. It just replaces all the files to factory originals. Recovery is optional, if you flash an OTA with stock recovery you keep stock recovery installed. If you flash an OTA with a custom recovery it keep that installed. If you feel adventurous you can ADB side load it using either stock recovery or custom.
Whenz da ETAz?
Please don't ask, its ready when its ready. Some people find it rude asking so just don't go there.
Y I loose rootz?
For various reasons not all known to me but superuser permissions can be changed (especially through OTA) as permissions for certain files can sometimes get reset. I recommend using the latest SuperSu by @Chainfire. If you loose root flash the latest Supersu in custom recovery to regain / gain super user permissions.
CPU Tuningz
Info for governorz and their tunablez
For people interested about various interactive tunables here's some 'light reading' though its not my own wording but there's good information for an understanding.
The interactive governor tunablez
In order of appearance in FKU app, these are just the basic ones with hopefully easy to understand explanation of each function
above_hispeed_delay = when your CPU is at hispeed_freq, wait for this long before boosting speed further in response to continued high load. Measured in milliseconds.
boost_pulse_duration = boost CPU speed to input_boost_freq for this amount of time. Measured in milliseconds.
go_hispeed_load = Go to hi_speed_freq when CPU load at or above this value. Measured by system load percentage.
hispeed_freq = Boost CPU to this speed when go_hispeed_load value has been met. Measured in MHz.
input_boost_freq = Boost CPU speed to this frequency on touch screen events. Measured in MHz.
min_sample_time = The minimum amount of time to spend at a frequency before it can ramp down. Measured in milliseconds.
timer_rate = The sample rate of the timer used to increase frequency. Measured in milliseconds.
Hot plug controlz
This is a system in place which controls how many CPU cores are operating at a single time. The range of the control is from 0 - 100.
0 = Perminent quad core only mode
100 = Permanent duel core only mode
1 - 99 = system load in % required to online more cores.
The value defined is at which level of system load to activate all cpu cores. The closer to 0 this number is then its easier for all cores to be be active. The closer to 100 makes it harder for all cores to be active
Quad core devices have obviously 4 cores and the relationship to each other is
CPU 0 - always on
CPU 1 - always on
CPU 2 - tied to cpu 0. Activated when cpu 0 reaches the required load.
CPU 3 - tied to cpu 1. Activated when cpu 1 reaches the required load.
franciscofranco said:
Ok so ahead of launching another r33 test image I'll let you sneak peak the new tunables for the Hotplug driver. There are no changes to the driver algorithm itself, I'm just exposing all these interesting tunables for users that want maximum control and I mean extremely maximum control on how my driver behaves. Feel free to ask away if any explanation is not as good as it could and I'll happy to explain! Here's my documentation:
The load_threshold = first_level, just changed the name of the text to be less ambiguous.
Code:
/*
* system load threshold to decide when online or offline cores
* from 0 to 100
*/
unsigned int load_threshold;
/*
* counter to filter online/offline calls. The load needs to be above
* load_threshold X high_load_counter times for the cores to go online
* otherwise they stay offline
*/
unsigned int high_load_counter;
/*
* max number of samples counters allowed to be counted. The higher the
* value the longer it will take the driver to offline cores after a period
* of high and continuous load
*/
unsigned int max_load_counter;
/*
* if the current CPU freq is above this limit don't offline the cores
* for a couple of extra samples
*/
unsigned int cpufreq_unplug_limit;
/*
* minimum time in seconds that a core stays online to avoid too many
* online/offline calls
*/
unsigned int min_time_cpu_online;
/*
* sample timer in seconds. The default value of 1 equals to 10 samples
* every second. The higher the value the less samples per second it runs
*/
unsigned int timer;
Click to expand...
Click to collapse
Top Tips
Run speaker clean every so often. It really works wonders.

One Plus One
Compatible Romz
Stock Cyanogmod 11S
Wah 100z of Kernal which one for old Androidz?
4.4 <r7
Get your downloadz here
Franco has made a version of his kernel made for non cm11s roms. This should run on both aosp and regular cm11. I believe this is a temporary place holder until cm11 and cm11s make some kernel related merges. You can find the post with download link here
Here is fork for Franco Kernel for Mahdi Rom
Cyanomod 11 boot loopz
This kernel is only designed to run on the stock ROM the device ships with, same as any other device. Its highly unlikely Franco will make forks designed for specific roms how ever if you search you might find a modified Franco kernel for your favourite 3rd party rom in the Android Development section. Send me a link to the thread and I'll add a link in this thread.
Can I double tap to awake ma phonz?
This feature is built into the cyangenmod 11s rom and isn't dependant on kernel and functions just fine using Franco Kernel.
Wifi won't turnz on!
There seems to be an issue with the built in theme manager which can cause the WiFi settings to not be able to turn on or off. A simple reboot should fix this
When will colour controlz arrive?
Update 4/8/14 RGB sliders have been added. No Gamma control as of yet
There is some screens which have yellow areas or yellow tint to them. This might be because the glue hasn't completely cured under your screen which could cause the yellowish appearance. The screen was calibrated by Supercurio (to the best of my knowledge). The back end of being able to control the RGB filters is in place and Franco has requested to Supercurio to allow a user interface to control the RGB filter.

Nexus 5
Compatible Kitkat Romz
No order of favouritism here I will list in order posts reporting Franco kernel working with various roms.
1 Stock
2 Beanstalk
3 Purity
4 Cataclysm
5 Mahdi
6 Slimkat
7 T-Rex
8 Omnirom
9 AOSPA
10 Rastakat
11 Carbon Rom
12 Paranoid Android
Wah 100z of Kernal which one for old Androidz?
4.4 < r58
Grab your downloads
Alternative Ports
@big_bum has made a port using influences from all over place, features include Franco + commits from Chaos(neobuddy89), Code blue (engstk) and Uber (Cl3Kener), + -Ofast + Linaro GCC 4.9.1 + BFQ + ZEN + F2F2 + KSM, always on latest 3.4.y and it works on CM too, if you flash the dedicated zip.
Double Tap / Sweep 2 Wakez
linaro build by @LaboDJ
and another by @PhantomGamers
Screen Back light flickers at low brightness
To disable the feature for super low back light feature which some users report flickering back light;
Open up a terminal emulator and type in su to gain root.
Then type in echo 0 > /sys/module/lm3630_bl/parameters/backlight_dimmer
Musicz clipping / glitching / pausing
Believe it or not this is quite a common issue over the history of android, especially quad core devices.
Disabling adblock software seems to of solved this issue for some and helped for others. The issue was a server containing the adblock hosts makes your network busy and causes errors with music.
If you are still facing issues with music not playing back smoothly bump the min CPU speed from 300mhz to 345mhz and that should do the trick. It will cost a little in battery life but your mp3 should work properly.
Flac support got broke in 4.4 and cause the CPU to ramp up high and get hot. Hopefully a fix will come within 4.4.3
When will colour controlz arrive?
THEY HAVE ARRIVED on 14/1/14!!
Download the file you want to your phone (see below) , use a file editor to remove the .txt extension and place the file in Internal storage\franco.kernel_updater\color_profiles\ . Then using the Franco app you can load any profile you have in that location. Turn the screen off and on to successfully load it. You can set on boot without any worry of any damage.
Primary host download (thanks @vomer)
Secondary host download
Here's a video thanks to @vomer on how to load profiles.
@yorici has started off his own thread dedicated to screen calibration, discussion and FAQ, its well worth a look if your interested in an accurate colour reproduction on your display.
Wherez da changlogzz?
You can veiw Franco's github and here
This is an easy summery
franciscofranco said:
* instead of running Qualcomms MPDecision to control the CPUs/touch boost I'm running my custom hot plug driver and the touch boost is 100% Kernel based instead of Google's solution that goes from the Kernel to user space, then to a file, then back to user space then back to the Kernel
* I'm using interactive governor heavily tuned, stock uses On demand who wastes too much time in higher frequencies
* Using my GPU governor which is more conservative than stock, and stock makes the GPU sleep at a higher frequency than it should (sleep as in a state between active and slumber, active being when the device is using the GPU, and slumber as in having the GPU device in deep sleep)
* Also has a ton less debugging than stock, which reduces overhead
* Has Wi-Fi patches from Google to reduce, immensely, the WLAN wake locks and general Wi-Fi drainage
That's mostly it in terms of battery improvements, probably something else that I missed, but everything is on my github.
Click to expand...
Click to collapse
Init.d
It will work on stock rom but you need busybox installed to system/xbin I suggest using one of the many apps on the play store
vomer said:
so I was thinking that you do not need to put all those quotes in here. How about just this:
Path to CPU:
/sys/devices/system/cpu/cpu0/cpufreq/
Path to GPU:
/sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/
Path to Governer:
/sys/devices/system/cpu/cpufreq/interactive/
This is all that is needed. You can like to my init.d post for a ready-made solution too. I doubt many people will want to mess with this manually.
Click to expand...
Click to collapse
Nexus 5 Specific Voltage Tables PVS 0-6
Someone requested the stock voltage tables, here they are for PVS binning 0-6 (covers all devices) thanks @SetiroN. Of course if you wanted to return to stock voltage unset on boot and reboot is easier. I found this info on the Nexus 5 CPU binning thread
Personal Settings Collections
The Gingerbread Man
vomer
Jamith
Nbsss
Sent from my Nexus 5 using Tapatalk

The Gingerbread Man Kernel and Device Settings Post
In this post I'll keep my settings for various settings for others to see and use for reference if they fancy trying some battery saving tweaks. Anything not mentioned or has --- means I have left as default value. Thanks @JNewms, @Nbsss, @vomer and anyone else who i haven't remembered for their testing so far in the main thread.
I will keep this post updated if anyone wants to book mark it for future reference
My devices
Phone; black nexus 5 16gb
Case; official black bumper
Screen protector; cruzerlite tru glass
Tablet; nexus 7 2013 black 16gb
Case; official Asus black flip case
Screen protector, some generic cheap one. Hoping for a @cruzerlite truglass
Nexus 5 Kernel Settings
CPU
Max 2265 (600) MHz
Min 300 (000) MHz
Interactive
Deadline
Hot Plug
Load threshold 80
GPU
450 (000000) MHz
Up threshold 50
Down threshold 25
Governor Control
Boost Duration 0
Go Highspeed Load 90
Highspeed Freq 1190 (400) MHz
Input Boost Freq 300 (000) MHz
Voltage Tables
Reference is the key word for undervolt especially as not all SoC are built to the same quality so any settings may not work for you and cause a reboot. Do not set on boot until you are certain with over 24 hours time without reboot set on boot. YOU HAVE BEEN WARNED!!! Voltage tables should be evaluated by the defaults and gradually reducing 25mv each time and isolating each CPU freq (set min and max to the same value). If you don't understand don't do it. Again warning given! Voltage can be reverted back to stock if you unset on boot and reboot, how ever if stuck in boot loop due to your own stupidity then fastboot flash boot boot.img stock kernel.
Per App Modes
Download all my pams, Franco's pam's & all custom paths
Very Low Power
I use this for;
Google Play Books, Omega 500, Hold'em ( low res poker), TriOmonies
Max CPU 729 (600) MHz
Input Boost 300 (000) MHz
GPU 200 (000000) MHz
Hot Plug Load Threshold 100
Go Hi Speed Freq 422 (400) MHz
Go Hi Speed Load 90
GPU Down Threshold 25
GPU Up Threshold 50
Low Power
I use this for very light apps, not CPU intensive tasks like;
Drastic (Nintendo DS emu), Dune 2, Google Maps, Klondike (solitaire), Shít Head
Max CPU 1267 (200) MHz
Input Boost 300 (000)Mhz
GPU 320 (000000) MHz
Hot Plug Load Threshold 100
Go Hi Speed Freq 960 (000) MHz
Go Hi Speed Load 90
GPU Down Threshold 25
GPU Up Threshold 50
Gaming
I use this for games to keep CPU temps down to avoid thermal throttle;
DoomGles, Dungeon Quest, Mighty Dungeons, Monopoly, Nitro Nation, Riptide 2 GP, Sky Force 2014, Worms 2 Armageddon, Worms 3
Max CPU 1267 (200) MHz
Input Boost 300 (000) MHz
GPU 450 (000000) MHZ
Hot Plug Load Threshold 80
Go Hi Speed Freq 960 (000) Mhz
Go Hi Speed Load 90
GPU Down Threshold 15
GPU Up Threshold 25
Misc settings
Vibration amp 80
Headphone boost volume 2
Headset gain boost -1
Speaker gain 5
Google settings
Run time compiler ART
Google now on
Google location reporting and location history on
Location setting high accuracy
Screen Calibration
I use Yorici Calibrated Punch
These are profiles made by me
TGM_WP31(V1) (white point at 31)
TGM_WP32 (V1) (white point 32)
Nexus 7 2013 Kernel Settings
CPU
Max 1512 (000) MHz
Min 384 (000) MHz
Interactive
Deadline
Hot Plug
Load threshold 70
GPU
400 (000000) MHz
Up threshold 50
Down threshold 25
Governor Control
Boost Duration 0
Go Highspeed Load 90
Highspeed Freq 1026 (000) MHz
Input Boost Freq 384 (000) MHz
Voltage Tables
See nexus 5 warning above
Per App Modes
Download all my nexus 7 pams and all custom paths
Very Low Power
I use this for;
Google Play Books, Hold'em (poker), Omega 500, TriOmonies
Max CPU 702 (000) MHz
Input Boost 384 (000) Mhz
Boost Duration 0
GPU 128 (000000) MHz
Hot Plug Load Threshold 100
Go Hi Speed Freq 422 (400) Mhz
Go Hi Speed Load 90
GPU Down Threshold 25
GPU Up Threshold 50
Low Power
I use this for;
Drastic (Nintendo DS emu), Dune 2, Google Maps, Klondike (solitaire), Shít Head
Max CPU 1026 (000) MHz
Input Boost 384 (000)MHz
Boost Duration 0
GPU 200 (000000) MHz
Hot Plug Load Threshold 70
Go Hi Speed Freq 918 (000) MHz
Go Hi Speed Load 90
GPU Down Threshold 25
GPU Up Threshold 50
Gaming
I use this for games to keep CPU temps down to avoid thermal throttle;
DoomGles, Dungeon Quest, Monopoly, Nitro Nation, Riptide 2 GP, Sky Force 2014, Worms 2 Armageddon, Worms 3
Max CPU 1242 (000) MHz
Input Boost 384 (000) MHz
Boost Duration 0
GPU 400 (000000) MHz
Hot Plug Load Threshold 70
Go Hi Speed Freq 702 (000) MHz
Go Hi Speed Load 90
GPU Down Threshold 15
GPU Up Threshold 25
Misc settings
Headphone boost volume 2
Headset gain boost -1
Speaker gain 3
Google settings
Run time compiler ART
Google now on
Google location reporting and location history on
Location setting high accuracy
Favourite Android Game
Its got to be DoomGLES which is the classic doom game we all loved from the 1990s but with improved graphics due to 3D hardware acceleration and using open gles. There is dynamic lighting and cool effects for water and blood, it really refreshes the game and makes it very fun. If you have the .wad files you can play all the full games, doom 1, doom 2, plutonia, TNT and allows you to load custom .iwad please don't ask me for the files for the games I cannot share them . There is a free version, I recommend you have a go and if you like it £1.73 really is bargain for the paid version!
Sent from my Nexus 5 using Tapatalk

Nexus 7 2013
Compatible Kitkat Romz
No order of favouritism here I will list in order posts reporting Franco kernel working with various roms.
1 Stock
2 Rastakat
3 Paranoid Android
Wah 100z of Kernal which one for old Androidz?
Many old versions were made legacy android builds. Grab your downloads
Android ver F.K Build.
4.3 < r4
4.4 < r17
Alternative Ports
CAF compatible version maintained by @RobbieL811
Sabermod franco.Kernel*(caf & aosp ) by @zaclimon
When will Debz be added?
UPDATE @osm0sis got deb to work on 10/4/14. There's an os-fixed version to try below!
osm0sis said:
Done. New r13: flo-fixed and deb-test up.
http://v.ht/osmod
Native USB-OTG working (ie. no app required), and hopefully fixed the governor issues with deb to make it fully functional (disabled mpdecision service and added interactive permissions tweaks to match the flo ramdisk).
@pietropizzi @poondog @franciscofranco
Click to expand...
Click to collapse
pietropizzi said:
Thanks osm0sis, it booted up fine with the fixed deb! Interactive was default and the FREQ-Range is fully used. I'll play some more with it but it looks good till now ! ��
Gesendet von meinem Nexus 7 mit Tapatalk
Click to expand...
Click to collapse
osm0sis said:
@franciscofranco Achievement Unlocked: Deb Support!
Someone go quote me in the N5 thread so he sees. :laugh:
Click to expand...
Click to collapse
Colour Controlz
RGB sliders have been added in to the FKU beta app so finally we have a little control over our screens colour calibration. Personally I found my display just a touch too warm and now now longer is an issue now I have tuned it.
When you make a profile and save it, upload the file somewhere and leave a link and I'll download the file, then I'll upload to the collection and I'll keep them organised and rename to my OCD standard (I really don't like it when listed items have some starting with capitals and others not and spaces between words).
To load profiles you just need to download them and place the file in SD/Franco kernel updater/colour profiles, then go to the app and look for the desired file. If / when nexus display control app gets updated the same applies but put the files SD/nexus display control/colour profiles.
Nexus 7 2013 Screen Profiles
Snapdragon 600 or S4 Pro?
We have officially a s4 pro chip but better in a few aspects making it close to the snap dragon 600. The differences are explained very well below
zaclimon said:
Anandtech did open the device and saw that the cpu (APQ8064–1AA) is different from the one on the Original S4 pro. (APQ8064) The main difference is that there's Krait 300 cpu cores instead of Krait 200 like with the S4 Pro inside the Nexus 4, which makes it looks like more of a Snapdragon 600 than an actual S4 pro. The naming however I think is more because of the defafult clock speed (1.5 vs 1.7 in base SD600)
Here's the link if you need it:
http://www.anandtech.com/show/7176/nexus-7-2013-mini-review/4
Click to expand...
Click to collapse
Personal Settings Collections
The Gingerbread Man

Nexus 4
Compatible Kitkat Romz
No order of favouritism here I will list in order posts reporting Franco kernel working with various roms.
1 Stock
2 Cataclysm
3 omniROM
4 Purity
5 Carbon
6 Slimkat
7 Paranoid Android
8 OverStock
9 Dirty Unicorn
10 Rastakat
Wah 100z of Kernal which one for old Androidz?
Many old versions were made legacy android builds. Grab your downloads
Android ver. F.K Build.
4.2 > r165
4.3 > r193
4.4 > r203

Nexus 10
Compatible Kitkat Romz
No order of favouritism here I will list in order posts reporting Franco kernel working with various roms.
1 Stock
2 Slimkat
3 Rastakat
Wah 100z of Kernal which one for old Androidz?
Many old versions were made legacy android builds. Grab your downloads
Android ver. F.K Build.
4.3 r13
4.4 r14

Nexus 7 2012
Compatible Kitkat Romz
No order of favouritism here I will list in order posts reporting Franco kernel working with various roms.
1 Stock
2 Slimkat
3 Rastakat
4 Shiney
Wah 100z of Kernal which one for old Androidz?
Many old versions were made legacy android builds. Grab your downloads
Android. FKU Build no.
4.2 > r65
4.3 r75
4.4 > r76
Sysfs Commands (advanced level)
osm0sis said:
Since there's finally a bit of interest in init.d scripts in here, here is a file I've been maintaining as a reference for myself for some time now, containing all the sysfs commands franco doesn't have in the 2nd posts of the GN and N7 threads. They are all set to the defaults as of r36x.
All of this is set in f.Ku, but hey, it never hurts to learn how it all works behind the scenes.
This is not a shell script, and cannot be run as one as-is; it's just a bunch of commands. UV should never be set with init.d in case they are unstable.
Code:
# CPU Clock
echo 1228800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 537600 > /sys/devices/system/cpu/cpu0/cpufreq/screen_off_max_freq
# UV
echo "1450 1425 1400 1375 1350 1250 1225 1200 1050 900 850 800" > /sys/class/misc/customvoltage/mpu_voltages
echo "1375 1291 1140 950" > /sys/class/misc/customvoltage/iva_voltages
echo "1150 1050 950" > /sys/class/misc/customvoltage/core_voltages
# SR
echo 1 > /sys/kernel/debug/smartreflex/sr_mpu/autocomp
echo 1 > /sys/kernel/debug/smartreflex/sr_iva/autocomp
echo 1 > /sys/kernel/debug/smartreflex/sr_core/autocomp # CORE no longer SR calibrated on FK
# Governor
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 15000 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo 0 > /sys/devices/system/cpu/cpufreq/interactive/boost
echo 80000 > /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
echo 95 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo 729600 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo 45000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo 85 > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 15000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo 80000 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack
# I/O Scheduler
echo 1024 > /sys/block/mmcblk0/queue/read_ahead_kb
echo "deadline" > /sys/block/mmcblk0/queue/scheduler
echo 500 > /sys/block/mmcblk0/queue/iosched/read_expire
echo 5000 > /sys/block/mmcblk0/queue/iosched/write_expire
echo 4 > /sys/block/mmcblk0/queue/iosched/writes_starved
echo 0 > /sys/block/mmcblk0/queue/iosched/front_merges
echo 1 > /sys/block/mmcblk0/queue/iosched/fifo_batch
echo "row" > /sys/block/mmcblk0/queue/scheduler
echo 100 > /sys/block/mmcblk0/queue/iosched/hp_read_quantum
echo 100 > /sys/block/mmcblk0/queue/iosched/rp_read_quantum
echo 1 > /sys/block/mmcblk0/queue/iosched/lp_read_quantum
echo 2 > /sys/block/mmcblk0/queue/iosched/hp_swrite_quantum
echo 1 > /sys/block/mmcblk0/queue/iosched/lp_swrite_quantum
echo 1 > /sys/block/mmcblk0/queue/iosched/rp_swrite_quantum
echo 1 > /sys/block/mmcblk0/queue/iosched/rp_write_quantum
echo 10 > /sys/block/mmcblk0/queue/iosched/read_idle
echo 20 > /sys/block/mmcblk0/queue/iosched/read_idle_freq
echo "cfq" > /sys/block/mmcblk0/queue/scheduler
echo 8 > /sys/block/mmcblk0/queue/iosched/quantum
echo 125 > /sys/block/mmcblk0/queue/iosched/fifo_expire_sync
echo 250 > /sys/block/mmcblk0/queue/iosched/fifo_expire_async
echo 16384 > /sys/block/mmcblk0/queue/iosched/back_seek_max
echo 2 > /sys/block/mmcblk0/queue/iosched/back_seek_penalty
echo 93 > /sys/block/mmcblk0/queue/iosched/slice_sync
echo 39 > /sys/block/mmcblk0/queue/iosched/slice_async
echo 2 > /sys/block/mmcblk0/queue/iosched/slice_async_rq
echo 7 > /sys/block/mmcblk0/queue/iosched/slice_idle
echo 0 > /sys/block/mmcblk0/queue/iosched/group_idle
echo 1 > /sys/block/mmcblk0/queue/iosched/low_latency
echo "bfq" > /sys/block/mmcblk0/queue/scheduler
echo 4 > /sys/block/mmcblk0/queue/iosched/quantum
echo 125 > /sys/block/mmcblk0/queue/iosched/fifo_expire_sync
echo 250 > /sys/block/mmcblk0/queue/iosched/fifo_expire_async
echo 16384 > /sys/block/mmcblk0/queue/iosched/back_seek_max
echo 2 > /sys/block/mmcblk0/queue/iosched/back_seek_penalty
echo 7 > /sys/block/mmcblk0/queue/iosched/slice_idle
echo 0 > /sys/block/mmcblk0/queue/iosched/max_budget
echo 4 > /sys/block/mmcblk0/queue/iosched/max_budget_async_rq
echo 125 > /sys/block/mmcblk0/queue/iosched/timeout_sync
echo 39 > /sys/block/mmcblk0/queue/iosched/timeout_async
echo 1 > /sys/block/mmcblk0/queue/iosched/low_latency
echo 20 > /sys/block/mmcblk0/queue/iosched/raising_coeff
echo 256 > /sys/block/mmcblk0/queue/iosched/raising_max_time
echo 7000 > /sys/block/mmcblk0/queue/iosched/raising_max_softrt_rate
echo 304 > /sys/block/mmcblk0/queue/iosched/raising_rt_max_time
echo 2000 > /sys/block/mmcblk0/queue/iosched/raising_min_idle_time
echo 500 > /sys/block/mmcblk0/queue/iosched/raising_min_inter_arr_async
echo "" > /sys/block/mmcblk0/queue/iosched/weights
# CAB
echo 1 > /sys/class/backlight/s6e8aa0/acl_set
# TCP Congestion Avoidance Algorithm
echo "westwood" > /proc/sys/net/ipv4/tcp_congestion_control;
# N7-specific
echo 500 > /sys/devices/system/cpu/cpu0/cpufreq/cpu_lp_max # LP core no longer used on FK
echo "1125 1100 1075 1050 1025 1000 975 950 925 900 875 850 825" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
echo 2 > /sys/class/misc/tegra_hotplug_control/cores_on_touch
echo 60 > /sys/class/misc/tegra_hotplug_control/first_level
echo 50 > /sys/class/misc/tegra_hotplug_control/second_level # No longer used in newer driver in FK
echo 25 > /sys/class/misc/tegra_hotplug_control/third_level # No longer used in newer driver in FK
echo 0 > /sys/devices/tegradc.0/smartdimmer/enable
Here's a link to my post of the possible GPU OC frequencies on the N7.
Click to expand...
Click to collapse
Possible GPU OC Frequencies
osm0sis said:
Here are the possible GPU values I found in the source.
Looking at it again you could probably grab any of the different clock values in the file from the 4 CORE sections starting at line 238, they're all CORE frequencies, just for different parts of the core like vde (video decoding engine), mpe (media processing engine), etc., and generally capping at the stock 416. I imagine they all just ramp within their brackets to whatever the closest one (without going over) is to what we set:
https://github.com/franciscofranco/...4084f8/arch/arm/mach-tegra/tegra3_dvfs.c#L238
You'd end up with the following options:
Code:
228000, 234000, 247000, 267000, 275000, 285000,
304000, 332000, 352000, 361000, 380000,
400000, 408000, [i]416000[/i], 437000, [i]446000[/i], [i]484000[/i],
[I]520000[/i],
[I]600000[/i], [i]625000[/i]
Edit: Metallice has supplied some more insight on the coded values. So we can mostly disregard the above.
So from https://github.com/franciscofranco/...mr1/arch/arm/mach-tegra/tegra3_clocks.c#L3201 we get:
So in summary? The ones you should use based on the legitimate timings from the code are:
Code:
208, 260, 300, 312, [B]416, 520, 666, 750[/B]
But devs have also added some other intermediate steps in at the following mathematically appropriate spots which are good options and also make sense with other parts of the code (as seen in the first half of my post):
Code:
[B]446, 484, 600, 625, 700[/B]
P.S. Don't try to underclock. Instant freeze.
Click to expand...
Click to collapse

Galaxy Nexus
Compatible Kitkat Romz
No order of favouritism here I will list in order posts reporting Franco kernel working with various roms.
1 Stock
2 Paranoid Android
3 Paranoid Saberdroid
4 Slimkat
5 Omni
6 Carbon
7 AOKP
8 Shiney
9 official cyanogenmod
10 unofficial cyanogenmod
Wah 100z of Kernal which one for old Androidz?
Many old versions were made legacy android builds. Grab your downloads
Android ver. F.K Build.
4.2 > r384
4.3 r395 JB
4.4 r395 KK
Whoz da Osmodz¿
@osm0sis has played a significant part in the development of the Franco kernel mostly on galaxy nexus and nexus 7 2012. He is a highly respected member and has fingers in several projects around xda including working directly on Franco's kernels for Gnex and N7. He takes Franco's kernel and with some help of the other Franco Dev Team help further optimise settings to ensure you guys always get the best setting for performance and battery. These include modifications to interactive governor and the Franco Dev Team spent along time optimising all the IO schedulers for best performance. These changes all got put through to the main Franco kernel. Since Franco doesn't have much time for Galaxy Nexus with all these newer devices Osm0sis is pretty much the main maintainer for it these days.
Sysfs Commands (advanced level)
osm0sis said:
Since there's finally a bit of interest in init.d scripts in here, here is a file I've been maintaining as a reference for myself for some time now, containing all the sysfs commands franco doesn't have in the 2nd posts of the GN and N7 threads. They are all set to the defaults as of r36x.
All of this is set in f.Ku, but hey, it never hurts to learn how it all works behind the scenes.
This is not a shell script, and cannot be run as one as-is; it's just a bunch of commands. UV should never be set with init.d in case they are unstable.
Code:
# CPU Clock
echo 1228800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 537600 > /sys/devices/system/cpu/cpu0/cpufreq/screen_off_max_freq
# UV
echo "1450 1425 1400 1375 1350 1250 1225 1200 1050 900 850 800" > /sys/class/misc/customvoltage/mpu_voltages
echo "1375 1291 1140 950" > /sys/class/misc/customvoltage/iva_voltages
echo "1150 1050 950" > /sys/class/misc/customvoltage/core_voltages
# SR
echo 1 > /sys/kernel/debug/smartreflex/sr_mpu/autocomp
echo 1 > /sys/kernel/debug/smartreflex/sr_iva/autocomp
echo 1 > /sys/kernel/debug/smartreflex/sr_core/autocomp # CORE no longer SR calibrated on FK
# Governor
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 15000 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo 0 > /sys/devices/system/cpu/cpufreq/interactive/boost
echo 80000 > /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
echo 95 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo 729600 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo 45000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo 85 > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 15000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo 80000 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack
# I/O Scheduler
echo 1024 > /sys/block/mmcblk0/queue/read_ahead_kb
echo "deadline" > /sys/block/mmcblk0/queue/scheduler
echo 500 > /sys/block/mmcblk0/queue/iosched/read_expire
echo 5000 > /sys/block/mmcblk0/queue/iosched/write_expire
echo 4 > /sys/block/mmcblk0/queue/iosched/writes_starved
echo 0 > /sys/block/mmcblk0/queue/iosched/front_merges
echo 1 > /sys/block/mmcblk0/queue/iosched/fifo_batch
echo "row" > /sys/block/mmcblk0/queue/scheduler
echo 100 > /sys/block/mmcblk0/queue/iosched/hp_read_quantum
echo 100 > /sys/block/mmcblk0/queue/iosched/rp_read_quantum
echo 1 > /sys/block/mmcblk0/queue/iosched/lp_read_quantum
echo 2 > /sys/block/mmcblk0/queue/iosched/hp_swrite_quantum
echo 1 > /sys/block/mmcblk0/queue/iosched/lp_swrite_quantum
echo 1 > /sys/block/mmcblk0/queue/iosched/rp_swrite_quantum
echo 1 > /sys/block/mmcblk0/queue/iosched/rp_write_quantum
echo 10 > /sys/block/mmcblk0/queue/iosched/read_idle
echo 20 > /sys/block/mmcblk0/queue/iosched/read_idle_freq
echo "cfq" > /sys/block/mmcblk0/queue/scheduler
echo 8 > /sys/block/mmcblk0/queue/iosched/quantum
echo 125 > /sys/block/mmcblk0/queue/iosched/fifo_expire_sync
echo 250 > /sys/block/mmcblk0/queue/iosched/fifo_expire_async
echo 16384 > /sys/block/mmcblk0/queue/iosched/back_seek_max
echo 2 > /sys/block/mmcblk0/queue/iosched/back_seek_penalty
echo 93 > /sys/block/mmcblk0/queue/iosched/slice_sync
echo 39 > /sys/block/mmcblk0/queue/iosched/slice_async
echo 2 > /sys/block/mmcblk0/queue/iosched/slice_async_rq
echo 7 > /sys/block/mmcblk0/queue/iosched/slice_idle
echo 0 > /sys/block/mmcblk0/queue/iosched/group_idle
echo 1 > /sys/block/mmcblk0/queue/iosched/low_latency
echo "bfq" > /sys/block/mmcblk0/queue/scheduler
echo 4 > /sys/block/mmcblk0/queue/iosched/quantum
echo 125 > /sys/block/mmcblk0/queue/iosched/fifo_expire_sync
echo 250 > /sys/block/mmcblk0/queue/iosched/fifo_expire_async
echo 16384 > /sys/block/mmcblk0/queue/iosched/back_seek_max
echo 2 > /sys/block/mmcblk0/queue/iosched/back_seek_penalty
echo 7 > /sys/block/mmcblk0/queue/iosched/slice_idle
echo 0 > /sys/block/mmcblk0/queue/iosched/max_budget
echo 4 > /sys/block/mmcblk0/queue/iosched/max_budget_async_rq
echo 125 > /sys/block/mmcblk0/queue/iosched/timeout_sync
echo 39 > /sys/block/mmcblk0/queue/iosched/timeout_async
echo 1 > /sys/block/mmcblk0/queue/iosched/low_latency
echo 20 > /sys/block/mmcblk0/queue/iosched/raising_coeff
echo 256 > /sys/block/mmcblk0/queue/iosched/raising_max_time
echo 7000 > /sys/block/mmcblk0/queue/iosched/raising_max_softrt_rate
echo 304 > /sys/block/mmcblk0/queue/iosched/raising_rt_max_time
echo 2000 > /sys/block/mmcblk0/queue/iosched/raising_min_idle_time
echo 500 > /sys/block/mmcblk0/queue/iosched/raising_min_inter_arr_async
echo "" > /sys/block/mmcblk0/queue/iosched/weights
# CAB
echo 1 > /sys/class/backlight/s6e8aa0/acl_set
# TCP Congestion Avoidance Algorithm
echo "westwood" > /proc/sys/net/ipv4/tcp_congestion_control;
Click to expand...
Click to collapse
Personal Settings Collections
osm0sis

Change logs;
-on going- trying to list compatible roms over all devices
18/11/13 Initial post
18/11/13 fIx many spelling and grammor errors
18/11/13 added screen shots
18/11/13 added FAQ
18/11/13 added voltage tables
18/11/13 added some info about the kernel, features and a small peice about Franco
20/11/13 added device specific placeholders for questions about device specifics
20/11/13 added a poll but cocked it up
20/11/13 added y i lost rootz question
20/11/13 added some colours to text and played with text sizes, leet me know if this works for you visualy?
20/11/13 added 2 cores always online y question
21/11/13 update what about OTA explanation
21/11/13 updated why I loose root explanation and changed its location in the post
21/11/13 added screen shot for why I lost root
21/11/13 added a piece about Osm0sis and Osmod in Galaxy Nexus
21/11/13 updated a few sentences for grammar / spelling errors
21/11/13 added double tap / sweep to wake question
29/11/13 added a basic summarised kernel change log
30/11/13 edited colour control information about nexus 5
1/12/13 feeling quite proud of my thread
4/12/13 added question why colours have reverted back to stock removing the blue tint
5/12/13 edited OTAZ a little more
5/12/13 added instructions for 4 methods to install the kernel
5/12/13 added links to SDK manager and Google factory image page
5/12/13 added Return to stock rom
6/12/13 further editing of OTA and edited return to stock rom
19/12/13 added links for unofficial n5 builds with tap 2 wake
19/12/13 added a link to a lengthy discussion about tunables on galaxy nexus
21/12/13 posted link to very comprehensive guide by @droidphile about governor and tunables, many thanks much better than I could have done and over 1,500 thanks for 1 post is insane!
25/12/13 updated set on boot
27/12/13 another spell check session
15/1/14 updated colour controls nexus 5
16/1/14 removed old stuff for old colour tuning and added link to my drop box containing colour profiles
18/1/14 remove the bit about antutu
18/1/14 edited color control explanation a little
19/1/14 mini faq colour control added with perms from yorici
22/1/14 edited wording for my instructions on colour profile loading
22/1/14 added Q about deb support
7/2/14 updated set on boot section
11/2/14 lots of small improvements and updating 1st post sections
15/2/14 updated double tap etc etc wake section
18/2/14 edited cyanogen ROM
18/2/14 added fast charge
18/2/14 added moar pretty screen shots
23/2/14 major restructure of OP with a post per device. Massive thanks to @ApriliaM3
23/2/14 added a few new pictures
25/2/14 edit and update nexus 5 info, colours, music
25/2/14 added Greenify info to universal
25/2/14 added Wah 100z of Kernal which one for old Androidz for all device showing kernel to use for all supported android versions!
26/2/14 lots of info added for GN and N7-1 thanks Osm0is for the pointers there buddy
26/2/14 added Colour Profilez Q to universal section
3/3/14 added link to guide to fastboot
3/3/14 thread moved from nexus 5 q&a to android general section
9/3/14 edited the info about interactive gov
10/3/14 removes text heavy quotes to remove 6 billion characters from nexus 5 and replaced with links to specific posts
10/3/14 organise post 2 a bit, added a couple of new [email protected]'s
10/3/14 moved items about application settings to post 1
12/3/14 alot of tidy up links, resizing stuff and maintance
13/3/14 tidy up moar links! Added a few more pictures, updated per app mode images and replaced nexus 5 image.
23/7/14 added one plus one. Moved setting post. Edited CPU setting and Pam's. Lots of other stuff I probably forgot.
Sent from my Nexus 5 using Tapatalk

The Gingerbread Man said:
If there is anything anyone feels I have missed please post and I'll add it to the OP
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
good thread! my suggestions on how to improve that FKU:
1) it doesn't tell you the version number, it gets cutoff at the side there?
2) eliminate that right part of the app, its weird how it has 2 'planes' kinda annoying to have to swipe one of them away
3) make it more user friendly with checkboxes instead of values u have to enter, newbies won't know what is high/low range
4) also make a set on boot option radio button on each page of settings, no one knows the LONG press lol
5) have cpu/battery temp readings on the 1st page of app, not in system monitor, i hardly use that app
thanks

last_kmsg
I'm using franco's r13 with Cataclysm rom and my phone rebooted while I was using whatsapp earlier today. I'm using Dalvik (never switched to ART) and have done no UV/OC/UC. Here's my last_kmsg.
Hope it has some useful info in it

cobyman7035 said:
good thread! my suggestions on how to improve that FKU:
1) it doesn't tell you the version number, it gets cutoff at the side there?
2) eliminate that right part of the app, its weird how it has 2 'planes' kinda annoying to have to swipe one of them away
3) make it more user friendly with checkboxes instead of values u have to enter, newbies won't know what is high/low range
4) also make a set on boot option radio button on each page of settings, no one knows the LONG press lol
5) have cpu/battery temp readings on the 1st page of app, not in system monitor, i hardly use that app
thanks
Click to expand...
Click to collapse
1 & 2 that's by design which Franco is following googles design principles. Check out just about any Google app you find they have multi panels and swipy bits
3 I think is planned I want it to
4 I don't understand set on boot radio. What do you mean there bud? With the long press set on boot is constistant around the app. Once you found it you will know. I think there's a mini tutorial which mentions that if you wipe your app data and reboot you should see
5 Franco felt the status page was redundant and removed it
Sent from my Nexus 5 using Tapatalk

bleuxeon said:
ChangelogZ ?!
Click to expand...
Click to collapse
Done :silly:

liperus said:
I'm using franco's r13 with Cataclysm rom and my phone rebooted while I was using whatsapp earlier today. I'm using Dalvik (never switched to ART) and have done no UV/OC/UC. Here's my last_kmsg.
Hope it has some useful info in it
Click to expand...
Click to collapse
welcome and congratulations on your first post and submitting a bug report in hte correct way, your off to a flying start here! These posts where you are reporting a reboot are best in hte main franco thread. Franco said he probably wont monitor here so it could get missed by him.

The Gingerbread Man said:
welcome and congratulations on your first post and submitting a bug report in hte correct way, your off to a flying start here! These posts where you are reporting a reboot are best in hte main franco thread. Franco said he probably wont monitor here so it could get missed by him.
Click to expand...
Click to collapse
Haha thanks I've been following the other thread (yes, all 300+ pages of it ), but I can't post there ( dev thread and it's my first post ), so I posted it here. Maybe someone can "forward" it to franco's thread?

liperus said:
Haha thanks I've been following the other thread (yes, all 300+ pages of it ), but I can't post there ( dev thread and it's my first post ), so I posted it here. Maybe someone can "forward" it to franco's thread?
Click to expand...
Click to collapse
il quote your post and copy paste to the main one. You need 10 posts i think to post in dev threads

The Gingerbread Man said:
il quote your post and copy paste to the main one. You need 10 posts i think to post in dev threads
Click to expand...
Click to collapse
Thank you. Yes, exacly, I need 10 posts...
And thanks for this thread, I hope it'll ease things in the main one. It's definitely annoying seeing the same questions again and again and again every 5 posts.

liperus said:
Thank you. Yes, exacly, I need 10 posts...
And thanks for this thread, I hope it'll ease things in the main one. It's definitely annoying seeing the same questions again and again and again every 5 posts.
Click to expand...
Click to collapse
No worries youl be up to 10 posts before you know it! The idea of this thread was to stop those questions or refer them here. It gets like this in every device tbh and it annoys me and like you I tend to read most posts in threads I subscribe to
Sent from my Nexus 5 using Tapatalk

Related

[How-To] OC/UV a kernel

As I cannot find any related guide while google-ing, I want to post this question on here for the purpose of learning and probably helping other people.
[Q1] How to overclock a kernel
which files are needed -> kernel source .. ?
what files need to be edited ?
is the cpufreq driver related ?
how to determine which frequencies need higher voltage and how high exactly ?
[Q2] Undervolting
which files are needed -> kernel source .. ?
what files need to be edited ?
is the cpufreq driver related ?
how to determine which frequencies can use lowered voltage and how to calculate them ?
I would be very thankful if any developer could teach me (probably others too) and I will contribute back for sure.
I am right now fixing up bugs in TeamGummy rom, and I'm nearly finished.
Only thing I lack is a custom kernel, which I want to build myself along with the rom.
*push*
Watch out guys, master guevor is going to teach us a little of his enormous knowlegde, so better keep your eyes on this one.
Overclocking
I must say that all I'm going to write, is what I've gathered looking at the code and changes made by others (thanks Blades and Roach2010) (I have not had any documentation about it), so I could make mistakes or misinterpretation.
Nor do I explain everything, because if you do not have a minimal knowledge get to play this directly may be dangerous.
(Q1) Overclocking
Files to modify
arch/arm/mach-tegra/tegra2_clocks.c (All matters relating to the frequencies.)
The system uses a series of programmed pll clocks which in turn can be used as a basis to other clocks. Let's say for this case pll_x is used for the base of processor clock.
The frequency table are in tegra_pll_x_freq_table processor. Seeing the type definition clk_pll_freq_table in clock.h we know that has entries consisting of 6 values​​. (input_rate, output_rate, n, m, p, cpcon)
These values ​​allow tegra2_pll_clk_set_rate function to set the pll frequency.
The values ​​of interest are the frequency of input and output that indicates the input frequency base to be used and what frequency we want to set (it will use the frequency corresponding to the current base and the output frequency we want). m * p values ​​give us the divisor and n is the multiplier. For simplicity we say that n/(m*p) will give us the multiplier, which applied to the base frequency will give the target frequency.
So if we want to add new frequencies, we must add entries in this structure (tegra_pll_x_freq_table) so the system knows how to program a frequency we want to use.
Add 4 entries for each frequency we want to add (one for each base frequency: 12000000,13000000,19200000,26000000 in our case), with multipliers/dividers to calculate the frequency for which we are adding.
If we add higher frequencies than at present, we have to change the maximum (max_rate) in the tegra_clk_virtual_cpu and tegra_clk_cclk structures, otherwise the system will ignore it. Also have to change the limits for our type of processor in sku_limits. For this case the cpu, cclk y pll_x in the values ​​for our processor (0x04, 0x08, 0x0F).
Finally we modify the table of frequencies used by the processor (frequency list and their order). Is defined at cpufreq_tables and contains a list of lists where we can add a new list or not to touch anything and modify an existing list.
We can look at the existing list freq_table_1p2GHz or in my source I added the list freq_table_1p7GHz.
Contains a list of frequencies that the system can select. It uses the list whose maximum corresponds to the maximum indicated above.
​
arch/arm/mach-tegra/tegra2_dvfs.c (Everything related to the voltages and its relationship with the frequencies.)
This part is much more sensitive and therefore can affect much to the duration of the battery as to stability. I have no formula (unfortunately for me) on how to modify the values, so the task has been more trial and error.
The first thing to know is that one must distinguish between the core voltage and the cpu and should be the latter inferior to the first. In tegra2_dvfs_rel_vdd_cpu_vdd_core function establishes the relationship between the two, being the default 120mV core above the cpu.
Basically what we do if we have added frequencies higher than normal, is to increase the voltage so that they are stable (depend on each processor). I recommend (at first) increment in the same extent all the values ​​involved (maximum voltage).
Therefore we can modify:
Table core_millivolts, establishing the voltages that core can use.
Table cpu_millivolts, establishing the voltages that cpu can use. It contains all the steps and should take into account the difference with the core discussed earlier. If we added any frequency, we add the corresponding voltages.
Tables core_speedo_nominal_millivolts and cpu_speedo_nominal_millivolts contain a nominal voltage of both the core and the cpu.
The maximum and nominal voltages in structures tegra2_dvfs_rail_vdd_cpu, tegra2_dvfs_rail_vdd_core and tegra2_dvfs_rail_vdd_aon.
Finally we adjust the settings for dvfs_init ("cpu", 1,) according to the list of frequencies we want to use (adding if we added new frequencies or changing them if changed change some)
With these changes we should be able to overclock, although we know that although you can configure (once started) a maximum frequency below the maximum that we put on the tables, there is a problem and many times after suspending the system will use the maximum frequency of the table. To avoid this we must make some changes in cpufreq.c
​
drivers/cpufreq/cpufreq.c
The problem occurs in the second core when reconnected after being disconnected in the suspension process. The problem is solved with the next patch.
Code:
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index e157205..2626e2d 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1048,18 +1048,27 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
/* Set governor before ->init, so that driver could check it */
#ifdef CONFIG_HOTPLUG_CPU
+ struct cpufreq_policy *cp;
for_each_online_cpu(sibling) {
- struct cpufreq_policy *cp = per_cpu(cpufreq_cpu_data, sibling);
+ cp = per_cpu(cpufreq_cpu_data, sibling);
if (cp && cp->governor &&
- (cpumask_test_cpu(cpu, cp->related_cpus))) {
+ (cpumask_test_cpu(cpu, cp->related_cpus))) {
+ dprintk("found sibling CPU, copying policy\n");
policy->governor = cp->governor;
+ policy->min = cp->min;
+ policy->max = cp->max;
+ policy->user_policy.min = cp->user_policy.min;
+ policy->user_policy.max = cp->user_policy.max;
found = 1;
break;
}
}
#endif
if (!found)
+ {
+ dprintk("failed to find sibling CPU, falling back to defaults\n");
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
+ }
/* call driver. From then on the cpufreq must be able
* to accept all calls to ->verify and ->setpolicy for this CPU
*/
@@ -1071,6 +1080,16 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
policy->user_policy.min = policy->min;
policy->user_policy.max = policy->max;
+ if (found)
+ {
+ /* Calling the driver can overwrite policy frequencies again */
+ dprintk("Overriding policy max and min with sibling settings\n");
+ policy->min = cp->min;
+ policy->max = cp->max;
+ policy->user_policy.min = cp->user_policy.min;
+ policy->user_policy.max = cp->user_policy.max;
+ }
+
blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
CPUFREQ_START, policy);
Ok, I'm on it. Trying my best, but I'm afraid you have to push me a little..
Facing heavy compile errors.
Question :
In your kernel source dir, which command do you use to start compiling ?
EDIT :
EDIT 2 :
@ all people trying to compile, do NOT use
Code:
make tegra_defconfig
!
Better grab an existing .config file from an already running kernel (thanks to guevor for this)
Just google "cyanogenmod building kernel from source" , it's described well over there.
If people request, I can share the kernel config and the precompiled blob tools once I get them from guevor.
First kernel compiled successfull, I have my zImage ready.
OC'd and Voltages changed.
First test kernel incoming the next days, I could need some testers.
Pm me if you want to test.
Thanks for this! I love your work and you sharing your vast knowledge of this subject! Thanks OP for giving him the means of enlightening us
back from the dead
edited
I was a little sleep deprived... my bad
Necromancy!
Say I want to just simply modify my cpu_max_freq via my stock kernel (no source availabel) and I have the boot.img and have unpacked it to boot.img-kernel. What should I do from here to get into the internals of the kernel to adjust the cpu_max_freq? I'm running an ARM Cortex A9, the same as the Tegra2 cpu per say.
Thanks
1chris89 said:
Say I want to just simply modify my cpu_max_freq via my stock kernel (no source availabel) and I have the boot.img and have unpacked it to boot.img-kernel. What should I do from here to get into the internals of the kernel to adjust the cpu_max_freq? I'm running an ARM Cortex A9, the same as the Tegra2 cpu per say.
Thanks
Click to expand...
Click to collapse
You can't do it that way. You can try to create oc modules but I couldn't tell you how to do that
Sent from my EVO using Tapatalk 2
Can you send me in the right direction?
Looks like unpacking the kernel isn't happening but I can create an overclock module which is FAR from easy but here's something I started on a little not sure if it's specific to the other device or whatever but I'll see how it goes.
http://forum.ppcgeeks.com/android-t...modules-tinboot-nand-boot-more-beginners.html
1chris89 said:
Say I want to just simply modify my cpu_max_freq via my stock kernel (no source availabel) and I have the boot.img and have unpacked it to boot.img-kernel.
Click to expand...
Click to collapse
Since the kernel is under GPL, get the sources from where you got the binary.
1chris89 said:
I'm running an ARM Cortex A9, the same as the Tegra2 cpu per say.
Click to expand...
Click to collapse
Is it a Tegra 2 or not? If not, this thread won't help you.
I don't understand this part:
The values ​​of interest are the frequency of input and output that indicates the input frequency base to be used and what frequency we want to set (it will use the frequency corresponding to the current base and the output frequency we want). m * p values ​​give us the divisor and n is the multiplier. For simplicity we say that n/(m*p) will give us the multiplier, which applied to the base frequency will give the target frequency.
So if we want to add new frequencies, we must add entries in this structure (tegra_pll_x_freq_table) so the system knows how to program a frequency we want to use.
Add 4 entries for each frequency we want to add (one for each base frequency: 12000000,13000000,19200000,26000000 in our case), with multipliers/dividers to calculate the frequency for which we are adding.
Click to expand...
Click to collapse
I want to add new frequencies but I don't get it.. also, why 4 entries for a single frequency? thanks!
Someone pleaseeee?
I hope there's a video tutorial for "adding overclocking features to your kernel", I hate to admit that I can't follow the instructions carefully due to lack of English knowledge

[Guide] [Dec.15] How to Tweak and Mod Android Using Init.d Scripts

Hello my fellow Android enthusiasts,
There are many apps that can be used to tweak kernel settings. However, I am a reductionist at heart and prefer to break things down to their essential parts. This guide was written for those who want to be rid of apps that dig into their kernel at every boot. It is a simple guide to writing init.d scripts that the average user should be able to implement.
Happy Tweaking,
Lucius
PS......ITS A CELEBRATION, *****ES!!!!!!!:victory:
Basics:
The android boot sequence is divided into 3 parts.
1) First stage bootloader
2) Kernel loads and prepares hardware
3) User space programs load - this is where init.d scripts are invoked
Init.d scripts execute commands as if they were entered into a terminal. These commands modify the value of parameters that influence our devices behaviour. They are much more flexible than tweaking apps and give end users the ability to tweak and optimize their device as they see fit. They are small, fast, clean... and awesome.
Requirements:
See my guide to modding and optimization for instructions on how to unlock, install TWRP, root, and install custom ROMs/kernels - http://forum.xda-developers.com/showthread.php?t=2232715
Unlocked: Needed to install custom recovery.
Custom Recovery: Needed to install custom ROMs and custom kernels.
Root Permissions: Needed to access /system partition - enabled when most custom ROMs are installed
Init.d Support: Needed to run init.d scripts at boot - enabled in every custom ROM/kernel I have come across.
Scripting Tool: Text editor or script manager - I use Android Tuner to create/test a script and AntTek File Explorer Ex's built in text editor to edit a script.
Root File Manager: I use AntTek Explorer Ex, it reminds me of my old linux setup, its very functional but clean as hell. Also has a built-in text editor.
Step #1: Acquire a Scripting Tool
I use Android Tuner for script creating/testing. You could also use a text editor. AntTek Explorer Ex has a built in text editor that works well. You could also use Notepad++, its a free linux based text editor. Just avoid windows-based editors, they leave extra spaces and invisible characters when enter is pressed.
Step #2: Begin Your Script
To create a script open your text editor or select "create new script" within the "script manager" in Android Tuner. Put your cursor at the very top left corner to begin writing. The first line of a script must invoke a compatible shell that will execute the script, which in our case is the following:
#!/system/bin/sh
Once this line is typed simply hit enter to start a new line. I usually put an empty line after the first line as it makes things easier to see. Extra lines for spacing purposes are fine so long as they are completely empty.
NOTE - Android tuner automatically appends the above line to the beginning of all scripts. It will not be displayed in the script creator but can be found in the final script you save.
TIP - Do not add spaces at the end of a line. Syntax must be exact.
TIP - Adding a "#" to the front of the line instructs the shell to avoid this line, which is essential for writing notes and keeping scripts organized.
Step #3: Write Your Tweaks
Now we can start writing tweaks. If written correctly each line that you enter will execute a command that changes a kernel or system level parameter. This seems daunting at first but it is really quite easy. Once you are finished typing a line simply hit enter to begin the next line. Here is an example of an executable command so you know what we are talking about going forward.
echo "SmartAssv2" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
NOTE - For some examples of useful tweaks see my guide to tweaking and optimization - http://forum.xda-developers.com/showthread.php?t=2232715
GENERAL FORMAT:
The tweaks that we are interested in typically begin by identifying the value to be written to the desired parameter:
echo "parameter value" >
The new parameter value is always followed by the directory tree locating the parameter of interest:
/sys/devices/system/cpu/cpu0/cpufreq/parameter file
In order to create:
echo "700" > /sys/devices/system/cpu/cpu0/cpufreq/gpu_oc
CPU/GPU TWEAKS:
To familiarize yourself with how tweaking is done I would start by opening up the following directory in your file manager:
/sys/devices/system/cpu/cpu0/cpufreq/
This is where cpu parameters, and often gpu parameters, are located. These files/parameters determine how our kernel controls our CPU. To modify our CPU's behaviour these parameters are modified at boot utilizing init.d scripts. Familiarize yourself with these files, open them up with a text editor - it's entirely safe so long as you don't start changing values. If the name of a parameter isn't self-explanatory, opening it up and examining the value it holds will typically explain its purpose. Here are some common parameters that are useful to know.
scaling_available_freq - lists the frequencies available to the cpu
scaling_available_governors - lists the cpu governors available for use
scaling_governor - sets the cpu governor
scaling_max_freq - sets the max freq
scaling_min_freq - sets the min freq
UV_mV_table - sets the voltage table for the cpu
GOVERNOR TWEAKS:
The CPU governor determines how our CPU behaves in response to changes in workload. Changing the governor will impact how our CPU scales through the freq steps available to our CPU. This has a significant impact on the time our CPU spends at different frequency steps, which influences efficiency, performance, battery life, and stability. For more info about the various governors available in android see post #1 at the following link - http://forum.xda-developers.com/showthread.php?t=1369817
Tweakable governor parameters are located in:
sys/devices/system/cpu/cpufreq/
Various interactive governor parameters can be accessed, such as:
go_hispeed_load - Go to hispeed_freq when cpu load at or above this value
hispeed_freq - freq to bump to once go_hispeed_load is passed
min_sample_time - minimum amount of time that can be spent at a frequency before scaling down
timer_rate - the interactive governor checks cpu load at regular intervals to determine whether frequencies should be increased when it comes out of idle. If the cpu is busy between exiting idle and the timer firing we assume the cpu is underpowered and ramp frequency up
HOTPLUG CONFIG:
The hotplug config in Hundsbuah's Kernel allows you to control how CPU cores are brought online as threads are processed. A thread is the smallest sequence of instructions that can be managed independently by a process scheduler. Threads are contained within a process. A process is the execution of instructions contained within a program. On a single processor system multi-threading (multitasking) is generally implemented by transmitting/sending signals over a common signal path; the processor switches between different threads. This switching generally happens frequently enough that the user perceives the threads or tasks as running at the same time. If the CPU is overloaded and a thread is queued up by the process scheduler then lag/stuttering is likely to occur because thread switching does not occur quickly enough to be hidden from the user. On a multi-core system threads can be truly concurrent, with every processor or core executing a separate thread simultaneously, which decreases the potential for lag/stuttering. If core 1 is busy processing a thread and another thread is queued up by the process scheduler we want an additional core to become active so that core 1 does not have to switch between threads. However, we also do not want to bring cores online needlessly. If a core is able to process multiple threads fast enough such that switching is unnoticeable then it would be inefficient to bring another core online. The hotplug config can be found in the following location:
/sys/kernel/rt_config/rt_config
I/O TWEAKS:
The I/O scheduler handles read/write requests from memory (RAM and storage). The I/O scheduler we use can significantly impact I/O (read/write) performance. For more info about the various I/O schedulers available in android see post #4 in the following thread - http://forum.xda-developers.com/showthread.php?t=1369817
The location of the I/O scheduler is:
/sys/block/mmcblk0/queue/scheduler
/sys/block/mmcblk1/queue/scheduler
Use the follIng lines to change the I/O scheduler:
echo "sio" > /sys/block/mmcblk0/queue/scheduler
echo "sio" > /sys/block/mmcblk1/queue/scheduler
KERNEL MODULES:
A kernel module is a file containing code that extends the functionality of our kernel. Modules allow our kernel to communicate with different types of hardware (ex - bluetooth), utilize various file systems (ex - NTFS), or system calls (ex - frandom.ko). Kernels do not automatically come with all available modules, loading only the most essential modules can reduce a kernels footprint and potentially improve performance. Simultaneously, loading improved modules can improve performance in some cases (ex - frandom.ko). For more info about various kernel modules see post #3 in the following thread - http://forum.xda-developers.com/showthread.php?t=1369817
NOTE - You cannot download and load kernel modules from the internet. They need to be compiled for kernel you are using.
To make a kernel module available make sure /system is mounted as rewritable, rather than read-only (see step #5 for further instructions). Copy the module .ko file (ex - tntfs.ko) to the following location:
/system/lib/modules
To check what modules are loaded at boot enter the following command in a terminal:
lsmod
To load a kernel module at boot add the following line to your init.d script:
insmod /system/lib/modules/module name
To unload a kernel module at boot add the following line to your script
rmmod module name
SYSCTL TWEAKS:
This section is currently under construction, more tweaks will be posted once I find them. Sysctl is an interface that is used to examine and dynamically change parameters within a linux based OS.
To change the TCP Congestion Algorithm add the following line to your script:
/system/xbin/sysctl -w net.ipv4.tcp_congestion_control=westwood
NOTE - For a brief explanation of TCP/IP protocols and network congestion algorithms see the following post - http://forum.xda-developers.com/showpost.php?p=48088128&postcount=1884
FINISHING YOUR SCRIPT:
Once all your tweaks are written go through the entire script and make sure syntax is exact - no extra spaces or characters. Save your first script as w/e you want (ill explain naming later) just make sure it doesn't have a file extension. I'm talking total absence of file extensions. WHOA! WHAT! WTF YO!
NOTE - Android Tuner saves scripts by default in the "at" folder in "sdcard0"
Example Script:
Code:
#!/system/bin/sh
#CPU Tweaks
echo "1350 1320 1280 1240 1200 1150 1100 1050 1000 950 900 860 820 780 750 720 700" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
#Governor Tweaks
echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
#SD Tweaks
echo "vr" > /sys/block/mmcblk0/queue/scheduler
echo "vr" > /sys/block/mmcblk1/queue/scheduler
#Module Tweaks
insmod /system/lib/modules/ frandom.ko
rmmod tntfs.ko
rmmod texfat.ko
Step #4: Test Your Script
You can test your script using a root terminal shell (Android Tuner has a terminal). Open a terminal, type "su", and hit enter (or select the box beside "su" in AT). This will give you the ability to run commands as root. To test your script enter the following command:
sh directory of your script
EXAMPLE - sh /storage/sdcard0/at/scripts/01ZenKernelTweaks
Check the files that correspond to the tweaked parameters to see if the script worked. If the values were correctly modified then you have officially finished writing your first working init.d script.
Step #5: Enable Your Script
First, open your file manager, go to your root directory, and remount your /system partition as RW instead of RO. This is typically done by long-pressing the /system folder (ex - AntTek Explorer), file manager settings (ex - esFile Explorer), or through the overflow menu. Once the /system is mounted as RW we can move our script to the init.d folder and change our scripts permissions. The init.d folder is located here:
/system/etc/init.d
The name of your script determines the order in which it is executed. The first two characters determine the order of execution. The ordering is as follows - numbers from 0-99, then letters from A-Z. The first two letters of a script's name are typically numbers between 0-99, this is the standard method of script naming that most developers/tweakers use. Set the name of your script so that it is executed in the order that you wish. Mine is set to execute first because I want to get kernel tweaks done as early as possible.
Once you have named your script long-press it and select "Change Permissions" (or however this is done in your file manager). Give User, Group, and Other read, write, and execute permissions.
Your init.d script will now optimize your tablet quickly and efficiently at every boot. Don't get out of your chair too fast....Before doing anything else, I suggest revelling in your awesome new-found abilities for a significant period of time. Pat yourself on the back. Start referring to yourself as "a boss" if you like. You deserve it.
CAUTION:
Although init.d scripts are easy to make, a bad script may cause boot looping. However, a bad script does not necessarily = boot looping. I have yet to cause a boot loop and I have written many scripts that did not work. Everything typically boots normally, the bad lines in the script are simply not applied. Before enabling your script I strongly suggest taking a Nandroid backup in TWRP. To do so boot into TWRP and select "Backup" from the home screen. This will allow you to restore your entire system, which is done via the "Restore" tool in TWRP.
NOTE - Do not enable scripts to run at boot in a program like Android Tuner or others similar to it. If the script is bad it will cause boot looping because the app will keep trying to run it. If you put the script in the init.d folder and enable it yourself you will avoid this issue.
SUGGESTION:
If you want more examples of tweaks that can help you optimize your tablet see my guide to tweaking and optimization. It fills any gaps in this guide and contains many useful resources. You can find it here - http://forum.xda-developers.com/showthread.php?t=2232715
tweakalicous...
lucius.zen said:
HAPPY TWEAKING,
Lucius
PS......ITS A CELEBRATION, *****ES!!!!!
Click to expand...
Click to collapse
LOL ... great tut Zen ...
Very nice, thanks Zen.
I accidentally stated in Step #3 that "Android saves scripts by default in the 'at' folder in your internal storage"....However, I meant to write "Android Tuner saves scripts...". Changed the OP, just wanted to make sure anyone who has read it already isnt like "WTF ZEN! Where is my damn script! Derpa a derrrr".
Breaking News.....
***************IMPORTANT UPDATE - MUST READ BREAKING NEWS*****************
DEY TUK ARRRRR JEEEERRRRRRRBSSSSS!!!!!!!
.....watching too many episodes of SP lately
lucius.zen said:
How-To Write Init.d Scripts for the tf700
Click to expand...
Click to collapse
Great tutorial!
lucius.zen said:
The number, or letter, at the beggining of the init.d script determines its order of sexecution, beginning at 1 or A, and going up to 99 or Z.
Click to expand...
Click to collapse
The universal convention is to use a numeric prefix from 00 to 99, but in reality the name can be anything and the scripts are simply executed in alphanumeric order - digits come before "A". I recommend using two-digit prefixes as intended.
lucius.zen said:
Code:
#!/system/bin/sh
#CPU Tweaks
echo "1300 1200 1150 1125 1112 1100 1087 1075 1050 1037 1025 1012 987 975 962 950 925 912 900 887 875 862 850 837 825 812 800 775 762 750 737 725 712 700 687 675 650 637 625 600" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
Click to expand...
Click to collapse
Note that the UV_mV_table has a completely different format when reading or writing the file - one reason why I hate this interface. But it's the "standard" that was established by whoever hacked the first implementation, and user mode apps expect it like this.
lucius.zen said:
Although init.d scripts are easy to make, you can potentially cause boot looping, please proceed with caution.
Click to expand...
Click to collapse
To repair this, boot into recovery, connect via adb shell, and do the following:
(if needed
mount -o remount,rw /system
chmod 0666 /system/etc/init.d/50myevilscript
This will remove "execute" permissions for the script, which will effectively disable it.
Say I tested and am currently using 10 scripts, how do I create a .zip recovery file so I can flash/install the scripts at once, every time I reflash or factory reset my rom?
Thanks for your awesome tuto ! But I've a question concerning the gpu governor: it's possible to set this governor with command line too ?
@lucius.zen
It is a nice write up and great tutorial. I am enjoy reading it and keep up the good work... :good:
LetMeKnow said:
@lucius.zen
It is a nice write up and great tutorial. I am enjoy reading it and keep up the good work... :good:
Click to expand...
Click to collapse
@LetMeKnow
Thanks a lot dude very much appreciated, makes me miss contributing to xda. I made a lot of promises and left too much work unfinished. I haven't been on for 6 months because I have been dealing with some pretty serious mental health issues. Apparently I am mildly schizophrenic with comorbid anxiety and attention issues. Been super fun times lol. Hoping to get back in the game this holiday season, would be sweet to share some tweaking/optimization ideas, I havent had much of a chance to check out your tweaks but I have heard great things.
All the best,
Lucius
lucius.zen said:
@LetMeKnow
Thanks a lot dude very much appreciated, makes me miss contributing to xda. I made a lot of promises and left too much work unfinished. I haven't been on for 6 months because I have been dealing with some pretty serious mental health issues. Apparently I am mildly schizophrenic with comorbid anxiety and attention issues. Been super fun times lol. Hoping to get back in the game this holiday season, would be sweet to share some tweaking/optimization ideas, I havent had much of a chance to check out your tweaks but I have heard great things.
All the best,
Lucius
Click to expand...
Click to collapse
Thanks for a kind word... It sounds like that you need to take of yourself a little better before worrying about the contributing to xda. You do a lot for the community already and hope you will get very soon. Please let me know whenever you have time to talk about tweaks and more than happy to share what I know.
Cheers and get well,
LMK
Missing Files
Hi,
Using the guide I came up with the following script:
Code:
#!/system/bin/sh
#CPU Tweaks
echo "1350 1320 1280 1240 1200 1150 1100 1050 1000 950 900 860 820 780 750 720 700" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo "1900000" > /sys/devices/system/cpu/cpufreq/interactive/max_boost
echo "1900000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo "85" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "85" > /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load
echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
but I received an error for hispeed_freq and go_hispeed_load claiming "No such file or directory". When I checked the /sys/devices/system/cpu/cpufreq/interactive/ directory, the two files are missing. Are they supposed to be present on the TF700?
Thanks
00shakey00 said:
Hi,
Using the guide I came up with the following script:
Code:
#!/system/bin/sh
#CPU Tweaks
echo "1350 1320 1280 1240 1200 1150 1100 1050 1000 950 900 860 820 780 750 720 700" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo "1900000" > /sys/devices/system/cpu/cpufreq/interactive/max_boost
echo "1900000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo "85" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "85" > /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load
echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
but I received an error for hispeed_freq and go_hispeed_load claiming "No such file or directory". When I checked the /sys/devices/system/cpu/cpufreq/interactive/ directory, the two files are missing. Are they supposed to be present on the TF700?
Thanks
Click to expand...
Click to collapse
Everything looks good in the script. Not sure why those parameters are missing. What kernel are you using?
lucius.zen said:
@LetMeKnow
Thanks a lot dude very much appreciated, makes me miss contributing to xda. I made a lot of promises and left too much work unfinished. I haven't been on for 6 months because I have been dealing with some pretty serious mental health issues. Apparently I am mildly schizophrenic with comorbid anxiety and attention issues... Lucius
Click to expand...
Click to collapse
Forgive the digression, I couldn't help wondering: I don't mean to slight the condition in any way, but zen couldn't tackle it so you had to go the physical route?
graphdarnell said:
Forgive the digression, I couldn't help wondering: I don't mean to slight the condition in any way, but zen couldn't tackle it so you had to go the physical route?
Click to expand...
Click to collapse
Sorry I am having trouble understanding what you are asking. Are you wondering if I medication is more effective than meditation?
lucius.zen said:
Sorry I am having trouble understanding what you are asking. Are you wondering if I medication is more effective than meditation?
Click to expand...
Click to collapse
Here we go off topic already ... but just had to throw in my 2 cents. I have many conditions that have been treated for 30+ years (I am in my 50's) I had Chronic Severe OCD that was almost debilitating in my mid 20's. I also have A.D.H.D. (A.D.D) along with boughts of narcolepsy and severe panic attacks (were I end up on the floor or in the ER) anyways, I am a mess or I use to be. I did ALL the drugs Adderall (Amphetamine, Dextroamphetamine Mixed Salts) / Ritalin / Zoloft / bupropion / Xanax all at MAX DOSE. They all relieved some of the systems, but caused other issues to arise (addiction being one). I got into TD and Zen Yoga 10 years ago. 90% of my symptoms went away the first year, and I only take medication for my high cholesterol now. I feel great and work 10 to 13 hours a day. What this has to do with Init.d scripts .... *shrug* .... Pharmaceuticals just suck .
Now back to the Init.d scripting. Great job on the guide !! if this is not pinned it should be !!
Thank you for creating it.
Thibor69
Thibor69 said:
Here we go off topic already ... but just had to throw in my 2 cents. I have many conditions that have been treated for 30+ years (I am in my 50's) I had Chronic Severe OCD that was almost debilitating in my mid 20's. I also have A.D.H.D. (A.D.D) along with boughts of narcolepsy and severe panic attacks (were I end up on the floor or in the ER) anyways, I am a mess or I use to be. I did ALL the drugs Adderall (Amphetamine, Dextroamphetamine Mixed Salts) / Ritalin / Zoloft / bupropion / Xanax all at MAX DOSE. They all relieved some of the systems, but caused other issues to arise (addiction being one). I got into TD and Zen Yoga 10 years ago. 90% of my symptoms went away the first year, and I only take medication for my high cholesterol now. I feel great and work 10 to 13 hours a day. What this has to do with Init.d scripts .... *shrug* .... Pharmaceuticals just suck .
Now back to the Init.d scripting. Great job on the guide !! if this is not pinned it should be !!
Thank you for creating it.
Thibor69
Click to expand...
Click to collapse
Thanks dude! They tried to prescribe me an antipsychotic for my schizophrenia but I try to avoide pharmaceuticals. I agree that meditation, yoga/exercise work really well, as does tailoring my diet, etc. Glad things are going well for you now.
All the best,
Lucius
lucius.zen said:
Sorry I am having trouble understanding what you are asking. Are you wondering if I medication is more effective than meditation?
Click to expand...
Click to collapse
Actually I was asking if Zen would not suffice that you need to take medication. I don't see that drugs would do anything other than suppressing symptoms. Nothing is done about the root-cause, and that's how they get you hooked for life.
My own experience is that body is a reflection of mind and vice versa. The dichotomy is simply false. However, given the ingrained ruts one needs to obliterate, diet for the body must be watched as much as mediation must be practiced for mental well-being. You ever studied Oshawa? Much more than just a regime, the way I see it.
Sorry, I won't digress any further.
lucius.zen said:
The name of your script determines the order in which it is executed. The first two characters determine the order of execution. The ordering is as follows - numbers from 0-99, then letters from A-Z. The first two letters of a script's name are typically numbers between 0-99, this is the standard method of script naming that most developers/tweakers use. Set the name of your script so that it is executed in the order that you wish. Mine is set to execute first because I want to get kernel tweaks done as early as possible.
Click to expand...
Click to collapse
Great guide, thanks for the tutorial. One question, regarding the order of execution of scripts, does it matter if two or more scripts share the same prefix (1st 2 characters), for example 99SuperCharger and 99Supersudaemon, and 98KickAssKernelizer and 98Fly-On, 94engineflush and 94governor, and etc.? I combine scripts from different devs by editing their code to arrest any conflicts when they get executed, though, I don't change the script's name. Never had any problems, just curious on the sequencing of init.d scripts.
iZLeeP said:
Great guide, thanks for the tutorial. One question, regarding the order of execution of scripts, does it matter if two or more scripts share the same prefix (1st 2 characters), for example 99SuperCharger and 99Supersudaemon, and 98KickAssKernelizer and 98Fly-On, 94engineflush and 94governor, and etc.? I combine scripts from different devs by editing their code to arrest any conflicts when they get executed, though, I don't change the script's name. Never had any problems, just curious on the sequencing of init.d scripts.
Click to expand...
Click to collapse
No it doesn't as they get executed alphabetically but it looks a mess and there is little room for ordering.

[Guide/Tweak/Mod/Script] [Feb.24] How to Tweak and Optimize Android Performance

Please see post #2 for instructions and change log.
BASICS/PREREQUISITES:
To begin you must unlock, install TWRP, and acquire system files and mods.
Unlocking:
Use the Asus unlocking tool from the downloads section on the Asus TF700 support website. Simply install the .apk, run the app, and follow the prompts.
Installing TWRP:
TWRP can be found here - http://forum.xda-developers.com/showthread.php?t=1797692
Instructions for installing TWRP can be found here - http://forum.xda-developers.com/showthread.php?t=1938129&highlight=root+custom+recovery
NOTE - To boot into TWRP press and hold the power and volume down button until white text appears in the top left corner of your screen. Release both buttons and press volume up.
System Files:
System files and mods can be obtained from the following links. Please thank/donate to the devs for all of their hard work.
CROMi-X [ROM] - http://forum.xda-developers.com/showthread.php?t=2425383
Hundsbuah’s Kernel - http://forum.xda-developers.com/showthread.php?t=2143093&page=80
Data2SD [Mod] - http://forum.xda-developers.com/showthread.php?t=1962507
ROM2SD [Mod] - http://forum.xda-developers.com/showthread.php?t=2501129
CrossBreeder [Mod] - http://forum.xda-developers.com/showthread.php?t=2113150
DATA2SD/ROM2SD:
Data2SD works around poor I/O performance by giving us the ability to utilize a fast microSD card as our primary mode of storage. ROM2SD follows a similar premise as Data2SD; however, it also gives us the ability to dual boot any android ROM compatible with our tablet. The application of these mods results in apps opening faster, faster boot times, faster read/write speeds, and faster downloading/less lag while downloading. Step #1 and Step #2 only need to be followed the first time you apply these mods.
Step #1 - Create GParted Live USB Stick:
In order to run your tablet from a microSD card you will need to reformat it using Gparted (a linux based partition editor) installed on a live USB stick. A live USB stick has the image (.iso file) of a program burnt onto it so that it can be run at boot on a PC.
Find Gparted here - http://gparted.sourceforge.net/livecd.php
Download the live CD/USB image. The easiest tool for burning the image is the LinuxLive USB Creator.
LinuxLive USB Creator can be found here - http://www.linuxliveusb.com/
Download the program and install it. Simply follow the instructions within the program using the Gparted image.
Step#2 - Reformat microSD Card:
This involves booting into Gparted, clearing your microSD of existing partitions, and creating new partitions to store androids /system (ROM, kernel), /data (apps and data), and /media partitions (user data and media files - "sdcard0"), which were previously stored internally.
Boot Into Gparted:
Insert your live USB and microSD card into your PC. To boot into Gparted power on your PC and select one of the "FX" buttons to bring up the boot selection menu (I need to select F9). The live USB will be labelled something like "USB Diskette", or "USB Hard Disk". Select your live USB and follow the prompts to boot into Gparted.
Create Partition for External Storage:
Once Gparted has loaded delete any existing partitions on your microSD card. Next create a primary partition using the Fat32 file system at the very beginning of your card with at least 4Gb of storage (I am using 8Gb). This is recognized and functions as external storage so that we have a place to store flashable (installable) .zips and TWRP backups. It does not contain any data relevant to the functioning of our tablet.
NOTE - Partitions should be aligned to mb and ideally be divisible by 4.
Create Partition for System Storage:
After creating a partition for external storage we need to create partitions for androids /system, /data, and /media partitions. If you plan on using Data2SD you only need to make a second partition. If you plan on using ROM2SD then you need to make 2 additional partitions.
Data2SD - Create a second primary partition using the ext4 file system with the remaining space on your microSD. This partition will contain your /system, /data, and /media partitions. After you have created this partition you will need to flag it to run at boot. Right click the ext4 partition and select “Manage Flags”. Check the box beside “Boot”. You are done reformatting, simply exit Gparted.
ROM2SD - The second partition you need to make will contain your /data and /media partitions. The third partition will contain your /system partition. It only needs enough space to store your ROM and kernel so we will create it first at the very end of the microSD card. Create a primary partition using the ext4 file system with 1Gb of space. After you have created this partition you will need to flag it to run at boot. Right click the ext4 partition and select “Manage Flags". Check the box beside “Boot”. Now create another primary partition using the ext4 file system with the remaining space on your card. You are done reformatting, simply exit Gparted.
Step #3 - Install System Via TWRP:
I do not recommend setting up Data2SD or ROM2SD using old data. Please do a fresh install to avoid issues. I am able to wipe my tablet completely, install my system, set up my apps/data, and apply all of the tweaks in this guide in less than half an hour.
Getting Started:
If using Data2SD please download the "mount-data2sd.zip" file attached to this post (credit @Mistar Muffin). If using ROM2SD please download the "mount-rom2sd.zip" file attached to this post (credit @_that). Move this file, your ROM, your kernel, and any applicable mods to the Fat32 partition on your microSD card. Power down your tablet and boot into TWRP (see basics section for details).
Install Using Data2SD:
Boot into TWRP and wipe everything other than external storage (cache, dalvik cache, data, system, internal storage). To begin setting up Data2SD select CROMi-X for installation. Next choose "mount-data2sd.zip". This resets device nodes so that TWRP will install .zips to our microSD card rather than internal storage. Begin installation once the rest of your .zips are selected (ex - themes, mods, etc). During CROMi-X installation you will be presented with a kernel selection page. In the first section select your desired kernel. In the second section choose the Data2SD compatible option. When installation has finished reboot your tablet and set it up as usual.
Install Using ROM2SD:
Before proceeding check out _that`s ROM2SD thread so you understand how ROM2SD works - http://forum.xda-developers.com/showthread.php?t=2501129. CROMi-X or miniCROMi-X users can utilize the following instructions to install ROM2SD, see the following post if you are dual-booting other ROMs - http://forum.xda-developers.com/showpost.php?p=47333729&postcount=31.
Boot into TWRP and wipe everything other than external storage (cache, dalvik cache, data, system, internal storage). We begin by setting up our tablet to run from internal storage. Select CROMi-X or miniCROMi-X for installation. Hundsbuah's kernel and _that's kernel are available through CROMi-X and are ROM2SD compatible. Next choose any other .zips you need to flash (ex - themes, mods, etc). During CROMi-X installation you will be presented with a kernel selection page. In the first section select a ROM2SD compatible kernel, in the second section choose the 4th option. This installs CROMi-X to your internal storage and allows you to boot to an additional system on a microSD card. Once installation has finished reboot your tablet.
When you reboot you will be presented with the android set up wizard. Go through this as usual and set up you tablet. Once you have finished reboot your tablet back to recovery. Next we will set up our microSD. Select CROMi-X or the ROM2SD compatible version of miniCROMi-X for installation. Next choose "mount-rom2sd.zip". This file updates TWRPs device nodes so that .zips are installed to the correct partitions on your microSD card. Select the rest of the .zips you need to flash and begin installation. Once you reach the kernel selection page in the CROMi-X installer select your desired kernel and the third option in the second section. Once installation has finished reboot your tablet. After rebooting you should be presented with the android set up wizard again.
NOTE - To boot using internal storage remove your microSD card from your tablet and power on. To boot to using your microSD simply put it back in and turn on your tablet.
Creating/Restoring Nandroid Backups:
To create or restore a TWRP Nandroid backup you must first install mount-data2sd.zip or mount-rom2sd.zip. This resets device nodes so that TWRP will correctly backup/restore partitions on your microSD card. The "Backup" section allows you to create Nandroid backups. The "Restore" tool in TWRP allows you to restore Nandroid backups.
Wiping Partitions and Factory Reset:
Boot into TWRP and install mount-data2sd.zip or mount-rom2sd.zip. This resets device nodes so that TWRP will correctly wipe partitions stored on your microSD card. The "Wipe" section can be used to do a factory reset or selectively wipe your dalvik cache, cache, /system partition, /data partition, or internal storage.
NOTE - Partitions are mounted differently after implementing Data2SD/ROM2SD. The Fat32 partition on your microsd is recognized as "MicroSD". The media partition is still mounted as "sdcard0". It can be found in the /system/storage/ directory, along with your tablets internal storage, which is mounted as "sdcardi". If using ROM2SD you internal /data partition can be accessed via the/datai directory.
CPU/GPU FREQ CAPS:
With Hundsbuah's kernel you can set freq caps for the CPU and GPU within each of Asus' power modes (power saving, balanced, performance). The parameters we need to edit can be found in the following files:
cpu1.sh (power saving)
cpu2.sh (balanced)
cpu3.sh (performance)
Which are located in the following directory:
/system/etc/cpuX.sh
To apply the following tweaks a text editor is used to edit lines contained in the aforementioned files. I utilize the editor built into AntTek Explorer Ex.
GPU Frequency Cap:
The following lines set GPU voltage:
logi "echo GPU voltage > core_cap_level"
echo GPU voltage > /sys/kernel/tegra_cap/core_cap_level
To modify the GPU freq cap simply fill the red portion of the above lines with your desired GPU voltage. The GPU voltage determines the GPU freq cap. Here is how Hundsbuah's stock voltage table works, if you modify the voltage table these values will be different:
700 mhz - 1425 mV
650 mhz - 1387 mV
600 mhz - 1350 mV
520 mhz - 1300 mV
484 mhz - 1250 mV
446 mhz - 1200 mV
408 mhz - 1150 mV
361 mhz - 1100 mV
247 mhz - 1000 mV
200 mhz - 950 mV
GPU FPS Limit:
To unlock the GPU FPS limit and change it to 90 add the portion in red to the following lines:
logi "setprop persist.tegra.NV_FPSLIMIT 1"
setprop persist.tegra.NV_FPSLIMIT 1
logi "setprop persist.sys.NV_FPSLIMIT 90"
setprop persist.sys.NV_FPSLIMIT 90
CPU Frequency Caps:
To change the frequnecy caps for each CPU core fill the red portion of the following lines with the desired frequency:
logi "echo Core 1 freq cap > pwr_cap_limit_1"
echo Core 1 freq cap > /sys/module/cpu_tegra/parameters/pwr_cap_limit_1
logi "echo Core 2 freq cap > pwr_cap_limit_2"
echo Core 2 freq cap > /sys/module/cpu_tegra/parameters/pwr_cap_limit_2
logi "echo Core 3 freq cap > pwr_cap_limit_3"
echo Core 3 freq cap > /sys/module/cpu_tegra/parameters/pwr_cap_limit_3
logi "echo Core 4 freq cap > pwr_cap_limit_4"
echo Core 4 freq cap > /sys/module/cpu_tegra/parameters/pwr_cap_limit_4
Asus Power Saving Modes:
The following profiles are optimal for specific tasks/uses. They were designed to obtain a lag-free experience based on certain levels of CPU load.
Power Saving - Used for tasks with a moderate to high load for extended periods of time (productivity, browsing heavy websites, streaming video online, heavy multitasking)
- GPU Voltage/Freq = 1425/700
- Core 1/2/3/4 = 1750000
- Quadrant Score - 7400-7500 (Screenshot - https://www.dropbox.com/s/jqdcrwc7t...core - Power Saving Mode (max 1.75Ghz).jpg?m=)
Balanced - Used for tasks with low to moderate load (general use, light browsing, email, media consumption, etc.)
- GPU Voltage/Freq = 1425/700
- Core 1/2/3/4 = 1600000
- Quadrant Score - 6900-7000 (Screenshot - https://www.dropbox.com/s/zlfhnv1jq...ant Score - Balanced Mode (max 1.6Ghz).jpg?m=)
Performance - Used for short intense workloads
- GPU Voltage/Freq = 1425/700
- Core 1/2/3/4 = 1900000
- Quadrant Score - 8000-8100 (Screenshot - https://www.dropbox.com/s/iv5wawq49...ant Score - Performance Mode (max 1.9Ghz).jpg)
INTERACTIVE GOVERNOR TWEAKS:
The CPU governor controls how the CPU scales through frequency steps in response to changes in CPU load. CPU load reflects the difference between our processors current power (increased by freq and voltage - decreased by leakage) and the power needed to effectively process work queued up by the process scheduler. The magnitude and variability of CPU load are important indicators of processor performance. As load increases instances of lag also tend to increase. If we were to graph instances of lag/stuttering and CPU load over time you would see that stuttering happens most when load is high. An unstable, or highly variable CPU load indicates that CPU scaling is not responsive to the demands of the process scheduler; its almost as if scaling is a half-step too late. In this condition scaling is generally erratic, which decreases time spent idling, system stability, and responsiveness. Ideally we want CPU load to be as low and stable as possible as this indicates scaling is working efficiently. The amount of power a CPU can output does not matter; if it is not effectively scaled based on changes in load then lag/unresponsiveness is bound to occur. The following governor tweaks improve the efficiency of CPU scaling. To evaluate their effectiveness Android Tuner was utilized to monitor CPU load, CPU scaling in real-time, total time spent at each frequency step, and core temperature during benchmark tests and actual use. Detailed explanations can be found beneath each tweak.
NOTE - You will need to write an init.d script to apply the following tweaks. See my guide to writing init.d scripts for details - http://forum.xda-developers.com/showthread.php?t=2198510.
NOTE - CROMi-X Users - The following tweaks, aside from max_boost, are applied by default in CROMi-X.
timer_rate - 20000
Sets the rate at which the governor samples cpu load. Lower values result in scaling that is too jumpy. Higher values result in scaling that is not responsive enough.
min_sample_time - 40000
Sets the minimum amount of time spent at a freq step before scaling down. The interactive governor samples CPU load every 2 ms. If the CPU is underpowered core freq is ramped up. Once load decreases the CPU is scaled back down. By default the CPU must spend at least 3 ms at a freq before it can scale down, which does not make sense if the governor is set on a 2 ms timer. A 4 ms minimum downscaling delay makes sense - the timer samples load twice before scaling down. Load tends to fluctuate drastically with touch devices; thus we do not want the CPU to scale down if it is going to have to ramp up again. Having a 2 ms timer allows the CPU to be scaled up quickly, while a 4 ms down scale delay prevents the CPU from downscaling early.
midrange_freq = 760000 - set as close to middle of freq table as possible
Needs to be recalibrated to reflect modified freq caps. If core freq caps are increased midrange freq should be adjusted so that the governor knows how to control the CPU properly.
max_normal_freq = 1300000
Instructs the CPU to jump to this freq when midrange_go_maxspeed_load is reached. For some reason this tweak has had a greater impact on performance than any of my governor tweaks. Before applying this tweak 475 mhz and max frequency are used most while under low/moderate load. After applying this tweak 475 mhz and 1.3 Ghz are utilized more often, as are a wider range of freq steps. Despite spending far less time at max frequency benchmark scores and performance have increased.
max_boost = 1900000 - set to highest freq available
Max boost is a mechanism for clearing a mounting queue as quickly as possible to prevent lag. It will do its job most effectively if we give it as much juice as possible. Controlled by go_maxspeed_load.
NOTE - CROMi-X Users - To apply the above tweak delete or edit the line changing max_boost under "#CPU and VM Tweaks" in sdbags 50CleanTWEAKS init.d script.
midrange_go_maxspeed_load = 65
go_maxspeed_load = 85
Optimal for keeping CPU load low and stable. Through my testing I have found that it is more efficient to adjust freq a little earlier by setting load thresholds lower (65/85) than it is to make adjustments when load has already gotten relatively high. Improves responsiveness without hurting battery life because the CPU spends more time idling.
To implement the above tweaks add the following lines to your init.d script:
echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo "760000" > /sys/devices/system/cpu/cpufreq/interactive/midrange_freq
echo "1300000" > /sys/devices/system/cpu/cpufreq/interactive/max_normal_freq
echo "1900000" > /sys/devices/system/cpu/cpufreq/interactive/max_boost
echo "65" > /sys/devices/system/cpu/cpufreq/interactive/midrange_go_maxspeed_load
echo "85" > /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load
NOTE - Detailed descriptions of each governor can be found at the following link - http://forum.xda-developers.com/showthread.php?t=1369817.
HOTPLUG CONFIG:
The hotplug config in Hunds Kernel allows you to control how CPU cores are brought online as threads are processed. A thread is the smallest sequence of instructions that can be managed independently by a process scheduler. Threads are contained within a process. A process is the execution of instructions contained within a program. On a single processor system multi-threading (multitasking) is generally implemented by transmitting/sending signals over a common path; the processor switches between different threads. This switching generally happens frequently enough that the user perceives the threads or tasks as running at the same time. If the CPU is overloaded and a thread is queued up by the process scheduler then lag/stuttering is likely because thread switching does not occur quickly enough to be hidden from the user. On a multi-core system threads can be truly concurrent, with every processor or core executing a separate thread simultaneously, which decreases the potential for lag/stuttering. If core 1 is busy processing a thread and another thread is queued up by the process scheduler we want an additional core to become active so that core 1 does not have to switch between threads. However, we also do not want to bring cores online needlessly. If a core is able to process multiple threads fast enough such that switching is unnoticeable then it would be inefficient to bring another core online.
NOTE - CROMi-X Users - The following tweak is applied by default in CROMi-X.
To change the hotplug config add the following line to your init.d script:
echo "2 4 6" > /sys/kernel/rt_config/rt_config
Instructs the kernel to bring core 2, 3, or 4 online when more than X threads are active. Core 2 is brought online when 3-4 threads are active, core 3 is brought online when 5-6 threads are active, and core 4 is brought online when 7+ threads are active. Through my testing I have found that a single core running at 475 Mhz has enough power to effectively process a constant low load. If hotplugging values are set lower then the kernel tends to unnecessarily bring additional cores online while in a low load state. If the kernel is told to activate cores later then we begin to notice lag/stuttering due to thread switching.
KERNEL TWEAKS:
The following tweaks directly impact how the kernel controls our tablets hardware.
CPU Frequency Table:
The CPU frequency table sets the frequencies that are available to the CPU. The following tweak modifies the minimum freq step that is available to the CPU, to apply it add the following line to your init.d script:
echo "475000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
Through my testing I have found that if an app is open and generating a very low load we cannot utilize frequencies below 475 mhz. If allowed to drop below 475 mhz core freq bounces between 204 mhz and 475 mhz while in an active low load state; which indicates that freq steps below 475 mhz are incapable of handling the load induced by the activation of a foreground app. Preventing the CPU from dropping below 475 mhz increases responsiveness and stabilizes CPU load as the CPU cannot drop to ineffective frequencies. This does not impact battery life because of the design of the Tegra 3 processor. The Tegra 3 has 5 cores; 4 primary fast-process cores and 1 slow-process battery saving core. If our tablet is asleep or idling/inactive (no foreground app) then processing is handled by the low-powered battery saving core. If any foreground app is open our kernel activates a combination the 4 primary cores. Scaling_min_freq has no impact on the battery saving core. Therefore, increasing scaling_min_freq ensures we utilize effective frequencies while in an active state without preventing the CPU from dropping to lower frequencies while inactive.
CPU Voltage Table:
The CPU voltage table sets the voltages that are supplied to frequencies in the frequency table. Processing power is increased by frequency and voltage; while it is decreased by leakage, which is increased by heat. As voltage increases so does heat. Therefore, voltage has a positive and negative impact on processing power. The optimal voltage table balances the costs of reducing voltage with the benefits of reducing heat. When undervolting we want to drop voltages as low as possible without decreasing the load that a frequency step can handle. If voltages are dropped too low the need to jump to higher frequencies negates the benefit of running lower voltages. At this point, stability is also compromised. In order to change your CPU voltage table add the following line to your init.d script:
echo "1337 1300 1275 1250 1225 1200 1175 1150 1125 1100 1075 1050 1025 1000 975 950 925 900 875 850 825 800 775 750 725 700 687 675" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
The voltage table above has been rescaled and undervolted such that heat production is decreased while performance and stability are maintained. Battery consumption correspondingly decreases as less voltage is drawn by each freq step. Lower voltages are used across the entire table yet the undervolting is not very severe, if voltages are dropped any lower the load that each freq step can handle begins to decrease and introduce instability. The lowest and highest freq, where CPU utilization is highest, are undervolted the most. The voltages supplied by the table are optimal for the load each freq step needs to process, which is indicated by improved CPU scaling. CPU load is lower and more stable, low to mid range freq are used more, and upper range freq are used less. The CPU responds to changes in load more appropriately; while in a low load state we are much more likely to jump to a midrange feq than an upper range freq.
GPU Voltage Table:
The GPU voltage table sets the voltages that are supplied to freq in the freq table. Hundsbuah's voltage table is nearly optimal. The voltage supplied to 700 mhz (1425 mV) cannot be dropped without negatively impacting performance. That being said, the voltages supplied to lower freq can be dropped and rescaled such that performance is maintained. The following voltage table reduces heat production and battery consumption without impacting performance and stability. To edit your GPU voltage table add the following line to your init.d script:
echo "1425 1375 1325 1275 1225 1175 1125 1075 1025 975 925" > /sys/devices/system/cpu/cpu0/cpufreq/gpu_voltage_control
I/O TWEAKS:
I/O (input/output) refers to the communication between an information processing system and external sources (users, network cards, monitors etc). I/O operations involve an input device, a processing unit, and an output device. Whether or not a device is classified as input or output depends on one's perspective because many devices can serve as an input or produce output. Within computer architecture the CPU is the processing unit and main memory (RAM) is the output device. Any operation involving the transfer of data to/from this combination (ex - from an SSD) is considered I/O. I/O operations utilize both slow-access bulk storage (ROM) and fast-accesss memory (RAM), which prevents the CPU from processing flows of information at the same rate in both directions. The bottleneck introduced by R/W operations on slow-access storage often underlies laggy/unresponsive performance. I/O scheduling is utilized to avoid lag/stuttering that results from disparate rates of information processing.
Scheduler:
I/O schedulers control the flow of information between input devices, processing units, and output devices. Schedulers utilize algorithms to maximize the efficiency of I/O operations. Thus, I/O performance is significantly impacted by the scheduler that we use. To evaluate each scheduler's performance both Quadrant and Android Tuner were used; Quadrant for global I/O performance, Anroid Tuner for specific R/W speeds. I ran all schedulers through 6 trials in Quadrant and 6 trials in Android Tuner to control for variability in test scores and the effects of confounding variables. Following trials I calculated the mean R/W speed of each scheduler for all tested file sizes. Mean memory, I/O and total Quadrant scores were also calculated. Schedulers were then ranked from 1-6 within the previous measures. Finally, schedulers were ranked globally based on the mean of all within measure ranks. Results are as follows:
1)sio
2)deadline
3)row
4)cfq, noop
5)bfq
While the aforementioned ranks accurately reflect global I/O performance schedulers excel in a different areas. I suggest checking out my data at the following link and selecting the scheduler that is optimal for your system - https://www.dropbox.com/s/iie89tn33qe07j8/Lucius.Zen - IO Scheduler Data.xlsx?m=.
NOTE - CROMi-X Users - The following tweak is applied by default in CROMi-X.
To change your scheduler to "sio" add the following line to your init.d script:
echo "sio" > /sys/block/mmcblk0/queue/scheduler
echo "sio" > /sys/block/mmcblk1/queue/scheduler
NOTE - Detailed descriptions of each scheduler can be found at the following link - http://forum.xda-developers.com/show....php?t=1369817.
NOTE - Additional I/O tweaks can be found in the "I/O Scheduler Tweaks" section in post #3.
Structural/Clerical Section
METADATA:
INTRODUCTION:
Please advance through post #1 in the order I have laid out. I include prompts to links or other sections when necessary. I suggest reading the entire guide before applying any tweaks. See the "Appendix" section (post #3) for additional tweaks, mods, and useful resources.
Kernel Compatibility:
I am running Hundbuah's latest kernel. However, these tweaks should work well with other kernels (ex - _that's kernel).
Android Version/ROM:
This guide is based on the latest version of the android 4.2 ROM CROMi-Xenogenesis by sdbags. The modifications made in newer versions of android should have little impact on the effectiveness of these tweaks.
Init.d Scripts:
CROMi-X and other users can utilize the appropriate scripts attached to post #1 to apply tweaks implemented via init.d. To activate the script simply save it and remove the .txt appendage at the end of the file. See "Step #5: Enable Your Script" in my guide to writing init.d scripts for application instructions - http://forum.xda-developers.com/showthread.php?t=2198510.
Caution:
It is not possible to brick your device by applying the tweaks/mods in this guide. I have done terrible things to my tablet and she still works like a charm. However, I suggest taking a Nandroid backup of your /system, /data, and boot partitions before proceeding (see "Data2SD/ROM2SD" section in post #1).
Disclaimer/Support:
I am not a developer. I am simply an android enthusiast. I can guarantee that if you thoroughly follow the instructions in this guide you will not run into any issues. That being said I will not hold your hand. I have spent an immense amount of time ensuring this guide is incredibly thorough and easy to follow. I welcome all feedback relating to how this guide can be improved and promise I will do all I can to help anyone with issues. However, I have already spent far too many hours preparing this guide. I only ask that you do your best to avoid being a dumbass.
Happy Tweaking!
Lucius
IMPLEMENTATION GUIDE:
The following list outlines how I set up my system on a microSD formatted for ROM2SD (related section - "Data2SD/ROM2SD" - post #1). This roadmap is meant to simplify the overall application of this guide. Detailed instructions can be found in post #1 & #3. System files and installable mods can be obtained through links in the "Basics" section in post #1.
1) Wipe old data for fresh install (see "Data2SD/ROM2SD" - post #1).
- Boot into TWRP
- Install mount-rom2sd.zip (attached to post #1)
- Wipe cache, dalvik, system, data, and internal storage
- Format /data
- Power off
2) Install system and mods (see "Data2SD/ROM2SD" - post #1).
- Boot into TWRP
- Install CROMi-X to microSD
- Install mount-rom2sd.zip
- Install CrossBreeder mod (see "CrossBreeder Mod/AdAway App" - post #3)
- Install Disable_Journal.zip (attached to post #1 - see "Disable Ext4 Journalling" - post #3)
- Reboot System
3) Disable unnecessary apps (see "Disable Apps" - post #3).
4) Modify CPU/GPU profiles (see "CPU/GPU Freq Caps" - post #1).
5) Apply init.d script (attached to post #1 - see my guide to init.d scripting for application instructions - http://forum.xda-developers.com/showthread.php?t=2198510).
6) Disable CrossBreeder's governor & I/O tweaks (See Step #2 in "CrossBreeder Mod/AdAway App" - post #3)
7) Disable boot animation (see "Disable Boot Animation" - post #3).
8) Remap dock keyboard (see "Remap Dock Keyboard" - post #3).
9) Enable AdAway app & reboot when prompted (see "CrossBreeder Mod/AdAway App" - post #3).
CHANGE LOG:
Code:
[B]Feb.24/14:[/B]
- Added "Step #2 - Disable CrossBreeder's Governor & I/O Tweaks" in the "CrossBreeder Mod/AdAway App" section in post #3 - important for CrossBreeder mod users only
- Updated Quadrant scores in the "CPU/GPU Profiles" section in "CPU/GPU Freq Caps" in post #1
- Updated "Implementation Guide" in post #3
- Added note to "Remap Dock Keyboard Section" in post #3 - found APP_SWITCH function that invokes recent apps menu
[B]Feb.21/14:[/B]
- Added "Implementation Guide" section to post #2
- Renamed "Instructions" section in post #2 to "Introduction"
- Edited and cleaned up "Disable Ext4 Journalling" section in post #3
- Updated Power Saving mode Quadrant score in the "CPU/GPU Profiles" section in post #1
[B]Feb.20/14:[/B]
- Added new flashable .zip (Disable_Journal.zip) for disabling journalling - old one wasn't configured for our device - thanks LetMeKnow!
- Updated Quadrant scores in the "CPU/GPU Profiles Section" in post #1 and added screenshots
[B]Feb.19/14:[/B]
- Added "I/O Scheduler Tweaks" section to post #3
- Updated scripts to include aforementioned changes
- Added note to "Scheduler" section in post #1
[B]Feb.18/14:[/B]
- Added "Disable Logging/Logcat" section to post #3
- Updated scripts to include aforementioned change
- Reorganized post #3
[B]Feb.17/14:[/B]
- Added "Disable EXT4 Journaling" section to post #3
- Added "Set GPU FPS Limit" section to "CPU/GPU Freq Caps" in post #1 - thanks LetMeKnow!
- Added "Search Applications Provider" to "Disabled Apps" section in post #3
Updates Related to CROMi-X:
- Updated script for CROMi-X 5.3a compatibility
- Updated "Cromi-X Installer Options" section in post #3
- Added note to "TCP/IP Protocols and Congestion Algorithms" section in post #3
- Added note to "Scheduler" section in post #1
[B]Jan.13/14:[/B]
- Caught up on editing, reformatting, and reorganizing - fewer errors, clearer instructions, increased consistency across post #1-3 - not a single sub section made it out unscathed :)
- Modified intro to post #1
- Changed "Introduction" section in post #2 to "Instructions"
- Added "Init.d Scripts" section to "Instructions" section
- Added Google Search, Search, and User Dictionary to "Disabled Apps" section
- Added link to my TCP congestion algorithm data in "Optimal TCP Congestion Algorithm" section
Updates Related to CROMi-X:
- Updated script for CROMi-X users, please use new script for compatibility reasons - script was altered and renamed as entries in sdbags 50CleanTWEAKS script need to be removed or overwritten for compatibility reasons - see notes below
- Added note to "max_boost" in the "Interactive Governor Tweaks" section
- Added note to "Optimal TCP Congestion Algorithm" in the "TCP/IP Protocols and Congestion Algorithms" section
- Added note at the top of the "Interactive Governor Tweaks" section
- Added note at the top of the "Hotplug Config" section
[B]Jan.5/14:[/B]
- Updated CPU voltage table - midrange voltages rescaled and undervolted more - results in less heat, less battery consumption, greater usage of mid range freq, lower and more stable cpu load, feels more responsive, benchmark scores maintained, no decrease in stability thus far - attachments also updated
- Apologies for the many updates, voltage table tweaking can be finicky, tends to be a work in progress, should be the last for a while
[B]Jan.4/14:[/B]
- Changed top voltage (1.9 Ghz) in CPU voltage table from 1350 mV to 1337 mV as it is running much more stable - attachments also updated
[B]Jan.3/14:[/B]
- Moved "Introduction" to post #2 - ran out of room in post #1
- Added "GPU Voltage Table" section to the "Kernel Tweaks" section in post #1
- Uploaded a copy of the scripts I use - download and remove the .txt appendage to use - see my guide to writing init.d for application instructions
[B]Jan.2/14:[/B]
- Added "CPU Voltage Table" section to the "Kernel Tweaks" section in post #1
[B]Dec.30/13:[/B]
- Added "Disable Boot Animation" section to post #3
[B]Dec.27/13:[/B]
- Updated links to descriptions of governors/schedulers as they were out of date
- Added "Noozxoide Settings" section to post #3
- Added "Optimal TCP Congestion Algorithm" section to "TCP/IP Protocols and Congestion Algorithms" in post #3
- Added note to "Remap Dock Keyboard" section
- Cleaned up "Data2SD/ROM2SD" section
[B]Dec.26/13:[/B]
- Added "Remap Dock Keyboard" section to post #3 - thanks berndblb!
[B]Dec.23/13:[/B]
- Added "TCP/IP Protocols and Congestion Algorithms" to Appendix
- Went through and edited entire guide several times over to make everything as clear and easy to read as possible
[B]Dec.19/13:[/B]
- Added "I/O Tweaks" section
- Updated "Introduction" section (disclaimer)
- General cleaning, editing, clarification
[B]Dec.17/13:[/B]
- Cleaned and updated "Data2SD/ROM2SD" section - thanks _that and Thibor!
- Updated "Caution" section
[B]Dec.16/13:[/B]
- Tested CROMi-X 5.2.3, updated guide to reflect new changes - thanks sdbags!
- Changed "Introduction" section significantly
- General editing, cleaning, and reorganizing - simpler, more concise, easier to understand :)
[B]Dec.15/13:[/B]
- Added max_normal_freq tweak to "Interactive Governor Tweaks" section
- Added scaling_min_freq tweak to "Frequency Table Tweaks" in the "Kernel Tweaks" section
- Moved "CrossBreeder Mod/Ad Blocking" section to post #3
- Fixed typo in "Set CPU Freq Caps" in the "CPU/GPU Freq Caps" section - first line editing core 2/3/4 were improperly labelled as core 1 - copy/paste error, sorry guys
[B]Dec.14/13[/B]
- More editing - Arghhhhhh!!!
- Added "CROMi-X Installer Options" and "Disabled Apps" sections to post #3
- Updated "Special Thanks" section in post #3
- Updated "CPU/GPU Freq Caps" section - dual/quad core modes are no longer needed to increase utilization of the entire freq table - better performance without hurting efficiency or battery life
- Added quadrant scores to "CPU/GPU Profiles" section
- Reorganized "Interactive Governot Tweaks" section - ready to add the most powerful governor tweak thus far
[B]Dec.13/13[/B]
- Added "Disclaimer" section in "Intro"
- Updated Post #2 and #3
- More editing
[B]Dec.12/13:[/B]
- General cleaning, reorganizing, editing
- Ready for more tweaks
[B]Dec.6-11/13:[/B]
- And the updating begins...
- Updated "Introduction", "Basics", "Data2SD/ROM2SD", and "CrossBreeder/Ad Blocking" sections
- Updated "CPU/GPU Profiles" and "Stock (Interactive) Governor Tweaks" section
- Added "Hotplug Config" Section
SPECIAL THANKS:
This guide would not have been possible without the support of the xda community. I would like to take this opportunity to thank the community at large for all of your support. I would also like to formally thank the following individuals:
@Dees_Troy for bringing TWRP to our device.
@scrosler for the original CleanROM.
@clemsyn for his awesome kernel development.
@sdbags for CROMi-X and his incredible support.
@Hundsbuah for Hundsbuah's Kernel and explaining the inner-workings of kernel tweaking.
@_that for ROM2SD, kernel development, and his incessant need to challenge everything that I do. Thank you for helping keep my brashness in check, tolerating my lack of knowledge, and explaining rather than simply lecturing.
@Mistar Muffin for Data2SD
@idcrisis and @fivefour for their CrossBreeder Mod and sticking it to the man.
@buhohitr for the essential. support he provided during my initial foray into the "Android Development" section
@LetMeKnow for GPU fps unlocking, Disable_Journal.zip, sharing his results, and general support.
RESEARCH AND TESTING:
In order to evaluate a tweak I conduct experiments using a pretest-posttest design, which involves comparing mean pretest/posttest scores within and between a test group and a control group. Both groups are subjected to testing before the application of the experimental manipulation to establish an estimate of baseline performance in the measure of interest. Following pretests the experimental manipulation is applied to the test group while the control group is left constant. Posttest measures of both groups are then made. The mean score of both groups in pretests and posttests are calculated. To evaluate the overall effect of the experimental manipulation mean posttest scores are compared between the test and control group. If mean scores in the test group are greater than the control group then it is likely that the experimental manipulation was effective. Statistical hypothesis tests are needed to validate the comparison by ensuring within group variability does not exceed between group variability. If within group variability is higher than between group variability we cannot be sure that our mean scores are actually different. The pretest posttest design gives us the ability to evaluate changes within both groups as well. This is done by comparing mean pretest to protest scores within each group. If the control group made statistically significant improvements between the pretest and posttest this decreases our confidence in the validity of our between group comparison; unless the change within the control group can be accounted for. To create a test and control group ROM2SD was used to install two seperate systems on the same microSD card (32GB Sandisk UHS-1). One install was utilized as the control group, the other was utilized as the test group. Both setups were exactly the same in all respects to ensure accurate comparisons of mean test scores. The tweak being applied represents the experimental manipulation. Each tweak was tested in a separate experiment on a clean system. In between blocks Sd Maid was used to clear caches and junk files and dalvik/cache were cleared via TWRP. Various benchmarking and system monitoring tools were used to measure performance. While benchmarking and system monitoring tools are great they are not perfect. Thus, the effect of each tweak was subjectively tested in real world use for 3 days at minimum. Generally speaking I do not put much faith in others' subjective opinions; however, I make sure I know exactly what to look for with respect to a tweaks impact on performance. This is the point where I ask you to momentarily suspend disbelief, take my word for it, and try these tweaks for yourself. If you think I am nuts after all the more power to you.
Additional Resources
APPENDIX - USEFUL RESOURCES/TWEAKS/MODS:
CROMi-X INSTALLER OPTIONS:
I select the following options during the CROMi-X installation process:
DPI - 200
Launcher - Apex Launcher
Sound Manager - X-Loud Audio Mod (Noozxoide)
Tweaks - Browser2RAM, Zip Align .apks
Apps - AdAway App
Hard Core Tweaks - Force GPU Rendering
DPI Settings:
DPI, or dots per inch, determines how images are rendered across the pixels on your display. Setting DPI to a lower value results in content looking smaller. Changing DPI settings will not impact performance. 240 DPI is standard for most tablets because it makes things easiest to see/use for the widest number of people. 200 is better if you use your tablet as a laptop replacement because more content can be displayed at any given time.
Launcher:
I suggest using Apex Launcher. It has great features that extend functionality if desired. The UI is also incredibly customizable and can be stripped down to the bare essentials. Disabling features and cleaning up the UI is more important to me than adding features. Apex also won an award for top 5 apps in 2012 from xda. Make sure you select "Lock launcher in memory" in Apex's "Advanced Settings".
NOOZXOIDE SETTINGS:
The optimal noozxoide settings depend on the speakers you are using. I am utilizing the following settings for our tablets built-in speaker.
Noozxoide Xlimiter Processor:
- Compress and reduce overload for smooth audio - Enabled
- Select Effect Strength - Hard
Noozxoide Balanced X-EQ Processor, Noozxoide Maxxbass Processor:
- Deliver balanced natural soundstage and premium bass - Enabled
- Digital Presets - Cinema
- Noozxoide VE-Engine - Stongest
Noozxoide Logic Surround ES Processor:
- Create VSUR on practical monitors and widen the soundstage - Enabled
- Create Room Size - Live
CROSSBREEDER MOD/ADAWAY APP:
The CrossBreeder Mod utilizes 5 techniques to reduce lag. See the CrossBreeder mod link in post #1 for further details. From my experience it noticeably improves web page loading speed and the responsiveness of apps relying on mobile networks. It also completely removes ads instead of covering them with the "Web Page Not Availabe" dialogue. In order to enable ad removal you will need the CrossBreeder mod and AdAway app (obtained via the CROMi-X installer or the following link - http://forum.xda-developers.com/showthread.php?t=2190753).
Step #1 - Enable CrossBreeder:
If you did not install CrossBreeder during your system installation download the CrossBreeder mod and move it to your external storage. Boot into TWRP and install CrossBreeder (if you are flashing to a microSD make sure device nodes are set correctly). Wipe cache/dalvik and reboot.
Step #2 - Disable CrossBreeder's Governor & I/O Tweaks:
The CrossBreeder mod implements governor and I/O tweaks that may interfere with the application of the tweaks in this guide. To disable CrossBreeder's governor and I/O tweaks open a root explorer and navigate to the following file:
/system/etc/CrossBreeder
Next remount the /system partition as rewritable (see "Step #5 - Enable Your Script" in my guide to writing init.d scripts for details - http://forum.xda-developers.com/showthread.php?t=2198510). Once your /system partition is mounted as rewritable locate the following files:
/system/etc/CrossBreeder/START_TWEAKING_GOVERNOR
/system/etc/CrossBreeder/START_TWEAKING_IO
And change their name to:
/system/etc/CrossBreeder/STOP_TWEAKING_GOVERNOR
/system/etc/CROssBreeder/STOP_TWEAKING_IO
Step #3 - Enable AdAway App:
Once you have rebooted open the AdAway app. Select "Download Files and Apply Ad Blocking". Reboot your system when prompted. All ads should now be completely removed.
REMAP DOCK KEYBOARD:
To remap the dock keyboard we need to edit the following file using a text editor:
/system/usr/keylayout/asusdec.kl
I suggest backing up this file to an additional location before you begin editing. To remap a particular key simply delete the function to the right of the key's number and replace it with the desired function. Once you are done editing save the file and reboot your tablet.
EXAMPLE:
key 142 SLEEP WAKE UNLOCK
key 142 FORWARD_DEL WAKE UNLOCK
NOTE - Invoking the APP_SWITCH function opens the recent apps menu.
NOTE - The files below asusdec.kl contain the keyboard mappings for various external keyboards (ex - generic PC keyboards). I suggest checking out these files as they contain numerous functions that can be remapped to our keyboard dock (ex - escape).
NOTE - For a list of useful keyboard shortcuts see the following thread - http://www.transformerforums.com/fo...list-shortcut-keys-keyboard-dock.htmlhortcuts
DISABLE APPS:
Disabling the following apps will not impact basic functionality, cause instability, or boot looping. However, I primarily use my tablet as a laptop replacement; therefore, I offload many functions that I find better suited to my phone (ex - location based anything, lockscreen, daydream, etc).
Asus Battery
Asus Sync
Basic Sleep Mode Apps
Bluetooth Share
Calculator
com.android.backupconfirm
com.android.lockscreen
com.android.providers.partnerbookmarks
com.android.sharedstoragebackup
com.asus.pcsynclauncher
com.asus.quicksearch
com.asus.youtubesearch
com.google.android.voicesearch
Gallery
Google Backup Transport
Google Partner Setup
Google Search
Google Text-to-speech Engine
Live Wallpaper Picker
Market Feedback Agent
Mobile Data
Mobile Network Configuration
MusicFX
Network Location
Photo Screensavers
Search
Search Applications Provider
Setup Wizard
Setup Wizard
Sound Recorder
Talkback
User Dictionary
Wi-fi Direct Share
DISABLE BOOT ANIMATION:
Disabling the boot animation significantly reduces heat production and battery consumption brought about by the boot sequence. Core temperature ranges between 44-46 degrees celsius following a cold boot with the boot animation enabled. Core temperature ranges between 38-40 degrees celsius following a cold boot with the boot animation disabled. To disable the boot animation add the following line to the bottom of your build.prop file (found in the /system directory) using a text editor:
debug.sf.nobootanimation=1
DISABLE EXT4 JOURNALLING:
The ext4 file system utilizes journalling as a safeguard against data loss. A journalling file system keeps track of write operations in a journal before committing them to storage. In the event of a shutdown brought about by a system error it is possible for write operations to be interrupted, which may introduce inconsistencies in the file system. Instead of doing an entire file system check the journal is examined for write operations that were potentially interrupted. Thus, journalling allows ext4 file systems to quickly recover from crashes as entire file system checks can be avoided. However, write operations cannot be executed until the journal is updated and actively maintaining a journal requires memory and processing resources. Therefore, disabling journalling is advantageous from a performance perspective. I have found that disabling journalling reliably produces an increase in performance. To test I ran through 5 trials in Quadrant with journalling disabled and 5 trials with journalling enabled. On average disabling journalling increased total score by 88.2 points. The minimum and maximum total scores out of 5 trials were also much higher with journalling disabled. These results suggest that disabling journalling is a reliable way to improve performance. Follow the steps below to disable journalling:
Step #1:
Download Disable_Journal.zip (credit - @LetMeKnow) from post #1 and move it to your microSD card.
Step #2:
Boot into TWRP and install Disable_Journal.zip (if you are flashing to a microSD make sure device nodes are set correctly). Wipe cache/dalvik and reboot.
DISABLE LOGGING/LOGCAT:
Logcat, the android logging system, provides a mechanism for collecting and viewing system debug output. Various logs from applications, portions of the system, and kernel are recorded in logcat so that users can debug system failures/crashes brought about by errors in processes. Thus, logcat can be an incredibly useful tool for developers, testers, and advanced users. However, maintaining logcat involves recording thousands of lines of data as processes are executed, which requires system resources. Despite logcat's usefulness as a debugging tool it negatively impacts performance. To test I ran through 5 trials in Quadrant with logcat disabled and 5 trials with logcat enabled. On average disabling logcat increased total score by 20.2 points. The minimum and maximum total scores out of 5 trials were also higher with logcat disabled. Therefore, disabling logcat is advantageous for users who do not require advanced debugging capabilities. To disable logcat add the following line to you init.d script:
rm dev/log/main
I/O SCHEDULER TWEAKS:
The following tweaks improve I/O performance by modifying parameters that control the behaviour of the I/O scheduler. Detailed explanations can be found beneath each tweak.
iostats - 0
Disables I/O stats, which reduces overhead.
rotational - 0
Optimizes I/O scheduler behaviour for non-rotating storage. Scheduler no longer uses logic meant to reduce seek times.
rq_affinity - 1
Forces the kernel to process I/O requests on the CPU core that issued the request. Improves the effectiveness of CPU data caching.
nr_requests - 1024
Increases the size of the I/O request queue so that more requests can be sorted before execution.
read_ahead_kb - 6144
Increases the size of the read-ahead cache, which improves the reading of sequential data.
To evaluate the effectiveness of the above tweaks I compared mean R/W speeds of various file sizes following the application of each tweak. The above parameters represent independent variables (experimental conditions) and R/W speed, measured via Android Tuner, represents the dependent variable. I subjected each experimental condition to 5 trials to control for variability in test scores. In the first set of trials no tweaks were applied in order to establish a baseline measure of R/W speed (baseline condition). After establishing baseline performance each tweak was applied and tested in a sequential manner (experimental conditions C0-C4). Following trials the mean R/W speed of each file size was calculated for each experimental condition. In order to compare the impact of each tweak the total mean R/W speed of each experimental condition was also calculated. Global R/W speed increased sequentially following the application of each experimental manipulation. These results suggest that all of the aforementioned tweaks have a positive and measurable impact on I/O performance. You can find an excel chart detailing my results at the following link - https://www.dropbox.com/s/ezkbenk1ruql9rt/Lucius.Zen - Scheduler Tweaks Data.xlsx?m=.
To apply the above tweaks add the following lines to your init.d script:
MMC=`ls -d /sys/block/mmc*`;
for i in $MMC;
do
echo "0" > $i/queue/iostats;
echo 0 > $i/queue/rotational;
echo "1" > $i/queue/rq_affinity;
echo 1024 > $i/queue/nr_requests;
echo "6144" > $i/queue/read_ahead_kb;
done;
echo "6144" > sys/devices/virtual/bdi/179:0/read_ahead_kb
TCP/IP PROTOCOLS AND CONGESTION ALGORITHMS:
TCP/IP is a core set of communication protocols used to transfer data over the Internet and similar networks. IP packets are the vehicle devices use to transfer data between an application program and a web host. They are comprised of a header, which contains the source/destinatin address (among other things), and a payload, which contains the actual data. TCP, part of the transport internet layer, provides intermediate communication between an application and a host. When sending large chunks of data a program can issue a single request to TCP instead of breaking down data into a series of IP packets and requests.
Due to network congestion and other factors IP packets are often lost. TCP maintains the ordered delivery of packets by detecting packet loss, requesting retransmission, reordering data, and minimizing network congestion. When a host receives a stream of packets it reassembles the data into the sequence that was originally sent. Once the receiver confrims the soundness of the data it sends a packet acknowledging its retrieval. To avoid overloading the connection between a program and a host this aknowledgement must occur before more packets can be sent/recieved.
For each connection TCP maintains a congestion window. The TCP congestion window is maintained by the sender and is used to prevent network congestion/overload due to packet loss. When packet aknowledments are received the size of the TCP congestion window increases exponentially until a timeout occurs or the receiver reaches its bandwidth limit. Thus, as more packets are acknowledged the maximum segment size (specifies the largest amount of data in a single TCP segment) of the congestion window becomes larger; every round-trip time the maximum segment size effectively doubles. A mechanism called "slowstart" controls the maximum segment size of the TCP congestion window. To prevent network overload TCP congestion avoidance algorithms modify TCP window size, "slow-start", and the slow-start threshold. Thus, TCP congestion avoidance algorithms have a significant impact on the speed of packet delivery between an application program and a web host.
Optimal TCP Congestion Algorithm:
NOTE - CROMi-X Users - The following tweak is applied by default in CROMi-X.
My research and testing suggests that "lp" is the optimal TCP congestion algorithm. Although "westwood" produces marginally higher download/upload speeds (see the following post - http://forum.xda-developers.com/showpost.php?p=48088128&postcount=1884) "lp" results in a stronger connection between an application and a host; which is indicated by fewer timeouts, lost connections, and more responsive web browsing. This leads to the best overall user experience. To change your TCP congestion algorithm to "lp" add the following line to your init.d script:
/system/xbin/sysctl -w net.ipv4.tcp_congestion_control=lp
I salute you just for write this up. Thanks!!!! :good::good:
Thank you very much for this very detailed guide :good:
Thanks so much for this write up :good: just one question with regards to vsync, there seenms to be a lot of people that have experienced battery drain and/or screen tearing (especially during gaming) when disabling vsync, have you noticed this with the tf700?
yew123 said:
Thanks so much for this write up :good: just one question with regards to vsync, there seenms to be a lot of people that have experienced battery drain and/or screen tearing (especially during gaming) when disabling vsync, have you noticed this with the tf700?
Click to expand...
Click to collapse
I cannot report on the effects of disabling vsync on gaming because I do not play on games on my tablet. I havent experienced excessive battery drain or screen tearing during any benchmarks or stress tests that ive used. I dont experience any while watching a 1080p youtube video in a floating browser while reading multiple articles on the web with lots of pinching and zooming. If i were going to ever experience screen tearing, I imagine that would do it lol.
lucius.zen said:
I cannot report on the effects of disabling vsync on gaming because I do not play on games on my tablet. I havent experienced excessive battery drain or screen tearing during any benchmarks or stress tests that ive used. I dont experience any while watching a 1080p youtube video in a floating browser while reading multiple articles on the web with lots of pinching and zooming. If i were going to ever experience screen tearing, I imagine that would do it lol.
Click to expand...
Click to collapse
Thanks, will give it a try.
I'm pmr there is an option for compressed ram, what choice do you use?
Sent from my MB865 using xda app-developers app
yew123 said:
Thanks, will give it a try.
Click to expand...
Click to collapse
I don't think you can disabled vsync on tf700. Even if you disable vsync in PMR it does nothing.
Great guide. Is there any way of making a flash able zip so we don't have to re do it all when we upgrade rom?
Sent from my Xperia S using XDA Premium HD app
ishamm said:
Great guide. Is there any way of making a flash able zip so we don't have to re do it all when we upgrade rom?
Sent from my Xperia S using XDA Premium HD app
Click to expand...
Click to collapse
+1 and an uninstall zip
Sent from my ASUS Transformer Pad TF700T using xda premium
Where exactly in the internal storage do the zip files for apps go if you have data2sd enabled?
---------- Post added at 05:06 PM ---------- Previous post was at 04:46 PM ----------
And has anyone else had an issue where the network tweaks cause your Wifi to be disabled? I had to stop using them because of this.
gvsukids said:
I'm pmr there is an option for compressed ram, what choice do you use?
Sent from my MB865 using xda app-developers app
Click to expand...
Click to collapse
Only tweaks that are included are mentioned. Dont implement zram compression. Its an old optimization meant for lower end devices. It will reduce performance rather than improve it.
buhohitr said:
+1 and an uninstall zip
Sent from my ASUS Transformer Pad TF700T using xda premium
Click to expand...
Click to collapse
I include instructions on creating rescue packages in my guide, i will upload my .zip for PMR today.
primaleph said:
Where exactly in the internal storage do the zip files for apps go if you have data2sd enabled?
---------- Post added at 05:06 PM ---------- Previous post was at 04:46 PM ----------
And has anyone else had an issue where the network tweaks cause your Wifi to be disabled? I had to stop using them because of this.
Click to expand...
Click to collapse
I include instructions on how each partition and storage point is mounted in data2sd, see the "Note" at the end of Step #3.
buhohitr said:
I don't think you can disabled vsync on tf700. Even if you disable vsync in PMR it does nothing.
Click to expand...
Click to collapse
It doesnt have any impact on benchmark scores but I noticed flash elements in web pages were rendering faster with it enabled, especially when maximizing fullscreen flash videos. It used to take 3 sec for the GPU to render a streaming flash video when switched to fullscreen, now it takes around .8s.
I used to hate using flash. Which sucks, bc i use flash a lot, so I have spent a lot of time trying to optimize web browsing and flash. It still isnt perfect, but at least performance and stability are comparable to a laptop now. It just works better. At least it does exactly what you expect, no more errors, or unresponsiveness. The experience of consuming media over the web is much better overall after implmenting all my tweaks.
IF YOU HAVE A QUESTION, PLEASE REREAD THE INSTRUCTIONS IN DETAIL BEFORE ASKING IT.
I have answered 4 questions already that I really did not need to answer. The answers were already included somewhere in my guide. I dont mind answering questions, however, i wrote the guide with so much detail for a reason lol. The answers are there, please make sure you are thorough when reading my guide, I was quite throrough when I wrote it .
primaleph said:
Where exactly in the internal storage do the zip files for apps go if you have data2sd enabled?
---------- Post added at 05:06 PM ---------- Previous post was at 04:46 PM ----------
And has anyone else had an issue where the network tweaks cause your Wifi to be disabled? I had to stop using them because of this.
Click to expand...
Click to collapse
I havent had any network connection issues any my internet is terrible. I get a max download speed of 1.2 mb and only 50% signal strength in my bedroom. I have actually noticed wifi performance is better. Webpages open instantaneously, like apps do. Loading a new page in xda.com takes less than one sec, it basically happens instantly. Right now my signal is full strength, webpages are loading really fast, and streaming stuff is a pleasure. When I get my new phone I will definitely do up a video review on wifi performance and web browsing so you can see how fast web pages load.
ishamm said:
Great guide. Is there any way of making a flash able zip so we don't have to re do it all when we upgrade rom?
Sent from my Xperia S using XDA Premium HD app
Click to expand...
Click to collapse
I have had some issues creating a flashable .zip for PMR tweaks, the method I thought I could use doesn't work the way I anticipated. If I can figure this out I will post it, however, in the mean time it is really easy to apply the tweaks yourself. Now that I know which tweaks to apply it takes less than 5 min. Once youve done it twice you should have it memorized no problem

[KERNEL] [ROOT] [SM-N920T/W8 Exynos 7420] [19 Feb] SkyHigh TW 5.1.1 Kernel [v4.5]

[KERNEL] [ROOT] [SM-N920T/W8 Exynos 7420] [19 February] SkyHigh TW 5.1.1 Kernel [ v4.5 ] [Synapse ++]
*** DEVELOPMENT & SUPPORT CEASED FOR 5.1.1 ***
WARNING
Code:
[COLOR="Red"]PLEASE SHOW RESPECT TO ACTUALLY [COLOR="PURPLE"][B]READ POSTS #1-3[/B][/COLOR]
[URL="http://forum.xda-developers.com/announcement.php?a=81"][B]XDA RULE #1 "SEARCH BEFORE POSTING"[/B][/URL] (GOOGLE, XDA & THREAD),
IF YOU DON'T LIKE A UP-FRONT "MATTER OF FACT" APPROACH,
[B]THEN DON'T BOTHER POSTING[/B]. [/COLOR]
FEATURES
Code:
* Based on official Samsung source: [URL="http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=n920"]Samsung OSRC[/URL]
* ramdisk source: N920TUVS2COKC
* Compiled with Linaro gcc-linaro-4.9-2015.02-3-x86_64_aarch64-linux-gnu
* Linux 3.10.96
* [COLOR="red"]AUTO-ROOT binary v2.52[/COLOR] & Install busybox v1.24.1-Dorimanx
* [COLOR="Red"]KNOX WARRANTY VOID: 1[/COLOR]
* [COLOR="red"]SELinux PERMISSIVE[/COLOR] (for Titanium Backup and other apps to work correctly)
* adb insecure
* stock dt.img
* init.d script support (drop in script & set permissions to 755 or 777 and reboot)
* [COLOR="red"]DEEP SLEEP FIX[/COLOR]
* [COLOR="red"]IN-CALL REBOOT BUG "FIX"[/COLOR]
* Possible Screen Mirroring / AllShare Cast fix
* Secure storage = false (should prevent WIFI settings & passwords wiping on reboots)
* RAM management tweaks
* GearVR [U]reported[/U] working (depends on ROM/firmware version installed)
* [B]Synapse app support[/B] for many kernel configurations + more !!
* Many descriptions are in the app ! If you require more info, don't be lazy, please [B]SEARCH[/B] like I did ;)
SYNAPSE FEATURES
ABOUT
PayPal Donation link
SkyHigh kernel thread link
Up time
Total
Sleep
Awake​
A57 CPU
A57 big Cores Frequency Scaling
live frequency
MAX: 2400 MHz (stock 2100 MHz is default)
MIN: 500 MHz (stock 800 MHz is default)​
A57 VOLT
HPM voltage control
A57 big Cores voltage control
A53 CPU
A53 LITTLE Cores Frequency Scaling
live frequency
MAX: 1600 MHz (stock 1500 MHz is default)
MIN: 200 MHz (stock 400 MHz is default)​
A53 VOLT
HPM voltage control
A53 LITTLE Cores voltage control
CPU GOV
CPU governors
interactive (default)
on-demand
conservative
ktoonservative (hotplug)
userspace
performance​
Interactive governor live load at current frequency (A57+A53)
Interactive governor tuning (profiles)
Default
Battery
Performance​Turbo Mode​
A57 GOV
A57 governor tunables
A53 GOV
A53 CPU governor tunables
MULTICORE
HMP threshold tuning profiles
Default
Performance
Battery​
HMP threshold controls for up/down migration
Power Aware Scheduling control
HMP LITTLE Packing
PEWQ (Power-efficient Workqueues) control
Exynos Core Control Interface (choose 5 > 8 cores online)
CPU STATS
CPU0 time in state
CPU4 time in state
BOOST
Input-Booster profiles
key
touchkey​
GPU
GPU stats
Current clock freq
Live Frequency Utilization (load)
Time in state​
GPU power policy control
coarse_demand (default)
demand
always_on​
GPU frequency scaling
Max freq control to 852 MHz (700 MHz is default)
Min freq control to 100 MHz (stock 266 MHz is default)​
GPU Governor
Default
Interactive (default)
Static
Booster (more graphic and benchmark performance)​
GPU Interactive Governor tunables
highspeed clock
highspeed load
highspeed delay​
GPU VOLT
HPM voltage control
GPU voltage control
THERMAL
Sensor temperatures
A57
A53
GPU
ISP​
CPU thermal control
normal temp
critical temp​
GPU thermal control
On/Off thermal manager
temp levels 1 > 5
throttling freq levels​
Memory thermal control
normal temp
critical temp​
ISP (Image Signal Processor) thermal control
temp levels 1 > 5​
BUS
Memory Bus HPM voltage control
Memory Bus voltage control
Internal Bus voltage control
ISP (Image Signal Processor) voltage control
IO
I/O Schedulers
BFQ (tweaked for SSD)
DEADLINE (tweaked for SSD)
FIOPS
CFQ = default (tweaked for SSD)
NOOP
ROW (tweaked)​
Storage read-ahead (256 KB)
General IO tuneable
Add random
IO stats
Rotational
No merges
RQ Affinity
NR requests​
I/O scheduler tunables
MEMORY
Memory state
Total
Free​
Low Memory Killer Profiles
Low
Medium
Custom (recommend)
Default (default)
Aggressive
Exterminate​
Low Memory Killer minfree tuning (OOM LMK)
Adaptive Low Memory Killer
vmpressure_file_min​
Samsung SPCM Service control (Enabled = default/stock)
Ultra Kernel SamePage Merging (UKSM)
UKSM stats
Scan Delay Interval
UKSM Governor
Max CPU consumption​
Dynamic FSYNC control (enabled)
Dynamic dirty page writeback control (enabled)
Dirty writeback active
Dirty writeback suspend​
Virtual Memory
Virtual NAND Swap control (VNSwap)
ZSwap memory pool
Adaptive Dirty Background Ratio on suspend / resume
Adaptive Dirty Ratio on suspend / resume
Drop caches (Clear VFS cache after boot)
Laptop Mode
Swapiness
Adaptive vfs_cache_pressure on suspend / resume​
ADVANCED
Entropy (max 4096)
Gentle Fair Sleepers control (disabled)
Arch Power control (enabled)
randomize_va_space control
pm_freeze_timeout control
Google Play Services Battery Drain Fix
Driver wakelock controls
SensorHub
ssp_sensorhub​SSP
sig_motion_sensor
pickup_gesture
grip_sensor
tilt_detector
proximity_sensor​bcm4773
bcm4773_gps​
POWER SUSPEND
Modes:
Autosleep
Userspace
Display Panel
Hybrid (Autosleep + Display Panel) = default​
PowerSuspend State (enable only with Userspace mode set)
Version push button
AUDIO
(Sound Control by AndreiLux)
Jack media volume control
L/R channel volume
mono mixer​
Speaker volume control
Earpiece volume​
Main Equalizer
Advanced Stereo Equalizer
SCREEN
Live panel brightness
sweep2sleep control
NETWORK
TCP congestion control
All available enabled.
Default = westwood+​
Screen mirror/allshare cast fix control (enabled)
Clean WIFI Lease
WIFI Passwords
Save
Restore​
WiFi Power Mode While Screen-On/Off
Force Off
Off
Fast (default = screen ON)
Max (default = screen OFF)
WiFi DTIM Interval While Screen-On/Off​
RX wakelock timeout control
TCP/IP network security
3G DNS speed & security tweak
Google
OpenDNS
Comodo, Level3
Norton_DNS
Smart_Viper​
GPS time-zone
Original
Asia
Europe
Oceania
North America
South America
Africa​
IPV6-protocol
IPv6 Test push button
IPv6 enable / disable
optimistic detection​
SECURITY
KNOX control
NO_ACTION (default)
Disabled
Enabled​
SELinux
Live status​
BATTERY
Battery info
Charging controls
HV power supplies
A/C Mains
A/C Mains (screen-on)
Standard downstream port
Dedicated charging port
Charging downstream port
Accessory charging adapter
MHL power
Wireless power​
Store Mode
enable / disable (master control)
Store Mode Maximum
Store Mode Minimum​
Battery SCALING calibration (fuel gauge reset)
LED
LED disable control
LED Fade-in/out Time Period
LED Fade control
Fade-in
Fade-out​
Test notification push button
Stop notification push button
FS (File System)
Display FS Type
FS Controls
remount System r/w r/o
remount RootFS r/w r/o​
Scrolling cache control
Optimise Databases (SQLite3)
FSTrim lagfix
Wipe options
cache reboot
dalvik-cache reboot
cache & dalvik-cache reboot​
Clean up
clipboard cache
/data/tombstones
/data/anr logs
/data/dropbox logs
lost+found​
CORTEXBRAIN
Live status
Cortexbrain-Background-Process (Master Switch)
CortexBrain Functions
WiFi Auto
Media Manager
System-Tweaks
Kernel-Tweaks
nmi_watchdog​
CRONTAB
Live status
CronTask (Master Switch)
Cron Tasks
Clean RAM cache (every hour)
Google Service restart (every 3 hours)
Clean app cache & junk (every day at 4:30AM UTC)
clipboard cache
/data/tombstones
/data/anr logs
/data/dropbox logs
lost+found​Optimize databases (every day at 4:40AM UTC)
File system trim (every day at 4:50AM UTC)
Battery scaling calibration (every Sunday at 5:00AM UTC)​
Test Cron Task jobs
USB
USB status
USB mode selection
MTP
PTP
CD_ROM (drivedroid support)
USB_Keyboard-Mouse​
MODULES
CIFS
NTFS
ISO9660_FS
UDF
XPAD
BACKUP & RESTORE
Name - Restore - Delete - Backup
profiles
kernel image​
LOGS
Android Logger control (enabled)
LogCat​
Kernel Logger control (enabled)
dmesg
last_kmsg​
REBOOT
Reboot device
Recovery Mode
Download Mode
Power Off
Clear Synapse Data & Reboot
Restart Synapse
INFO
Reduced logging
exFAT FS support
NTFS R/W support with app
CIFS support (not tested)
ISO 9660 CDROM & UDF FS support
Frandom
mount partitions NOATIME and NODIRATIME by default
FSTrim on boot (ensure consistent IO throughput)
Entropy tweaks
Increased boot frequency
Power-efficient workqueue (PEWQ) efficiency patches
CLEANCACHE & ZCACHE
Microsoft X-BOX gamepad controller module (updated)
LZO de/compression algorithm
Slub tweaked
Much more - check source commits & Synapse
CREDITS
My family !!
@Chainfire - root & SuperSU / @Manh_IT - auto-root method
@AndreiLux - years of support for Exynos development and his various kernel features + Synapse app and UCI code
@halaszk88 - patches and Synapse code I adapted to many of my kernels
@dorimanx - BusyBox and various ramdisk tweaks/ideas
@apb_axel - I adapted and used many of the Synapse controls to suit my kernels
@arter97 - various source fixes/patches
@ktoonsez - ktoonservative hotplug governor
@LuigiBull23 - ktoonservative profiles I've adapted
XDA
Samsung OSRC
and many others!
check github source credits
IF I'VE FORGOTTEN ANYONE, PLEASE DON'T BE SHY AND SPEAK UP, THANKS
XDA:DevDB Information
SkyHigh Note 5 Exynos 7420 TMO Kernel, Kernel for the T-Mobile Samsung Galaxy Note5
Contributors
UpInTheAir
Source Code: https://github.com/UpInTheAir/SM-N920
Kernel Special Features: Synapse ++ | EXT4 | exFAT | NTFS | CIFS
Version Information
Status: Stable
Current Stable Version: 4.5
Stable Release Date: 2016-02-19
Created 2015-10-05
Last Updated 2016-03-04
Warning - ChangeLog - Requirements - Installation - Download - Source
** DISCLAIMER : FLASH AT YOUR OWN RISK **
WARNING :
Code:
[COLOR="Red"]* Under-volting can cause instability
* Over-clocking can cause freeze/reboot, heat & damage to CPU, GPU or other hardware
* Any customizations may void warranty
* May not be suitable for your device or customizations
* UpInTheAir is NOT responsible, the person you see in the mirror is !![/COLOR]
CHANGE-LOG
Open GitHub Change-Logs
Tap/click "Full Change log" under the latest version (i.e. v4.5)
Example: ALL commits (changes) for v4.4.1 > v4.5 are visible at the top section
Tap/click any commit and will display all comments in the top section and code changes in the bottom section for particular commit
REQUIREMENTS
Variant support for:
SM-N920T
SM-N920W8​
Watch >>> THIS <<<
For BUG REPORTING: Stock UNMODIFIED TouchWiz (TW) 5.1.1 ROM (this means no Xposed or tweaks etc)
Custom recovery i.e.. TWRP
INSTALLATION
If you have systemless root installed, then you must REMOVE it as this kernel will auto-root a proven and stable 2.52 binary into system.
Open SuperSU app
Select "Full unroot" option
Reboot (or flash kernel)
Re-install SuperSU app​
Uninstall any CPU control apps, tweaks and init.d scripts etc.
Recommend: Disable or remove KNOX (you can disable with Synapse once kernel is flashed)
Install Synapse app from Google Play and rate it ☆☆☆☆☆ !!
Device Settings:
Enable Developer Options > OEM UNLOCK
If flashing from previous SkyHigh kernel > Device settings > Applications > Synapse > Force Stop > clear data​
If not installed > Install SuperSU from Google Play:
Boot into custom recovery and flash SkyHigh_kernel____.zip FOR YOUR DEVICE and reboot
After boot:
a) wait at least 120 secs to stabilize
b) Open Synapse
c) Tap "Understood"
d) DO this step so some defaults are set !!
1. tap the square menu button top right hand corner
2. tap the three dots button
3. "select all globally"
4. tap the back button next to it
5. apply​
DOWNLOADS
Note5 SM-N920-T / W8 [ v4.5 ]
________________________________________________________________________
Note5 SM-N920P thread > HERE
________________________________________________________________________
OTHER Note5 international & dual SIM thread > HERE
________________________________________________________________________
S6 Edge+ SM-G928T / W8 thread > HERE
________________________________________________________________________
S6 Edge+ SM-G928C/F/G/I thread > HERE
________________________________________________________________________
S6 Edge+ SM-G928P thread > HERE
SOURCE
ALL KERNELS COMPILED WITH SAME SkyHigh SOURCE !!
Github
.
Help & FAQ
THREAD RULES & PROTOCOLS FOR THIS DEVELOPMENT THREAD:
I might not have your device variant and or able to reproduce your "issue". With this in mind, without providing as much information as possible, and resetting your device to a stable unmodified baseline, any potential troubleshooting or logs could be meaningless. So please follow the guidelines set out below. Thanks
BY POSTING YOUR ISSUES IN THIS THREAD, YOU ARE AGREE TO HELP YOURSELF FIRST BY PROVIDING INFO REGARDING:
Code:
1. DEVICE MODEL ?
2. ROM and firmware version (build number, boot-loader etc) ?
3. EXACT steps taken to reproduce YOUR issue
4. Screen-shots (if applicable)
5. Did you read Posts #1-3 completely?
6. Did you search the thread, XDA or GOOGLE?
7. Did you follow the install instructions EXACTLY?
8. What was your previous kernel?
9. Do you have any other known kernel tweaking apps, scripts or mods? ([B]remove them[/B]). [COLOR="Red"]This includes Xposed etc[/COLOR]
10. Try older kernel (if available)
11. Factory reset ?
12. Try latest stock [B]UNMODIFIED[/B] firmware (without custom ROM - if you have installed) and factory reset
13. Delete your ROM BusyBox (kernel uses it's own in /sbin)
ONLY IF YOU HAVE TRIED SUGGESTIONS ABOVE:
Turn on logging in Synapse and save logs AT TIME OF ERROR. AND post together with ALL the above information.
ELSE, DON'T WASTE MY TIME, YOU WILL BE IGNORED AND/OR POST REPORTED !!
THANK YOU :good:
NO FAST CHARGE
If using the pathetic original cable, try disconnect and reconnect the USB cable whilst power is still turned on to the charger
Use a thicker / better cable, will work every time (ie. Note4 OEM cable)
CAN I BUILD A KERNEL FOR YOUR __XX DEVICE ?
I will not build for any device that I can not compile using SAME source, personally test method or debug. Some device variants can compile with same source.
Sorry. I don't have the spare time for any more variant support.
"NO UCI SUPPORT"
It's a ROM busybox compatibility issue
Three choices:
Device > settings > applications > Synapse > force close & wipe data and REBOOT
OR
Remove your ROM busybox from /system xbin and /system/bin (Synapse will use the kernel busybox in /sbin).
Force stop Synapse and delete app data (device settings > applications)
Re-flash kernel as per Installation Instructions
OR
Try install a different busybox
Force stop Synapse and delete app data (device settings > applications)
Re-flash kernel as per Installation Instructions
Synapse or BACKUP/RESTORE ISSUES
It's a ROM busybox or sqlite3 compatibility issue
Remove both your ROM busybox & sqlite3 from /system xbin and /system/bin (Synapse will use it's own from kernel /sbin).
Device > settings > applications > Synapse > force close & wipe data
Reboot or re-flash kernel as per Installation Instructions
BACKUP & RESTORE
DO NOT restore profiles from different kernel version
Refer to THIS post for "how-to" screen-shots
Refer to THIS post for a "how-to" video (thanks @aldoblaga )
LOADABLE MODULES AREN'T WORKING
Check your /system/lib/modules directory. Are any ____.ko present?
Did you flash a ROM or wipe the system partition at any point? Doing this will remove them !
Re-flash the kernel will install the modules.
If modules aren't installed after flash, then re-flash and manually mount system in recovery first.
You can check running modules in terminal with:
Code:
lsmod
KTOONSERVATIVE GOVERNOR
Some info from the author: http://forum.xda-developers.com/showpost.php?p=60223338&postcount=3
DT2W & COLOUR CONTROL
No, I cannot make it work properly with single source for all supported variants
CPU POWER CONSUMPTION
The Samsung Exynos 7420 Deep Dive - Inside A Modern 14nm SoC (by ANANDTECH - Andrei)
F2FS SUPPORT
It's not needed. You wouldn't see any difference or measure much, if anything. Not worth the potential trade-off. This is not eMMC anymore
http://bgr.com/2015/03/17/galaxy-s6-storage-benchmarks/
STUCK ON SAMSUNG BOOT LOGO AFTER FLASH
Ensure you flashed the correct kernel for your device model
Ensure your download is not corrupted. Check MD5 hash or re-download
Your current base firmware (ROM, boot-loader version etc.) may be incompatible - UPDATE to latest with Odin and try again.
CM SUPPORT
Read Post #12
"Unauthorized actions have been detected, reboot to undo changes"
As it's a common warning found with all KNOX enabled android devices, you would have found the answer by Google search and also that it is actually unrelated to kernel and also unrelated to this kernel development..............
It is caused by the process of rooting/modifying your device. Unless you use KNOX, don't worry.
[Q] How to disable
[A] Freeze or delete your KNOX & Security related apps/processes manually (using root explorer or titanium backup (pro) or use Synapse > Security > disable KNOX
CAN I USE OTHER KERNEL CONTROL APPS
No, many features and options won't be available. Remove all other control apps to avoid conflicts !
Synapse is the recommended and has everything you need
BATTERY TIPS
Try some (or combination) of the CPU MULTICORE features in Synapse:
HMP profile = Battery
Power Aware Scheduling (slight performance cost) = Enabled
HMP LITTLE Packing (slight performance cost) = Enabled
PEWQ (power-efficient workqueue) (slight performance cost) = Enabled​
Set A57 & A53 Interactive governor profile = Battery
Set Input-Booster for key/touchkey profile = Battery
Multi-tasking: enable UKSM & "low" or "quiet" profile (slight performance/battery cost)
Set all Advanced wake-lock controls to 1, except GPS. Set it to 4
Set WiFi wakelock control to 2 or 3
PERFORMANCE TIPS
Set A57 & A53 Interactive governor profile = Performance
Set A57 & A53 Interactive governor = Turbo Mode (battery cost)
Once in a while:
Optimize Databases
FSTrim​
RANDOM REBOOT
Don't UV or UC CPU or GPU
Use SkyHigh defaults
Use a stock UNMODIFIED ROM for your device variant
No tweaks, Xposed or other CPU control apps installed
ASV_GROUP (ALL DEVICES ARE NOT CREATED EQUAL)
This is an example from my Exynos5420 source. Similar idea for Exynos420
http://forum.xda-developers.com/showpost.php?p=61579949&postcount=202
CAN I INCLUDE SkyHigh KERNEL IN MY ROM
Although I do appreciate your contribution here, if you could please do not include my kernel in any ROM package etc. This policy goes for anyone.
Having my kernel distributed outside my development thread just removes a lot of credit and more importantly, constructive user feedback that could be helpful to my development or user issue.
DOWNLOAD LINK NOT WORKING
I want to keep this project all in one place - ☆☆ NO MIRRORS ☆☆
Please try again in a few minutes
POOR CPU/GPU BENCHMARK or GRAPHICS PERFORMANCE
Disable any CPU MULTICORE options in Synapse
Disable any Battery profiles in Synapse. Set to default or Performance.
Allow the device to cool. Repetitive testing will heat the device hardware and invoke thermal throttling and lead to decreased benchmark.
HIGH CPU/GPU OC >> excessive heat >> thermal throttling >> reduced clock frequency >> DECREASE PERFORMANCE
DYNAMIC MANAGEMENT OF DIRTY PAGE WRITEBACKS
* [Christopher83]
This feature allows to have two different intervals for dirty page
writebacks and to dynamically manage them when the system has been
resumed (it's active) or when has been suspended.
Three new procfs parameters are exposed inside /proc/sys/vm path:
- dynamic_dirty_writeback is the activation status of this feature,
set 1 to enable it, set 0 to disable it and use the standard behaviour
- dirty_writeback_active_centisecs is the interval for the dirty page
writebacks when the system is active (screen on)
- dirty_writeback_suspend_centisecs is the interval for the dirty page
writebacks when the system is suspended (screen off)
This feature is in part inspired on Francisco Franco's patch:
https://github.com/franciscofranco/mako/commit/34d79548cf16b69c7d0154836018e7f258a22947
Click to expand...
Click to collapse
TCP/IP NETWORK SECURITY
* Thanks to zeppelinrox & V6SuperCharger
Hardening the TCP/IP stack to SYN attack
Bump up tw_buckets in case we get DoS'd
Ignore pings
Don't cache connection metrics from previous connection
Don't pass traffic between networks or act as a router
Enable spoofing protection (turn on reverse packet filtering)
Don't accept source routing
Don't accept redirects
- Further reading:
http://www.cyberciti.biz/faq/linux-kernel-etcsysctl-conf-security-hardening
http://www.symantec.com/connect/articles/hardening-tcpip-stack-syn-attacks
CHROMECAST - STREAMING PROBLEMS
* Thanks to @AtLmd Post
Lock screen MUST be enabled (simple screen lock swipe) I don't know why but it breaks the chromecast app's ability to resume smoothly if switched off
Synapse > Network > DTIM (both screen ON & OFF) = 1
Synapse > Network > WIFI Power Mode (screen OFF) = FAST
.
v1.4b released
v1.4b update for SM-N920-T device
Check out the change-log in Post #2.
Not tested because I don't use T-Mobile variant. I use a SM-N920-C
XDA RULE #1 'SEARCH BEFORE POSTING". Please READ Posts #1-3 BEFORE flashing !!
Bugs:
Still have the call reboot bug with N920C, but seems to be improved. Latest results of testing found in v1.2b release post
Have fun
Cheers
UITA
Will be running this today and let you know how it goes. Thank you very much for your time and work that you have done.
Install darthstalker last night with this kerner and I keep getting random restarts. Tends to happen more when making calls...
No sleep? ?
Random reboot. Rom:Breakdown 2.0
Last kmsg. Latest beta. Amazing battery life!
http://1drv.ms/1MUO22k
jpeps3 said:
No sleep? ?
Click to expand...
Click to collapse
I have sleep time. Sure there isn't an app keeping you up?
@UpInTheAir I'm glad to see you are at work on this kernel again. Welcome back! I hope your travels went well. Looking forward to seeing more of your work here.
dandroid7 said:
@UpInTheAir I'm glad to see you are at work on this kernel again. Welcome back! I hope your travels went well. Looking forward to seeing more of your work here.
Click to expand...
Click to collapse
I just don't have much time afraid. That's why I have to run the threads with a "matter of fact" approach. Particularly since I don't have your variant.
v1.5b released
v1.5b update for SM-N920-T device
Check out the change-log in Post #2.
Not tested because I don't use T-Mobile variant. I use a SM-N920-C
XDA RULE #1 'SEARCH BEFORE POSTING". Please READ Posts #1-3 BEFORE flashing !!
Bugs:
Random reboot during charge. Only rebooted at 100% during A/C charge on my SM-N920C device
Have fun
Cheers
UITA
Shaffer678 said:
I have sleep time. Sure there isn't an app keeping you up?
Click to expand...
Click to collapse
Who I find that out ??
jpeps3 said:
Who I find that out ??
Click to expand...
Click to collapse
Wake lock detector, or Better Battery Stats
UpInTheAir said:
v1.5b update for SM-N920-T device
Check out the change-log in Post #2.
Not tested because I don't use T-Mobile variant. I use a SM-N920-C
XDA RULE #1 'SEARCH BEFORE POSTING". Please READ Posts #1-3 BEFORE flashing !!
Bugs:
Random reboot during charge. Only rebooted at 100% during A/C charge on my SM-N920C device
Have fun
Cheers
UITA
Click to expand...
Click to collapse
Great kernel. Very good performance and battery life. Haven't had the random reboot issue but then again I only charge at night while sleeping.
Will flash new update tonight.
Thanks again for your work.
Sent from my SM-N920T using Tapatalk
I just installed this v1.5b kernel... I will give feedback tomorrow night sometime and let you know how it runs for me.
Thanks for all your hard work on this @UpInTheAir
This kernel run great on t-mobile variant but I can't call anyone...it lags while trying to call someone and once they pick up neither side can hear anything.
Sent from my SM-N920T using Tapatalk
lilviet93 said:
This kernel run great on t-mobile variant but I can't call anyone...it lags while trying to call someone and once they pick up neither side can hear anything.
Sent from my SM-N920T using Tapatalk
Click to expand...
Click to collapse
Can users please follow the development thread protocols and try a few things first. Example is top of Post #3 which you all would have read. I don't use your device variant, so I can't test the exact kernel build, neither can I read minds.
At the very least, details of your ROM and firmware need to be posted so others can give feedback on what is working and not.
Myself, have no issue on SM-N920C (H4 firmware), and with minmial searching found this piece of info from arter97. it may be applicable, maybe not.
http://forum.xda-developers.com/showpost.php?p=62742125&postcount=1303
You will need more feedback here so others may help build a BIGGER picture.
UpInTheAir said:
Can users please follow the development thread protocols and try a few things first. Example is top of Post #3 which you all would have read. I don't use your device variant, so I can't test the exact kernel build, neither can I read minds.
At the very least, details of your ROM and firmware need to be posted so others can give feedback on what is working and not.
Myself, have no issue on SM-N920C (H4 firmware), and with minmial searching found this piece of info from arter97. it may be applicable, maybe not.
http://forum.xda-developers.com/showpost.php?p=62742125&postcount=1303
You will need more feedback here so others may help build a BIGGER picture.
Click to expand...
Click to collapse
I kind of feel bad for you bro. If you expect these people to read I think your gonna be disappointed ?. Xda no longer makes people read or search. They all expect things handed to them. This is the majority these days. The old school guys is a dying breed.
UpInTheAir said:
Can users please follow the development thread protocols and try a few things first. Example is top of Post #3 which you all would have read. I don't use your device variant, so I can't test the exact kernel build, neither can I read minds.
At the very least, details of your ROM and firmware need to be posted so others can give feedback on what is working and not.
Myself, have no issue on SM-N920C (H4 firmware), and with minmial searching found this piece of info from arter97. it may be applicable, maybe not.
http://forum.xda-developers.com/showpost.php?p=62742125&postcount=1303
You will need more feedback here so others may help build a BIGGER picture.
Click to expand...
Click to collapse
No issues with that here. Followed all instructions (DUH) and no issues so far. Had one random reboot but that was because I accidentally OC and hit apply without realizing it, lol.
BACARDILIMON said:
I kind of feel bad for you bro. If you expect these people to read I think your gonna be disappointed ?. Xda no longer makes people read or search. They all expect things handed to them. This is the majority these days. The old school guys is a dying breed.
Click to expand...
Click to collapse
True that. It's getting harder and harder to type the same thing over and over again. They just don't want to fend for themselves.
Sent from my SM-N920T using Tapatalk

[Guide][CPU Tweak] Advance Interactive Governor Tweak for Whyred

Hi Guys, this is a continuation from initial discussion (and my promise) on InsigniuX kernel thread HERE
UPDATE 1 : After further testing, incorporate input boost to CPU 1 and 5 actually help the performance without affecting battery, as long as we set it within the optimal frequency. I also put fine tuning in hispeed_delay value, please use latest Profile File if you are using PRESET, or check the new values bellow if you do manual config
NOTE : If you are too lazy too read all the technical stuff, simply download the PRESET KERNEL ADIUTOR PROFILE HERE, and apply it to your Kernel Adiutor (choose "profile" from side bar, hit the (+) icon, and choose "import" and choose the downloaded .json file)
as we all know and aware, we always look and try to find the most optimum configuration to achieve best battery life without sacrificing performance. And while of course Qualcomm and Xiaomi have the most talented developers in their team, sometimes the implementation between both in their mass product might left a room for improvement. And in that exact room, we as community here play our role,
so, in an attempt to get a better fluidness out of this device, without sacrificing battery life, i remember one of the guide made by @soniCron i used to stumbled upon few years ago. This Guide give a very detail insight on how to optimize the interactive governor on almost any device/any kernel/any rom (as long as you have root), and thats what i gonna try to apply to our device - if you want to check the guide yourself : HERE
so i take a look into Whyred Kernel Sources to see the voltage values being used by our processor for each frequency step. And here's the voltage/speed table in case you want to see :
{
"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"
}
from that table, we can see which frequencies are using most power, and where is the most jump in voltage usage happen when switching between frequency.
Higher voltage jump will cost more power, means less battery life.
in conclusion, i found few frequencies which are less favorable, which is
LITTLE CPU :
1136Mhz - step by step Speed Gain is fine, but when compared to straight jump to 1401Mhz, the Speed to Power Ratio is become less favourable
1536Mhz - Smallest Speed Gain compared to Power Usage
and i also found some which might be the best/favourite frequencies :
LITTLE & BIG CPU :
900Mhz - Best contender for base speed, as it use almost same power with 633Mhz, but with plenty of speed gain
1401Mhz - Good Speed to Power Ratio
and
1747Mhz - Good Speed to Power Ratio for BIG CPU
_____________________________________________________________________________________________________________________________________________________
Now we take into account of the minimum frequency needed to ensure smooth task (if you dont know what am talking about, read the GUIDE i mention in my opening paragraph) :fingers-crossed:
For Whyred, i've found the best frequency is as following :
Idle = 633MHz (Lowest we can go at the moment)
Scrolling = 900MHz (Use Chrome browser to scroll Facebook in desktop mode)
Video = 1401MHz (Play 1080p*60fps videos in Youtube app)
App load = 1747MHz (Can use any app really)
High load = 1843MHz (Max out just in case)
Using the formula take from soniCron guide, i tried calculate optimum CPU load (this will be used as target load config) config for each frequencies
If you want to see the formulas :
Code:
We want to determine 2 values for every available clock rate: the maximal efficient load and the minimal efficient load. To make this determination, we need to bust out our calculators. (Or spreadsheets!)
For the maximal efficient load, we want to correlate a load value no higher than 90% of a given clock rate before it would be more efficient to jump to the next clock rate–to avoid overwhelming a particular rate while avoiding premature jumps to the next. For this value, we calculate it as:
(clock rate * 0.9) / next highest clock rate
For example, the maximal efficient load for 600Mhz on the Nexus 5X would be calculated as:
(600000 * 0.9) / 672000 = 80.36% (rounded and normalized: 80)
For the minimal efficient load, we want to correlate a load value at which anything higher would be better served by a higher clock rate. To calculate this:
(1 - next highest clock rate / clock rate) * -1
For example, the minimal efficient load for 600Mhz on the Nexus 5X would be calculated as:
(1 - 672000 / 600000) * -1 = 12.00% (rounded and normalized: 12)
with this config, logically speaking we want to make the Governor to favour the "best" frequencies above, and minimize the usage of unfavourable freqs.
LITTLE
Code:
633Mhz : 63
900Mhz : 71
1136Mhz : 23
1401Mhz : 82
1536Mhz : 4
1612Mhz : 83
BIG
Code:
1136Mhz : 73
1401Mhz : 9
1747Mhz : 85
1843Mhz : 90
Now that we already get the optimum number, time to apply it
Use your favorite Kernel Manager, in my case, am using Kernel Adiutor, and go to CPU Config - CPU Governor Tunables and input these value (am using Hawktail base profile from soniCron thread, as it seems it work best for most of devices, and i already do trial & error with some other value like timer rate as well ) :
(LITTLE)
Code:
align_windows:1
go_hispeed_load: 95
above_hispeed_delay: 0 633600:60000 902400:75000 1401600:100000
timer_rate: 80000
hispeed_freq: 902400
timer_slack: 200000
target_loads: 70 633600:63 92400:71 1113600:23 1401600:82 1536600:4 1612800:83
min_sample_time: 35000
boost: 0
boostpulse_duration: 0
(BIG)
Code:
align_windows:1
go_hispeed_load: 95
above_hispeed_delay: 32000 1136000:60000 1401600:75000 1747200:80000
timer_rate: 60000
hispeed_freq: 1747200
timer_slack: 100000
target_loads: 98 1113600:23 1401600:9 1747200:85 1804200:94
min_sample_time: 20000
boost: 0
boostpulse_duration: 0
Other necessary adjustment :
Boost : ON For CPU 1 at 902400 and CPU 5 at 1401600 both for 100ms
Min Big CPU Hot Plug : 0
Disable all Toggle in Thermal Section
Run Terminal and command :
Code:
su
stop perfd
or Install this MAGISK MODULE to disable Stock Thermal & Hotplug Control (Courtesy of @Mr.Nguyen0504)
Now you can test it. Do full charge and use it normally, see whether you can see the improvement or not,
be mind that this config is not really adjusted towards battery life, but rather overall fluidness/performance, yet without sacrificing too much power
Hopefully it helps you as it seems to help me (you can expect no less than 7-8Hrs SoT, am quite heavy user myself, with 2 WhatsApp account and 1 LINE account constantly active. YouTube & Gaming at least hour/day as well). Discussion is more than welcome here, as these are considered an initial calculations that still yet to furtherly fine tuned for our CPU.
Thanks mate, was waiting for this.
Initial thoughts = project butter:good:
xdarkstar said:
Thanks mate, was waiting for this.
Click to expand...
Click to collapse
please let me know the experience, i only test it with my personal preferences, so your desire with your device may vary
but i think it shouldnt be that far
otonieru said:
please let me know the experience, i only test it with my personal preferences, so your desire with your device may vary
but i think it shouldnt be that far
Click to expand...
Click to collapse
Excellent guide as well. Will test parameters over the weekend.
I will test this
mxilil said:
I will test this
Click to expand...
Click to collapse
yes please,
in the meantime, i also testing another config with input boost enabled, and some fine adjustment to hispeed_delay,
if it turn out to be better, i might create 2nd preset, along with custom control to disable BCL and Perfd. So we do not need to type it in terminal manually after reboot and let adiutor do that.
otonieru said:
Run Terminal and command :
Code:
su
stop perfd
Click to expand...
Click to collapse
I think "stop perf-hal-1-0" is the proper command.
@otonieru Great thread, very nice presentation of the matter with just the right info and setup example.
I have followed the same tutorial for my previous device but ended up using the tunables from my ROM maintainer as I never managed to calculate it properly, probably because I overlooked the voltage jumps.
Now, I wonder whether the minimum freqs of 300mhz for both clusters would help in battery life gains, taking into account the proper target loads are set for both and "timer_rate" and "min_sample_time" are tuned to make CPU ramp up quickly to avoid lags and stutters.
Logically, voltage is lower for lower frequencies, but in this case, 300mhz and 633mhz might be the same on little cluster or the voltage jump might be insignificant, but the voltage jump on big cluster might be bigger. And since the big cluster is on minimum frequency most of the time we might see some gains there.
Can you check the sources of some kernels with full range of frequencies (not the ones who have undervolt applied) and see the voltage tables?
Where is perfd located, or the file that contains the values for perfd daemon? It seems that the terminal command to disable it doesn't work, on any load except standby it still hits 1612mhz on little cluster, which is extremely annoying.
EDIT: There is no line about running state of perfd like this:
Code:
[init.svc.perfd]: [running]
There is only a line pointing at the presence of perf daemon I believe. Does this mean that perfd is not running on my system at all, so the "stop perfd" command doesn't do anything?
EDIT2: My bad people, I've set target loads for 1536 and 1612 to 4 and 8 respectively, by missing another number. Now I've set them to 98 and 100 as it was set on my previous device for two of the highest CPU steps, now the use of freqs seems much better and the device performs nice.
Cirra92 said:
Where is perfd located, or the file that contains the values for perfd daemon? It seems that the terminal command to disable it doesn't work, on any load except standby it still hits 1612mhz on little cluster, which is extremely annoying.
EDIT: There is no line about running state of perfd like this:
There is only a line pointing at the presence of perf daemon I believe. Does this mean that perfd is not running on my system at all, so the "stop perfd" command doesn't do anything?
EDIT2: My bad people, I've set target loads for 1536 and 1612 to 4 and 8 respectively, by missing another number. Now I've set them to 98 and 100 as it was set on my previous device for two of the highest CPU steps, now the use of freqs seems much better and the device performs nice.
Click to expand...
Click to collapse
Actually, i didnt include 300Mhz in my calculation because i try to check various whyred kernel source, and found that not too many of them make the 300Mhz available to beanually selected, but i do check the voltage used by 300Mhz and its saving is almost neglectible,
and as i do this tweak based on my current kernel set up (InsigniuX), i do it with 633 as base.
as for 1612 being used much,
i found that there's probably a bug in our device kernel code that make cpu sometimes lock in its highest frequency (1804 & 1612), it only happen after you restart the phone, (and it happen with most kernel out there, so its not literally the dev mistake, more like xiaomi messed up some codes)
the fix for now is by opening adiutor, ensuring that the freq not locked up. If its locked, change it back manually to 633 and 1133 (for small and big respectively), i found that it manage to stay until another reboot.
my cpu usage is as how i expected from my target load. so i think it play nicely for now.
After further testing, i update the config to incorporate boost & better tuning of hispeed_delay for each frequencies,
please check main post
otonieru said:
After further testing, i update the config to incorporate boost & better tuning of hispeed_delay for each frequencies,
please check main post
Click to expand...
Click to collapse
I am still on first charge since tweaking the kernel. So far it seems that the battery life is going to be the same, but it feels to me that everything is just a bit faster now, app opening and loading times are shorter and a bit smoother, might be a placebo, but it works nice.
One thing you should fix in main post, your target load for 1612 mhz in little cluster is set to 8, but in calculations it is 83, I suppose you missed the 3 when you wrote the tunables
I am going to update the settings you added after it falls to 20% and I recharge it.
One more thing, if I use the Magisk module for thermal and hotplug (or simply turn off the Core control in Kernel manager) does it mean that the cores will go offline if there is no load?
I remember having different hotplug solutions on SD801 devices which actually turned off 3 cores and left only one to do basic functions in deep sleep, or turn on 2 of them when there is low load on the CPU.
@Cirra92 ah right ! i might hit the backspace accidently, LoL
about hotplug, honestly am still testing it myself to figure whether the config work as intended or not, since the behaviour of this chipset it quite different. And since oreo its a bit harder to really track the cpu activities, we need to run an app to see the activities, but the app itself is giving load to cpu, thus the reading might not actually accurate.
1. Can you repost the voltage table image again? i can't see or is it missing? i really need this voltage info table, I've been playing with kernel tweaks this last few weeks.
2. On your 1st post,little cpu target load arguments are as follows : target_loads: 70 633600:63 92400:71 1113600:23 1401600:82 1536600:4 1612800:83
I don't think its the right setup. the first argument is target load which is 70, is affecting all freq starting from lowest to the highest (if there are no more arguments). but on 2nd argument you write 633600:63 (assuming 633600 is our lowest freq) then the first target load (70) has no effect. cpu target load for lowest freq (633Mhz) will be 63%, at 902Mhz the target load max is 71% and so on. And your screenshot shows the setup behavior. It idles at 633 then only spend small amount of time at 902 and 1401 and go right at the max freq for almost one and a half hours of total. If you want 633600 max target load 63% then the setup as follow :
target_loads: 63 92400:71 1113600:23 1401600:82 1536600:4 1612800:83
It means max target load from the lowest freq (633Mhz) will be 63% until below 902400. at 902400 max target load is 71% until below 1113600... and so on.
CMIIW
blackbellz said:
1. Can you repost the voltage table image again? i can't see or is it missing? i really need this voltage info table, I've been playing with kernel tweaks this last few weeks.
2. On your 1st post,little cpu target load arguments are as follows : target_loads: 70 633600:63 92400:71 1113600:23 1401600:82 1536600:4 1612800:83
I don't think its the right setup. the first argument is target load which is 70, is affecting all freq starting from lowest to the highest (if there are no more arguments). but on 2nd argument you write 633600:63 (assuming 633600 is our lowest freq) then the first target load (70) has no effect. cpu target load for lowest freq (633Mhz) will be 63%, at 902Mhz the target load max is 71% and so on. And your screenshot shows the setup behavior. It idles at 633 then only spend small amount of time at 902 and 1401 and go right at the max freq for almost one and a half hours of total. If you want 633600 max target load 63% then the setup as follow :
target_loads: 63 92400:71 1113600:23 1401600:82 1536600:4 1612800:83
It means max target load from the lowest freq (633Mhz) will be 63% until below 902400. at 902400 max target load is 71% until below 1113600... and so on.
CMIIW
Click to expand...
Click to collapse
i still can see the table, probably the connection from xda server is not good, its kinda patchy nowaday,
and btw, maybe you are right about the target loads. Although as i mentioned as well, that this config is lean more towards percormance, so its kinda intended from my side. But am still testing some other value as well, and i gonna try with your value as well.
as for now, my current set up is quite satisfy me.
crap, i cant even attach 2 picture in one post
otonieru said:
After further testing, i update the config to incorporate boost & better tuning of hispeed_delay for each frequencies,
please check main post
Click to expand...
Click to collapse
Can you add an image of the voltage table? The original image is not visible^^
otonieru said:
i still can see the table, probably the connection from xda server is not good, its kinda patchy nowaday,
and btw, maybe you are right about the target loads. Although as i mentioned as well, that this config is lean more towards percormance, so its kinda intended from my side. But am still testing some other value as well, and i gonna try with your value as well.
as for now, my current set up is quite satisfy me.
Click to expand...
Click to collapse
i tought this was towards battery but still keeping performance.
Try it or die said:
Can you add an image of the voltage table? The original image is not visible^^
Click to expand...
Click to collapse
Yup, it's not visible. But OP said its visible to him...
raptorddd said:
i tought this was towards battery but still keeping performance.
Click to expand...
Click to collapse
no, its the other way round as i wrote in my main post, LoL. But i guess 9-10Hrs SoT is more thwn enough wasnt it ?

Categories

Resources