[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Eliminater74:
Note:

I made a few changes all around.. Changes that most of you wouldnt even notice really.........

First, my custom Kernel thats stand alone install, I updated anykernel2 the otherday, last time I updated it was like 9 months ago, So now its up 2 date with official anykernel2, Plus still has my own

personal code in there too..

Kernel Modules, I been working with kernels since 2015, I have always compiled the modules statically into kernel, I hate Modules, my HTC10 used to have alot of Modules, and I just converted them all

to be compiled statically.. anyhow, I didnt change the one from the G6 yet.. Remember I told you im using the Official LOS kernel with all my custom changes ontop..........

Long story short, I noticed that the modules were not getting placed, Hooking up my device to PC and logging in, I realized that the old sk00l way of modules, which is "/system/lib/modules" is not the case

with the G6, its "/system/vendor/lib/modules", So I fixed that...... <-- I honestly wouldnt of figured this out if I didnt update my anykernel2. anyhow, even know I got it fixed and the modules now go to the correct place..

after logging in once again, typing lsmod, Still no modules are loading up.. So I tried to load it the manual waym "insmod <modulename>" gave me error about sig not matching..

So I added Module signing to my build script.. So it will sigh all modules regardless........... Well once that was done, still rebooted and typed lsmod again.. No modules loaded..

did it the manual way, And wow, it worked.. module loaded..

typing this command from adb shell: find /system/vendor/lib/modules -name "*.ko" -exec insmod {} \;

allowed all modules to load........... worked perfect............

I then checked the device tree for anything that loaded modules, (let me remind you that i used the official LOS device tree originally), well it doesnt load any of the current modules the G6 perduces..

but it d id have a few other modules it tried to load, Not only in the wrong spot using the old sk00l way, but also names of modules the G6 doesnt use.................

So I made a few corrections to the device tree adding that line above as a system service ONSHOT, meaning it will run a shell script 1 time that will find and load all modules in the correct Dir, then script will end and never run again till reboot......... I didnt remove the old method way just yet.. cause there is a chance that the other 2 devices that use the msm8996 still have their modules in the old sk00l way..

I need to check on that.. if they do, ill move that code to the g6-common.. but for now its in msm8996-common...............

Now the good news, after loading the modules the right way, I noticed that my device sleeps better and uses less battery drain......... Much less.............

one of the modules that didnt get loaded before was the lcd.ko <--- I think this plays a big part in the battery drain we received before.

Now that its loading.. seems to work way better..........

anyhow, as I said. even the device tree didnt have the correct loading of the kernel modules.. and im not 100% sure that building the ROM, if the modules will get signed.. so they still might not work even after that..

I signed the modules with my script using this:

echo "Signing Modules.........."
find $MODULES_DIR -name '*.ko' -exec \
$KERNEL_DIR/scripts/sign-file sha512 \
$KERNEL_DIR/$OUTPUT_DIR/signing_key.priv \
$KERNEL_DIR/$OUTPUT_DIR/signing_key.x509 {} \;

As you know when you build a kernel, it auto makes a new signing key.. but it doesnt seem to auto use it to sign the modules, So it has to be done manually....

Modules do save memory but have slower access times then compiling them statically.. but I think once I figure out whats needed and not needed ill remove it from module form and have it

built statically.. Removing the need for signing modules and having them load upon boot...........

So that is my take on it all.. Just letting you all know, because I noticed the big Difference once that was discovered and fixed..