• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Cyanogenmod-Tweaked Kernel

Yoinx

Android Expert
This is a kernel tweaked off of the CM Iproj Kernel. A lot of the code will be directly borrowed from the repos of Windkernel, Showp1984, and Faux123

This is a custom kernel, so don't report issues it may cause as issues with roms. Always run the kernel included with those roms when reporting issues.

This kernel will replace/remove/rename a few things on /system so make sure you have a backup.
  • /system/etc/init.qcom.post_boot.sh - stop mpdecision and thermald, just in case they're running somehow
  • vold.fstab - only mount the external sdcard to clean up some logcat spam
  • /system/lib/modules - deletes all modules and replaces them with the ones for this kernel


Features:
  • Overclocked to max out at 1.83ghz
  • GPU overclocked to max at 300mhz
  • Added the governors: smartassv2 and lagfree
  • Added the I/O schedulers: row, sio, and vr
  • Added kernel based MSM Mpdecision from Showp1984
  • Added 3 stage kernel based MSM thermald from Showp1984
  • Added Dynamic fsync from one of faux123's repos
  • Sysfs Tunable CPU voltage table
  • Lowered the LCD screen max current (may make the screen a bit dimmer)
  • Enabled more tcp congestion methods.(may or may not do much)
  • Enable zram and swap
  • Lots of miscellaneous fixes, check the commit history for details.


I recommend using either Trickstermod or Kernel Tuner to tweak kernel settings. They both have their fine points. I personally prefer Kernel Tuner.


Latest Version: V44

I highly recommend using this with my enhanced init.d script. Get it from here


Previous Versions

Source: github


Showp1984 Explains some of the tunables for msm_mpdecision and msm_thermald on his rom page here. AS well as a bit about the badass governor.
 
I remember TDM posting something about wind kernel awhile back. I figured I might give it a go trying to modify it for our phone.

So, i cloned the repo at https://github.com/lyfkevin/Wind_iproj_CM_kernel and modified a few files to get it to build. Seems like it should have some nice features as far as overclocking, io schedulers, and governors.

However, as soon as I enabled bluetooth it rebooted and bootlooped lol

Then I noticed the https://github.com/lyfkevin/Wind_iproj_ICS_kernel repo has a higher version number. I'm going to clone this one and try to get a build, hopefully this one has newer modules or something and doesnt reboot.

Has anyone else attempted this yet?

I posted on the xda wind kernel thread when tdm brought it up but I never heard anything back. It would be awesome if you could get it working though
 
The 3.4 kernel is where it's at now. An xda dev had it running on the su640 and/or the p930 I'm still a bit confused on that. I'll be trying to get it running on my nitro tomorrow and then it's spectrum time.

Yeah? That second git I posted with ics in the name claims to be 3.80 Linux kernel but 3.4 wind version.

I managed to get iv3.4 to boot once so far but I had no video by basically adding config items from a diff between the cm defconfigs and the 640. Then every attempt after that I wasn't getting past the LG screen. But that was using stuff from the p930 config. Thinking about trying with just get cm920 config asks answering the questions for the missing fields.

Just tried a few things briefly last night. Bring my first time playing with it I didn't expect much to happen ;p

Sent from my VS920 4G using Tapatalk 2
 
Alright, I decided that since I can't get windkernel to work quickly (if at all) I compiled the overclocking, governors and I/O schedulers from wind kernel into the CM kernel. I'm guessing that if TDM is also working on this, he'll likely finish it before I do.

ANY KERNEL LINKED HERE SHOULD BE CONSIDERED EXPERIMENTAL AND POTENTIALLY RISKY.


Source https://github.com/CyanogenMod/lge-kernel-iproj

Patch - This should be able to be applied ontop of most any changes to the repo.
Modified defconifg - You'll get errors about not having min/max cpu freq set if you don't use this.

Flashable Kernel and Modules


I haven't done a whole lot of testing with this, but it boots fine and all the options are select-able without an immediate reboot.

Note: The default max freq is set to the max of 1836MHZ. So you'll need to use setcpu or the performance control in the rom (if it's still there) to set this to a lower value on boot if you like your battery. Here's a second flashable kernel that's got it's default set to 1512mhz, for those of you that like your phone to feel cool ;)


I didn't carry across the undervolting. I'll have to put a bit more time into that as it looks like a bit of tweaking to the lge sources for each device. I'll have to compare/carry over each bit, compile/test/commit and continue on. :)


*edit*

And here's one that *should* let you tweak cpu voltages in incredicontrol. Of course, you may fry your phone playing in there... But, you might also get better battery.

http://d-h.st/EqT

Unfortunately, most of the other voltage control apps require the device/kernel to be added to the app to allow tuning... So it may or may not actually be doing anything.
 
I've got the governors io schedulers and sysfs voltages added in. However I'm having a hard time getting showps msm mpdecision baked in. It compiles but there's nothing in the log from it... so I'm not sure if it's working. Sorry for the sloppy commits. I moved from a local repo to a fork and my patches wouldn't take...

Any ideas?

https://github.com/yoinx/lge-kernel-iproj

Sent from my VS920 4G using Tapatalk 2
 
Scratch that... I've got msm_mpdecision baked into the kernel with sysfs tuneables now (though I don't actually know 100% if it's working right. Looks like I finally got it going, but it outputs it's start/stop to dmesg, not logcat.

Next is getting thermal control working built into the kernel. I'll put up a new build once I have that going. (just in case anyone's actually interested in using this). It's pretty neat being able to tweak things in trickster mod.
 
Scratch that... I've got msm_mpdecision baked into the kernel with sysfs tuneables now (though I don't actually know 100% if it's working right. Looks like I finally got it going, but it outputs it's start/stop to dmesg, not logcat.

Next is getting thermal control working built into the kernel. I'll put up a new build once I have that going. (just in case anyone's actually interested in using this). It's pretty neat being able to tweak things in trickster mod.
After reading all the changes you put in. Once its fully functioning I'll switch to it. I'm really wanting some better battery life on cm10.1.
 
Can't wait to give this a run as well. As much as I love stock CM, I miss having an overclocked kernel.
 
After reading all the changes you put in. Once its fully functioning I'll switch to it. I'm really wanting some better battery life on cm10.1.

I don't really want to say that "I" put anything in. I'm just moving features over from wind kernel since when I compiled that it wouldn't even pretend like it would find out video.

I'm no dev... just borrowing code and recompiling then chasing down errors ;)


Can't wait to give this a run as well. As much as I love stock CM, I miss having an overclocked kernel.

Yeah me too. I mostly wanted the different governors. But the gpu is also overclocked to 266 which can be turned down in trickster.

I wanted to include the ... I can't think of the name... but it's a module from shpwp that lets you tube the gpu 2d and 3d settings on the fly.... but I'm not sure what the right info to pass for parameters is

Sent from my VS920 4G using Tapatalk 2
 
alright... so... I'd recommed making a full system/boot backup before using this (obviously).

Dev-Host - Kernel_Test.zip - The Ultimate Free File Hosting / File Sharing Service

This has everything that was included previously. I managed to get msm mpdecision and msm thermal working. These can both be configured in trickstermod.

msm mpdecision will turn off one of the cores when the turned off. It has other settings that can be configured via app or by echoing values into it's settings in /sys/kernel

msm thermal is the 3 phase version. You can configure the settings for it's low/mid/high upper and lower temp values (in celcius) and the frequency that you throttle to. It doesn't look like this thermal control though has a configurable panic though to reboot the phone. It just throttles the cpu all the way down.


Enjoy.

Remember, if you plan on undervolting... don't jump too far, and use an app like Stability test to see if you're going to get reboots from undervolting too far.


Also, I'm still trying to get https://github.com/showp1984/kcontrol_gpu_msm to work right to configure the 2d/3d clocks on the fly. Currently you can set the gpu clock through normal means. But not for each of those individually, which is the functionallity this module would provide. Specifically, I can't figure out the values to use when inserting the module in insmod kcontrol_gpu_msm.ko dev_3d0=0xXXXXXXXX gfx2d0_clk=0xYYYYYYYY gfx3d_clk=0xZZZZZZZZ


Unfortunately, I couldn't get the code from windkernel to do what I wanted for the thermal control... so this project's deviated a little. *shrug*

If anyone's got any ideas, I'm open to them.


*Now that I got all that to where it seems like it's working... I'm going to be cherry picking bug fixes in from WindKernel. Keep an eye here for updates. I'll start using some sort of versioning system as well*
 
Flashed and booted fine, a little choppy at first but seems to be settling down. Adjusted the overclock and governer, will post updates after I run it for awhile. On the latest PAC nightly (6/03 I think?)
 
Heh, new version. I was hoping to get it up here before anyone flashed ;)

Dev-Host - Cyanogenmod-Tweaked.33.zip - The Ultimate Free File Hosting / File Sharing Service

The changes can be found (somewhat) in the commit messages here. Most of them just reference the commits on the winderkernel github. https://github.com/yoinx/lge-kernel-iproj/commits/cm-10.1

This should have a memory leak in fscache fixed, update the interactive governor, automatically convert oom_adj values to oom_score_adj values, send input events 1 at a time (might improve touch response), and a few misc wifi fixes (one addressed wakelocks, maybe it will help with the wlanrx issues).


I managed to get the kcontrol_gpu_msm module to work. You may have to do this manually (or via init script)


Basically, follow the directions and get the values from the cat commands. My string ended up having to be:

[high]insmod /system/lib/modules/kcontrol_gpu_msm.ko dev_3d0=0xc0c7a9f0 gfx2d0_clk=0xc0c38f80 gfx3d_clk=0xc0c339bc[/high]

I'm willing to bet yours will be as well.


OP updated with latest version.

Also, if you use this... the default governor is "badass" it's a conservative type governor. You'll notice better performance with most any of the others. I installed an frandom module (I'll likely include this next time I post up a build/installer) But for example... with badass (1.5ghz max) antutu gives me 3800ish for a score. with smartass2 (1.5ghz max) it gives me 7600ish. I didn't run multiple tests though.


So, first issue I've found... While running antutu benchmarks, it doesn't seem to like being set to 1.8ghz on performance governor. Though, I doubt this phone's ever enjoyed that too much. But I get a reboot each time. and of course there's nothing helpful in the last_kmsg :s It's VERY likely that I've undervolted the freqs over 1.5ghz too much.
 
So I charged my phone to 100% last night before I went to bed. Not sure if this is good or bad... but looked like about 2% an hour from just sitting on WiFi.

uploadfromtaptalk1370430679922.jpg

Sent from my VS920 4G using Tapatalk 2
 
V34 up.

I included the frandom (by ryuinferno) and kcontrol_gpu_msm modules in this one, with an init.d script to load them both (and configure some things for frandom by ryuinferno)

I also turned the max current for the lcd backlight down from 22.5mA to 12mA. I'm not sure if this will be too dark... or really even save any battery life... But I've always felt that the screen was too bright at the brightest setting which should draw juice for no reason.

Let me know how it works out.
 
Flashed this on the latest chameleon os and got stuck a boot screen, will flash v34 on PAC and see if that works
 
Flashed this on the latest chameleon os and got stuck a boot screen, will flash v34 on PAC and see if that works

Yeah, I probably should have mentioned that since I've only been running PAC on my phone... that's the only thing that I've been testing on.
 
Just tried v34 on cm10.1 5-22 nightly and it wouldn't read the SD card... said blank or unsupported file system. Its a class 10 sandisk 32gb.
 
Just tried v34 on cm10.1 5-22 nightly and it wouldn't read the SD card... said blank or unsupported file system. Its a class 10 sandisk 32gb.

What format is the card in? FS and partitions?

I use a 32gb class4, 1 partition fat32.
 
Fat32, 1 partition. I dirty flashed another cm nightly and still couldn't access the sd card. I ended up having to restore a nandroid. Give me a few minutes to make an updated nandroid and then I'll reflash the kernel and see if I can get a logcat or something.
 
Fat32, 1 partition. I dirty flashed another cm nightly and still couldn't access the sd card. I ended up having to restore a nandroid. Give me a few minutes to make an updated nandroid and then I'll reflash the kernel and see if I can get a logcat or something.

Thanks. I'm pretty curious what's going on. I think I only pulled one commit from windkernel that touched the file system sources. That *might* have done it, but I would think that would affect everyone.
 
Back
Top Bottom