[KERNEL] [May26] ElementalX-EVO-4.3 | OC | UV | ZRAM | ROW | S2W | DT2W | BLN

flar2

Recognized Developer
Jun 11, 2012
18,447
87,152
263
Southwestern Ontario
elementalx.org

Kernel for Sense-based Jelly Bean ROMs


LATEST VERSION: ElementalX-EVO-4.3 (May 26, 2013)


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!


This kernel has tons of options. You can get yourself into trouble. Overclocking and undervolting takes effort, you need to test, test, test in order to find stable settings for your device. Please don't complain about reboots or crashes if you're overclocking and/or undervolting. When you find settings that work well with your specific hardware, this kernel will be very stable and have long battery life.

If you have problems, or simply don't want to endlessly tweak kernel settings, then consider trying the Bulletproof kernel: http://forum.xda-developers.com/showthread.php?t=2181243

If you do want to endlessly tweak kernel settings, and get to know your hardware intimately, then you're in the right place.



FEATURES:

  • based on HTC Jelly Bean source code 3.16
  • Aroma installer
  • choose CPU optimization level: vanilla, elementalx, or ultra
  • optimized for extended battery life
  • overclocking/underclocking options
  • minimum CPU frequency 192MHz or 384MHz
  • choose max screen off frequency
  • user voltage control
  • choose voltage profile in installer
  • GPU overclocking
  • sweep2wake
  • doubletap2wake
  • pocket detection to prevent accidental wakes
  • button light notification
  • /system writable
  • force fastcharge
  • optional zRam with snappy compression
  • NTFS r/w support
  • governors: intellidemand (default), badass, lagfree, lionheart
  • i/o schedulers: ROW (default), FIOPS, SIO
  • option to disable fsync
  • increased refresh rate for HDMI output via MHL adapter
  • optimized -O3 linaro 4.7.3


DOWNLOAD

Elemental-EVO-4.3


NOTE: If you downloaded this before 9pm EDT on May 26, please redownload and reinstall the file!


If you have trouble installing or using ElementalX, or you don't know what settings to choose, I recommend you try Bulletproof Kernel: http://forum.xda-developers.com/showthread.php?t=2181243


Previous versions:
Elemental-EVO-4.2
ElementalX-EVO-3.3
ElementalX-EVO-3.2
ElementalX-EVO-3.1
ElementalX-EVO-JB-v2.5: http://goo.gl/Bvx3j
ElementalX-EVO-JB-v2.3: http://goo.gl/KJlgZ
ElementalX-EVO-JB-v2.2: http://goo.gl/qSavM
ElementalX-EVO-JB-v2.1: http://goo.gl/XWDYK
ElementalX-EVO-JB-v1.2: http://goo.gl/LTYN3
ElementalX-EVO-JB-v1.0: http://goo.gl/xNUab
ElementalX-EVO-JB-v0.8: http://goo.gl/FPDra
ElementalX-EVO-JB-v0.7: http://goo.gl/KDDjK



INSTALLATION

1. Install zip from TWRP Recovery
2. Follow the instructions, if you don't know what to do, use the preselected option
3. Reboot!


S-OFF highly recommended for easy installation



The installer includes a method to flash the boot.img with s-on, however, some people still have difficulties. If it doesn't work, extract boot.img from the zip, reboot to bootloader and do:

fastboot flash boot boot.img

Note: you must still run the installer to get all the configuration files!




Please hit the Thanks button if you use this

If you really like this, please consider buying me a beer


Special thanks:
zarboz and Sbryan12144 for porting S2W to the One XL
jrior001 for CPU1 fix
backfromthestorm for fstrim
xHausx and amarullz for installer stuff
tbalden for bln





NOTES:


Configuration
Your choices in the Aroma installer are used to build a configuration file. The config file is located at /etc/elementalx.conf. You can edit this file to change kernel settings. Whatever is set in this file will take effect when the device is booted (unless other scripts or apps interfere!)

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 (for example, sweep2wake settings)


Kernel Tuner
You don't need Kernel Tuner because the ElementalX installer sets everything up automatically, but if you want to check or change settings, Kernel Tuner is recommended. Just be aware that Kernel Tuner is set by default to apply settings on boot, which can interfere with the settings you chose in the ElementalX installer.


Venom Tweaks force close
If Venom Tweaks closes when you try to access the CPU tab, go to Settings->Apps->Venom Tweaks and push the Clear Data button. This should fix the problem.


CPU Optimization
Vanilla: stock voltages, stock l2 cache frequency, stock bus bandwidth
ElementlaX: increases l2 cache frequency and bus bandwidth, allows you to choose voltage level in installer
Ultra: increases l2 cache frequency and bus bandwidth even more. May cause instability, please test thoroughly for stability if you use this option.


Overclocking
Overclocking (underclocking) is optional. Whatever frequency you chose in the installer will be set at boot for both CPUs. Frequencies can be changed any time using apps like No Frills or Kernel Tuner. WARNING: not all devices can handle overclocking. The stock maximum CPU frequency is 1.5GHz. In versions of the kernel prior to 4.2, the frequencies were labeled wrong so you won't be able to overclock as high with version 4.2+.


CPU voltages
CPU voltages can be changed with Venom Tweaks, Kernel Tuner or System Tuner. Be careful, lowering voltages could cause instability. If you have stability problems even at the highest voltages, try the vanilla version


Minimum CPU frequency
Sets the minimum CPU scaling frequency. 192MHz is the recommended default and should work fine on the vast majority of devices. The 384MHz option is available for devices that experience random reboots while the device is idle. It is recommended that you try increasing the minimum voltage by 25mV before changing the minimum CPU frequency.


Max screen off frequency
This sets the highest CPU frequency available while the screen is off. It is recommended to disable this for stability. Also, do not set this to 192MHz or 384MHz, as many devices experience random reboots at these frequencies. The default is 486MHz, which should be safe for most devices. If you experience random reboots while the device is asleep, set this to a higher frequency. This setting can be changed in /etc/elementalx.conf or using an app like Venom Tweaks.


GPU frequencies
3D GPU: 480 (overclocked) or 400 (stock)
2D GPU: 266 (overclocked) or 200 (stock)


Governors
Intellidemand is the default CPU governor. There are other governors included, however, intellidemend is recommended for best balance of battery life and performance.


Installing a new ROM
If you install a new ROM, it will overwrite /etc/init.d/89elementalx and /etc/elementalx.conf. The kernel will run perfectly fine without these files, but you will lose your settings and certain features.


Sweep2Wake
Sweep2wake 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. If you use ViperXL, make sure to enable sweep2wake in Venom Tweaks. Note that in Venom Tweaks, the sweep2sleep only option can be selected by choosing Enable (no buttons backlight).


DoubleTap2Wake
DoubleTap2Wake (DT2W) allows you to wake the device by double tapping in the bottom inch or so of the screen, above the capacitive buttons. You can edit /etc/elementalx.conf to change the setting on boot.

/sys/android_touch/doubletap2wake

0=disabled
1=enable doubletap2wake


Pocket Detection
Pocket detection protects against accidental wakes while S2W, DT2W or L2W are enabled and the phone is in your pocket. Pocket detection uses the proximity sensor. A few people have a problem with their proximity sensor that makes DT2W not work, so I've made an option to disable pocket detection. You can edit /etc/elementalx.conf to change the setting on boot.

/sys/android_touch/pocket_detect

0=disabled
1=enable pocket detection


Button Light Notification
With Button Light Notification (BLN), the capacitive buttons will blink on and off when you have a new notification. As soon as the screen comes on, BLN is canceled and the lights will no longer blink until you have another notification. Please note that if you have your screen set to turn on when a message arrives, you will not see the buttons blinking because once the screen comes on, the button light notification is canceled. You can edit /etc/elementalx.conf to change the setting on boot.

/sys/class/leds/button-backlight/bln

0 = disabled
1 = BLN enabled



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.


NTFS support
This is for anyone who wants to use OTG to connect a USB stick or portable harddrive formatted with Microsoft's NTFS filesystem. You will need Stickmount or a similar app, HTC Sense+ won't detect NTFS.


Enable/disable fsync
Disabling fsync can increase filesystem performance. However, there is a small risk of data loss if the system suddenly crashes. If you can't afford to lose data, keep fsync enabled. Many custom kernel disable fsync, I leave it enabled by default for safety reasons.


XBox controller support
There is an experimental module that supports XBox gamepads, however, some people have reported that it draws too much power and doesn't work. I've suggested trying a powered USB hub, but still not sure if it works.




Changelog:

v4.3:
-button light notification
-doubletap2wake
-pocket detection to protect accidental wakes
-optimized AES and SHA1 routines


v4.2:
-correct oc frequencies
-adjust l2 cache frequencies
-gpu overclock frequencies now 480 3D and 266 2D
-fix max screen off limit
-various patches from Linaro and CAF
-WiFi module fix (thanks thicklizard)
-avoid loadavg moire
-enable automatic process group scheduling
-max screen off frequency can be disabled


v3.3:
-optimized build compiled with -O3
-linaro 4.6.3 -> linaro 4.7.3
-force ac for unknown chargers


v3.2:
-use glibc memcopy
-use glibc string
-add /dev/frandom
-add force fastcharge
-change makefile optimizations
-tweak clocks
-fix aroma installer(?)


v3.1:
-based on HTC source code 3.16
-overclock to 2.1GHz
-minimum frequency 192 or 384MHz
-screen off frequency
-optional overclock GPU
-full voltage control
-enable/disable fsync
-intellidemand default governor
-add sweep2wake
-add zRam with snappy compression
-init.d support
-ntfs r/w support
-fix HDMI refresh rate
-add lionheart, badass governor
-add row i/o scheduler
-adjust l2 cache frequencies
-default i/o scheduler is ROW
-add fix for crash when wp_mod.ko loaded
-disable gentle fair sleepers
-xz kernel compression
-fix installer conflicts
-dual zram
-use zcache instead of qcache
-use zsmalloc instead of zxmalloc
-CPU1 governor can be set independently
-set max screen off frequency
-choose 192 or 384 minimum CPU frequency
-update cpu_power according to cpu load
-CPU optimization options: Vanilla, ElementalX or Ultra
-small tweaks to GPU settings
-fstrim at boot
-switch do_fsync() to fget_light()
-adjust readahead to 2048
-made sure that if you flash boot.img in fastboot you get vanilla version



v2.5:
-added 384 MHz frequency step when selecting 192MHz as min frequency (needed because CPU1 will not stay at 192MHz)
-adjustments to init script


v2.3:
-adjustments to init script (now works with Viper4G 3.0.1)
-added extra governors (lionheart, lagfree, interactivex2, and badass)
-new boot.img from 3.16 OTA


v2.2:
-choose minimum CPU frequency (192MHz or 384MHz)
-option to leave minimum voltage at default
-optimized CPU control module, now reads PVS efuse and sets appropriate voltage levels
-streamlined options and config file
-optional XBox controller support


v2.1:
-Option to completely disable overclocking/undervolting
-If overclocking, choose between optimization for stability or performance
-stability option does not increase L2 cache frequency and bus bandwidth


v2.0:
-added intellidemand governor (default)
-added fiops i/o scheduler (default)
-optional zram with snappy compression
-optional ntfs r/w support
-select minimum voltage (800, 825, 850, 875, or 900mV)
-added 1134 and 1242 MHz underclocking options
-increased bus bandwidth
-many changes to installer and configuration files


v1.2:
-minor changes to init.d script


v1.1:
-fix low 3D GPU setting
-undervolt option now undervolts 384MHz frequency step to 800mV
-boost L2 cache frequency for extra performance
-increase readahead buffer to 4096
-tried to fix touch in aroma installer


v1.0:
-add voltage options


v0.8:
-removed 1998MHz frequency step
-added 1647MHz frequency step
-increased voltages slightly for stability
-added option to install without boot.img


v0.7:
-tweaking install method


v0.6:
-fix installer?




Source:
ElementalX-3.2
ElementalX-JB-v2.5: http://goo.gl/uWK4r
 
Last edited:

flar2

Recognized Developer
Jun 11, 2012
18,447
87,152
263
Southwestern Ontario
elementalx.org
Alright, don't actually install it, we just need to test the modules.

Could someone who has the stock JB kernel extract wp_mod.ko and oc_mod.ko from the zip file and try to insmod them from the terminal and let me know what the output of dmesg is?


Also, could someone post the output of:

uname -r
 

P.Mobile

Senior Member
Nov 18, 2011
4,400
934
0
RhOdE IsLAnD... 401
OMG!! a kernel!! thank you so much bro!! we need some kernels for this device :good: thank u.. i almost **it my self when i seen there was a new kernel!! lol... im down to help test but im only good for flashing zips.. let me kno if i can help.. thank u flar2
 
Last edited:
  • Like
Reactions: MexPwrEng

flar2

Recognized Developer
Jun 11, 2012
18,447
87,152
263
Southwestern Ontario
elementalx.org
I think I might have fixed the installer, not sure how things work on this device.



OMG!! a kernel!! thank you so much bro!! we need some kernels for this device :good: thank u.. i almost **it my self when i seen there was a new kernel!! lol... im down to help test but im only good for flashing zips.. let me kno if i can help.. thank u flar2
Well, it's not exactly a custom kernel, just some modules and config files to make it work
 

flar2

Recognized Developer
Jun 11, 2012
18,447
87,152
263
Southwestern Ontario
elementalx.org
^^I can get over 7400 on the One XL

1998 MHz likely isn't going to work.


Anyone tested /system write?


so i take it we good to flash this??

At your own risk, I don't have this device so I don't know exactly what happens if you try to flash this.



I have a question. If the modules didn't flash.. my WiFi wouldn't work right?... Or what wouldn't work?

$tack$

This won't affect wifi. Your existing modules stay the same.

The kernel is the stock JB kernel, I just had to modify the boot image to add init.d support.
 
  • Like
Reactions: joeyrushlow

joeyrushlow

Senior Member
Oct 11, 2010
137
29
0
Burbank
Alright, don't actually install it, we just need to test the modules.

Could someone who has the stock JB kernel extract wp_mod.ko and oc_mod.ko from the zip file and try to insmod them from the terminal and let me know what the output of dmesg is?


Also, could someone post the output of:

uname -r
uname -r
3.4.10-g014d33e

when i try insmod /system/lib/modules/oc_mod.ko

i receive "insmod: init_module '/system/lib/modules/oc_mod.ko' failed (file exists)"

I do have overclock though.

I'll post my dmesg since I don't know what part is needed -__- lol
 

Attachments

  • Like
Reactions: flar2

dandan2980

Senior Member
Jun 17, 2010
3,062
1,337
0
it flashed using the 1809 oc but i am getting fc on messages,gmail,android media, i can open tapatalk and go thru threads but once i try to enter one i get fc. using nova widgetswill not load i used your latest alpha
 

stacksptdtdm

Senior Member
Sep 19, 2010
966
425
0
new york
^^I can get over 7400 on the One XL

1998 MHz likely isn't going to work.


Anyone tested /system write?





At your own risk, I don't have this device so I don't know exactly what happens if you try to flash this.






This won't affect wifi. Your existing modules stay the same.

The kernel is the stock JB kernel, I just had to modify the boot image to add init.d support.
Getting there :)


$tack$