Friday, May 11, 2012

Epic 4G Kernel 3.0.x Progress

This post documents our progress porting kernel-3.0.x to work on Epic 4G CM9.

  • Update 6/23/2012:
    • Haptic feedback is now working, thanks to nubecoder.
    • Updated the test kernel download files.  If you were using a previous test kernel, redownload the zImage and boot.cpio.gz.
  • News 6/20/2012:
    • The orientation sensor has been fixed with the switch to CM9 libsensor source, although the test kernel is not yet updated for it.
    • WiMax is working, although there are still some big bugs to work out.  The test kernel will be released when it is stable enough to use.
  • News 6/18/2012:
    • nubecoder is working on porting the vibetonz driver to the 3.0.x kernel.
  • Update 6/9/2012:
    • Reverted display drivers to match stock 2.6 which results in much better colors.
    • Incorporated the 200MHz min frequency fix from 2.6.
    • Switched the default governor to Ondemand and added the ability to control the min/max cpu frequency via the Performance menu.
    • Added sysfs controls from 2.6 for disabling the capactive key backlights via the Advanced Settings menu.
    • Updated to 3.0.33
    • Updated the test kernel download files.  If you were using a previous test kernel, redownload the zImage and boot.cpio.gz.
  • Update 6/4/2012:  
    • Added a "Bugs" list. 
  • Update 6/3/2012:  
    • Capacitive key backlights are now timing out with the keyboard light.
  • Update 6/2/2012: 
    • Mic recording and proximity sensor now properly continue to work during calls.
    • Kexec test kernel posted under Links section with instructions. Feel free to test and report any findings as a comment to this blog post.
  • Update 5/19/2012:  
    • Fix light & proximity sensors.  This also allows for Autobrightness to function.  
    • Fixed camera snapshots.  Front facing camera still needs fixing.  Fixed front facing camera.
    • There appears to be a bug during calls where the mic recording gets disabled as the CPU goes to sleep.  Waking the phone with the power key re-enables the mic.  Calls are not dropped and you are still able to hear the other person, but they obviously won't hear you.  Using an app like Softlocker to disable deep sleep allows the mic to function continuously during the call. 
    • Proximity sensor fails to operate the screen after above mentioned suspend issue, until manually reactivating the sensor or after initiating a new call session.
  • Update 5/17/2012:  Call audio is now working.  
  • Update 5/11/2012:  Wifi is now working.
What Works
  • Haptic Feedback
  • Call Audio
  • Wifi
  • SDCard
  • USB Mass Storage
  • 3g & Text Messaging
  • GPS
  • Light/Proximity Sensor
  • Bluetooth, A2DP
  • Ringtones, Notification Sounds, Media Audio (Speaker & Headset)
  • Incoming/Outgoing Calls
  • Recovery Mode
  • adb
  • Keyboard
  • Touchscreen & Softkeys
  • Autobrightness
  • Capacitive backlight timeout
  • Camera Snapshots (Front and Back)
  • Video Recording
  • Screenshots
  • /system, /data, /cache mounted as mtd/yaffs2
  • Suspend/Resume
  • Charging
What Doesn't Work Yet
  • WiMAX - In progress.
  • Headphone mic (need to confirm)
  • More to add as we find it
  • Capacitive key backlights become dim at some point (happens after first suspend).
  • adb uses Google vendor id (18d1) during recovery mode instead of Samsung id (04e8).
    • Linux users may need to adjust your usb udev rules to recognize device. (Permanent flash only)
  • Registers a generic adb device serial number.
  • Charging bugs (seem to be tied together, but doesn't always happen)
    • Statusbar battery icon not properly reflecting actual charge state. (possibly occurs after first suspend, still unconfirmed.)
    • Phone enters deep sleep while on charger. (might have been a fluke, need to confirm)
    • Charge LED does not stay lit with screen off. (Presumably when enters deep sleep)
  • Powered off device on charger will automatically boot up (Permanent flash only)


Temporary kexec test kernel instructions:
Files last updated: 6/23/2012
Note:  The orientation sensor should work if you are on Beta5-pre1 or newer.  If north is pointing the wrong direction, consider a quick calibration as seen here:

  1. Download the 3 files: zImage, boot.cpio.gz, &
  2. Place the files at the root of your sdcard (/sdcard/zImage, etc.)
  3. Flash from CWM.
IMPORTANT:  The phone's stock browser saves zImage as zImage.bin.  You *must* rename it back to zImage.

Please test anything in the list above, whether we specify it working or not.  If something isn't working fully, or not working at all, please let us know in a comment.  Anytime you want to go back to your normal kernel, just reboot the phone.


  1. I can't find it anywhere, what is the three major improvements of 3.x over the existing?

    1. It's not available. They are just keeping us up to date on the current progress for it's development.

    2. Duh. Why switch? What does 3.x offer over 2.6. On paper/theory?

    3. well its not necessary to run ics on 3.0 as it can run on 2.6. But I could have sworn that possibly 3.x makes ics run a bit more solid as it was more optimized for it. But honestly I don't know.

  2. I believe it is to bring our phones code base more inline with some of the other phones development efforts, that way it is easier to maintain and we can benefit from their fixes/enhancements.

  3. The 3.x kernel is capable of more which will let us keep up with more of the actual ics stuff.

  4. When might the speed dial capability be added to CM9?

  5. Can't wait for the test kernel.

    1. I'll second that, it will be nice to have something new to dig through.

  6. Fantastic work. I'm gonna keep Beta 3 on my phone and I'll roll along with the updates. :) If you're taking requests, I'd like to be able to move the applications button from the middle of the dock. I'm so used to it being on the far right lol. Though I suppose I can get used to its new spot.

    Also of note, on the keyboard the Function .com button doesn't work when typing.

    1. The moving of applications button is an upstream feature. That would be something with Trebuchet Launcher. Unfortunately, I'm not sure where to make upstream recommendations directly to the devs. This link will show you the most recent people to work on Trebuchet, hope it helps.,n,z

    2. My stock Nexus S 4G running ICS launcher is the same as the one in Cyanogen Mod 9 so who knows if that feature will be added or not.
      You could always run another launcher, there are several available that let you move the app button around and them some.
      When I used to run GB I would use the GO Launcher which lets you pretty much customize everything, all of the launchers you can get for free are pretty good now.

    3. Try the Nova Launcher. You get all the look of ICS but the customization you are looking for. I also recommend purchasing the prime option as it gives you all the gesture and swipe options on the doc bars.

  7. This blog post is about the 3.0 kernel development. What does Launchers, keyboard functions, speed dial, and sd cards have to do with that?

  8. try to do the test kernel method posted above but it boots with the 2.6.35 kernel instead of the 3.0.x. i cleared the dalvik right after flashing as well before the reboot...???????

    1. I have added a note to the instructions in case anyone downloads with the phone. The filenames must be "zImage" & "boot.cpio.gz". You could change the zip's filename, but I wouldn't unless you have a need to.

    2. Thank you, bbelos. (does homer simpson "DOH!")

  9. Battery was at ~99-100%. Flashed using Rom Manager/CWM, came back at 88%. I know that happens when flashing, but my phone was plugged in.

    1. Can't set clock to 100 Mhz is back.

    2. your phone doesnt charge while your in recovery. ive been messing with galaxy s' for 2 years now and they never have charged while in recovery and it is a big drain flashing in cwm.

    3. Updated the test kernel 6/9/2012 which should fix the 100MHz issue.

  10. Mic on wired headset does not appear to be working.

  11. My phones radio is giving me signals of 1x or sometimes just no bars at all 3g. Is there a specific step I should do how way to update my prl?

  12. absolutely zippier + more responsive than stock kernel on CM9b4-pre3: ran fine for 2 days, then text on screen began to dither + soften out of sharp tight focus, from black type to the screen has begun to deteriorate w/ color rasterization in blobs surrounding the text.........can't imagine why this happened.......have a screenshot, but obviously can not post here; otherwise, great work getting this ported to our og EPIC4G! congrats!

  13. I can confirm sonarchrist comment. Words look "staggered" like every other line of pixels in the letters shift back and forth. All apps, but not all the time.

  14. @sonarchist @bryanweaver and to anyone else testing, I have updated the test kernel's display drivers (among other things) to match the 2.6 kernel which results in better colors. I'm curious if it clears up your distortion issues, although I have yet to reproduce your findings on my own device.

  15. I ran the new kernel for a while tonight. GPS and nav worked fine this time. But I could not get the capactive light to shut out. I also was getting a lot of lag and could not get my laptop to connect to the phone while running 3.033. Colors look good, I have not seen any distortion here. Running with Beta 4 Thanks!

  16. New version 3.0.33 blazingly fast, therefore expect an occassional slight tremor to screen text; so far kernel is holding its own: color is fine, reboots fine, slightest dither to fonts but understand the focus of this test version is functionality, therefore fine-tuning razor sharp screen response is separate phase. Tons of hard work getting this to current state, very much appreciated!

  17. Boot animation loop error on newest test kernel.......

  18. After reading sonarchist's post, I reinstalled this. No lag now, used all day with no problems. Still can not get capactive lights to shut out and no usb connect. But overall very stable. Not sure what happened on my first flash. No problems with texts, phone calls, 2 email accts.( k-9 ),Wifi and battery use seemed comparable to the cm9 stock kernal. I'll post again if I have any issues. Thanks

  19. After running for nearly two days on this kernal I had to go back to stock this afternoon. After using nav to one location this afternoon, when I tried to get a map to the next location, I could not get a data connection. Rebooted to stock Beta 4 and 3g was fine then

  20. ha ha: same here, got a good run from 3.0.33 after setting the minimum frequency to 200MHz, THNX for the pointer bbelos!, then began to change other elements....eventually good a lockscreen-cum-autoreboot, so my ROM went back to stock kernel........mea culpa, just wanted to continue exploring the outer limits of kernel_3.0.33; it is really getting there + the best performance has been on CM9beta4 (also tested on AOKP, tho it works, wouldn't recommend this, in the current form that it's in)..........capacitive lights are fine for me, however have not tried usb connect.......slightly less trembly w/ 200MHz setting (used Voltage Control, NSTools wouldn't stick)+ NO artifacts this round.........will be ODIN'ng back to stock, then up the chain to CM9beta5-pre1 to discern what if any differences this may bode.

  21. This comment has been removed by the author.

  22. Tried with beta pre 1 today. Now cap lights work properly.

  23. Thursday night, ODIN'd back to bone-stock FC09, then ODIN'd CWM > flashed CM9beta5-pre1, DL'd a dozen apps, eventually flashing have been running 'experimental' beta5-pre1 + Kernel_3.0.33 at 100MHz/1000MHz (no 200MHz for this round)+ all appears to be going well......again: no artifacts; still, a very feeble vaguely discernable screen tremble remains; overall device performance is super responsive + working great w/ current bone-stock CM9 setup; only thing, NO 4G wimax (tho 3G is working well).......overall, everything else is *thumbs up* including GPS; did have one auto reboot earlier today while online: was running portable wifi hotspot + had forgotten to turn GPS off (had locked 8 satellites!) it was back to stock kernel for a short spell.

    Am now going to DL most recent 200 MHz version + give that a run, but from a clean CM9beta4 flash, 4 comparison's sake!

  24. I am also seeing artifacts and slight tremble on the screen,its been there since the first test kernel,you can also see it when the boot animation comes on too, its fuzzy around all the text and on the side of it, I tried all the test kernel coming from a clean install on beta 3,4 and 5 but it was still there,other than that its running very smooth and fast.

  25. Four days running 3.0.xx --this time on CM9_mmtest2-- and have to say pretty stable ride so far! Battery life is awesome, 100MHz has remained steady (rule: do not alter settings in Performance nor thru NSTools), GPS still great, + Portable Wifi Hotspot going strong w/ 3-plus hour sessions, no problem; Still some visual artifacts, however much less tremble on this version than in prior ones on this CM9 build. Wondering how this kernel will respond to Nightlies?................Looking forward to Cibetonz driver!

  26. I kinda like the Cap lights to be dimmed.

  27. Can some make this into a flashable zip kernel

  28. Hmm, does this 6/23 kernel include the wimax stuff you mentioned on 6/20? Either way, awesome work!

  29. Have been able to test 3.0.36 on: (1)CM9 NightlyBuild-0624, (2) AOKP_Build40, + (3) CM9_RC1, w/ perhaps the very same results on all ROMs, no discernable difference in performance; have not been able to lock-in 4G Wimax, however 3G has been more than considerable ..... + dramatically, have experienced the best performance from 3.0.36 of all of the test kernels that I have run thus far.

    Have posted a couple of clips on my youtube channel sonarchistVideoGraf which show the HD720p compression of the og EPIC'camera whilst running 3.0.36, for those of you that may be interested in this aspect of the device.

  30. Hey,
    I have added a note to the instructions in case anyone downloads with the phone. The filenames must be "zImage" & "boot.cpio.gz". You could change the zip's filename, but I wouldn't unless you have a need to.

    Moisture Management

  31. i absolutely cannot get this kernel to completely boot: it'll boot thru the animation, and i can only occasionally get the lockscreen to be responsive enough to unlock before the phone vibrates several times and restarts without ever completely loading. i've had this issue on every nightly i've tried since and including rc1 (am presently on 7/7). i've downloaded the 3 files fresh each time since they never worked for me in the first place. not sure what i'm doing wrong, but i seem to be the only person with this problem...