[AT&T, Rogers HTC One X, Telstra One XL] flar2:
Kernel for ICS Sense-based ROMs

FAST • CLEAN • STABLE

FINAL VERSION: ElementalX-v3.2 (December 19, 2012)

For Jelly Bean version, see here: http://xdaforums.com/showthread.php?t=2061577

* Standard disclaimer:
* Your warranty is now void. Use at your own risk.
* In other words: It is your choice to use this software,
* I am not responsible for any damage or problems!

Special thanks:

h8rift for bringing self-powered OTG to our device

zarboz and Sbryan12144 for porting S2W to our device

jrior001 for CPU1 fix

xHausx and amarullz for installer stuff

Thanks to beta testers, couldn't do this without you:

jrior001

Genetic517

katdog75

ronnie498

SkizzMcNizz

iElvis

954wrecker

plaster

darb 1985

dave-

currydude

chinchillachubby

For those who want to run stock kernel but have self-powered OTG

support, here is a stock kernel with only OTG and NTFS added

​

Important Notes (please read!)

Jelly Bean

This kernel does not work with Jelly Bean. You need this: http://xdaforums.com/showthread.php?t=2061577

Make sure you clean up after installing other stuff

You should check your /etc/init.d/ folder to see if there is anything from previous installations that might interfere with this kernel.

Configuration

There is now a config file and init script where you can change settings for GPU frequency, sweep2wake, zram and intellidemand. The settings can be changed by editing /etc/elementalx.conf and rebooting. Advanced users can apply settings on the fly by running /etc/init.d/99elementalx as root.

There is no need to edit /etc/init.d/99elementalx. All settings are configured in /etc/elementalx.conf.

If settings are not sticking, make sure the file permissions for /etc/init.d/99elementalx are set to execute. Every time the settings are applied, a log file is created at /data/local/tmp/elementalx-kernel.log. Problems can be diagnosed by looking at the log file.

Please check to see if any /etc/init.d scripts or apps are interfering with your settings If you're on ViperXL, make sure your settings in Venom Tweaks are the same as the ones in /etc/elementalx.conf

CPU frequencies

No CPU apps are necessary. By default, your CPU will run at the max frequency chosen during installation. Minimum frequency will be 192MHz and governor will be intellidemand. If you want to change CPU frequency, I recommend No-Frills CPU control with the setting "Prevent changes from other apps" checked. This will ensure your minimum stays at 192MHz. As of version 3.1, CPU1 frequencies will stick.

CPU voltages

CPU voltages can be changed with Venom Tweaks, Kernel Tuner or System Tuner.

In version 3.2, there are five voltage ranges to choose from in the installer. I recommend the stock voltage (850-1300mV) to start. If you want to undervolt, you'll need to test to make sure it's stable. Previous versions of ElementalX used undervolting (800-1300mV) as default.

GPU frequencies

Maximum GPU frequencies can now be set on the fly. At the moment, Kernel Tuner does not show the correct frequencies for our device. You have to change them manually in sysfs or set GPU overclock in /etc/elementalx.conf

The sysfs entries for the GPU are in the following locations:

3D Graphics:

/sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0

2D Graphics:

/sys/devices/platform/kgsl-2d0.0/kgsl/kgsl-2d0

/sys/devices/platform/kgsl-2d1.1/kgsl/kgsl-2d0

gpuclk shows the current frequency (it scales according to usage just like the CPU)

max_gpuclk shows the maximum frequency, you can edit this to limit the max frequency for GPU overclocking on the fly

gputime_in_state shows the amount of time the GPU has used each frequency. You can see what frequencies are available here

Installing a new ROM

If you install a new ROM, it will overwrite /etc/init.d/99elementalx and /etc/elementalx.conf. The kernel will run perfectly fine without these files, but will revert to default settings (S2W enabled, zRam disabled, stock GPU speed) . To get the files back, reinstall the kernel. Or, before you install a new ROM, save the files to your sdcard and replace them after installation.

Using OTG (USB Host Mode):

1. You need an OTG cable to hook up perhipherals!

2. If you connect a mouse or keyboard via OTG cable, it will just work.

3. At this time, most ROMs do not mount usb storage automatically. You will need to install StickMount or a similar app. Google for the StickMount apk (Play store says it's incompatible, but it's not). ViperXL 2.3.

You can also mount usb storage manually by typing something like the following into the terminal:

su

mkdir /mnt/usb

mount -t vfat /dev/block/sda1 /mnt/usb

4. Please refer to the OTG discussion thread in the General Section for details on how to use OTG.

http://xdaforums.com/showthread.php?t=1893960

What is zRam

zRam creates a compressed block device in RAM that is used as swap. Although it claims some of your RAM as swap, everything written to swap is compressed. This increases the apparent memory available to the system and helps with multitasking. Swap files on disk are very slow, but with zRam the swap is on RAM so it can be read as quickly as regular memory. Even though the data need to be decompressed, modern CPUs can decompress quicker than if it had to be to read from disk. The penalty is cpu usage, which could drain battery; however, this is likely negligable in daily use. I didn't enable this by default because not everyone will want it. This is for heavy multitaskers and will allow you to quickly switch between more apps and have more tabs open in your browser without refreshes.

zRam is disabled by default. If you want to enable it, edit /etc/elementalx.conf

change ZRAM=0 to ZRAM=1 and reboot.

You can check if zRam is working by typing the command "free" into the terminal. You should see the total used and free swap. If these are all 0, then zRam is not enabled. Please ensure that other apps are not changing your minfrees, zRam works best with low minfrees and high swappiness.

Sweep2Wake

Sweep2Wake is enabled by default. It allows you to wake up your device by swiping your finger across the capacitive buttons from left to right. Swiping from right to left will put it back to sleep (sweep2sleep). There are now options for sweep2wake/sweep2sleep, sweep2sleep only, and disabled. Sweep2sleep only should be better on battery.

If you want to have sweep2sleep only or disable completely, edit /etc/elementalx.conf

Intellidemand

The powersave_bias setting for the Intellidemand governor can be changed in /etc/elementalx.conf. The default is 0. You can get better battery life, at the expense of speed, by setting this to a higher number, like 60.

Underclock to 192MHz not sticking

By default, this kernel sets the CPU's lowest frequency to 192MHz and sets read-only permissions on /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq. If you don't do anything, it will always stay at 192MHz.

Many overclocking apps will change the permissions of /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq to read/write. When the permissions are changed to read/write, the lowest frequency will change to 384MHz as soon as you use your network (either wifi or 3G or LTE). This is due to some HTC software bs. In order to stop the minimum frequency from changing to 384MHz, make sure the permissions on /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq remain set to read only.

If you want to change CPU frequencies, I recommend using No-frills CPU Control with the setting "Prevent changes from other apps" checked. This will keep those permissions set to read-only and your underclock to 192MHz will stick.

Game Controllers

Support for USB gamepads and joysticks was added to v2.0. The best way to know if yours works is to hook it up. As soon as I hooked up my generic usb gamepad (via the OTG cable), I was able to flip between homescreens and play Beach Buggy Blitz.

CHANGELOG:

SOURCE:

kernel source code: http://goo.gl/8KXH9