yashsingh1/xdaforums huggingface dataset:
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Redline:
Gamma Kernel Second Screen Release

Finally, the moment you've all been waiting for. Gamma Kernel Second Screen is released! :D This post will serve as the link you can give to people who request second-screen versions of Gamma, to avoid clogging unrelated threads.

(You should search through the thread for more releases as they happen)

Link to this post: https://xdaforums.com/showpost.php?p=77606639&postcount=364

Features:

- Second Screen Support

- Everything that Gamma Kernel has

- Built from Omar-Avelar's V20-Kernel-Gamma ('gamma-integration' branch) Github source

Sources:

- Gamma Kernel by Omar-Avelar

- Easier-to-use (for someone like me anyway) build system by Phoenix591

Always tested on these ROMs before a new release:

- Latest UNOFFICIAL LineageOS 15.1 second-screen version by x86cpu

- Latest UNOFFICIAL Resurrection Remix second-screen by Blaises

Flashing process:

It's the same as any other kernel.

Make sure your TWRP is up-to-date

Do a TWRP backup (I do everything except a full system image because that's like 50GB in my case)

(If flashing a ROM, clean or dirty) Flash your ROM first, then the kernel

(If not flashing a ROM and you just want this over your existing ROMs kernel) Flash the kernel

For good measure, wipe caches/dalvik

Reboot to system from TWRP

Enjoy!

Need to knows:

- Second-screen builds are based on the same source as non-SS builds, meaning they come after the release of a single-screen (non-SS) build

- Built on an Ubuntu Budgie OS virtual machine from my personal PC

- I am not responsible for any damage done to your device. By flashing my builds, you accept this risk. If in doubt, back it up.

- I test these builds personally on my H990DS before releasing them. If it doesn't work, it won't be released.

Personal Thanks & Recommendations:

[MENTION=5103965]Omar-Avelar[/MENTION] (of course!) for Gamma Kernel itself, [MENTION=8639605]Phoenix591[/MENTION] for the easier-to-use build system and for his wealth of help via PMs, [MENTION=7055541]Zacharee1[/MENTION] and other contributors for getting the second screen working for AOSP ROMs (purchase his app BoredSigns from the Play Store for second-screen customisation options and to support him!), [MENTION=2881807]x86cpu[/MENTION] and other contributors for the unofficial LineageOS for our devices, [MENTION=1852121]Blaises[/MENTION] and other contributors for the unofficial ResurrectionRemix for our devices and his contributions to second-screen, AndroidFileHost for hosting the builds (consider donating to them for the service they provide to us) and finally, to you! :highfive:

Downloads are here

Or here: https://androidfilehost.com/?w=files&flid=282339
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] xttapolatakettle:
Here's something interesting: for the hell of it, I flashed [MENTION=5988026]iDefalt[/MENTION] 's SS kernel build on top of non-SS Lineage 15.1 on VS995. It is treating the second screen as part of the main screen (touch and everything). Basically, the camera just blocks part of the screen (like a crappy notch). It's not ideal (like actual notch support), but I'm liking it so far. I think I'll be running like this for a while :)
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Grin59:
Thank you so so so much, I really appreciate you doing this and I am sure other people do as well. Good job :)
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Redline:
That's certainly a unique way of doing things haha :p

And yeah, that's what happens if you either flash the SS kernel on a non-SS ROM or use an SS ROM with a non-SS kernel, you get that "push-down" effect.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] dilaboni:
iDefalt,Omar-Avelar

Thank you very much, for your efforts to our enjoyment.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Grin59:
So the 2nd screen works with screen off but doesn't update or work, just reporting bugs so something to keep in mine for whoever wants to fix it. Idk how, but thank you anyways :)
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Koont:
You might be on to something here. Only use I had for the second screen was for AOD and to push my status bar up there for more screen real estate.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Koont:
My screenshot takes out the notch.. That's interesting. Might be a resurrection remix thing.

But, this new kernel is running good so far..
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] xttapolatakettle:
I doctored my screenshot to show how it looks on the physical phone.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Redline:
Yeah, that's something for the second screen devs to look at, I believe it's already been raised. The kernel just adds the functionality.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] murmurous:
Thanks for the effort man, glad to see the V20 still gets some attention! I took this as an opportunity to experiment with the second-screen builds, but they're not quite there yet tbh. For instance the quick toggle for wifi always displays the opposite state, and you can only swipe down to see notifications from the far-left edge of the screen (the second screen "blocks" the swipe). But I'm holding out hope that someday it'll be better than the unresponsive stock implementation.

I had to flash the SS version of the rom, restart into system, then restart back into recovery and flash Gamma. Flashing both in one go bootlooped my phone (vs995).

I think I'm going to hang out with the non-SS rom + Gamma, but I'll be keeping an eye on this for sure.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] itchydroid:
Status bar alignment

This is a good start. I see it as well on my using non-SS LOS 15.1 9/3 on my H918. Im just wondering if its possible to align the screen so that the bottom of the status bar aligns to the bottom of the notch. In affect, push down the status bar so as to not crop the main viewing area. You will lose about half height realestate on the top but makes it appear less intrusive. Also, the notification icons are also already cropped out. I can live without those for a bit :). Again, a good start :good:
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Redline:
I'm not sure which second-screen ROM you tried, but those are fair points. I know that ResurrectionRemix's second-screen builds are more up-to-date than LineageOS's at the moment, by about a month now I believe, so if you tried LOS you should give RR a try and see if it functions better. Otherwise, I too am running non-SS builds of LOS but once development gets just that bit further along, I will probably switch to a SS version and the Gamma SS kernel.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Redline:
Gamma Kernel Second Screen v30

Removed from download due to touchscreen & fingerprint issues.

See THIS post for details.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] xttapolatakettle:
Anybody have any luck with this new fingerprint firmware? Not working for me on VS995 :(
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Redline:
The fingerprint reader isn't working at all? Did it work on the previous version?
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] scottyrick:
Fingerprint not working on 9/14 build h918

Not working on h918 on the 9/14 build. Works just fine on the 9/13 build for me.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] droidrzr1610:
Tried this build on my H918 and first impressions so far are that this phone finally performs like it should. The SD 820 is finally flexing its muscles and I can feel it, it definitely flies through apps and animations are smooth with very few frame drops. Much better than the stock LOS kernel. Better than SuperV20 with the mk2000 kernel even.

Battery life is however pretty bad, not as much in usage but in standby. The phone gets warm when in standby and loses its battery quite rapidly although both of there issues don't occur when in use. In use it remains cool and doesn't throttle even when running geekbench.

If you need more detailed logs or stuff to hopefully track down what's causing the standby drain I'm here to test.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Omar-Avelar:
I am indeed trying to track what is what sucks during standby. I have been able to (last few weeks) put the phone in standby overnight and get 1% or 0% battery drop BUT only airplane mode is enabled. So hoping you guys test v1.0.0 in that regards as I will also be using it myself... :fingers-crossed:
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Omar-Avelar:
I have figured out that the following were missing giving the error message of: "A vendor image mismatch has been detected. Typically..." at boot, so that is fixed now.

CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_MODULE_SRCVERSION_ALL=y

CONFIG_USELIB=n

CONFIG_IKCONFIG_PROC=y

I've also incorporated the firmware fixes for OTG that [MENTION=2881807]x86cpu[/MENTION] identified so hopefully that is also working now (don't have a way of testing this). I have also tuned EAS further and some latency and memory scaling parameters as well as potential idle and active battery savings. Enjoy the first version v1.0.0 for 15.1, as the others were just test versions as we were starting to play with 15.1...
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Omar-Avelar:
I am not a super fan of benchmarks but here's a run using v1.0.0 Gamma Kernel + LOS 15.1, this was with AnTuTu version 7.0.7. I was asked to perform this benchmark and thought I would share.

​

This was run with the phone after a day of use and I didn't close any app before running the benchmark. Tremendous work on Lineage 15.1 by our friend [MENTION=2881807]x86cpu[/MENTION] :)

Update: Looks like the results are good based on this reddit post ...
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Sadistic_Loser:
How did you get LOS 14 to work, it doesn't boot up for me and all I get is a dim screen and some light flashes here and there

H918 varient
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Omar-Avelar:
There's another thread for LOS 14.1 of the same Kernel but for Nougat... check one page back, title says [LOS-14.1+EAS] instead of [LOS-15.1+EAS] ;)
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] :
I keep getting this error message in TWRP when trying to flash the 10p version of LOS 15.1. I have an h918. It literally says my device is a dot.

E3004: This package is for device h918; this device is .

E: unknown command [log]

Updater process ended with ERROR: 7

I tried wiping Dalvik, Cache, Data and System to no avail as well. Coming from LOS 14.1 as I have upgraded my firmware to h918m.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Phoenix591:
You need a twrp upgrade.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] :
Lol i forgot to edit my post to say delete. I posted in the wrong thread but I already got help in the appropriate thread. Thanks though. :):good:
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] droidrzr1610:
[Deleted]

---------- Post added at 08:20 AM ---------- Previous post was at 08:18 AM ----------

I also faced the same flashing black screen issue. It's due to flashing a room based on an ARB00 fw when the device is on ARB01. AFAIK Los 15.1 is the only ARB01 supported aosp room for the h918.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Sadistic_Loser:
Alright so I have found the oage you were talking about but in less I am being dumb rn I just can't get LOS 14.1 to boot on my phone. Literally, I went out of my way to just flash LOS 14.1 + Magisk and I cannot seem to get it to boot. All I get after the LG boot screen is a black display with some minor lights here and there on the display.

I appreciate you taking the time to write back to me. I am just gonna try installing LOS 14.1 again and see if it works.

---------- Post added at 09:28 AM ---------- Previous post was at 09:22 AM ----------

Okay so I cannot flash LOS 14.1 at all because of ARB. I was thinking it was that but I figure if ARB was tripped my phone would be a brick rn so I kinda dismissed the idea of it. I'll use this kernel for LOS 15 instead

---------- Post added at 09:31 AM ---------- Previous post was at 09:28 AM ----------

Hey Omar, so I figured out why my phone was not booting with LOS 14.1 with Gamma Kernel and Magisk. A fellow user replied back to me saying them themselves have haf the same experience flashing LOS 14.1 on their phone (The flashing and dimming of the screen after rebooting.) The ROM (LOS 14.1) is for ARB 0 phone and sadly for me, my phone is ARB 1 so basically ARB was tripped and that is why I could not use phone or the ROM.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] droidrzr1610:
Hold on there pal! ARB has not been tripped on your phoene. If you were already on ARB01 (which you were) you should simply head back into twrp and flash a stock rooted 10T ROM or simply flash LOS15.1 (the one labeled 10p). Your phone is perfectly fine.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] :
[MENTION=5103965]Omar-Avelar[/MENTION]

I'm here to make a report on Gamma kernel. I know it's still being updated for Oreo and you might already be aware of these things so I'm sorry if i bring up something you already know. I'm still new to these types of reports.

1. It doesn't have VoxPopuli Powerhal which is needed for an EAS kernel. The CPU boost options are for HMP kernels.

2. I noticed that the big and little cores' min CPU frequency isn't 307. The minimum frequency is 1113 mhz for both big and little cores. The cause is having an input frequency set on cores 0 and 2. Setting it to 0mhz will allow big and little cores' minimum frequency to be 307 mhz although the big core can never go below 800ish (I say ish because i forgot the value) mhz when there's no input from the user. To fix this, input boost milliseconds needs to be 0 and finally both big and little cores can rest at 307 mhz when there's no input and they can probably go into deep sleep much better too.

3.Wq_power_saving is on by default. It interferes with the capabilities of EAS.

4. ZRAM is enabled by default but it isn't really needed for phones that have 4 GB+
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Omar-Avelar:
I agree with your observations (1) and (2). (2) was put there in the meantime as [MENTION=2881807]x86cpu[/MENTION] figures out the perfd (PowerHAL) missing portions in LineageOS, and I wonder if it might be getting stuck since [MENTION=2881807]x86cpu[/MENTION] started to incoporate things up in his recent builds. I will remove it on next build and check with the latest unofficial today...

For (3) I wasn't aware. But I think you're wrong since Wahoo (Pixel XL 2) has WQ_POWER_SAVING by default. Do you have backing up data? Keep in mind that I backported newer Kernels EAS and it's not the typical 3.18 based EAS... I would love to be proven wrong with supporting data....

And for (4) it is written in the Known Bugs for the Oreo version for now. I also want to disable but my "patch" to disable via AnyKernel failed to so. Might just set CONFIG_ZRAM=n all together to make it easier.... :laugh:

UPDATE: Thanks for feedback... will update to the latest UNOFFICIAL and if perfd is already there I ill make changes to take out (1), (2) and will use the big hammer for (4)...
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Sadistic_Loser:
Kinda early lol but yeah I wasn't saying that i couldn't use my phone, i was saying someone told me that the reason LOS 14.1 didn't boot was because of ARB being tripped and like I said I was confused because if it did get tripped then I would have been bricked.

I am running LOS 15 + Gamma kernel so I know everything is all good.

So one question for you, if ARB was tripped would my phone be bricked like I assumed beforehand.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] toastyp:
To trip arb you have to flash lower level firmware. Lineage zips only contain system/boot image so it only soft-bricks the device, a boot loop. However, if you flashed a firmware zip with a lower arb value, you're device won't even power on. Completely dead weight. Arb is a value burned into the CPU. Upon installing a software package with a higher value, this higher value blows a fuse within the CPU, preventing one from downgrading. System/boot images installed with a lower value prevent boot up, firmware such as an older bootloader will full on destroy the phone. Once you go up a level you stay there. In your situation, by installing lineage you had only soft-bricked the device which is why you were able to recover.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Sadistic_Loser:
Very informative. Thanks for letting me know what ARB would look like when activated
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] :
Ohhh. So is EAS now compatible with WQ_Power_Saving? :highfive:
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Omar-Avelar:
I will do some research later myself too -- if you help me that would be great.

As a side note I am now but uploading v1.2.0 now with the changes. Seems like [MENTION=2881807]x86cpu[/MENTION] unofficial version from May 23th has perfd with input boost set to 1113 MHz now. So I took out the kernel input boost now, and hard hammer of CONFIG_ZRAM=n now... enjoy and thanks for the early feedback!
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] :
I'll see what I can dig. I might not find anything relevant but we will see haha. As for the new kernel, I flashed it and all is well now. :svetius:

---------- Post added at 08:44 PM ---------- Previous post was at 08:13 PM ----------

@Omar-Avelar After 15 minutes of searching, all I could find was this. https://xdaforums.com/oneplus-5/development/kernel-renderzenith-t3659850/post74211558
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] reza_xdv:
This version causes the touch screen stop working on my 990ds. 9/13 version works fine btw.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Redline:
Gamma Kernel Second Screen v30 Downloads Removed

I've removed the previous builds from download due to the issues people are having with the fingerprint reader and touchscreen. I built the previous set after seeing that Omar had updated his Github source between then and my initial releases, but he also updated today. It's possible the previous builds were missing things, changes or had issues he later fixed.

From now onwards, after Gamma V30 is up for download, I'll build second-screen Gamma after the version of non-SS Gamma it's based on has been put up for download by Omar, which should ensure they're based on the same version he has finished working on.

This will mean, for example, single-screen Gamma v30 will be available for download before second-screen Gamma v30, but will also ensure if there's any issues (since they'll be coming from the exact same source) they should happen for everyone. Apologies, I probably should've done it this way from the start.

I'd tested the v30 build by dirty-flashing over my initial release, and the fingerprint sensor and touchscreen had both worked fine in both instances, but after reports of issues, this wasn't the case with a TWRP backup, and clean flash of both the ROM and v30 kernel. I again updated my source from Omar's changes today, re-built and tried again but the issues were still there.

You should revert to my initial release builds dated "gamma-kernel-SS-2018-09-13-variant.zip" until Omar releases the next non-SS Gamma version, which will mark the start of the new release schedule I'll follow. From there, things should be smoother. I've also updated my original Gamma second-screen release post to reflect this.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Migush:
Hey I did the same, but found it sometimes annoying that some of the buttons were behind the notch. Well I found something for that: if you don't mind safetynet, install Xposed and the 'Dimensions editor' module. You should then set the Statusbar height to 45 (if you have the default lineage dpi). The actionbar shouldn't be behind the notch anymore. See the image attached. The only problems now are that in landscape mode the statusbar higher is than normal, the notification panel still is completely in the top of the screen (but luckly it only blocks the provider names), no notification icons (maybe they can be moved by setting padding on the left side? No idea how however), and the statusbar icons are pretty small. Maybe a few of those things can be done via editing the Lineage source?
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Migush:
Oh to make the notification panel look better, use the Android P-ify Xposed module. The black bar at the top is exactly the right size for the notch. Also go to 'status bar' in P-ify and disable 'left clock'
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] kadajawi:
I haven't managed to read _all_ pages here, maybe someone could give me a heads up on the DAC situation? When I plug in my 250 Ohm headphones it sounds very much like other phones I have, i.e. no DAC is at work, and the volume is lower than I'm used to. Has anyone confirmed it to work with high impedance headphones? Running the latest RR-SS, and Gamma-SS.

Also, at what settings should I be able to see the calibrated screen?

Anyway, thanks a lot for the good work. It's impressive how much is working, given that the V20 has quite a bit of non-standard hardware.

Edit: Playing back with foobar2000 rather than YouTube it's better, but I thought it was louder before. I'm on the fence. And it'd be ideal if the DAC worked in all apps.
[LG V20 ROMs, Kernels, Recoveries, & Other Developm] NippleSauce:
I always see lots of people saying the DAC is 100% working on AOSP, but I really don't think that's the case... I had a hunch that it wasn't working and then stumbled across a very old topic where some devs were discussing why it will never work on AOSP (can't find the thread but I'll keep looking). More recently, [MENTION=7467520]Dr_DjEnder[/MENTION] made a few posts (page 2 Gamma Kernel 15.1) regarding missing calls that were preventing the DAC from being enabled. I'm not sure if the fixes were ever made and implemented into the Unofficial Lineage builds.

Regardless, a close friend of mine just got a V20 and after side by side comparisons (stock w/ DAC vs Lineage) there's a pretty clear difference in the audio output.... Now that's not to say that Lineage sounds bad at all. In fact, with Viper4Android Lineage still sounds fantastic. But without it, stock with the DAC enabled sounds much nicer.

Just my 2 cents :p