[KERNEL][2.6.35.9][CWM] Custom kernel for the Samsung Galaxy S II stable-r2

Search This thread

NZgeek

Senior Member
Jul 7, 2011
448
294
Auckland
www.nzgeek.net
I tried this kernel (the .13 r4 version) for a few days, but have switch back to a CF-Root kernel.

My big issue was excessive battery drain. With the CF-Root kernel, I'm losing about 1-2% battery per hour. On the r4 kernel it was more like 5-6% per hour, and nothing had changed except the kernel. I checked the battery usage in settings, but aside from the Android OS process dropping down the list there weren't any major changes. (Yes, I checked the raw usage times, not just the relative percentages. Nothing anomolous stood out.)

The only other thing that bugged me was that the MTP application didn't start when you plug in the USB cable. Not a major issue for most people, but I find that Kies does a reasonable job of backing up my phone (rooted or not), and being unable to use it is an annoyance.

p.s. I looked at the code changes for the sleep of death bug... yikes! Those static ints should at least be initialized to sane values, if nothing else. And let's hope that the function is only ever called by one CPU core at a time, otherwise you end up with nasty cross-thread syncng issues.
 

bgn9000

Senior Member
Jan 12, 2011
446
732
Versailles
Hi, me too, I tried r4 kernel (2.6.35.13) during a couple of days from a stable and consume less Litening v1.5 settings. Yesterday, I stayed my phone in standby (often screen off) with data => -90% in 12 hours.

My remarks are:
1/ No CPU usage : thanks to setCPU, I can read 99% of 200 Mhz frequency. This confirms that no process are requesting significant CPU resources.
2/ In the battery history usage, I can see "Eveil" (Wake up?) very often whereas today this occurs only when I waked up my phone (screen on) or if I am listening 3G radio or MP3...
3/ To confirm this, when I wake up my phone after few minutes screen off, usually the CPU loads are around 10 whereas with your kernel this is less than 1. So, the phone is not really in "Veille" (sleep mode) with your kernel.

Regards
 

AdamG

Retired Recognized Developer
Jun 14, 2007
1,671
3,803
I'm tryng to use this kernel with HDBlog ROM but is hanging on boot screen.
Could be any incompatibility with that ROM?
Anyway thanks for your work!!!

I'm compiling my own kernel trying to get to the bottom of the drain issues,

I upgraded the stock kernel to .13 last night and lost most of the battery last night whilst I slept.

oGyQW.png


I've rolled back to the stock kernel with stock config at the moment to see if it was the upgrade that caused the problem.

Hopefully we can get to the bottom of this quicker.

I also figured out that using the codesourcery 4.5.2 toolchain and also a custom built 4.6.1 toolchain leaves you with no radio connectivity, only the stock Android 4.4.0 toolchain works best.

I also checked the stock kernel to see what toolchain that was using and it is also using the stock Android 4.4.0 toolchain, I don't know why samsung are recommending the codesourcery toolchain to be used in their README when they are clearly not using it.

Fishy stuff.
 
Last edited:

utp

Senior Member
Jan 7, 2007
202
27
theopoon.rinnovative.com
I'm compiling my own kernel trying to get to the bottom of the drain issues,
.....

I also figured out that using the codesourcery 4.5.2 toolchain and also a custom built 4.6.1 toolchain leaves you with no radio connectivity, only the stock Android 4.4.0 toolchain works best.

I also checked the stock kernel to see what toolchain that was using and it is also using the stock Android 4.4.0 toolchain, I don't know why samsung are recommending the codesourcery toolchain to be used in their README when they are clearly not using it.

Fishy stuff.

Hi, I am also trying to but a kernel from stock, I am a newbie on this and how do I check the codesourcery toolchain version? and if I am not on 4.4.0 where can I get a copy of that?

Thanks a lot!
 

ownhere

Senior Member
Jun 17, 2010
213
286
Beijing
I'm compiling my own kernel trying to get to the bottom of the drain issues,

I upgraded the stock kernel to .13 last night and lost most of the battery last night whilst I slept.

oGyQW.png


I've rolled back to the stock kernel with stock config at the moment to see if it was the upgrade that caused the problem.

Hopefully we can get to the bottom of this quicker.

I also figured out that using the codesourcery 4.5.2 toolchain and also a custom built 4.6.1 toolchain leaves you with no radio connectivity, only the stock Android 4.4.0 toolchain works best.

I also checked the stock kernel to see what toolchain that was using and it is also using the stock Android 4.4.0 toolchain, I don't know why samsung are recommending the codesourcery toolchain to be used in their README when they are clearly not using it.

Fishy stuff.

I tried compile the kernel with codesourcery 4.5.x(x>=2), results can not boot.
4.5.1 is fine.
My kernel is 2.6.35.7 + 4.5.1 + c1_rev02_defconfig-nodebug, no battery drain.
Does android 4.4.0 toolchain include cortex-a9 optimize?
 

AdamG

Retired Recognized Developer
Jun 14, 2007
1,671
3,803
I tried compile the kernel with codesourcery 4.5.x(x>=2), results can not boot.
4.5.1 is fine.
My kernel is 2.6.35.7 + 4.5.1 + c1_rev02_defconfig-nodebug, no battery drain.
Does android 4.4.0 toolchain include cortex-a9 optimize?

Yes the initial results of using .7 looks like there is no drain but its too early to tell yet, as for the 4.4.0 toolchain I don't know if its optimized for the cortex-a9 however I'm pretty sure this is what Samsung are using for their kernels.
 

python08

Retired Recognized Developer
May 28, 2010
325
289
I'm compiling my own kernel trying to get to the bottom of the drain issues,

I upgraded the stock kernel to .13 last night and lost most of the battery last night whilst I slept.

oGyQW.png


I've rolled back to the stock kernel with stock config at the moment to see if it was the upgrade that caused the problem.

Hopefully we can get to the bottom of this quicker.

I also figured out that using the codesourcery 4.5.2 toolchain and also a custom built 4.6.1 toolchain leaves you with no radio connectivity, only the stock Android 4.4.0 toolchain works best.

I also checked the stock kernel to see what toolchain that was using and it is also using the stock Android 4.4.0 toolchain, I don't know why samsung are recommending the codesourcery toolchain to be used in their README when they are clearly not using it.

Fishy stuff.

I'm currently trying a slightly modified kernel based on the stable 2.6.35.9 kernel and compiled with CodeSourcery 4.5.1 (2010). I'm currently testing battery life. I'll report my results. Hope we'll quickly find a way to solve this annoying issue!
 

AdamG

Retired Recognized Developer
Jun 14, 2007
1,671
3,803
I'm currently trying a slightly modified kernel based on the stable 2.6.35.9 kernel and compiled with CodeSourcery 4.5.1 (2010). I'm currently testing battery life. I'll report my results. Hope we'll quickly find a way to solve this annoying issue!

Well after rolling back to .7 the results are much better, the drain is back at normal levels, I think it would be best to just stay at 35.7 unless you fancy doing a supercurio job on a newer kernel and trying that :)

RJI8d.png


Edit: Android now has a 3.0 common branch *hint* ^_^
 

NeoPhyTe.x360

Retired Recognized Developer
Aug 20, 2009
1,663
1,849
oυτ oƒ иoωнєяє
I've tried to compile it myself successful, but I have a strange thing, and it's that the screen becomes ON itself (when it is on sleep mode :S)

Somebody knows something like this related to any option in defconfig?
 
Last edited:

crypticc

Senior Member
Aug 22, 2009
1,101
114
London
I still don't quite understand why the patches for 2.3.3 kernel that fix android os battery drain aren't used in those compiled from source here. I came from htc magic and those patches were just becoming well known and accepted.

p.s. I am not a dev but thought a kernel guy would know how to use those. Search for farmatito. Patch 22 regresses usb driver from 2.6.35 version back to 2.6.29. Or is the source code completely different?



http://forum.xda-developers.com/showthread.php?p=12439632


Sent from my GT-I9100 using Tapatalk
 
Last edited:

python08

Retired Recognized Developer
May 28, 2010
325
289
Using the stable r1 kernel since morning on stock JG1 ROM, and already had 2 random reboots!


python08 said:
This kernel should work with any european ROM. (It won't work with 2.3.4-based ROMs!)

I thought that everyone in here had been to school. Reading is fundamental.


Sent from my GT-I9100 using XDA App
 

vanessa13006

Senior Member
Jun 24, 2010
498
51
Marseille
I thought that everyone in here had been to school. Reading is fundamental.


Sent from my GT-I9100 using XDA App


Went to school but it was a long time ago cause i'm 46 and i have stopped my studies at the age of 25 ;)
By the way used your kernel with VR 2.0 (which is a 2.3.4 base rom). I have not had time to test everything but my device appeared to function normally.

Anyway following your advice and back to KG1.

Thanks
 

Top Liked Posts

  • There are no posts matching your filters.
  • 25
    About
    This kernel is built from Samsung's official sources (available on github thanks to supercurio). It's clean, fast and it aims to be stable.
    Please note that this kernel won't root your device automatically but you will be able to remount /system as r/w and then push Superuser apk and binary.
    This kernel should work with any european ROM.

    Features
    ClockworkMod recovery 4.0.0.8
    Stable Linux kernel 2.6.35.x (currently .9)
    Deadline I/O scheduler tweaked for flash usage
    SLQB slab allocator
    /system/etc/init.d scripts support
    "Insecure" mode
    Some other tweaks and improvements

    Download
    Please remember that I'm not responsible of any damage caused to your phone.

    gt-i9100_kernel-stable-r2.zip
    md5 checksum: 5d8aa55604ef25de6cf8910337bc4365

    Installation
    Flash the .zip with Odin or the zImage with heimdall (heimdall flash --kernel /path/to/zImage).
    I advice you to wipe cache, dalvik-cache and battery stats between updates.
    Also, you should notice a better battery life after a full charging cycle.

    Sources
    All sources are available on my github

    Credits
    For a list of all contributors, look at the git repo. Special thanks to supercurio, netarchy and teamhacksung.

    CHANGELOG

    * stable-r2 : *Should* be compatible with leaked 2.3.4 and fix random reboots
    Updated ClockworkMod Recovery to blue-themed version 4.0.0.8 (thanks to codeworkx)

    * stable-r1 : Stable release (Linux 2.6.35.9)
    This version fixes the battery drain (at least for me)
    Removed CIFS support and interactive governor
    Rebuilt with a newer toolchain

    ==========================================
    OLDER RELEASES
    ==========================================

    * r4 : Removed autogroup patch
    Optional interactive governor

    * r3 : Removed *buggy* interactive governor
    SLQB instead of SLUB
    Rebuilt with the toolchain recommended by Samsung
    Small tweak to ondemand governor and to readahead
    Upstream fixes

    * r2 : Added ClockworkMod recovery
    Fixed battery drain
    Sleep of death patch
    Interactive governor adjustments
    Compiler optimizations
    Misc fixes

    * r1 : First release
    2
    Stable-r2 is out.
    2
    Nice release.
    In your git repo, you posted that this kernel build includes BacklightNotification. Has this been confirmed working by you with BLN control?

    It won't work with BLN Control app because, as we can't modify liblights, we need to manage blinking at kernel-level.
    I'm working on it.

    Sent from my GT-I9100 using XDA App
    2
    I've just uploaded a r4 built on Linux 2.6.35.7
    Please test and let me know if it's of any help for battery life :) (Thank you ownhere for the advice).
    Download here
    2
    r2 is out! More details in the first post :)
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone