yashsingh1/xdaforums huggingface dataset:
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
It's mostly identical to Lineage's kernel in regards to the device features, there's only some security updates and optimizations, so if you have any problem on stock lineage that isn't the charging over USB when connected to a PC (that one was fixed a while ago), it most likely will still happen here.

That audio problem could very well be kernel related for all i know, but will probably be something on the kernel-side device tree files and might require a lot o refactoring to achieve. Personally i don't think it's worth the hassle on 3.18.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] xxseva44:
Audio issue is in the dt, not kernel. It’s an issue with the levels set in the tasha xml.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] JoeKis:
Just installed it whit no problems but have problem with screen/display burning/ghosting. there was a fix I used previously with kernel audatory but there is no display section anymore. how can I fix this? I used gamma kernel before SwanKernel h990 lineage os 18.1

Does anybody else have this problem?
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] ROMSG:
Thats because KCAL was removed look for LiveDisplay under Setting/Display/LiveDisplay and drag the blue slider down by 10%, you can also drag the red and green back for more balanced color (about 5% or so).
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] JoeKis:
Tkanx! worked like a charm!! Any good tips for optimizing for battery time? like undervolting or any other method?
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
Undervolt-wise the kernel has two flavors for that, Stable goes -60mV across the board while Extreme is -90mV, so one is perfectly stable on all phones that ran it while the other is prone to reboot on some of those so you should be fine on Stable already. You shouldn't notice any major difference between both unless you play games on it where the stronger gpu undervolt adds up.

And since you have kernel adiutor, you can do some extra tweaks to maximize battery life although it might impact the responsiveness a bit. Going into CPU->Governor tunables for both big and little clusters you should be able to set up_rate_limit to 3000 and down_rate_limit to 1000. This will make the cpu favor lower clocks but as i said before it might impact responsiveness.

Furthermore, setting I/O Scheduler -> Read-ahead to 128KB on both internal and SDcard (if you have one) will minimize wasteful read cycles whenever the scheduler reads useless info to try and "preload" some data for further use. This also reduces CPU usage slightly on those cases.

The rest is really minor like setting the Low Memory Killer profile to Very Light as it only really makes a difference in multitasking and setting Entropy to 64 Read, 256 Write.

After those, there's not much else you can do to improve battery life other than changing ROMs entirely.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] JoeKis:
After 4 hour use I found a problem: battery draining fast even when off O-o . I didn't use an app or let something run in the background. my setup: Lineage Os 18.1 Latest LG V20 h990 (Dirty Santa) Battery original Newfrom LG (max 2 month). SwanKernel Stable. in an half hour from 60% to 20%

No battery drain with Gamma Kernel
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
Well, first things first: Does it heat up at least mildly while idling with the screen off? Because if you have no background apps running, it might as well be Android 11 running iorap to prefetch some apps for faster loading, it tends to kick in whenever a big kernel or rom update happens and disappears after a while. The only way to really check what might be using the cpu is to use the "top" command through ADB or run it with su privileges on a local terminal, but i think lineage stopped building it a few months ago.

The kernel doesn't cause higher battery consumption by itself, it might be something external triggered by the massive upstream from gamma to swan.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] xxseva44:
Sounds like a rogue app. And also, did you test gamma with your battery and the exact same setup with the same usage? Also fyi, new lg batteries don't exist. The "new" ones are old stock that have been sitting for the past 6 years. Pretty sure they stopped manufacturing them around 2019.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] JoeKis:
Like you said the draining stopped after a while. All good!
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] nostupidthing:
i having problem with zoom on lineageos, want to flash this kernel to see if problem solves, i just download from https://androidfilehost.com/?w=files&flid=329155 (dec2021) and flash using twrp is ok right?

thx!

edit: ok it doesn't work, maybe cause i using lineageo os recovery, it says unsupported device

edit 2: ok twrp worked! thx!
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
Welp, a bit late to answer that but i'm glad it worked! The flashable zip tends to spit out "unsupported device" when you try to flash a variant that doesn't correspond to the model it reports to the zip script.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] itt533:
i flashed it right after installing the latest nightly LOS. It seems indeed it is consuming less and heats less, and, not sure about it but it seems faster in opening menus, and sliding screens.

As for the IR blaster, i was not able to get it working. But i did only a quick try with one app. Is there any app to test the IR receiver? indeed the lg v20 does both.

As for audio recording, it is same as with native kernel. The sound is weak when recording in stereo (mono is fine). The gain boosted to 400% in "audio recorder" makes it better but not as good as with stock kernel.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
IR Blaster is pretty much identical to Lineage's built-in kernel, mk2000, and anything newer than the oreo builds of the gamma kernel, which means it doesn't work for now. But if you want to test it, "Lean Remote" is what i use to check if it is sending IR signals.

And that low audio volume during recordings is very likely to be related to the tasha (Snapdragon 820 sound card name) xml configs in the device dts and hence is more of a ROM problem, as @xxseva44 pointed out above.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] itt533:
well, i just checked /vendor/etc/mixer_paths_tasha-quad_dac.xml, it contains thousands of lines. I tried to find the tasha soundcard datasheet, no luck.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] xxseva44:
I've already done the hardwork of figuring out what does what. Guide
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] itt533:
ok. I initially tried with ghost commander but no luck. I finally took solid explorer as per your suggestion and editing /vendor/etc/mixer_paths_tasha.xml worked.

Well I modified the file following your directions but it didn´t change the low recording volume with "audio recorder" when setting stereo mic.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] xxseva44:
Raise the uncompressed mic higher
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] itt533:
you mean unprocessed? i raised DEC7 to 90 and DEC to 240 but that doesn't change anything. The max is 255?
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] xxseva44:
Yea my bad i meant unprocessed, Also are you editing mixer_paths_tasha-quad_dac or mixer_paths_tasha? And do you keep the dac enabled?
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] itt533:
only mixer_paths_tasha and dac is disabled during my tests.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] itt533:
i tried the ir blaster with an ir detector, which doesn't see the data carried. The first time it triggers one shot. My lg tv did not react at all. After that shot, it continues emitting an alternating signal of about 1~2s period. There is no way to stop it, despite killing the ir app, and worse... even once the phone is turned off it continues emitting for 2~3s and stops.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
That's the current behavior alright. The first command works (assuming your TV, AC, etc responds, my LG TV does at least), but then the phone's IR blaster stays unresponsive due to that intermittent flashing for quite a while before another command can be issued. We logged it pretty extensively a few months ago but came to no concrete conclusion as of yet, although it seems to be related to the kernel's tty ports.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] itt533:
kernel's tty ports? is it assumed that it's a problem with the driver?
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
Nope, not the driver exactly. I compared the irrc's files with gamma's oreo branch and those are identical on lineage, mk2000, swan, etc. It seems to be somewhere on the bridge that connects those drivers to the userspace (i.e. The OS and apps requesting actions from the IR), where exactly, we don't know yet. It's one of the things we're also looking at in the 4.4 kernel in hopes of fixing it there.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] itt533:
then, did you investigate the stock ir remote app?
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] xxseva44:
Stock ir app will not work on custom due to it's reliance on the lg framework. Besides ir is confirmed to work on gamma with 3rd party apps, so there isn't much to be gained from looking at lg's app.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] xxseva44:
Hmm weird, yea not sure, it should be working.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] stingbandel:
Can I use swan on oreo stock?
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] aCIDsLAM:
Using swan kernel makes the device snappier but i get random reboots on h918.

Not sure it ifs sdcard access related. I may test a bit more.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] abdoistheone:
IS THIS KERNEL COMPATIBLE WITH LG G5 H830 & WHAT ANDROID VERSION IS SUPPORTED ?
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] TappedCeiling46:
how did you add voltage control?

I tried both the stable and extreme versions of this kernel but they are both very unstable and buggy (tested on "stock" and LinageOS 1.18 rom). With no other options, I started making my own kernel for the LG H990 but I couldn't find anyone except you who has voltage control for the msm8996 chip. So my question is if you are willing to share the source/voltage control code with me?
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
Not really, Swan is Lineage-based and also heavily updated on top of that, i doubt it would work reasonably well on stock roms.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
I will need some logs to get a good indication about what might be causing those random reboots. Does it always happen when you're using it? If so, it might be related to the CPU clocks causing spikes in power consumption during app switches and etc, seeing as mk2000 also faces that same problem on some devices like the H990DS. This seems to be a device issue and not a kernel one (undervolting a lot might mitigate that, but it's not ideal since it may introduce other stability problems in the case of this kernel's Extreme version).

If you have some time, and is running a rooted device, try getting Smartpack Kernel Manager or any other app that allows you to change CPU frequency, and drop the performance cores to 1824MHz or a bit lower and the low-power ones to around 1300MHz. After that those random problems should disappear, assuming the reboots are caused by power spikes.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
In theory it might be compatible with pretty much any G5 variant supported by lineage, i just didn't compile a kernel for them since i don't have a G5 to test it so i'm hesitant on releasing something that might not even work in the end.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
Any specifics to those instabilities and bugs, like logs or something? It would help immensely since my device isn't a H990.

As for the voltage control, here's the commit for voltage control on the extreme variant: https://github.com/AShiningRay/Swan...mmit/92aee4af63d325ace25cdb4cf66546a80258581d

There might be more commits related to that though, but this one is the main commit and should already get you the feature. However, i only really use it to check the cpu voltages in real time and finetune the undervolts on a newer kernel revision, since actual voltage control doesn't seem to work, and i never managed to get working voltage control on any of my qcom devices, be it Snapdragon 625/626, 435 or 820/821 (no matter the kernel, even other custom kernels with VC fail to undervolt my phones without triggering a reboot or crash in some capacity while undervolting them through the kernel's dt files works like a charm). If you're going to use it to undervolt while booted into the system, it might not work for you as well.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] TappedCeiling46:
Thank you for sharing. Hopefully I can use your code in combination with other code I've seen to get it working.

If you could add me on discord I think it would be easier than using the forum(TappedCeiling46 ΦωΦ#7651).

If not, could you explain where I can find the log file? I can send the logs along side the others bugs I know of so far.

At the moment I'm using the "stock" rom but If that's a problem I can try dual booting LineageOS ¯\_(ツ)_/¯

​
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
I hope so, fine-tuning voltages is way easier, and faster, to do when going through the GUI and without needing to recompile the kernel between tests.

I don't have a discord channel for communication, but i do have Telegram, if that one's available to you. But send me a PM with infos and such, since doing so right here is way too unsafe.

To get the logs, you can load up a terminal app on your phone, give it su privileges, then type "dmesg >> /sdcard/filename.log", or do the same commands but through adb.

And yeah... if you're using the phone's stock ROM by LG or any other rom that mainly modifies the stock one, i'm afraid bugs are to be expected since this kernel was only tested on custom roms, and is based on lineage's kernel sources.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] riverstyxxx:
VS995 says wrong version.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
Huh, weird... the anykernel script is correct and checks for vs995. Did you crossflash your vs995 with any other variant's recovery? If not, might be a glitch in the script or something.

I don't really recommend flashing this kernel now that 4.4 is around and works almost as well, if not better than 3.18 most of the time... but if you're still interested, you can just open the flashable zip, open anykernel.sh and change the devicecheck prop to:

do.devicecheck=0

Assuming it's really a VS995, you won't have any issues.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] nostupidthing:
Should I use this or mk2000 on los18? Thx
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
Whichever, they aren't all that different in their latest versions.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] KouaV1:
I used the stable kernel and sadly seems like the undervolts are too low, my antutu scores are lowered by around 20k points compared to using that mk2000 kernel on raft custom rom
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] xxseva44:
You're complaining about performance reduction, on a undervolted kernel focused on battery life and efficiency...?
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] KouaV1:
wasnt complaining, pointing it out, with proper undervolt it should not have alot of reduction in performance as i had thought he put on that changelog without affecting performance alot but it did affect it by alot.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
You're right, proper undervolting shouldn't reduce performance, and it doesn't. Your performance reduction doesn't come from the undervolts, instead it's probably coming from the tweaked schedutil rates that focus a lot more on battery life than raw performance. My adjustments were meant to have a minimal impact in responsiveness and such, not benchmarks (which aren't really a great indicator of the device's performance by themselves, especially antutu).
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] KouaV1:
ah i see where its coming from, Thanks for the clarification on the kernel
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
No problem. It's just that i built this kernel to mitigate this phone's tendency to easily get hot so i ended up sacrificing some sustained performance along the way in an effort to improve battery life and temps.

Thankfully that's not an issue anymore on the new 4.4 kernel (which is a merge of this and mk2000) that's being bundled on the latest Android 12 betas, so it is both more efficient and faster than 3.18 kernels so far.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] KouaV1:
no problem, after a couple hour usage i noticed it, thanks
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] yesimxev:
IR is still not working on LOS18.1. Which kernel driver is responsible? I'd try to roll back to stock oreo driver see if that helps
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
It's not any of the IR drivers, they're identical to Gamma's and IR works there. The current hypothesis we have on 4.4 is that some upstream broke communications with the IR driver, and reverting that is far more complicated. If you really want to try your hand at that, i'd start by checking for differences between gamma's "gamma-oreo-stable"(working IR) and "gamma-pie" (borked IR just like any other kernel) branches in their repo.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] yesimxev:
Oh so it's ROM level, and Gamma ROM works fine? Confirm and I'll dive into it soon. The other mystery compared too that some of the external wireless drivers are causing the OS to crash on boot. Whereas it was working fine on oreo. Also if they are enabled as modules they are fine when loaded and works
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
No, it's not the rom either. Simply swapping any 3.18 kernel by gamma-oreo (gamma is a custom kernel, not a ROM) already makes IR work on any rom made for those older kernels.

The upstream in question is on the kernel side, such as bumping from 3.18.71 to 3.18.103 for example. Tons of code gets updated (including qualcomm's), and some of it can cause a few unintended and obscure issues... which seems to be the case for IR, considering it also fails to work on certain gamma branches.

As for the external wireless drivers, it can be a case of them not being built with the kernel at all to begin with. Swan (as well as mk2000, not sure about gamma) gets built with the least amount of bloat possible, so they're bound to not have those drivers actually present. LG's stock kernel on the other hand has a slew of additional kernel CONFIGs(those are basically switches dictating what's gonna be built with the kernel) and those could be a part of them.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] yesimxev:
Got it now, can you point me to the latest working exact version please? Or even, does IR working gamma kernel potentially work with LOS18.1?
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
AFAIK, the safest and surest way to get a gamma build with working IR is to build it yourself, as i couldn't find any kernel builds out there that didn't lead to dead links, or broken IR.

The repo (and branch) containing the version with working Infrared, that i tested myself and can confirm it was working, is here:

GitHub - oxavelar/V20-Kernel-Gamma at gamma-oreo-stable

Gamma Kernel for LineageOS based on Code Aurora Source from Qualcomm - GitHub - oxavelar/V20-Kernel-Gamma at gamma-oreo-stable

github.com

From my testing, the gamma-oreo-stable branch is the newest kernel that still has it working.

Also yes, it will work with LOS 18.1 assuming no changes were made to libcir and other rom-side IR blobs ever since i tested it.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] yesimxev:
Thank you! Really appreciated. Yes I'll build as I need to add NetHunter patches + configs
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] yesimxev:
What is the defconfig for h990? lineage_h990 seems dodgy
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
It should be "lineageos_h990_oxavelar_defconfig" seeing as the defconfig i used for mine was "lineageos_h910_oxavelar_defconfig".

And they look weird because oxavelar added the gamma tweaks into each defconfig manually instead of using a separate file for gamma overrides, it's the same case for the other variants as well.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] yesimxev:
I see, then it's not the defconfig. Last one, any recommended toolchain? I have an error which I never seen, will copy here when I get home
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] yesimxev:
I tried 3 different toolchain, no modifications yet.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
Try getting my build.sh script from Swan's repo and using it to build gamma. Not sure how i build it a while ago, but i'm pretty sure i also used it to some capacity... you'll need to make some adjustments to the script though, such as toolchain locations and defconfig names.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] yesimxev:
I did it, and didn't work, same error. Seems like this branch is messed up then. I'll try to patch
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
Huh, never faced something like that when building a kernel. Is it really using the downloaded ARM toolchains? Should be building if it is.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] yesimxev:
Huh, never faced something like that when building a kernel. Is it really using the downloaded ARM toolchains? Should be building if it is.

Yup the following ones:

https://developer.arm.com/-/media/F...-arm-10.3-2021.07-x86_64-arm-none-eabi.tar.xz

https://developer.arm.com/-/media/F...m-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz

Building on Kali, same issue as with the other toolchains, wondering if there's anything of build-essential that can fail?
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] yesimxev:
Delete
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
Not really, at least arch's build-essential causes no issues with kernel, recovery or rom builds over here.

I don't have experience with kali, so i can't say whether it has any difference from arch in regards to tools and kernel... those error messages tell that some critical functions are missing (and it doesn't seem to be missing in gamma's oreo-stable branch, or else it wouldn't build for anyone).
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] yesimxev:
I'll try on another distro
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] yesimxev:
Ah

Ah truly annoying. It's probably related to newer gcc on host, or similar. I guess this was automatic back then. After some time, I figured out from the Makefile, that you need to add this make arg to your make command, or script: CONFIG_CC_OPTIMIZE_FOR_SIZE=y.

So it will trigger the build flags around line 625 in Makefile:

ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
else
KBUILD_CFLAGS += -O2
endif
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] AShiningRay:
Oh right, i completely forgot that one of Gamma's features is that it tries to build with -O3 by default, which demands some specific adjustments and toolchains, as arm's GCC and Google's Clang tools are meant to build the kernel with -Os. Been a while since i've built it so i might have used mk2000's custom built toolchains.

But back to the main conversation: Did it finally build with OPTIMIZE_FOR_SIZE?