FORUMS
Remove All Ads from XDA

 View Poll Results: Do you enable zram?

yes
 
23 Vote(s)
41.82%
no
 
32 Vote(s)
58.18%

[KERNEL] [Dec 19] ElementalX v3.2 | OTG | S2W | OC | UV | ZRAM

11,646 posts
Thanks Meter: 57,573
 
Post Reply Email Thread

Kernel for ICS Sense-based ROMs

FAST • CLEAN • STABLE

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


For Jelly Bean version, see here: http://forum.xda-developers.com/show....php?t=2061577

Code:
* 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!

Quote:

FEATURES:

  • based on HTC kernel source 2.41
  • works with Sense based ICS ROMs (not Jelly Bean)
  • AROMA installer
  • hboot 1.14 friendly
  • self powered OTG for usb drives, keyboard, mouse, camera, etc.
  • gamepad/joystick/controller support
  • NTFS r/w support
  • increased refresh rate for HDMI output via MHL adapter
  • xz kernel compression
  • new config file /etc/elementalx.conf
  • sweep2wake with optional sweep2sleep only
  • enhanced stability [NEW]
  • maximum CPU frequency selectable in installer (1.3 to 2.0GHz)
  • CPU1 frequency now sticks
  • voltage selectable in installer [NEW]
  • full voltage control
  • GPU overclock selectable in installer and config file
  • min cpu frequency 192MHz (default)
  • intellidemand tweaked to be more responsive [NEW]
  • intellidemand governor (default)
  • simple i/o scheduler (default)
  • readahead buffer tweak
  • zRam selectable in installer and config file
  • zRam snappy compression
  • fudgeswap
  • init.d support

DOWNLOAD

ElementalX-v3.2: http://goo.gl/Rq0g4



INSTALLATION

1. Install zip from TWRP Recovery
2. Reboot!

May take several minutes with hboot 1.14, be patient!!




Please hit the Thanks button if you like this

If you really like it, please consider a donation








Quote:

IF YOU HAVE PROBLEMS:

1. factory reset
2. clean install of a stable ROM
3. reinstall kernel with max freq 1.5, S2W disabled, no GPU OC, and higher voltage

Please do not report problems until you've taken these steps!

Remember: You are installing a custom kernel and not all hardware is equal. This kernel allows you to choose settings that may not work on your device!







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


Quote:

Elemental-Stock

Features:

  • same as stock kernel
  • works with Sense ROMs
  • self powered OTG
  • NTFS r/w support
  • init.d support

DOWNLOAD
flar2-stock-v1.0: http://goo.gl/1b6Xu





Important Notes (please read!)


Jelly Bean
This kernel does not work with Jelly Bean. You need this: http://forum.xda-developers.com/show....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://forum.xda-developers.com/show....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:
Quote:


December 19, 2012 - ElementalX-v3.2
-add voltage options to installer
-fix installer (automatically wipe Dalvik and remove reboot checkbox)
-code clean up
-make intellidemand more responsive
-adjust l2 cache frequency for stability
-change swappiness to 80 when zram enabled


December 7, 2012 - ElementalX-v3.1
-new config file /etc/elementalx.conf
-GPU frequency selectable in sysfs
-GPU overclock option in config file
-fixed CPU1 max frequency not sticking
-max CPU frequency selectable in Aroma installer
-increase refresh rate for mhl output
-autodetect devices that need extra cpu voltage
-fixed voltage control bug from v3.0
-add modules to installer
-automatically install camera libs


November 27, 2012 - ElementalX-v3.0
-Rebased to 2.41
-optimized boot
-thermald fix
-revert dimmed capacitive buttons
-GPU overclock option extended to all versions
-add camera libraries to installer
-xz compression
-AROMA installer
-more zram tweaks
-memory tweaks
-re-enable fsync
-default voltage option in init script


November 18, 2012 - ElementalX-v2.1
-fix cpu voltage interface
-use Google snappy compression for zRam
-add fudgeswap
-add Ultimate version
-GPU overclock in Ultimate version
-add sweep2sleep only option


November 9, 2012 - ElementalX-v2.0
-made 1.7 and 2 GHz versions
-add sweep to wake
-add gamepad and joystick support
-add voltage control via sysfs
-add zram support (disabled by default)
-disabled fsync


November 4, 2012 - ElementalX-v1.3
-attempt to fix 192MHz min freq not sticking
-remove lowmemorykiller tweaks


November 3, 2012 - ElementalX-v1.2
-changed name to ElementalX from flar2-performance
-disabled gentle_fair_sleepers
-made intellidemand the default governor
-made 192MHz the default minimum cpu frequency
-override init.qcom.post_boot.sh
-adjust lowmemorykiller for better multitasking


November 2, 2012 - flar2-performance-v1.1
-now based on 2.34 kernel
-defaults to simple i/o scheduler


November 1, 2012 - flar2-performance-v1.0
-self powered OTG
-ntfs r/w support
-overclock to 2GHz
-slight undervolt
-intellidemand governor
-simple i/o scheduler
-dimmed capacitive buttons
-readahead buffer tweak
-init.d support


November 1, 2012 - flar2-stock-v1.0
-now based on 2.34 kernel
-remove overclock
-remove undervolt


October 28, 2012 - flar2-OTG1 (beta)
-self powered OTG
-ntfs r/w support
-oc to 1.6 GHz
-undervolt
-init.d support


SOURCE:
kernel source code: http://goo.gl/8KXH9
The Following 63 Users Say Thank You to flar2 For This Useful Post: [ View ]
 
 
1st November 2012, 02:32 PM |#2  
ChummyDays's Avatar
Senior Member
Flag Nashville
Thanks Meter: 177
 
More
Nice! First!

Sent from my One X using xda app-developers app
1st November 2012, 03:08 PM |#3  
sdc177's Avatar
Senior Member
Flag Austin, TX
Thanks Meter: 24
 
More
Interesting, would love to hear what everyone uses this for.

Sent from my HTC One X using Tapatalk 2
1st November 2012, 03:20 PM |#4  
Senior Member
Thanks Meter: 139
 
More
So far so good. Flashed on top of Viper latest instead of the Beastmode kernel I've been running. using the 2Ghz setup and setting it to 1.7ghz with Setcpu and underclock.

5705 benchmark on Quadrant with 1.7ghz and intellidemand/deadline.

Pretty nice.

Thanks TS
1st November 2012, 03:26 PM |#5  
WarRaven's Avatar
Senior Member
Thanks Meter: 280
 
More
Thanks for more choices.

I'll give it a go when I flash back to CRV later today.

WR

Sent from my One X
1st November 2012, 03:48 PM |#6  
Account currently disabled
Flag Tulsa
Thanks Meter: 42
 
More
Awesome!!!
1st November 2012, 07:30 PM |#7  
Junior Member
Thanks Meter: 9
 
More
Quote:
Originally Posted by techlogik

So far so good. Flashed on top of Viper latest instead of the Beastmode kernel I've been running. using the 2Ghz setup and setting it to 1.7ghz with Setcpu and underclock.

5705 benchmark on Quadrant with 1.7ghz and intellidemand/deadline.

Pretty nice.

Thanks TS

'

Do you have the supply the power for OTG to work? or does it pull power from the board? and if so, wouldn't that burn out the mainboard in the phone?
1st November 2012, 07:50 PM |#8  
Senior Member
Thanks Meter: 139
 
More
Quote:
Originally Posted by r1sky

'

Do you have the supply the power for OTG to work? or does it pull power from the board? and if so, wouldn't that burn out the mainboard in the phone?

English please, have no idea what your are talking about?
1st November 2012, 07:54 PM |#10  
caviera's Avatar
Senior Member
Flag Santiago
Thanks Meter: 7
 
More
I pluged in a usb card reader, but phone still asking for an external power source
1st November 2012, 07:56 PM |#11  
flar2's Avatar
OP Recognized Developer
Flag Ottawa
Thanks Meter: 57,573
 
Donate to Me
More
Quote:
Originally Posted by r1sky

'

Do you have the supply the power for OTG to work? or does it pull power from the board? and if so, wouldn't that burn out the mainboard in the phone?

No, you don't have to supply the power, the board is capable of providing 5V.
The Following 4 Users Say Thank You to flar2 For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Tags
elementalx, htc one xl, kernel

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes