• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[KERNEL][AOSP][AnyKernel] Gamma Kernel for D855/D852/D851/D850/VS985/LS990

Search This thread

Omar-Avelar

Senior Member
Feb 3, 2013
1,119
2,235
7177sw.png


DESCRIPTION
This is a custom based Kernel for the D855/D852/D851/D850/VS985/LS990 variants of the LG G3 with performance enhancements and bug fixes that I have been using personally for a few months, thought it is time to share since I have had no inconvenient bugs and quite a big performance increase and smooth UI benefits. The intention is to have a minimal light-weight kernel that is fine tuned for the device.

FEATURES

  • User space voltage control
  • Backport MSM devfreq features from 3.18 Kernel for the smoothest experience, includes adding cache fabric frequency scaling and better bus utilization as well as the mincpubw governor
  • User space display color calibration (KCAL)
  • Deeper memory controller power savings on suspend (deeper power savings while sleep)
  • Two new L2 cache frequency steps: 1.88 & 2.03 GHz, allows for better multi-core utilization and hit rates
  • Wireless roaming disconnecting is now fixed
  • IRQ Balancer enabled with proper SELinux support to spread out the interrupts of our SoC
  • IntelliPlug to allow lower thermal dissipation by keeping some cores alive to distribute loads and keep frequencies lower accross SoC die
  • Reduced heat when using wireless chargers
  • Memory and cache subsystem optimizations, you will feel it int the UI
  • Adreno Idler to get better GPU frequency utilization and battery life [removed as msm-adreno now idles properly]
  • Interactive governor tweaks to focus on lower frequencies while still maintaining fluidity in the UI
  • BFQ IO scheduler set by default to avoid slow-downs on task intensive scenarios
  • No overclocking was chosen to avoid unnecessary heat, optimizations were focused on other different areas
  • Kernel Samepage Sharing enabled with deferred timer by default to gain some memory usage optimizations
  • Compiled with GCC 6.x optimized toolchain and -O3 plus other hardware specific flags
  • Undervolted the Adreno 330 GPU voltage rail to keep things cooler, and reduced the GPU min frequency to 27 MHz while keeping it's temperature cool to reach 620 MHz overclock
  • Default thermal values work ok, since GPU voltage rails and others were shaved a few mV
  • 100 Hz tick to prevent excessive battery usage, the smoothness of the UX does not come alone from raw processing -- there are many other changes in the subsystem that helped achieve the fluidity
  • An ultra low value in the interactive min_sample_time so that the interactive governor does not hover on excessive frequencies
  • Heavily tuned the GPU bandwidth and bus requirements to match closer the capabilities of the device and thus preventing micro-stutters
  • Optimized the MSM crypto engines thanks to @waau
  • Updated the KGSL drivers so that we can use the Adreno userspace drivers version Adreno-MOB30M-for-LG-G3-AOSP.zip


DOWNLOADS

AnyKernel: Click Here (Check Top of the Post, Download Tab)




SOURCE



NOTES
  • I recommend turning NFC off for way better idle battery consumption :victory:


KNOWN BUGS
  • FM Radio is causing hangs, still needs investigation


<< If you like my work here is my hat, please donate! >>



XDA:DevDB Information
Gamma Kernel , Kernel for the LG G3

Contributors
Omar-Avelar
Source Code: https://github.com/oxavelar/D85X-Kernel-Gamma

Kernel Special Features:

Version Information
Status: Stable
Current Stable Version: 90.0.0
Stable Release Date: 2018-05-10

Created 2016-08-09
Last Updated 2018-05-13
 

Attachments

  • AnTuTu-620-MHz-v48.png
    AnTuTu-620-MHz-v48.png
    102 KB · Views: 39,056
Last edited:

Omar-Avelar

Senior Member
Feb 3, 2013
1,119
2,235
@agdish84, I have now updated the links, thanks... I missed that.

Hey @jochem86, USB charging is working on CM ROM's so I wonder if Xenon ROM is doing anything funky, mmm... I will check if Xenon has anything strange but it is not touching anything charge related.

This Kernel does not support USB force fast charge because fast charging will cause batteries to age faster. It's a trade-off, and usually ends up providing more heat. Not sure if I will put support on forced USB fast charge or not.
 
Last edited:

jochem86

Senior Member
Oct 24, 2013
371
120
Amsterdam
@agdish84, I have now updated the links, thanks... I missed that.

Hey @jochem86, USB charging is working on CM ROM's so I wonder if Xenon ROM is doing anything funky, mmm... I will check if Xenon has anything strange but it is not touching anything charge related.

This Kernel does not support USB force fast charge but might do add it in the week if a lot of people feel the need of it. [Btw, personally this is the main reason why I did not enable fast charging enabled sysfs force control - URL]

Dirty flashed the xenon again and it charges again without any problem. I have to say some other roms it doesnt charge in usb when i am using it... with xenon it doest but very slow, that is normal. But also in deep sleep, it doenst charge a bit... i guess in xenon the fast charge is enabled and other roms not bu default. i hope you figure out whats messign it up.
 
  • Like
Reactions: Omar-Avelar

Omar-Avelar

Senior Member
Feb 3, 2013
1,119
2,235
Dirty flashed the xenon again and it charges again without any problem. I have to say some other roms it doesnt charge in usb when i am using it... with xenon it doest but very slow, that is normal. But also in deep sleep, it doenst charge a bit... i guess in xenon the fast charge is enabled and other roms not bu default. i hope you figure out whats messign it up.

Thanks for the update, and do let me know how do you feel this Kernel in terms of performance against the others you've used. It doesn't have to be immedeatly, use it for a while and give me some feedback on things you see are working good too, thanks a lot ;)
 

jochem86

Senior Member
Oct 24, 2013
371
120
Amsterdam
Thanks for the update, and do let me know how do you feel this Kernel in terms of performance against the others you've used. It doesn't have to be immedeatly, use it for a while and give me some feedback on things you see are working good too, thanks a lot ;)

That was my intention to give you my experience but my batt was pretty low so i changed it back to stock kernel... as i am on my work right now ;) but for those few minutes i tried it felt pretty smooth.
 

Windforce0511

Senior Member
Aug 19, 2014
1,089
353
BIH
Thanks for the update, and do let me know how do you feel this Kernel in terms of performance against the others you've used. It doesn't have to be immedeatly, use it for a while and give me some feedback on things you see are working good too, thanks a lot ;)
In terms of performance? Oh yes, give me time to flash CM13 and test UI smoothness, I have feeling this is right thing for that. Waiting for this for a long time. ;)
 
  • Like
Reactions: Omar-Avelar

Jagdish84

Senior Member
May 1, 2010
1,883
435
@Omar-Avelar do you have any plans on adding gamma control? I'm really enjoying myself atm running it with Zephyr os rom. Ty for your hard work!

Sent from my caseless LG G3, because I believe in myself
 

Omar-Avelar

Senior Member
Feb 3, 2013
1,119
2,235
@Omar-Avelar do you have any plans on adding gamma control? I'm really enjoying myself atm running it with Zephyr os rom. Ty for your hard work!

Sent from my caseless LG G3, because I believe in myself

I think I will do that, it might be about the only things that are do needed and won't interfere as much with stability. ;) Gimmie a few weeks to get some free time.
 

Ormsher

Senior Member
Feb 1, 2015
58
35
Using this kernel made me love my phone again. Was using Latest CM 13 and UI was time to time laggy and slow. Flashed this kernel and device runs smooth as butter. Love that kernel does not overclock anything so i know that i don't shorten life span of my cpu. Kudos to @Omar-Avelar for developing something like this!
 
  • Like
Reactions: Omar-Avelar

Jagdish84

Senior Member
May 1, 2010
1,883
435
Phone heats up a lil while charging... Didn't use it or anything, just picked it up to see the time and it felt rather warm to me, using zephyr rom and a lil undervolting. Btw, during regular usage phone is stone cold, kudos!

Sent from my caseless LG G3, because I believe in myself
 

Top Liked Posts

  • There are no posts matching your filters.
  • 65
    7177sw.png


    DESCRIPTION
    This is a custom based Kernel for the D855/D852/D851/D850/VS985/LS990 variants of the LG G3 with performance enhancements and bug fixes that I have been using personally for a few months, thought it is time to share since I have had no inconvenient bugs and quite a big performance increase and smooth UI benefits. The intention is to have a minimal light-weight kernel that is fine tuned for the device.

    FEATURES

    • User space voltage control
    • Backport MSM devfreq features from 3.18 Kernel for the smoothest experience, includes adding cache fabric frequency scaling and better bus utilization as well as the mincpubw governor
    • User space display color calibration (KCAL)
    • Deeper memory controller power savings on suspend (deeper power savings while sleep)
    • Two new L2 cache frequency steps: 1.88 & 2.03 GHz, allows for better multi-core utilization and hit rates
    • Wireless roaming disconnecting is now fixed
    • IRQ Balancer enabled with proper SELinux support to spread out the interrupts of our SoC
    • IntelliPlug to allow lower thermal dissipation by keeping some cores alive to distribute loads and keep frequencies lower accross SoC die
    • Reduced heat when using wireless chargers
    • Memory and cache subsystem optimizations, you will feel it int the UI
    • Adreno Idler to get better GPU frequency utilization and battery life [removed as msm-adreno now idles properly]
    • Interactive governor tweaks to focus on lower frequencies while still maintaining fluidity in the UI
    • BFQ IO scheduler set by default to avoid slow-downs on task intensive scenarios
    • No overclocking was chosen to avoid unnecessary heat, optimizations were focused on other different areas
    • Kernel Samepage Sharing enabled with deferred timer by default to gain some memory usage optimizations
    • Compiled with GCC 6.x optimized toolchain and -O3 plus other hardware specific flags
    • Undervolted the Adreno 330 GPU voltage rail to keep things cooler, and reduced the GPU min frequency to 27 MHz while keeping it's temperature cool to reach 620 MHz overclock
    • Default thermal values work ok, since GPU voltage rails and others were shaved a few mV
    • 100 Hz tick to prevent excessive battery usage, the smoothness of the UX does not come alone from raw processing -- there are many other changes in the subsystem that helped achieve the fluidity
    • An ultra low value in the interactive min_sample_time so that the interactive governor does not hover on excessive frequencies
    • Heavily tuned the GPU bandwidth and bus requirements to match closer the capabilities of the device and thus preventing micro-stutters
    • Optimized the MSM crypto engines thanks to @waau
    • Updated the KGSL drivers so that we can use the Adreno userspace drivers version Adreno-MOB30M-for-LG-G3-AOSP.zip


    DOWNLOADS

    AnyKernel: Click Here (Check Top of the Post, Download Tab)




    SOURCE



    NOTES
    • I recommend turning NFC off for way better idle battery consumption :victory:


    KNOWN BUGS
    • FM Radio is causing hangs, still needs investigation


    << If you like my work here is my hat, please donate! >>



    XDA:DevDB Information
    Gamma Kernel , Kernel for the LG G3

    Contributors
    Omar-Avelar
    Source Code: https://github.com/oxavelar/D85X-Kernel-Gamma

    Kernel Special Features:

    Version Information
    Status: Stable
    Current Stable Version: 90.0.0
    Stable Release Date: 2018-05-10

    Created 2016-08-09
    Last Updated 2018-05-13
    19
    On v60.0.0 I have added a new devfreq governor called mincpubw (displayed as qcom,mincpubw.44) that exists on MSM8996 for our LG G3 which seems to have helped a lot on keeping the device smooth with unnecessary bandwidth voting on the real cpubw governor when the device is idle. This should help a lot on idle times while keeping the device without jank on real usage scenarios.

    The next thing I will do will be explore adding the memlat devfreq governor that exists on MSM8996 devices once I debug deeper why it does not register... this should help on janky issues when the device is changing between idle and active state :)

    UPDATE: I made a mistake on the D851 /D852 versions, this v60.0.0 will boot-loop...removing it out for now, I will update it during the weekend to fix it :) In the meantime the other users can let me know how it goes with this version
    17
    Changelog:

    12.0.0 was a mistake, but 12.1.0 tries to fix some enhancements I wanted to make on the DDR and cache subsystem utilization, so I reduced the polling in it to be 1ms instead of 10ms (which was the limit before) and using now a 80 sample time window makes the responsiveness improve even further while keeping the CPU freqs lower... seems like the memory subsystem (either jumps or lag) is what makes this device lag and crawl the most.

    And also added back the wiimote drivers in the Kernel, I had some local conflicts from upstream there but those are fixed now.

    Restored the gamma control colors to be more white neutral as some people complained about it, but still kept the contrast a little bit higher than default -- makes whites look more like the iPhone and increased a little bit the dark levels to look darker.

    The FM radio bug is still there, haven't had time to check what causes it yet
    16
    On v20.1.0 I have fixed a mistake I had made after v12 that caused not to have the performance up to par. I had picked the wrong slave ID's on the memory subsystem on the last 3 high'ish GPU frequencies, and hence introduced GPU micro-lags due to bandwidth starvation and not a fair QoS.

    Thanks to all (@fabriquesilver and @gr3ud) on pointing out that the v12 was the best and gave me an idea to look at what I could have messed up :)
    16
    On v50 I've finally properly incorporated the msm_irqbalance binary with correct SELinux policies. This helps a lot on removing the jerking of the animations. If our SoC does not rebalance interrupts it will tax CPU0 for most of them (GFx [kgsl-3d0], Bandwidth scaling [bw_hwmon, cache_hwmon], MMC[mmc*]) and many others important for a smooth experience factors and subsystem deliver interrupts. Give this version a try! :)

    e.g.

    Code:
    d855:/ # logcat | grep -i irqb
    04-13 09:28:26.085   266   266 I MSM-irqbalance: Decided to move IRQ57 from CPU0 to CPU3
    04-13 09:28:31.080   266   266 I MSM-irqbalance: Decided to move IRQ216 from CPU0 to CPU3
    04-13 09:28:36.079   266   266 I MSM-irqbalance: Decided to move IRQ65 from CPU0 to CPU1
    04-13 09:28:41.079   266   266 I MSM-irqbalance: Decided to move IRQ155 from CPU0 to CPU3
    04-13 09:28:49.242   266   266 I MSM-irqbalance: Decided to move IRQ200 from CPU0 to CPU3
    04-13 09:28:54.242   266   266 I MSM-irqbalance: Decided to move IRQ188 from CPU0 to CPU3
    04-13 09:28:59.244   266   266 I MSM-irqbalance: Decided to move IRQ33 from CPU0 to CPU3
    04-13 09:29:04.242   266   266 I MSM-irqbalance: Decided to move IRQ155 from CPU0 to CPU3
    04-13 09:29:30.906   266   266 I MSM-irqbalance: Decided to move IRQ65 from CPU0 to CPU3
    04-13 09:29:35.904   266   266 I MSM-irqbalance: Decided to move IRQ33 from CPU0 to CPU3
    04-13 09:29:40.904   266   266 I MSM-irqbalance: Decided to move IRQ155 from CPU0 to CPU3
    04-13 09:29:50.959   266   266 I MSM-irqbalance: Decided to move IRQ200 from CPU0 to CPU3
    04-13 09:29:56.069   266   266 I MSM-irqbalance: Decided to move IRQ188 from CPU0 to CPU3
    04-13 09:30:01.078   266   266 I MSM-irqbalance: Decided to move IRQ178 from CPU0 to CPU3
    04-13 09:30:06.159   266   266 I MSM-irqbalance: Decided to move IRQ177 from CPU0 to CPU3
    04-13 09:30:11.198   266   266 I MSM-irqbalance: Decided to move IRQ163 from CPU0 to CPU3
    04-13 09:30:21.239   266   266 I MSM-irqbalance: Decided to move IRQ137 from CPU0 to CPU3
    04-13 09:30:26.239   266   266 I MSM-irqbalance: Decided to move IRQ127 from CPU0 to CPU3
    04-13 09:30:31.255   266   266 I MSM-irqbalance: Decided to move IRQ240 from CPU0 to CPU3
    04-13 09:30:36.508   266   266 I MSM-irqbalance: Decided to move IRQ104 from CPU0 to CPU3
    04-13 09:30:41.503   266   266 I MSM-irqbalance: Decided to move IRQ128 from CPU0 to CPU3