[KERNEL][TWGB] TKSGB Kernel for EH09/EI20 [DEPRECATED ON 11/27]

Status
Not open for further replies.

comradesven

Senior Member
Jan 24, 2011
156
302
0
TKSGB KERNEL HAS BEEN RENAMED TO KGB KERNEL!

NEW THREAD HERE


PLEASE DISREGARD THE REST OF THIS POST
----------------------------------------------------------------------------------------------------------------------------

There aren't very many tweaks in yet but it should be stable again and a lot of ext4 and lowmemkiller lag issues should be gone! Here's an incomplete list of features.

Voodoo: Lagfix and sound. No color for now
CPU governors: The same ondemand, ondemandX, interactive, interactiveX, smartassv2 and ondemandX as default
I/O schedulers: The same cfq, bfqv2r1, sio, deadline, vr and deadline as default with the last three being optimized for flash
jhash3, OC/UV, BLNv9, 3rd-party batteries, boot animations
LED flashlight, CIFS and TUN
zram
User-adjustable in-call audio boost, no boost by default!
Preliminary dock audio support, need more feedback

Autogroups and Tiny RCU removed pending performance evaluation

How to adjust in-call audio and zram
Run callboost or zram from a root prompt (AS ROOT). To manually tweak zram size or call boost volumes, look in /etc/init.d/ for the startup scripts they drop after enabling. The filenames are 05zram and 91callboost.
Recommended settings for callboost are 1 or 2, 0, 0, and 0 or 1. zram is 12.5% of available RAM by default.

The zram script crashes when enabling if there isn't enough RAM free. Don't run zram enable unless you're sure you have enough RAM on hand, such as right after a fresh reboot.

How to use dock audio
Preliminary testing (thanks ACLakey even if you do have a Mesmerize :p) indicates it does something right. I have no way to know if it's doing something wrong or even if it doesn't work at all so give me feedback.

How to use your phone as an access point
Get the latest Wireless Tether for Android (3.0b6 last I checked), and set mode to Samsung softap in the settings. It won't be peer-to-peer and WPA2 encryption will work.

"STABLE" DEVBUILD 1027
CWM zip: http://www.mediafire.com/?tjsadn6v0cocqy6
Odin: http://www.mediafire.com/?redm61dt4uwjpt2

Oh, and just because...

"BLEEDINGEDGE" DEVBUILD 1116
CWM zip: http://www.mediafire.com/?mg78n9a77sje6e4
Changelog: Drivers/kernel settings from EI20, except for the dpram driver which is still from EH09. Removed carrier hotspot tracking code in init.rc (doesn't make hotspot tracker directories in /system), ARM and memory and RCU updates/tweaks, changes to scripts in ramdisk.
Still pretty untested :eek:
P.S. Don't confuse one for the other, thanks

Please excuse the mess below.

----------------------------------------------------------------------------------------------------------------------------




Kernel is alpha and untested for the most part, and I cannot guarantee stability or robustness of features. Still, I've been using it every day for a few weeks now, and it's pretty stable for me. It should work on most EH09-based ROMs out there, including PowerWashed, GeeWiz and TSM Resurrection, just to name the ones I know as I am a Fascinate user. It works with Mesmerize and Showcase too, I'm given to understand, with the proper ROM tweaks (which I don't claim to know anything about).

FEATURES
Voodoo: Lagfix, Sound v10, and Color v2. Use with Voodoo Control.
CPU governors: conservative, performance, ondemand, ondemandX, interactive, interactiveX (ondemandX as default)
I/O schedulers: Noop, CFQ, BFQv2-r1, SIO, V(R), Deadline (deadline as default). The last 3 are optimized for use with flash memory.
Autogroups, jhash3, Tiny RCU for responsiveness.
OC/UV up to 1.7GHz, with Voltage Control/Pimp My CPU.
Third-party battery support allows use and charging of aftermarket batteries and batteries for other Galaxy S phones.
No hotspot monitoring with the WiFi driver from the i9000.
In-call audio boost: Higher volumes and mic gain settings. Works OK as of 10/18.
CIFS and TUN included in base kernel. UTF-8 native language support was already there.
BackLightNotifications v9 with a ported touchkey driver from the i9000. Automatic installation of the proper liblights. Use BLN Control and/or Blinky to get down to business.
Bootanimations: Works with /data/local/bootanimation.zip, /system/media/bootanimation.zip, or /system/media/sanim.zip. Automatic installation of the proper bootanimation binary.
LED flashlight: The camera LED makes a surprisingly good flashlight. Activate with any of a number of flashlight apps from the Android Market.
zram from Linux 3 (credit imoseyon). Open up a terminal and run "zram" to get started. By default "zram enable" will use 12.5% of total RAM as an LZO-compressed ramdisk and set up swap space on that. Don't run the script unless you have at least 50MB or so of RAM free. To change the size of the zram, edit the relevant line in /etc/init.d/05zram (it's in bytes, do your own math) and reboot.
Other standard features: init.d support, adb shell gives you a root prompt
Various behind-the-scenes tweaks: A growing list of ARM and Samsung kernel/driver patches for hardware errata and Linux kernel patches to enhance interactivity

CHANGELOG
For complete changes refer to github.
Code:
[size=4][B]1018[/B][/size] Most changes on this one are behind the scenes.
[b]In-Call volume boost changes[/b] +12dB at earpiece only & mic gain boosts
[b]Update interactiveX and ondemandX CPU governors[/b]
[b]ondemandX as default[/b] i'm pretty sure this is a backport from linux 3 too
[b]Use CodeSourcery 2010q1 toolchain[/b] bad Linaro, bad!
[b]zram backport[/b] and add zram script to initramfs
[b]Memory tweaks[/b] optimize memcpy functions, tweak lowmemorykiller
[b]Bugfixes[/b] to autogroups and a couple other things
[b]initramfs changes[/b] probably falls under bugfixes actually

[size=4][B]1012[/B][/size]
[b]In-Call volume boost changes[/b]
[b]dvfs lock fixed[/b], no more pegging CPU at 1440MHz with bluetooth
[b]lowmemkiller settings[/b] changed in init.rc

[size=4][B]1010[/B][/size]
[b]In-Call Volume boost[/b] numbers were chosen arbitrarily, need detailed feedback
[b]Autogroups, [strike]Tiny Preempt RCU[/strike][/b] woopz
[b]Bootanimation support[/b] install required binary on boot
[b]Add ondemandX CPU governor[/b] 
[b]ondemand as default[/b] interactiveX pegs the CPU high on hw video playback
[b]optimize sio and vr[/b] for flash devices
[b]Voodoo Color fix[/b] no more green tint at low brightness
[b]More tweaks[/b] ARM, Samsung, buildflags; see github

[size=4][b]1006[/b][/size]
[b]Third-party battery support[/b] apparently works fine as of 10/10

[size=4][b]1005[/b][/size]
[b]BackLight Notifications[/b], neldar-flavored, finally!
[b]Installs liblights on boot[/b]
[b]deadline scheduler[/b] tweaked for flash memory
[b]interactiveX governor is default[/b]

[size=4][b]0927[/b][/size]
[b]Initial release[/b]

KNOWN ISSUES/TO-DO LIST
Dock audio: I've almost got this merged but have no dock and no way to test.
Lots more tweaks and testing. I know it isn't fully polished and some things could use cleanup and updating. There is also a veritable sea of tweaks out there that I haven't even started parsing through.
Autorooting, autoinstall of busybox, bash, nano, and a bunch of obnoxious init.d scripts
Recovery with crazy rainbow colors and logos, etc.

TKS does not yet come with CWM. The version most of you are using is probably the blue ClockworkMod Recovery 3.0.2.8x by I believe times_infinity. It's pretty compatible with my kernel with a couple of minor bugs. Mirrors: http://www.mediafire.com/?91cq99066cwph4d http://www.multiupload.com/QEP9U2MC2G

CWM-FLASHABLE ZIPS
NEW 1018 http://www.mediafire.com/?07nero2764ktcn4 http://www.multiupload.com/V81P3FNJOD
1012: http://www.multiupload.com/JFLEF7U7EH
1010: http://www.mediafire.com/?9f58oks4a988a7o http://www.multiupload.com/PDXE2U08IG
1006: http://www.mediafire.com/?ev1g554de7ab9g0 http://www.multiupload.com/KB7833E0E4
1005: http://www.mediafire.com/?em8md8yxq7o61ny http://www.multiupload.com/EHJFAPYW51
0927: http://www.mediafire.com/?76ea7izaqc3e7a2 http://www.multiupload.com/O1HRXNCQQW

ODIN TARS
NEW 1018: http://www.mediafire.com/?didta4h7vk0uh8p http://www.multiupload.com/EXS2REYBAI
1012: http://www.multiupload.com/W8VZQGA3AG
1010: http://www.mediafire.com/?2tiiwoeav61ha0f http://www.multiupload.com/4XORWQIQIZ
1006: http://www.mediafire.com/?p9u3ow2mw70n26c http://www.multiupload.com/58XYU7OF86
1005: http://www.mediafire.com/?5ojvasq4lurvxnp http://www.multiupload.com/4W2GPSZHU7
0927: http://www.mediafire.com/?rqwe26c1pi4766r http://www.multiupload.com/JST3N8AAIP


GITHUB
All I do is kang other people's work, get it?
https://github.com/kangtastic
Also where you can see the full changelogs.


THANKS
imoseyon: Merged Voodoo Lagfix by hand. Also, he and the next two guys and I are like the only ones doing anything with the TW GB kernel on this phone.
ccampos784: Merged Voodoo Sound, and some other dev work before I forked his branch.
djp952: Ported the i9000's Wi-Fi driver and killed VZ's hotspot monitoring dead. It wasn't the only thing he ported from the i9000 to get EH09 building. And on that note...
The Samsung Galaxy S i9000: It is truly the gift that keeps on giving. Comparing good work i9000 people have done on the i9000 and CM7 repos with the EH09 code makes broken things work again, period.
TeamSbrissenMod & Supporters: The TSM-Resurrection ROM got me to try EH09, but they've done lots of great work over the last year.
jt1134: Got me started with cross-compiling my first kernel, and he is responsible for most of the innovation on this phone.
Other "historically important" people: adrynalyne, imnuts, SirGatez, nemesis2all, navenedrob etc.
IRC people too numerous to list and random people too numerous to list from whom I have taken all sorts of ideas and code that ended up in this kernel :p


DISCLAIMER
I am not a developer and the sole reason I started was so that I could be happier with the kernel I use on my own phone. If something does not get added or fixed, you are welcome to do it yourself.

I take no responsibility for exploding phones, voided warranties, missed appointments, dead babies and the like which are claimed to be related to your decision to use my kernel in any way. You're in the "development forum."

That said, feel free to leave useful feedback and suggestions. For bug reports, link logcats and dmesg output. And enjoy!
 
Last edited:

comradesven

Senior Member
Jan 24, 2011
156
302
0
INFORMATION REGARDING OC/UV VALUES
The default values in the Samsung source are as follows:

1000MHz arm_volt=1275mV int_volt=1100mV
800MHz arm_volt=1200mV int_volt=1100mV
400MHz arm_volt=1050mV int_volt=1100mV
200MHz arm_volt=950mV int_volt=1100mV
100MHz arm_volt=950mV int_volt=1000mV

arm_volt_max=1350mV int_volt_max=1250mV

Of these the values that everyone talks about are the arm_volt values. arm_volt is what is modified by Voltage Control, Pimp My CPU, etc. int_volt is a secondary line that is not reported or directly adjustable by the user. The Glitch kernel plays around with int_volt for their different "leakage" versions, demonstrating that int_volt, too, plays a significant role in max overclock, but this isn't a concern of mine at the moment.

arm_volt_max is set to 1350mV which would then be the theoretical "overvolting limit". In this example you could overvolt 1000MHz by up to +75mV before running into driver limits.

Here are the default values in TKS.

1700MHz arm_volt=1500mV int_volt=1250mV
1600MHz arm_volt=1500mV int_volt=1250mV
1500MHz arm_volt=1500mV int_volt=1225mV
1440MHz arm_volt=1500mV int_volt=1200mV
1400MHz arm_volt=1450mV int_volt=1175mV
1300MHz arm_volt=1400mV int_volt=1150mV
1200MHz arm_volt=1350mV int_volt=1125mV
1000MHz arm_volt=1250mV int_volt=1100mV
800MHz arm_volt=1200mV int_volt=1050mV
400MHz arm_volt=1050mV int_volt=1050mV
200MHz arm_volt=950mV int_volt=1050mV
100MHz arm_volt=950mV int_volt=1050mV

arm_volt_max=1500mV int_volt_max=1250mV

Let's look at 100-1000MHz first. At 1000MHz there is a slight -25mV arm_volt undervolt (or just plain old undervolt) as well as a -50mV drop in int_volt for all frequencies <1000MHz. In other words, for stock frequencies there is already an undervolt built right in that you should take into account.

At higher clock settings the values are essentially best guesses at the proper settings for that speed, refined by community experience, so talking about a "proper" undervolt level is a little bit inaccurate. Note that voltage is maxed out at 1440MHz and above, but the secondary int_volt values keep increasing. The effect is a ramping up of total power supplied with increasing clockspeed, as it should be.

So I wouldn't be at all surprised to see 100-1000MHz benefitting from a couple +25mV boosts compared to "the settings I used to use on my old kernel" here and there and I'd pay attention to differences between the default voltages, especially 1200MHz+, of the old and new kernels. With different defaults, seemingly different undervolt settings could translate into the exact same amount of mV supplied.
 
Last edited:

nitsuj17

Inactive Recognized Developer
Aug 24, 2010
10,160
17,211
0
PA
awesome man...great to see eh09 finally getting some kernel love :eek:

hopefully once imoseyen gets his i500 from someone sending it, u can get some more help as well :)

(if u bet bln working ill reactive my fascinate for awhile lol)
 

skynet11

Senior Member
Oct 14, 2010
1,936
686
0
I can give feedback about what DOES work despite being in alpha stage:
Voodoo color is working (personally, I like to go "punchy" on gamma hack)

OC is stable at least to 1400 for me with default noop/interactive, and with 100mhz state disabled (I could only go up to 1200 on MIUI without immediate instability on Glitch)

My phone is quite stable (so far) on this kernel, more so than what you'd expect on an alpha release

I'm glad you posted your own thread for this kernel comeradesven :D

Another Fascinating post by my XDA app...
 
Last edited:

ssignature

Member
Sep 9, 2010
32
2
0
Spartanburg, SC
This kernel is what I've been looking for

With a battery fix and in-call volume fix, I think I'll have a permanent GB solution! I'm hard of hearing and most of these GB kernels just don't cut it for me. CM7 (MTD) works, but Slacker caching doesn't work because of the file system. Slacker says tough s**t, we're not supporting it. So here we are. I'll put this on my spare Fassy and test it out today.
 

skynet11

Senior Member
Oct 14, 2010
1,936
686
0
I'm also hard of hearing, but in-call isn't too, too bad for me on speakerphone... Media volume, on the other hand... IDK if media volume has anything to do with this kernel or if it's an EH09 issue...

Another Fascinating post by my XDA app...
 

comradesven

Senior Member
Jan 24, 2011
156
302
0
Does this kernel use the Nexus S color source like on Glitch's kernel?
If you're talking about mDNIe values, then no. I tried adding some new values earlier and it didn't work. It does have a ported Nexus S framebuffer driver like all Voodoo Color kernels AFAIK.
 

ekowanz

Senior Member
May 5, 2009
869
108
43
which one is better... voltage control or pimpmycpu?

now i use voltage control oc up to 1400 with uv 50 all way down. so far run smooth.

i use noop and ondemand, if i use conservative then phone get lag
 

mgrimmenator

Senior Member
Dec 29, 2010
199
5
0
Texas
will this eventually have a -100uv kernel. i've the best battery life using pbj kernels with that setup. hope this gets it too. will switch kernels once all the kinks get worked out.

thx for your efforts.
 

splashattack

Senior Member
Jan 21, 2011
221
67
0
So far this kernel is working out great for me. Loving voodoo color. Makes me wish I waited on buying that Thunderbolt off eBay. The cwm file didnt work for me (probably a bad download, stayed on bootanimation for WAY too long, lagging the animation) so I used the Odin version instead. Booted instantly. Many thanks for putting this together.

Sent from my SCH-I500 using Tapatalk
 

djblu

Senior Member
Aug 5, 2005
112
6
0
Portland, Oregon
Originally Posted by djblu
I purchased SetCPU originally, can I use it instead?

Sent from my SCH-I500 using xda premium
IIRC the answer to that for this variety of overclock code is as follows.

Short answer: No

Long answer: Maybe but you might/probably will have problems
Thanks for the clarification. next question:
how do keep from getting stuck in boot loop? Do I need to reflash my recovery immediately after flashinging the kernal?
Sent from my SCH-I500 using xda premium
 
Status
Not open for further replies.