[Kernel] Dragon-G2x v1.5.2 (CM7/Trigger) <Fix Boot on 173+> [10/19/2011]

Search This thread

ttabbal

Senior Member
Jul 1, 2009
2,076
723
Samsung Galaxy S21 Ultra
APN Fix: The work here was done by cm_acree, I provided testing and reporting, nothing more. Thank him. :D I have noticed one issue testing this build, which could be my fault. Rebooting from the menu to recovery (I have clockwork installed) then rebooting from clockwork back to CM7.1 breaks data. Reboot from the power long-press menu, and it comes right up. But how often do we hit recovery? :D

FOR OTHER DEVS: To fix APN, grab the boot.img and use it's ramdisk in your build. That was the only thing I did to my kernel build to get this result. See the bug report here: http://code.google.com/p/cyanogenmo...on Model Network Owner Summary Stars Priority

First off, big thanks to Faux123. This is based on his repo with a few tweaks of my own. I'll be adding more as we go on. And of course, he's welcome to pull any patches he likes from my github. Morfic also deserves top billing as of v1.3. I added a lot of tweaks from his code in the latest version.


Changes:

Added zram compressed swap support. I'll attach a script to turn it on and one to see what its status is. It's not like the older ramzswap that requires a special tool, everything is done through sysfs now. Very nice.

Added zcache compressed cache. This is a bigger win IMO, it compresses any compressible data in the cache. This means you can keep much more data in cache, which means you have to read it in from slow flash much less often.

Tweaked the low memory killer to take swap space into account, but only some of it.... This prevents swap thrashing while the system tries to kill processes and free up ram/swap. I also suggest using something like AutoKiller to set the levels to the best performance for your workload. We all run different apps and such, and that can affect how these things work for each user. There is no setup that is going to be perfect for 100% of users. Speaking of AutoKiller, I have found the advanced tweaks to help a fair bit as well. Don't use the memory management one, it overides your settings for things like swappyness. And the IO Scheduler doesn't do anything as we aren't using cfq. Unless you turn on cfq...


On Swap and compression:

While badly configured swap can slow things down, it's far more complex than people think. It also frees up RAM that's not being used frequently for apps that are. So your system can more efficiently use the resources it has. While compression does use some CPU time, our dual core 1Ghz+ CPUs can compress/decompress REALLY fast. Far faster than reading from the flash storage. In theory, this can affect battery life, though I haven't seen any significant issues from it.

Q: But we have 512M, that's a LOT!
A: Well, kind of... Not all of it is accessible to the kernel for running apps. 128M for the GPU, some for the cameras, wifi, etc... In the end, a little less than 400M is available. Then you have to add in system overhead from the kernel itself, Android's OS processes, etc.. That is quite limiting, IMO, so using it more efficiently is important to me.

Q: I don't like compression/swap.
A: Then don't run this kernel. :p

Download 1.5.1 (older cm7 builds): goo.gl/B2LSW

Download (CM7/Trigger) v1.5.2: http://goo.gl/rl7VY
Scripts: http://goo.gl/M4SzG

Code:
Changelog:

v1.5.2

* Added patch from CM repo for booting 173 and newer builds. 

v1.5.1

* Possible BT/CAM fixes (Change clock options based on Morfic's info) 
* Integrate some config changes 

v1.5

* Possible SOD fix from vork/CM
* Faster SHA-1 from kernel git
* Faster memcpy/memset from kernel git
* Various other patches from the kernel git

v1.4.1

* Updated ramdisk for the latest APN fixes

v1.4

* Disappearing APN fix from cm_acree
* Misc. little fixes

v1.3

* Added morfic's changes to the voltage control code
* Increased voltages 
* Added JRCU patch from morfic's repo
* Tweaked various VM options also per morfic's repo
* Made deadline scheduler the default

v1.2.2

* Update to work with latest CM nightly builds

v1.2 

* Updates from the CM repo


v1.1

* Update various drivers from the LG source drop
* Increase voltages and switch to max 1.5Ghz 
* Switch to the CM based battery driver
 
Last edited:

zimphishmonger

Senior Member
Jun 4, 2009
3,890
729
Great to see you back, ttabal! Been missing your work since the dragon kernels on the Vibrant. Always nice to find another dev working on the G2x! :) Looks alike a great start to an aggressive kernel, just what we need

You have any plans of working on a kernel based off the LG's OTA 2.3.3, the source was released last week?
 

web_ninja

Senior Member
Mar 25, 2010
212
48
Fort Smith
use a terminal emulator to cd to sdcard/scripts folder and type "su" then "sh enable_zram.sh" all without the quotes.... am i right? i did it and the command ran just fine and applied...:D
 

ttabbal

Senior Member
Jul 1, 2009
2,076
723
Samsung Galaxy S21 Ultra
Great to see you back, ttabal! Been missing your work since the dragon kernels on the Vibrant. Always nice to find another dev working on the G2x! :) Looks alike a great start to an aggressive kernel, just what we need

You have any plans of working on a kernel based off the LG's OTA 2.3.3, the source was released last week?


Thanks man! Still getting up to speed on the OC options and such for Tegra, but looks easy enough. I'll be getting dirty later, this is just to get started. :) I've already got the source building thanks to Faux again, just need to get an OTA based ROM installed so I can test it. If only the dual boot thing worked on G2x, would save me some time. Owell. I sent that dev the info he should need to make it work... don't know what the deal is.

Anyway... nandroid almost done... time to try booting. :D
 

web_ninja

Senior Member
Mar 25, 2010
212
48
Fort Smith
thanks ttabbal your way was easier... i am just used to shell... lol i was going to give him a breakdown of the script.... thanks....:p
 

fcisco13

Senior Member
Jul 10, 2010
2,394
686
houston
What should happen when i run script with script manager??

I get setting up swap space version 1 size =xxxxx
 

zimphishmonger

Senior Member
Jun 4, 2009
3,890
729
Thanks man! Still getting up to speed on the OC options and such for Tegra, but looks easy enough. I'll be getting dirty later, this is just to get started. :) I've already got the source building thanks to Faux again, just need to get an OTA based ROM installed so I can test it. If only the dual boot thing worked on G2x, would save me some time. Owell. I sent that dev the info he should need to make it work... don't know what the deal is.

Anyway... nandroid almost done... time to try booting. :D

Excellent! Cant wait for one of your kernels. Feel free to PM or DM me if u need a test.

Glad you got the source compiling w/o issue (I know Faux was having major issues w/ that and maintaining stability), now u just gotta make sure you dont have the same freezing\"black wake screen" issue and you're solid. From what I hear, Tegra's CPU governor is really different from other chips, and its very sensitive\strict to voltage changes in between stepping (<=100mv per stepping). I'm running OTA (well, WeaponG2x, but thats OTA based) FT at the moment cause I use A2DP, but I jump back to CM every once and a while when major developments happen. Feel free to shoot me a test if u need another device to try your code on. More than happy to help!

Crossing fingers for the boot ;)
 

KingDavid63

Senior Member
Apr 6, 2011
2,534
362
Warrior, AL
www.facebook.com
Uh oh it is oc and uv got us a mac book made kernel, lets hope it don't freeze and I'll be one happy man. Thanks dude!

Edit: didn't get as far as script with ota kernel, froze 10 minutes in had to do a battery pull, if you need a log cat just say the word...

Sent from my LG-P999
 
Last edited:

xkngofqnz

Senior Member
Jan 23, 2010
67
0
when i apply this with script manager whats it suppose to say? how do i know it worked?
and do i have to do it everytime i reboot? or just check the box root and run at boot when i apply?

thanks in advance
 

wu_wei_lion

Senior Member
Jul 27, 2010
114
5
This kernel is smooth as silk. I can't wait to see how you improve on it

Sent from my LG-P999 using XDA Premium App
 

billydroid

Senior Member
Jun 24, 2010
1,599
481
Thanks. Love seeing new devs

Sent from my LG-P999 using XDA Premium App

+ 1 ttabal is a badass kernel dev. He did awesome stuff for the vibrant with his dragon kernels.

This kernel is solid , nice work. Running the script as well and all seems really smooth.

Sent from my LG-P999 using Tapatalk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 31
    APN Fix: The work here was done by cm_acree, I provided testing and reporting, nothing more. Thank him. :D I have noticed one issue testing this build, which could be my fault. Rebooting from the menu to recovery (I have clockwork installed) then rebooting from clockwork back to CM7.1 breaks data. Reboot from the power long-press menu, and it comes right up. But how often do we hit recovery? :D

    FOR OTHER DEVS: To fix APN, grab the boot.img and use it's ramdisk in your build. That was the only thing I did to my kernel build to get this result. See the bug report here: http://code.google.com/p/cyanogenmo...on Model Network Owner Summary Stars Priority

    First off, big thanks to Faux123. This is based on his repo with a few tweaks of my own. I'll be adding more as we go on. And of course, he's welcome to pull any patches he likes from my github. Morfic also deserves top billing as of v1.3. I added a lot of tweaks from his code in the latest version.


    Changes:

    Added zram compressed swap support. I'll attach a script to turn it on and one to see what its status is. It's not like the older ramzswap that requires a special tool, everything is done through sysfs now. Very nice.

    Added zcache compressed cache. This is a bigger win IMO, it compresses any compressible data in the cache. This means you can keep much more data in cache, which means you have to read it in from slow flash much less often.

    Tweaked the low memory killer to take swap space into account, but only some of it.... This prevents swap thrashing while the system tries to kill processes and free up ram/swap. I also suggest using something like AutoKiller to set the levels to the best performance for your workload. We all run different apps and such, and that can affect how these things work for each user. There is no setup that is going to be perfect for 100% of users. Speaking of AutoKiller, I have found the advanced tweaks to help a fair bit as well. Don't use the memory management one, it overides your settings for things like swappyness. And the IO Scheduler doesn't do anything as we aren't using cfq. Unless you turn on cfq...


    On Swap and compression:

    While badly configured swap can slow things down, it's far more complex than people think. It also frees up RAM that's not being used frequently for apps that are. So your system can more efficiently use the resources it has. While compression does use some CPU time, our dual core 1Ghz+ CPUs can compress/decompress REALLY fast. Far faster than reading from the flash storage. In theory, this can affect battery life, though I haven't seen any significant issues from it.

    Q: But we have 512M, that's a LOT!
    A: Well, kind of... Not all of it is accessible to the kernel for running apps. 128M for the GPU, some for the cameras, wifi, etc... In the end, a little less than 400M is available. Then you have to add in system overhead from the kernel itself, Android's OS processes, etc.. That is quite limiting, IMO, so using it more efficiently is important to me.

    Q: I don't like compression/swap.
    A: Then don't run this kernel. :p

    Download 1.5.1 (older cm7 builds): goo.gl/B2LSW

    Download (CM7/Trigger) v1.5.2: http://goo.gl/rl7VY
    Scripts: http://goo.gl/M4SzG

    Code:
    Changelog:
    
    v1.5.2
    
    * Added patch from CM repo for booting 173 and newer builds. 
    
    v1.5.1
    
    * Possible BT/CAM fixes (Change clock options based on Morfic's info) 
    * Integrate some config changes 
    
    v1.5
    
    * Possible SOD fix from vork/CM
    * Faster SHA-1 from kernel git
    * Faster memcpy/memset from kernel git
    * Various other patches from the kernel git
    
    v1.4.1
    
    * Updated ramdisk for the latest APN fixes
    
    v1.4
    
    * Disappearing APN fix from cm_acree
    * Misc. little fixes
    
    v1.3
    
    * Added morfic's changes to the voltage control code
    * Increased voltages 
    * Added JRCU patch from morfic's repo
    * Tweaked various VM options also per morfic's repo
    * Made deadline scheduler the default
    
    v1.2.2
    
    * Update to work with latest CM nightly builds
    
    v1.2 
    
    * Updates from the CM repo
    
    
    v1.1
    
    * Update various drivers from the LG source drop
    * Increase voltages and switch to max 1.5Ghz 
    * Switch to the CM based battery driver
    3
    Link down

    The link in the op seems to be down and I know someone is trying to get it so I'm upping it here.
    2
    This might be a stupid question but I never really used these kernals before, I install this kernal after wipe cache and dalvic, fix permissions, boot up.
    Did all that but what about the scripts? do I have to do something with that?

    You don't need to use the script unless you want to use the extra swap thing. It works fine without it.
    2
    Just a matter of misunderstanding

    Guys/gals, as a newb and someone who has worked in software for many years, here's my 2 cents as an outsider.

    I think this is just a matter of a slight misunderstanding.

    It's easy to lose the essence of a message in a faceless forum, with thousands of people chiming in, without context, body-language, or real-time discussion. Knee-jerk reactions here or on twitter are just an unfortunate result.

    In reality both faux123 and ttabbal have made invaluable contributions to code-base and G2x community here. There might be a slight difference in expectations on how credit should be given and how the bounty should be shared. Fine, the two fine developers can work that out among themselves. It's more a matter of personal styles than best practices.

    That said, reading some of the direct/indirect criticisms of other forum member on faux's kernel I can see why his temperature might have been raised when others were pointing at ttabbal's work to be "better" or more complete.

    This would of never happened if users were giving live feedback and the devs were in a room together discussing the issues.

    Let's just accept this unfortunate misunderstanding as a result of our virtual digital world and move on.
    1
    Thanks bro. how do we run the script to turn on/check.

    Unzip the scripts.zip and use gscript or Script Manager to run them... you can also just run them in a shell if you prefer. Lots of options. They are to run on the phone, not your computer.