[HTC One X] csec:
This is a simple STARTER GUIDE to kernel features/parameters and everything you need to know about custom kernel goodies before you consider flashing them. I’d be glad if you could help me complete this guide. Thanks to [MENTION=4914682]Shan89[/MENTION] for his fantastic guide which inspired me to collect this.

First of all I’d like to thank all kernel guys who put countless hours into this to bring us the features which I am going to explain soon. Especially: XMister, n3ocort3x, Kozmikkick, Maxwen, Showp1984, faux123, TripNRaVeR, Alex-V.

Overview:

Post 1:

A.: What you want to know about the CPU/GPU of your device

B.: Custom Kernel Features

Post 2:

C.: Built in kernel features with no user control

D.: FAQs (Frequently Asked Questions)

More coming Soon!!!

Post 3:

E. Repacking

F. Useful Tools and Guides out there

More coming Soon!!!

A: What you may want to know about the CPU/GPU of your device:

HOX is powered by nVidia Tegra 3 which is a Quad Core CPU and it is said that have a Core Frequency of 1.5GHz. Also nVidia Tegra 3 comes with ULP Geforce GPU which is at 520MHz in all custom kernels available. You may want to know that your HOX can go up to 1.5GHz of single core and 1.4GHz of 4cores active with Stock kernel (The kernel that comes with your device out of the box). However custom kernels can perform 1.5GHz for all 4 cores.

nVidia Tegra 3 is in fact a 5 core chipset. The Advertising hype was about its 4+1 cores. So what is that one extra core? That core is called LP (Low Power) core. When the phone is in idle (sleep) this core is used. It is a weak core with 475MHz of processing power. It is there to save battery life as when we are in idle we do not need a whole 1.5GHz core to be active.

B.1: CPU/GPU/IO Features which come with Custom Kernels:

OC/UC (As for OverClock/UnderClock):

As you may know, CPU or any other processing unit features a clock frequency. Over/Under Clock simply means raising/decreasing the clock frequency of CPU.

Reason: Why would one need to overclock? Because one needs more processing power. For example if you want to experience smoother graphic when playing high-graphic games.

Why would we need underclock? Higher processing power demands more battery. So underclocking helps us, reserve more battery. As for HOX, searching internet and texting don’t need much of processing power. So we can limit the processing power and save battery during low use of our device.

•Note1: OC/UC is not limited to CPU. GPU is also capable of OC/UC. And the interface for that is also available in the custom kernels of HOX.

•Note2: Gamers may not use GPU UC. Limiting GPU processing power impact significantly on your gaming experience.

UV (As for Undervolt):

Every frequency of a processing unit, demands a certain amount of power to be supplied. Undervolting to put it simple means decreasing the voltage of a certain frequency (or all of them).

Reason: The more voltage CPU/GPU gets, more heat will be generated. So mainly we UV to decrease the generated heat of CPU/GPU.

•Note1: One Frequency needs a certain minimum amount of voltage to perform correctly and the system be stable. Undervolting more than a certain amount of voltage will cause system instability.

•Note2: HOX is known for getting hot soon. So UV is a great workaround for your device to be cooler.

•Note3: UV does not impact battery life (or it is not noticeable).

•Note4: For ULTIMATE guide about Undervolting and safe values visit Shan89’s great guide here.

Separate X/Y OC interface:

This probably means that the kernel has separate OC interface (interface to control OC) for operation X and operation Y. To be more exact it means you can OC different values for X and Y.

Audio Min. Freq.:

This specify the minimum frequency of the CPU when Audio is being processed. Default min in custom kernels is normally 51MHz. But Audio needs some more processing power. Anyhow, with this you can change that value.

LP Core OC:

The name explains everything. OC for LP core of T3 chipset.

Reason: LP core uses very little battery. So as long as the phone stays at LP core, more battery will be saved. If LP is OCed, it means it can handle more complex processing tasks and can hold more before letting the device to wake main cores. So battery will be preserved!

•Note: These are work in progress features and mostly in beta releases of Kernels. So using may cause system instability and other issues. So use them if you know what you are doing.

Hotplug Control - NEW:

- first_level: The number here specifies the amount of load on the cpu for it to turn on all the available cores (4 cores online).

- cores_on_touch: This number specifies the number of cores to come online when you touch the screen. (2 is efficient, 4 for extra smoothness on touch, and so more battery drain.)

- suspend_frequency: When screen is off, you don't expect your device to be smooth (!!!) and snappy! Because mainly nothing important is happening when screen is off. The number here specifies the maximum frequency of the CPU when the screen is off. Screen Off Max CPU can be really a very low number.

CPU Governors:

Frequency scaling is the means by which the Linux kernel dynamically adjusts the CPU frequency based on usage of the device. Governors refer to schemes which dictate to the kernel how it should do these adjustments. (From rootzwiki)

To put it simple, Governors are the way that CPU frequency is adjusted according to the demand of operating system.

Selecting a proper governor for your CPU is crucial to the performance and battery preserving of your device. For example if you are low using your device you may use a more battery friendly governor and if you want to play games you may use a more power consuming performance governor.

•Note: See Shan89’s Great Guide about Governors to be familiar with each one of them and the ones that you should use in different situations here.

I/O Schedulers (As for Input/Output):

Input/output (I/O) scheduling is the method that computer operating systems use to decide which order block I/O operations will be submitted to storage volumes. I/O Scheduling is sometimes called 'disk scheduling'. (From Wikipedia)

To put it simple, Schedulers are the way reading and writing to the SD card is managed.

The same things that is said in the Governors part is applied here, too.

•Note: See Shan89’s Great Guide about Schedulers here.

ReadAhead buffer size:

In terms of reading data from SD card, there is a cache which is used as a buffer. The size of that cache is readAhead buffer size. The size has a direct impact on your reading speed of your SD. So giving it a right amount is crucial.

•Note: Kernel guys believe that 128 is the right amount for that and it is the default in most of the kernels.

File System “X” R/W (As for Read/Write):

Android by default doesn’t support all the File Systems (What are file systems?! See here). So some kernels may add certain file system R/W. The most popular unsupported file system is NTFS.

B.2 Features of Custom Kernels (AKA Goodies!!!):

S2W (Sweep2Wake):

With S2W enabled you can wake/lock your device by sweeping your finger from left to right (or right to left) on the hardware keys of your device (Pretty Cool, hah?).

Reason: Some people just don’t like the hardware power button! Or after some time it will become less responsive. And some will use S2W because it is cool!!!???

•Note1: S2W doesn’t affect battery life that much. It almost does not use even a little bit. But be aware this stands corrected as long as you don’t touch your device. Touching the device would cause in waking the device from deep sleep.

DT2W (Double Tap 2 Wake):

It is something like S2W to wake the device. Double tap on the screen to wake the device.

•Note: The note for S2W applies here, too.

BLN (BackLight button Notification):

With BLN enabled your hardware buttons will blink when you have notifications. It is an/a alternative/support for led notification.

FastCharge:

This feature makes it possible for the phone to ask for more current from USB host. So your device would be charged faster connecting to a USB host (Or USB Battery) Be aware that enabling FastCharge would block the USB access to your Phone Storage.

UMS (USB Mass Storage):

After ICS, google only allows MTP connection to the PC. Back at ICS there was a UMS which make available your Phone Storage as a Mass Storage device in PC. The Mass Storage advantage is that you can manipulate data on it but it cannot be done using MTP. UMS feature returns that feature to your device. A system interface is also needed which is available in ViperX ROM or Lyapota’s mod.

•Note: MTP vs UMS (From here):

MTP:

1. Can copy files over (like APKs) and then access on them on the device without mounting/unmounting.

2. File transfer is available immediately when plugged in without having to mount.

Mass storage:

1. Better security since you have to get past the lock screen to mount.

2. Is actually a real drive in Windows, so you can do all operations normally.

MHL (Mobile HighDefenition Link):

It provides the feature for the miniUSB to HDMI cables to work. To output the device screen using HDMI.

SmartDimmer:

SmartDimmer can intelligently vary the backlight brightness of your device screen to help maximize battery life.

•Note: Haven’t really tried this. You may try it yourself and see how it is.

MultiCore PowerSaving:

This feature try to group up tasks in the least cores possible. To put it simple, it will focus in using least cores for your tasks to be done. This means less cores are active and so more battery life. Also this will decrease performance.

•Note: To enable use TricksterMod app. 0 for disable and 2 for the most aggressive.

Core Control/Max Active CPU Cores:

As the name suggests, this feature allows the user to set the maximum active cores of the CPU. In other words, you can completely shut down some cores. The default value is 4 as we have 4 max active cores. you can reduce this to 3, 2 or 1. But 1 is not really recommended.

Note: Core Control is the feature of ViperX ROM.

B.3 Other Features:

Pocket Protection - NEW:

Using features like S2W and/or D2TW when the phone is in your pocket (with no specific cover) occasionally causes the screen to turn on. (as a result of being close to your skin and almost touching it). This feature is there to prevent such wake ups. It uses proximity sensor to determine if the phone is in a closed position to something. If that is true, the screen won't turn on. :victory:

Swap:

Swap is a space which provides help to RAM in situation of low memory. When you are low in RAM some data will be stored in Swap space (Mostly cache). Swap is a space on Internal (and/or External Memory) so swap is not fast in comparison to RAM, but it helps multitasking, because you could cache more app data to your memory. So the results are less Force closes because of low RAM and faster switching between apps.

Swap is not really used by default, or it is used with very low space. You can boost your Swap, and also know more about this. there's a very nice MOD called Turbo Boost which allows you to add more Swap using your unused space. See this.

zRAM:

What we need to know essentially lies here:

zRAM off = Low use data will be stored the way they are in the memory. This will cause no extra load on CPU, yet need more RAM.

zRAM on = Low use data will be stored compressed in the memory. This will cause extra load in CPU as to store or restore data, yet preserve more Free RAM.

The main use of zRAM is when you are using a heavy ROM that eats up all your RAM. This will allow multitasking to be more functional. On light ROMs, or for those who don't multitask much, this is not necessary.

Init.d Support:

There are some scripts that run every time your device boot up which are located in /etc/init.d Those are called init.d scripts. One of the most popular init.d scirpts that is available for Note 10.1 is this.

DriveDroid Support:

Gives the phone the ability to use DriveDroid.

Take a look here for more information.

TCP Congestion Control:

The choices in this section, address how the operating system kernel manages flows of information in and out of the kernel, which is at some level the "switchboard operator" of your handset. More info here.

Better to leave this options as is. Cubic as the default of your kernel.

Dynamic FSync:

fsync is a system call in Unix/Linux. "man fsync" says:

So it's something embedded in programs after a related set of write operations to ensure that all data has been written to the storage device. The bolded part is what makes it interesting for some to disable it - "The call blocks" means the calling program waits until it's finished, and this may create lag. The downside is that if the system crashes, the data on the storage devices may be inconsistent, and you may lose data. (From here).

Dynamic FSync, makes it possible for fsync operation to be asynchronous when the screen is on, and synchronous when the screen is off. And what does asynchronous mean? Means OS issues fsync call, but not necessarily immediately at commit time for each transaction. It delays the FSync call for a certain amount of time. In case of a crash, the transactions not yet sync'ed in the last delay time before the crash may be rolled back, but the state of the data is always consistent. (From here).

Work in progress, will add more info soon.