Remove All Ads from XDA

[Kernel][ICS] Devil2_0.94 [24/05/12] - i9000 and i9000B

9,663 posts
Thanks Meter: 26,881
By DerTeufel1980, Recognized Developer on 14th January 2012, 11:40 AM
Post Reply Email Thread
This kernel is based on teamhacksung's kernel, with updated Linux base to 3.1.10

Kernel working for Teamhacksung build 13 to 17 (+ nightlies) and also ICSSGS RC3/4.


- Brain **** cpu-scheduler (BFS) (this should be much faster than the default cpu scheduler) will be back later
- 378, 391 and 403 Mb Ram available (selectable in kernel, no need for a patch (403 mb breaks 720p) only reboot required)
- 2 different recoveries included (cmw touch recovery + twrp recovery)
- SIO scheduler (default)
- V(R) scheduler (maybe even faster than SIO, can be set as default by using NSTools for example)
- init.d
- Voodoo Sound and CM9 Color Adjusment / Voodoo Color (VC version)
- Devil Idle
- BLN V9 (thx to mialwe)
- USB Host mode driver (for more information about this, and for saying thanks to the guy, who ported this for our phone, please visit this thread: )
-Ezekeel's Live_Oc
- Ezekeel's Deep Idle V2
- Touchwake
- vibrator intensity control (by mialwe)
- BLX (Batterie Life Extender, I don't think we need it, but maybe one feels better by using it )
- backports from Linux 3.2
- Swap/Zram support
- Zcache, Cleancache and Frontswap
- Smooth_ui included to ondemand, conservative, smartass, lulzactive, lagfree and lazy governor (only one setting for activating/deactivating it in general)
- 3 cpu governor presets (smooth, normal, powersave) for ondemand, conservative, smartass, lulzactive, lagfree (only one setting for switching the mode in general)
- many other small features and improvements

Changelog and FAQ in post 2


Many of the features (like Live_OC) require NSTools, which can be found at market for free.

Please also try this app, for setting many of the options which are only available with my kernel.
a pre configured file for use with command center can be found here: (you have to remove .zip extension)
a good explination/example of how to use it, can be found here:

if you don't like additional apps (or are having problems with command center), i recommend using this init.d script:

Kernels with VC in the name are coming with Voodoo Color

I try to support this kernel as good as possible, but due to family and university, I do not have much time, so please be kind, if it takes a little bit longer till I will answer your questions.

Many Thanks to:
TK Glitch
sztupy, for his great work, to get usb host mode driver
F4k for the idea to flash bigmem libs


If you like my work, please donate to me

Devil2 kernel up now: many thanks to SysTem-X many thanks to Rootax
The Following 372 Users Say Thank You to DerTeufel1980 For This Useful Post: [ View ]
14th January 2012, 11:40 AM |#2  
DerTeufel1980's Avatar
OP Recognized Developer
Thanks Meter: 26,881
Donate to Me

changelog 24.05.2012:
- Smooth_ui included to ondemand, conservative, smartass, lulzactive, lagfree and lazy governor (only one setting for activating/deactivating it in general)
- 3 cpu governor presets (smooth, normal, powersave) for ondemand, conservative, smartass, lulzactive, lagfree (only one setting for switching the mode in general)
- no need for activating/deactivating of selective live_oc anymore --> just change target low and target high
- BLX back in
- fixes to devil idle to be more stable while in call
- 1,5 mb more ram (thanks to mialwe)
- added aroma filemanager to cwm recovery
- added fully working TWRP recovery optional to cwm recovery (to use TWRP, just create a file named "twrp" at /cache)
- added option to select ram config in kernel --> no need for flashing an other kernel to get more ram (thanks to stratosk)


you can change ram setting by doing (or use command center or similar):
echo 1 > /sys/kernel/bigmem/enable (this gives you xl mem of 391 mb)
echo 2 > /sys/kernel/bigmem/enable (this gives you bm mem of 403 mb (this is breaking 720p))
echo 0 > /sys/kernel/bigmem/enable (this gives you cm9 default mem of 378 mb)
you have to reboot to make changes work

- switched to new initramfs from stratosk and mialwe ( now there will be cmw zip and odin tar file of every kernel version)
- added possibility to use Zram instead of Swap
- no need for flashing/using special scripts to make swap/zram working anymore

echo 1 > /data/local/swap_use (for using swap partition on external sd card, you have to create this partition before)
echo 2 > /data/local/swap_use (for using Zram, no other modifications required)
you have to reboot to make changes active. You can't use swap and Zram at the same time

- added zcache
- added frontpage
- added cleancache
- added fudgeswap (thanks to ezterry and faux123)

we will add in fudgeswap as long as its less then the free swap

Setting this to a very large positive number will indicate swap ought
to be fully used as free (and will slow the system down)

smaller numbers will allow you to put some pressure on SWAP without
slowing the system down as much.

small negitive numbers will allow the system to be faster at the same
minfree level.

default is 512 to give a very little bit of pressure to use some swap
but this can be modified at runtime via:

changelog 01.05.2012:
- all changes from cm9 stock kernel (including mount points option)
- some fine tuning to deadline and sio
- Devil Idle: limiting bus/ram/gpu speed to 100 mhz for 100-800 mhz cpu freq, while screen off (automatic mode) or always (permanet), both modes automatically reduce the int voltages of the affected freq by 50 mV

activate automatic:
echo 1 > /sys/devices/virtual/misc/devil_idle/bus_limit_automatic
deactivate automatic
echo 0 > /sys/devices/virtual/misc/devil_idle/bus_limit_automatic

permanet on:
echo 1 > /sys/devices/virtual/misc/devil_idle/bus_limit_enable
permanet off
echo 0 > /sys/devices/virtual/misc/devil_idle/bus_limit_enable

- compiled with swap support
- added stratosk's smooth_ui to lulzactive governor (activated by default)

echo 1 > /sys/devices/system/cpu/cpufreq/lulzactive/smooth_ui
echo 0 > /sys/devices/system/cpu/cpufreq/lulzactive/smooth_ui

with this feature enabled, cpu freq jumps up to max freq, by touching the screen.

- rest oc_value to 100 while screen off, and back when screen turns on (combined with devil idle automatic, can't be turn on/off without devil idle)
- added posibility for different voltages while screen off (also bundled with devil_idle, with default settings, stock arm voltages are applied, because of live_oc set to 100)

this is an example, how to apply screen_off arm voltages:
echo 1450 1400 1350 1275 1075 975 875 800 > /sys/class/misc/customvoltage/arm_volt_screenoff

this way, it is possible to undervolt while screen off, but overvolt and overclock while screen on

for now, the int voltages can not be changend

- added the possibility to set freq limits while screen off (min and max freq)

echo 100000 > /sys/devices/virtual/misc/devil_idle/user_min
echo 800000 > /sys/devices/virtual/misc/devil_idle/user_max

both are independent from devil_idle, and get applied when screen turns off
by default 100 and 1000 mhz are set.
values which can be puth here are all "stock" freq (without live_oc level) multiplied with 1000. live_oc values get applied automatically.


- even better fix to selective live_oc (last one (in test kernel) generated some overhead)
- fixed sampling rate of ondemand and conservative (have ported mialwe's/stratosk's sleep multipliers)
- new tunables for ondemand and conservativ

sleep multiplier and tunables:
mialwe and stratosk had the great idea, to change the sampling rate of conservative and ondemand governor while display of. for this, he introduced the sleepmultiplier (in his case factor 3). this means, if you set sampling rate to 20000, it changes to 60000 while screen off, and back, when screen on.

for ondemand and conservative:
i have made this multipliers tunable. proper values are between 1 and 5, because one could want a higher multiplier while screen off, if sampling rate is very low while screen on (higher sampling rate means, less checking for work load --> better batterie, worse performance). with this tunables you get better batterie, without making the performance worse while screen on.

two other tunables: up_threshold_min_freq and responsiveness_freq
the first one is a very low threshold while on low freq (by default 40), to make the governor scale up faster, until the responsiveness_freq is reached.

the responsiveness_freq is set to 400000 (400 mhz) by default. while the freq is below this value, up_threshold is the same as up_threshold_min_freq, and freq jumps to responsiveness_freq, with skipping the freq between the actual one and the responsiveness_freq. (conservative governor does not jump up to this step)

responsiveness_freq can be set to values between 100000 and 1400000
up_threshold_min_freq can be set to the same values as the normal up_threshold.

not tunable: while screen off, up_threshold is set to 95, no matter your other settings, to save more batterie.

till now, the tunables have to be changend by:

echo VALUE > /sys/devices/system/cpu/cpufreq/ondemand/VARIABLE_NAME


echo VALUE > /sys/devices/system/cpu/cpufreq/conservative/VARIABLE_NAME

echo 400000 > /sys/devices/system/cpu/cpufreq/ondemand/responsiveness_freq
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_min_freq
echo 5 > /sys/devices/system/cpu/cpufreq/ondemand/sleep_multiplier

up_threshold_min_freq is disbaled by default for conservative governor
(this can be done by setting the up_threshold_min_freq to 100.

for ondemand, this also disables the additional jump to the responsivenss freq)

for lulzactive:
for this governor, i did similar things, but they are not tunable till now.

when screen off:
- inc_cpu_load is set to 90, and back to the original value, when screen turns on
- up_sample_time is set to 50000, and back to the original value, when screen turns on
- down_sample_time is set to 40000, and back to the original value, when screen turns on

other changes:
- fix to touchwake from ezekeel, and another fix from stratosk
- upstream fix to compass
- building for i9000B now, too (big thanks to F4k for the hints by pn )
- removed some typos from recovery
- removed some annoying "no's" and "yes" from recovery in misc menu
- fixed wifi mode switch (pm_fast is the one with better signal)

- new b versions (only stock ram) changend to 377 mb, VC version needs the 720p fix from my ftp server. cmc version already patched

- updated wifi driver
- added the possibility to switch between wifi PM_Fast and PM_Max mode (Pm_Fast = better signal, PM_Max = better batterie, default is PM_Max)

echo 1 > sys/module/bcmdhd/parameters/uiFastWifi (pm_fast)
echo 0 > sys/module/bcmdhd/parameters/uiFastWifi (pm_max)

- user interface to disable fsync (this gives more performace, at the risk of data loss on a crash, taken from ezekeel, so it should be ok ), default is off, to be safe

echo 1 > /sys/devices/virtual/misc/fsynccontrol/fsync_enabled (fsync enabled)
echo 0 > /sys/devices/virtual/misc/fsynccontrol/fsync_enabled (fsync disabled)

to make this settings apply after reboot, select them from recovery --> devil --> misc

- fixed voodoo color kernels (these have the VC in their names)

- added vibrator intensity control (by mialwe), presets can be changend in recovery
- stock ram version now available (348 mb ram), XL (390 mb), XL_bm (402 mb)
- removed 1080 mhz freq for now
- small correction to touchwake
- small correction to selective live_oc (now the low freq really are not live_oc'ed)

to change the vibrator intensity on the fly, you have to do the following:
echo value > /sys/class/timed_output/vibrator/duty (where value is between 20000 and 43640)
if you want the changes to be applied at boot, you have to use one of the presets from recovery, use an init.d script, or:
echo value > /etc/devil/vibrator (where value is between 20000 and 43640)
- fixed bug in selective live_oc, which caused the target high not taking affect to the highest freq, if highest freq equals target high
- fixed another bug in selective live_oc, which could lead to gpu crashes due to overclocking the ram, but not the cpu freq (for low steps)
- added a switch to change between "normal" and selective live_oc
(can be changend in recovery, devil menu --> performace --> liveoc,
or by (this won't stay after reboot):
 echo 1 > /sys/devices/virtual/misc/liveoc/selective_oc (selective mode)
echo 0 > /sys/devices/virtual/misc/liveoc/selective_oc (normal mode)
by changing the live_oc mode while using it, live_oc value is set back to 100, to prevent strange things

- added possibility to set max. freq for boot (in recovery). This freq is set until init.d is executeted (it is automatically set to 1000 at this point, to make sure there are no conflicts with other cpu settings from users)

#Already in the last version, but i forgot about it:
- deep idle fixes from stratosk (many thanks)
- added possibility to underclock by using live_oc (limit is 90 now, which means lowering all freq and bus speed by 10%, to save more batterie when really needed)

For now there are three different RAM versions:
- stock mem kernel has 379 mb ram, everything working
- "slim ics" (XL) kernel comes with 390 mb, this is breaking playback of some high resolution videos
- XL_BM is coming with 402 mb ram, but breaking 720p
(while flashing the kernel, the modded rom files are also flashed, so you don't need to flash a new rom to get 379 or 390 mb)

-added new frequency: 1080 mhz (1100 does not like live_oc)
- fixed SmartassV2 for live_oc (after changing live_oc value, you have to change the smartass values, too, but then they automatically apply to the live_oc value (although you can only select 800 mhz in nstools (for example))
- touch recovery with custom devil menu (for some reason it takes a few seconds to load the first time, missing virtual keys is a warning, because there are no virtual keys yet)
-fast charge (thx to chad0989 for this), disabled by default.

activate fast charge:
echo 1 > /sys/kernel/fast_charge/force_fast_charge
deactivate fast charge
echo 0 > /sys/kernel/fast_charge/force_fast_charge

you also can use the widget from chad (to place on homescreen) to toggle the fast_charge mode

while fast charge is activated you cannot connect as usb device

- added datafix script to init.d (this script is deactivated by deafult. to make it work, you have to creat a file named datafix and placed in /data/local/)
- reworking and cleaning many parts to get more ram, speed, and stability

- updated sio i/o scheduler to latest version
- small updates to ondemand and conservative governor from linux 3.2
- bettter performance for CFS kernel due to tuning and patches
- tuning to deadline scheduler
- better i/o performance
- changed bootlogo (probably not the last time )

- finally working bln V9 (no need for LED2 anymore)
- fixed lockscreen freezes
- reverted memory tweaks, which could be the reason for lagging after using a day
- again wlan fixes from tk-glitch
- tweaked conservative and ondemand governor (conservative still is not too aggressive)
- added dm-cache again (who has removed this from my github? )
- improve usb signal quality
- xcaliburinhand's dock audio support (untested, do not have a dock)
- less debugging
- fixed kernel version not displayed under "about phone"

- Added newest Fiops scheduler (tuned for more performance)
- When Gpu is active, min CPU freq is set to second lowest step
- fixes to live_oc and custom voltage
- default mount parameter NOATIME and NODIRATIME (faster)
- updated Wifi drivers (thanks to tk-glitch)
- tuned intellidemand for better performance
- removed some stuff (zram, swap, tweaks to cpufreq untill I know what was causing the instabilities of last build)

- added Touchwake
- added BLX
- upgraded BLN from V8 to V9 (working for missed calls, blinking or static light, configurabel by using NSTools or BLN Pro App)
- added Intellidemand governor
- added mdnie settings to voodoo color version
- readded deep idle v2 again (I think it is the best/only working one, although
- version with CFS (instead of BFS) now also available (maybe better multitasking and batterie life, but slower)
- removed BFQ I/O Scheduler
- tons of smaller fixes and improvements

-revert: Voodoo Sound now to be set with DSP Manager

- Linux kernel 3.1.10
- Deep Idle from Eugene373 (always enabled, no stats)
- added BFQ v 3.1 I/O Scheduler
- Voodoo Sound now to be set with DSP Manager
- Zram (can be disabled by removing Zram file from init.d)
- Zcache and Cleancache (not working yet?)
- optimized rwsem algorithm
- USB Host V5

- init.d support (the folder is not created by the kernel. You have to do it for yourself)
- Deep Idle V2 back in
- new Cpu governors: MinMax, Lagfree, Lulzactiv
- LED V2 (you can set blinking by using nstools, also working for missed calls in most cases (sometimes it is not working for missed calls, don't know why at the moment))
- Backlight Dimmer (only LED version): used to turn led backlight of, while screen is on, after defined period of time. Deactivating it, makes your backlight stay on all the time
- I/O-less dirty throttling completely backported from kernel 3.2
- Ext4 with 3.2 patches
- Proportional Rate Reduction for TCP - by Google
- USB Host V 4

- Usb Host drivers integrated
- Cm9 Color adjustment
- Removed Deep Idle because of Bluetooth problems (hopefully it will come back, still testing)

- Updated Kernel basis to Linux 3.1.9

- fixed bug in cpu spy, caused by live_oc
- still using voodoo color for now, maybe two additional kernel versions tomorrow

Questions and Answers:

Q: What are BFS and CFS?
A: The Brain **** Scheduler (BFS) is a task scheduler designed for the Linux kernel in August of 2009 as an alternative to the Completely Fair Scheduler and the O(1) scheduler.[2] BFS was created by veteran kernel programmer Con Kolivas.[3]
The objective of BFS, compared to other schedulers, was to provide a scheduler with a simpler algorithm, that did not require adjustment of heuristics or tuning parameters to tailor performance to a specific type of computation workload. The BFS author asserted that these tunable parameters were difficult for the average user to understand, especially in terms of interactions of multiple parameters with each other, and claimed that the use of such tuning parameters could often result in improved performance in a specific targeted type of computation, at the cost of worse performance in the general case.[4] BFS has been reported to improve responsiveness on light-NUMA (non-uniform memory access) Linux mobile devices and desktop computers with fewer than 16cores.

Q: Is BLN is not working for sms?
A: It is working, but you have to disable "turn screen on" in your sms app.

Q: What the hell are all these governors?
A: here you should find the answer:

Q: What's a good setup for live_oc??
A: No one knows. Every phone is different. It seems like the folling setup is running well for some (many?) users. If you get reboots with it, you have to find the setup for yourself.

if you are satisfied with this configuration, please hit the thanks button of Crack:
Originally Posted by .:Crack:.

OK, these are mine. Rock stable

LiveOC 117% -> 1200 MHz -> 1404 MHz


low freqs could possibly be tweaked harder but stability was my fist goal

Q: How can I set up swap?
A: Take a look at this thread:, and especially at this post:

Q: What is Touchwake? Can you explain it?
A: With Touchwake, the touchscreen still recognices your fingers, after turning off (for a predefined time (NSTools)). For a detailed explenation, take a look at Ezekeel's thread:

Q: How can I make Voodo Color settings been saved after reboot?
A: You have to use Voodoo Pro App, because of changes between Gingerbread and ICS, and only the Pro app is updated till now.

Q: Which is the best IO Scheduler?
A: I think SIO and V(R) are the fastest.

Q: How can I enable DeepIdle/Live_Oc?
A: You have to use NSTools. You find it on market. It's free.

Deep Idle Questions:
Q: What's the meaning of TOP=Off and TOP=On when I look at the Deep Idle status?
A: When TOP=Off is used, the best powersaving state is used. TOP=ON will be shown, when bluetooth or gps are running.

Q: In Idle status I only see TOP=On. What's wrong here? I don't use Bluetooth or Gps.
A: You have to flash the modded framework-res.apk, because ICS does not fully deactivate bluetooth by default. Even if you never use it.

Q: Idle Stats only are showing Idle, but no Deep Idle. Why?
A: An App is preventing the use of Deep Idle. At first, you should try closing the cam, running in the background. Also rebooting should solve this problem.

Q: Which CPU governor is the best for use with Deep Idle?
A: As Ezekeel stated, one should use LAZY
The Following 90 Users Say Thank You to DerTeufel1980 For This Useful Post: [ View ]
14th January 2012, 11:49 AM |#3  
Senior Member
Thanks Meter: 382
What about init.d support?
The Following 5 Users Say Thank You to .:Crack:. For This Useful Post: [ View ] Gift .:Crack:. Ad-Free
14th January 2012, 11:53 AM |#4  
Senior Member
Flag Glasgow
Thanks Meter: 13
This looks great, exactly what I wanted. Testing now, will report back.

update: everything installed perfectly, running well. Still testing stability.
14th January 2012, 12:02 PM |#5  
tn9's Avatar
Flag Poznań
Thanks Meter: 11
Thank I will test it right now
14th January 2012, 12:02 PM |#6  
DerTeufel1980's Avatar
OP Recognized Developer
Thanks Meter: 26,881
Donate to Me
Originally Posted by .:Crack:.

What about init.d support?

no, it is not working.
The Following 3 Users Say Thank You to DerTeufel1980 For This Useful Post: [ View ]
14th January 2012, 12:05 PM |#7  
Senior Member
Thanks Meter: 382
Originally Posted by DerTeufel1980

no, it is not working.

Might want to look at Glitch's Sources for that

14th January 2012, 12:22 PM |#8  
Senior Member
Flag Glasgow
Thanks Meter: 13
Getting a lot of soft resets. Screen goes black, I'm kicked back to lock screen, and everything slowly gets loaded back into RAM.

Everything standard, no tweak, deep sleep activated (and modded framework flashed).
14th January 2012, 12:33 PM |#9  
lownoise's Avatar
Senior Member
Thanks Meter: 119
Camera Zoom
Great kernel! , Deep idle working fine
However it looks like either the kernel or the framework patch broke camera zoom
14th January 2012, 12:54 PM |#10  
T0rchlight's Avatar
Thanks Meter: 15
How to see if Deep Idle is working? I flashed the zip and enabled, after 20minutes it still show only Idle in stats.
14th January 2012, 01:01 PM |#11  
lownoise's Avatar
Senior Member
Thanks Meter: 119
Originally Posted by darristan

How to see if Deep Idle is working? I flashed the zip and enabled, after 20minutes it still show only Idle in stats.

Enable it with nstools
Post Reply Subscribe to Thread

devil2, kernel

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

Advanced Search
Display Modes