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

[KERNEL][AOSP] mk2000 Kernel [v0.6]

Search This thread

askermk2000

Senior Member
Jul 9, 2015
1,183
2,629
Moto G
LG G5
Which gcc version are you using? removing fsplit-paths to ftree-vectorize just causes a LOAD of errors xD
Might just be easier to update gcc version

That should not create errors in itself, that is something I added there. Maybe just remove all of it line 381 to 385.

I'm using gcc 10.3 (arm/linaro version). I don't compile inline with rom so I don't know much about that, but gcc4.9 might be too old because I've patched the kernel a lot to work better with newer gcc.
Well I think it should still work, but I feel it's a bit sad to use 4.9 hehe
 
  • Like
Reactions: VortexHD

VortexHD

Senior Member
That should not create errors in itself, that is something I added there. Maybe just remove all of it line 381 to 385.

I'm using gcc 10.3 (arm/linaro version). I don't compile inline with rom so I don't know much about that, but gcc4.9 might be too old because I've patched the kernel a lot to work better with newer gcc.
Well I think it should still work, but I feel it's a bit sad to use 4.9 hehe
Thanks I think I will leave it for now because nothing seems to be working. Thanks anyway, do you have a test build I can try?
 

VortexHD

Senior Member
Your kernel is great! I did a SOT test the same one I did to test the Lighthouse Kernel. You can see the result on the DotOS page.

Anyway, with your kernel I got 7hours of screen time when watching 1440p youtube playlist on repeat.

Have some images attached to show the result.
 

Attachments

  • Screenshot_20211011-194206_Settings.png
    Screenshot_20211011-194206_Settings.png
    108.9 KB · Views: 24
  • Screenshot_20211011-193900_AccuBattery.png
    Screenshot_20211011-193900_AccuBattery.png
    92.1 KB · Views: 24

askermk2000

Senior Member
Jul 9, 2015
1,183
2,629
Moto G
LG G5
@VortexHD What kernel where you on before, standard Lineage ?

This one has underclock and undervolt - same as Lighthouse kernel. That is likely a major contributing factor.
Although I got GB5 score of 276 and 883 with my kernel which is not bad I guess considering under(volt/clock),
but I haven't benched the standard kernel yet so might not be particularly great result compared to that.

Oh, nvm, you used lightouse, you just said so above lol :LOL:
 
Last edited:

VortexHD

Senior Member
@VortexHD What kernel where you on before, standard Lineage ?

This one has underclock and undervolt - same as Lighthouse kernel. That is likely a major contributing factor.
Although I got GB5 score of 276 and 883 with my kernel which is not bad I guess considering under(volt/clock),
but I haven't benched the standard kernel yet so might not be particularly great result compared to that.
I was using Lighthouse kernel previous.
If I have time tonight I will try the same test on lineage kernel and maybe on stock as well
 
  • Like
Reactions: askermk2000

VortexHD

Senior Member
I was using Lighthouse kernel previous.
If I have time tonight I will try the same test on lineage kernel and maybe on stock as well
With LineageOS kernel I got a SOT of 5h 38m.

Update: Just tested stock oreo rom and got a SOT of 7h 3m
 

Attachments

  • Screenshot_20211013-175400_AccuBattery.png
    Screenshot_20211013-175400_AccuBattery.png
    115.7 KB · Views: 11
  • Capture+_2021-10-15-10-17-13.png
    Capture+_2021-10-15-10-17-13.png
    128 KB · Views: 9
  • Capture+_2021-10-15-10-18-48.png
    Capture+_2021-10-15-10-18-48.png
    220 KB · Views: 8
Last edited:

askermk2000

Senior Member
Jul 9, 2015
1,183
2,629
Moto G
LG G5
Just tested and its not working 🙁

I'll look into it.

Soon I'll post beta builds. Thanks to Stealth1226 who discovered AP wasn't working. It is now fixed, an hotspot icon will now magically appear also in the hotbar.

nvm that about icon, lol - a mistake on my part. I thought it was not available on stock lighthouse.
 
Last edited:

VortexHD

Senior Member
Can I just add something I just realised. The sound works fine with your kernel!
With the Lineage or Lighthouse kernel I get a very annoying hiss/static noise and it's most noticible at low voulmes. Thing is though I don't think this issue affects many people.

Anyway, Do you know what you did to the sound to fix this? Would be nice to have it pushed to lineage and lighthouse kernel as well. Thanks
 

askermk2000

Senior Member
Jul 9, 2015
1,183
2,629
Moto G
LG G5
Can I just add something I just realised. The sound works fine with your kernel!
With the Lineage or Lighthouse kernel I get a very annoying hiss/static noise and it's most noticible at low voulmes. Thing is though I don't think this issue affects many people.

Anyway, Do you know what you did to the sound to fix this? Would be nice to have it pushed to lineage and lighthouse kernel as well. Thanks

All I can say is that I simply did everything from the ground up, porting latest lg source the the bare caf-kernel, and it was all in one go.
Thus I imagine I avoided potential problems that would have been introduced over time in lineage, due to updating lg sources, different people doing things etc.

Or it could be simply that the older lg sound code in lineage had this inherent flaw. In any case, there's probably quite a difference in the code between us (though I haven't looked specifically at sound).
The fix would likely have to involve removing the current lg sound base in lineage, and applying the latest one, which is already available as separate commit in my kernel.

I remember @Kloosek saying the same thing earlier. He also said there was something weird about the sound in games though.
 

askermk2000

Senior Member
Jul 9, 2015
1,183
2,629
Moto G
LG G5
Audio still does not sound properly.
The phone shuts down or resets after about a minute.
And one thing about the sound. Sounds bad in games, but when I watch YouTube or listen to music everything is OK. On this and on the previous beta.

And here are two videos that show what I mean when it comes to sound.

On LOS kernel

On MK kernel

Wysłane z mojego LG-H850 przy użyciu Tapatalka

You probably don't have this phone anymore. I'm quoting you to put some light on the issue here.

I don't know much about userspace stuff, but I assume this has to do with how the audio is configured there. Sockets or whatever it's called,
my kernel maybe the names of a few routed differently.
 

askermk2000

Senior Member
Jul 9, 2015
1,183
2,629
Moto G
LG G5
Would it be possible to compile the kernel with Clang instead of GCC?

Did you try with lineage/lighthouse ? I see they did put a lot of clang fixes in there.
I think in my kernel it will not compile as is, but I already have many of the clang fixes,
so probably only a few more is needed.

You can see my branch "mko-v2-clang" for hints (I didn't use that myself, but it should work).

LTO will not work with clang definitely. I want too change that so that the kernel can be built inside
build system with LTO enabled, or maybe it's possible to select a higher gcc version also?
 

VortexHD

Senior Member
Did you try with lineage/lighthouse ? I see they did put a lot of clang fixes in there.
I think in my kernel it will not compile as is, but I already have many of the clang fixes,
so probably only a few more is needed.

You can see my branch "mko-v2-clang" for hints (I didn't use that myself, but it should work).

LTO will not work with clang definitely. I want too change that so that the kernel can be built inside
build system with LTO enabled, or maybe it's possible to select a higher gcc version also?
Ah thanks I will take a look at that branch. I just found this: https://forum.xda-developers.com/t/gcc-toolchain-eva-gcc-calling-all-kernel-devs.4221409/ and about to try it out
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Ty again boss i will be testing ur builds in real time...battery life is outstanding with 0.6 based on my game playing last night my battery was at 80% & i played 3 different games which one of them is battery hungry (mythic heroes) for 2 hours or more & when i checked back it was at 30% (usually on other kernels battery start signal low) altough i still cant check cpu frequency or activity in kernel manager but you did an amazing job on this one
    1
    Hi, is BPF included in this kernel? We are going to need it for a12.
    There are several related configs. But I think I'm basically the same as Lineage in that regard.
    Is it as easy as just enabling BPF though, on 3.18 ? I've heard that 3.18 isn't compatible, but IDK personally.

    Edit: So I checked with a friend, and yes seems 3.18 is not gonna work. We are working on a 4.4 kernel though.
    1
    ok both tested:
    0.6 booted normally
    0.7 beta 1 caused bootloop
  • 14
    This is a kernel rebuilt from scratch. Based on the latest LG source code, and LA.UM.6.5.r1-04300-8x96.0 (with manual updates).
    It aims to fix possible strange bugs caused by older LG code in stock LOS kernel, and to make things clear and tidy.

    It brings in most of the patches from the stock mk2000 kernel.

    Right now it's in early development. Currently, LOS itself is in development, so naturally various issues may be encountered.

    NOTE:
    These zips doesn't touch system (no modules, all built in).
    If you backup the boot partition before installing, then restoring that will return you to the exact state you where in before.

    Download:
    V0.6 - Androidfilehost
    V0.7 Beta1 - Androidfilehost

    XDA:DevDB Information
    mk2000 Kernel, Kernel for the LG G5

    Contributors
    askermk2000
    Source Code: https://github.com/stendro/msm8996_lge_kernel/commits/mk2000-custom

    Kernel Special Features:

    * Linux 3.18.140
    * KCal
    * WireGuard
    * Wakelock blocker
    * Underclock CPU, undervolt CPU + GPU
    * Regular usb charging 500mAh++ toggle
    * Much porting, patching, etc
    * Improved speed and efficiency
    * Compiled with latest Linaro/Arm 10.3 self-built from source
    * LTO, link time optimization - better optimization by compiler

    Version Information
    Status:
    Testing
    Current Beta Version: 0.7
    Beta Release Date: 2021-11-22

    Created 2019-07-23
    Last Updated 2021-11-22
    6
    Hello
    just a small update.

    Unfortunately something unexpected has come up, I'll have to move, so that will further delay my getting back into this.
    Sorry to those who where hoping for an update soon, it will not be until late october at best.
    3
    Just tested and its not working 🙁

    I'll look into it.

    Soon I'll post beta builds. Thanks to Stealth1226 who discovered AP wasn't working. It is now fixed, an hotspot icon will now magically appear also in the hotbar.

    nvm that about icon, lol - a mistake on my part. I thought it was not available on stock lighthouse.
    3
    Hello there

    So after 2 years I decided to get back into it. Also helped by the fact that my stock rom had some kind of breakdown - enough already with the slowness and old android feeling!
    To my pleasant surprise the custom G5 scene has improved since last I was active. First rom I installed was Lighthouse and I see no need to look elsewhere.

    The newest build is v0.4-beta6 - it's attached in OP (that AFH #%&¤# still can't upload after 2 years).
    I'll be uploading beta7 instead shortly.

    Summary of my kernel:
    Fully upstreamed to 3.18.140
    Many recent CAF and Google patches
    Patches from SultanXDA/Kerneltoast, tytydraco, kdrag0n, nathanchance etc...
    Meticulous "weeding out" merge errors in original CAF source (most of which I found in ahmedradaideh's github)

    Source

    Suggestion for supplying logs: SysLog, I got it from F-droid store, maybe in play store idk.
    3
    New builds up

    Changes:
    * WireGuard
    * Disabled something possibly causing issue with sound
    * Simple Low Memory Killer (by sultanxda, replacement for default android lmk)

    I have not tested this build myself.

    NOTE: Still requires ADB disabled, as I've not attempted to address this just yet.