yashsingh1/xdaforums huggingface dataset:
[G4 Android Development] falenjam:
Yes, I have the same issue. It happens from time to time. Rebooting usually fixes the wakelock and the associated battery drain. I noticed the wakelock appears when the sim PIN prompt is not shown immediately after device reboot.
[G4 Android Development] myhe01:
Do you think there might be a way to change my device model in SALT or through adb to H810 so I am able to flash the LOS ROM for H810 (TWRP won't let me since my device has itself as an H812), or maybe something I can flash in TWRP to allow me to flash the H810 ROM?
[G4 Android Development] Gigio755:
Sorry for the OT

someone ask me through pm informations about my personal configuration, i just update my signature with everything you might need, I hope I haven't forgotten anything

about gcam, i often try newer versions, so it may not be what I'm currently using, but the settings are roughly the same, if you have advice, always share it!
[G4 Android Development] steadfasterX:
ok [MENTION=4928665]Termehansen[/MENTION] , [MENTION=5343361]Gigio755[/MENTION], [MENTION=10039215]lgg4-user[/MENTION], [MENTION=9903557]rundumdieuhr[/MENTION]

thanks guys for testing! Unfortunately it is harder to track it down so could you give me some advice for a 100% or almost 100% working scenario to re-produce the 2 issues:

* lagging (which was NOT the case for the 20200119 build)

* getting hot (which was NOT the case for the 20200119 build)

I can reproduce the overheating when just letting the video cam running for a while (20min or so) but that happens even on the build you all declared as a good one.

so I want to re-produce the issues to see which of the possible cases might be involved.

.-
[G4 Android Development] lgg4-user:
I am not sure about 20200119 –*I can't go back because I have encryption turned on and when I try to flash older versions I just get asked for an Android password (not my PIN, presumably it not knowing what to do with the encryption?)

For me the lastest build with the Test2 kernel work well. I get a little bit of camera stuttering (e.g, when rotating, starting up, big changes in exposure levels) but in general it is usable for me. It seems to recover at the moment, say, Test5 or Test3 would normally hang. You think it's crashed and then half a second later it's working again.

So for me the current build with Test2 is OK! If there were any way to iron out the small glitches that would be awesome, but for me the camera doesn't seem to need the phone rebooting frequently and so that's good enough for me!

Thanks again for your concerted efforts to get to the bottom of this!
[G4 Android Development] rundumdieuhr:
Thanks again for all your efforts!! I personally can't make out such a scenario for sure. Which isn't bad news at all, because I felt improvement in almost every experience I had with the test images. As stated before:

To be precise, still on the clean installed March build (and I think reproducible on the January build), I saw overnight battery drain and much heat when using a Wi-fi intensive app for 10+ min. In my eyes, both has improved with the test images.

For the regular builds, I go with what agelos100 (#1468) and falenjam (#1469) reported recently. I may be wrong, and it may or may not be related, during my tests with one or two test.img, I felt that DT2W had gone (and I didn't miss it).

Overall, I go with lgg4-user's report which is close to my experience:

When I have tested specifically with a Gcam, I see the same bit of "second of commemoration"/ stuttering but, hey, I think that's just hardware limits and it is no trouble to me. That said, I admit that, on this phone, I am less of a heavy user and in everyday scenarios, I don't take photographs. So I don't want to object to the other's test experiences with the camera. Also, my tests came to a halt before the weekend, because I currently don't have the G4 with me. (I'd say I "lost" it, but I am pretty sure I just left it behind at another place from where I will recover it next week, so no need to worry.)
[G4 Android Development] Cyanoid:
Can someone please tell me why I can't install a ported camera app on this ROM? I've tried over a dozen camera ports (GCam, Miui, Pixel, MGC, DMGC, F1, etc. etc), including those that said they were for the LG G4. Every time I open the app, it's "Camera Keeps Stopping". I tried disabling the stock camera, tried allowing ALL permissions on the ported apps (usage access), tried installing a port via Magisk Manager... so far nothing works! Only the stock camera works (and it has almost no options!).
[G4 Android Development] lostunsunghero:
Have you enabled camera2api?
[G4 Android Development] ThePsymoon:
Thanks [MENTION=5545101]steadfasterX[/MENTION] for your hard debugging work.

For me, as [MENTION=10039215]lgg4-user[/MENTION] and [MENTION=9903557]rundumdieuhr[/MENTION], I did not experience lagging and getting hot failures (except the one I reported; with long camera usage). I have the feeling that TEST2 kernel provides lower battery drain, smoother UI and cooler temperatures (on pm8994_tz sensor) than TEST5 or the default kernel. As other users, I had small glitches on the camera but it is totally usable for me (and better than stock MM).
[G4 Android Development] steadfasterX:
[MENTION=5343361]Gigio755[/MENTION], [MENTION=10039215]lgg4-user[/MENTION], [MENTION=9903557]rundumdieuhr[/MENTION] .. and anyone else with a h815 wanting to participate, ofc.

As the changes I did going deep into kernel and ROM, I decided to provide a full ROM test build instead.

download and flash this new ROM version: lineage_h815_CALMDOWN_20200423.zip from here

It should dramatically help in temperature and even when that sounds odd first: it should nevertheless improve responsiveness.

The kernel handles hotplug of all cores if needed (just HIGHLY optimized now), while frequencies will be handled by the resurrected thermal-engine service.

Fully explained:

KERNEL

DEVICE TREE

Before, when I had started a video capture it was like I could cook a meal on the G4 after 5 min latest.

Now its getting just warm. Ofc that comes with a little drawback as when reducing frequencies the system will get slower - but not as as slow as when unplugging the whole core(s) (which was the case before my changes).

That means optimized throttling (as integrated in the above experiment build) is better for your performance then hotplugging (current stable LOS).

At least it should.

Flashing instructions:

* backup (is always a good idea, right?!)

* wipe SYSTEM, CACHE, DALVIK (crucial important!)

* flash

If you encounter any overheat or lagging issues or just being curious how this thermal stuff works grab/monitor the log while/after doing high cpu usage tasks:

adb logcat -b all | grep -i "thermal"

live view on core online states + current freqs (for the advanced curious users):

adb root
adb shell
while true; do cat /sys/devices/system/cpu/cpu*/online /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq /sys/class/thermal/thermal_zone12/temp /sys/class/thermal/thermal_zone7/temp /sys/class/thermal/thermal_zone13/temp ; sleep 1; clear; done

(the first 6 numbers are the core state and can be 1=online or 0=offline. first 4 are the little cluster, the other 2 the big one. the rest are temperatures in that order: GPU,little core cluster, big core cluster)

.-
[G4 Android Development] Cyanoid:
Yes I have! (Via Magisk). I'm just not able to try it out, as no camera port will install on this OS/device.
[G4 Android Development] masemoel:
You need to uninstall your current camera.
[G4 Android Development] Cyanoid:
I was afraid that would be the answer! So, if it the other camera ports still don't work, can I get the stock camera back, once I uninstall it?
[G4 Android Development] Gigio755:
mmm i tested it and with youtube vanced in background (music) and after the first gcam shot in vertical, it began lag, after i take another picture in horizontal the lag go worst .. if i try to rotate in vertical again and shot ... it rotates half screen and after some seconds now total freeze for about 3 minutes (I was tempted to remove the battery, but I left it stuck while having breakfast :°D) before UI crashes and it come back from total freeze

BUT for me it doesn't burn anymore during lags and total freeze

ps: no kernel adiutor config, just new clean flash this version and in dev settings put every animation draw to "deactivate"

I use G4 as my first and only device i have :'( this evening i should revert back with my config in signature

EDIT:

i tried to enable DSP in gcam settings (disabled by default in pixelcam as a "lag fix") and without youtube in background, i was able to take 5/6 photos one behind the other and everyone with a different rotation .. it not freeze but UI crash for a second asking me if i want to wait or close it
[G4 Android Development] masemoel:
Don't know.

If not, try Open Camera.
[G4 Android Development] steadfasterX:
thanks for testing !

Any chance for logs while doing these tests as noted in my post ?
[G4 Android Development] ThePsymoon:
I have also installed it since yesterday evening and it runs quite well on my side. In addition to the rom, I only flashed opengapps pico (last version). I feel that the system seems to be more fluent than 20200324 build, with TEST2 kernel.

I tried to perform tests similar to [MENTION=5343361]Gigio755[/MENTION] but I did not experience freeze / lag. I used the PixelCam from his signature, run youtube audio in background (using newpipe app) and I was able to take pictures in both orientations (1 vertical, 1 horizontal and so on). I took more than 10 pictures with and without HDR+. I also tested with the DSP enabled without specific issue. (when HDR+ is enabled, after around 5 shots, the "long" HDR+ processing prevent to take more shots at high speed, but I did not identify lagging of the orientation or the system). [MENTION=5545101]steadfasterX[/MENTION], do you need a log if I do not encounter issue on my side?
[G4 Android Development] steadfasterX:
Thanks for sharing! I thought I read that your device is broken ? Anyways when you do not encounter issues no log needed ;)
[G4 Android Development] Cyanoid:
Ok, I tried uninstalling the stock camera on this LOS 16, and it won't allow the uninstall! I even tried changing the write permission of the stock camera apk in the System folder to allow for a delete or rename, it won't allow that either! And again, disabling the stock camera does not do anything, to prevent camera ports from crashing when they are opened.

I know that some 3rd party camera apps will work with the stock camera app installed, such as "Camera Go". But I would really like to try one of the ported cameras, like Google Cam, that everyone's been raving about. Surely others have been able to install such ported cameras on the LG G4 with Lineage OS?
[G4 Android Development] ThePsymoon:
No, it is not mine, it is [MENTION=4928665]Termehansen[/MENTION]:

[MENTION=3070192]Cyanoid[/MENTION], I was able to install PixelCam (from [MENTION=5343361]Gigio755[/MENTION] signature) without any special manipulation (clean flash of the ROM, boot, install opengapps, install pixelcam; no root/Magisk required)
[G4 Android Development] masemoel:
You can uninstall system apps with Link2SD (it's free on Google Play and requires root access).

Also ..

Which GCam are you trying to use? As not all work on our G4. I recommend you the GCam which is posted below the OP (original post).

Finally, check that it's not a hardware problem by using the camera in another thirty app like WhatsApp.
[G4 Android Development] Cyanoid:
RE: Signature Spoofing (Google Play Services)

What’s the deal with signature spoofing and this LOS 16? Is it possible? I’ve tried a lot of things, including researching it, but it’s still not clear to me if it can be done on this ROM. There are a couple of important apps I use that require Google Play Services and won’t run on my device. But this time around, I don’t want to be a slave to Google and install GAPPS. Instead I installed microG, Magisk, Aurora Store, and XPosed.

To try to enable signature spoofing so that I can run apps that require Google Play Services, I successfully installed “FakeGAPPS”, “XPosedGMSCoreUniifiedNlp”, “NanoDroid”, and I went into Advanced Settings and toggled ON all apps listed under “Special App Access”. Everything in microG settings seems to check out okay, but still no joy! The apps that require Google Play won’t run, and “Signature Spoofing Checker” app says spoofing is still! disabled.

-------------------------------------------------------------------------------------

RE: Camera Ports:

Thanks Masemoel, problem solved. I finally got the Google Cam (and the HedgeCam) in the OP to work! I don't know why it installed now, since that was the first GCam port that I tried to install! I had since tried about 20 camera port apks, including numerous ones that were specifically said to work on the G4. Only cameras downloaded from Play store worked. Now since Google Cam, Open Camera and HedgeCam all work, I don't really care about trying to get any of the other ported camera apps to install. All three are far better than the stock camera! :good:
[G4 Android Development] Gigio755:
damn, no :crying: .. "My memory is like RAM - always too small and volatile. (Author: steadfasterX)" .. i think i have only 128mb ram installed in my head, not only volatile, but even short :silly:

i will try to do it as soon as possibile, maybe with latest pico gapps as [MENTION=10649277]ThePsymoon[/MENTION] said

EDIT:

I did my best to grab everything, i hope i did it fine

This is with "logcat -b all | grep -i "thermal""

Clean install, after everything is installed, i go with youtube vanced (music in background), then pixelcam (dsp enabled, hdr+ 10 frame photo) ... after only one shot it extreme lag ... then i rotate in horizontal and it totale freeze for a long time

https://paste.omnirom.org/view/44765056

When UI crashed 2 o 3 times i tried to save log with this "logcat -b all -d -D > /sdcard/Download/logcat.txt", but i really don't know if i did it correctly

https://paste.ubuntu.com/p/p7DvKCgZcW/

This time it crashed pretty bad for me, a long time total freeze and several UI crashes

I had to come back 20200119 build now, i will try to do my day with boot img from 20200119 and kernel adiutor profile with this "calm down rom", i really need my G4 for daily use, thank you so much
[G4 Android Development] Xain_1425:
Regarding Camera App

Can anyone suggest me the way to install gcam. I have tried the Apk that was posted here but at the end of installation it says App Not Installed. the inbuilt camera app gets updated its not usable anymore it crashes when opened.(Camera2api is enabled )
[G4 Android Development] Cyanoid:
You might try disabling the stock camera app, before installing a ported camera app.
[G4 Android Development] Xain_1425:
I have already tried that it didn't fix the issue
[G4 Android Development] owlery_hk:
i am also trying the calmdown build.

Seems a little more responsive than the 0324 build.

I have not noticed any problems so far that was not in the 0324 build.

However, as with the previous build, CPU hot plugging seems not to be working for me.

There are also random locks ups with the system process force closing and the screen goes black for a minute or so.

The lock up spontaneously recovers, but then after that mobile network is not functional it just shows "No sim installed"

This is very hard to replicate, but seems to happen with I do anything more "intensive" like opening chrome.

Sticking to 3G instead of LTE also does not seem to change the behaviour.

Would you like logcat of turning on and off airplane mode after the lock up?
[G4 Android Development] waterblue85:
will you update libnfc-nci package to R2.4 version?
[G4 Android Development] steadfasterX:
What do mean by "CPU hot plugging seems not to be working for me"?

A logcat is useful only before and while the issue happens.
[G4 Android Development] masemoel:
You should uninstall your current camera (e.g. with Link2SD).

Then you can try, for example, the suggested GCam below the OP.
[G4 Android Development] lgg4-user:
I have installed the experimental build. I am using encryption, so I was not able to wipe the ART cache. Not sure what effect this would have had, but I seem to have been able to boot successfully. I did have a massive camera-related crash this morning with March build and Test2 kernel –*had to pull the battery. So the problem remains elusive! Could it be that the 808 is just not a very good chip and there is only so much that can be done to work around it? :)

Will report back in a couple of days!

---------- Post added at 02:56 PM ---------- Previous post was at 02:24 PM ----------

I am running logcat over WiFi now, which will hopefully substantially increase my chances of logging any issues.
[G4 Android Development] steadfasterX:
Dalvik is not that important , system and cache is fine. Also reboot once after flashing to have everything settled.
[G4 Android Development] owlery_hk:
https://paste.ubuntu.com/p/hHnYsxNRt2/

Here.

I managed to recreate the issue twice, once at ~1207 once at ~1228.

The first one did not have problem with the no sim card issue.

Re: CPU hot plugging, I used smartpack kernel manager to see CPU times, and found that the small clusters and big clusters have the same up time?
[G4 Android Development] Pyrocks:
I am also with the calm down build. The google app doesn't work well like in previous build and chrome is sluggish when viewing videos. Also experienced system lockups once or twice.

Memory intensive apps like pokemon go and gmail cause recent apps button to take a while to respond.
[G4 Android Development] steadfasterX:
well

1. we get issues when you have high priority apps watching CPU while doing CPU intensive tasks. Why? The LMK will try to free up memory and cannot kill the CPU monitor app, which then leads to system crashes as it might kill other processes unexpectly. So the very first thing here is stop using CPU monitoring apps and instead go to my previous post and monitor by ADB. Idc about what an app is saying about cpu up time as you can see the hotplug actions live via my adb cmd.

2. you have XPOSED stuff installed getting a lot of denials, some were selinux the others are system strictmode related. all of them cause: lagging, sim issues, other issues. so stop using xposed or you need to use an insecure build with strictmode off and selinux permissive.

The above goes to you all as I repeatedly see stuff like that.

.-
[G4 Android Development] owlery_hk:
thanks for that. more reading to do then!
[G4 Android Development] lgg4-user:
Just had a camera crash with the calmdown build. Froze during a video call, and then after that opening the camera up meant it was jammed so you could only see the first frame on the screen (and not capture anything). Had to reboot to get it going again. Sorry –*couldn't get a log while I was on the call.
[G4 Android Development] steadfasterX:
yes these camera freezes are a different thing and camera related.. I still trying to identify the root-cause but it can be re-produced easily by starting a video recording for a long time (>10min) or quickly by heavily flipping the phone around for a while during a video recording: after some seconds it freezes.

again this happens on all builds not just the calmdown one..

.-
[G4 Android Development] lgg4-user:
Ah OK! If I can replicate it then later on today I shall get it logging and try have a go at crashing it! Might be that other builds have seemed better to me on this front just by chance.

I haven noticed no heat issues with this build. (On the WhatsApp call there was the camera crash but no heating.)
[G4 Android Development] Knowbody42:
I've got this installed on an H815, and I'm trying to get MicroG to work properly.

Under self check for MicroG, it's got:

System has signature spoofing support: ticked

System grants signature spoofing permissions: ticked

System spoofs signature: unticked

I have tried deodexing it, as well as granting these permissions in a terminal:

su
pm grant com.android.vending android.permission.FAKE_PACKAGE_SIGNATURE
pm grant com.google.android.gms android.permission.FAKE_PACKAGE_SIGNATURE
[G4 Android Development] ThePsymoon:
Did you install microg apk in /system/priv-app/ as explained in FAQ#9? If I remember correctly, it solved the issue for me?
[G4 Android Development] Knowbody42:
That's where I installed MicroG.

I figured it out. In the developer options, there's a toggle to enable spoofing. Which is a bit weird, since it's separate to the option to enable spoofing in the application settings.
[G4 Android Development] steadfasterX:
Well . All that is described in the faq. And its not weird it's for a reason . Not everyone want to use microG and so enabling spoofing support must be granted separately for security reasons.

Here more background details about it:

https://github.com/steadfasterX/android_signature_spoofing

https://github.com/Suicide-Squirrel/issues_pie/issues/30

Edit:

Added FAQ #11 as an extension to FAQ 9
[G4 Android Development] Gigio755:
Partial OT:

i found working great with this rom, this google camera port trCamera_V5.apk, finally videos are shown in gallery and you have also a lots of settings and advanced settings, remember to disable 2x and wide camera (in advanced settings) to avoid accidental touch and crashing camera app (just this)

if you have a good experience, it might be useful to integrate it instead of the original camera LOS app (maybe)
[G4 Android Development] lgg4-user:
Not noticed any freezing with the calmdown built over the last few days. Camera issues I already mentioned aside it's running very nicely. I am using Footej camera –*great to have manual control. It's not always super responsive but it's doing a good job. (Still getting green images instead of actual capture sometimes.)
[G4 Android Development] Chris_Za:
Hi, first of all thank you for your amazing job [MENTION=5545101]steadfasterX[/MENTION], I follow G4 roms (and test in my H815 as my daily phone) from years ago...

So I follow this rom and the different builds from a couple of months.

Now I'm on 23032020 ( stable not experiments) and every build Pie I've tested I have the same problem: my phone after a reboot or shutdown, when it's turn on the SIM doesn't work, after many reboots and some prayers it works ok.

I've the same problem years ago with first oreo build... So when camera start freezing using whatsapp videocall and I must to reboot the phone for ripristinate camera I spend so many time to do some reboot before SIM start working.

Is there any solution? Obviusly in my h815 I installed the rom with Full clean Install.

So I have another problem with every Pie rom I've tested: when I editate an Instagram Stories before Publishing it if I stay in this "screen" for many time the phone burn and it reboot.

Sorry for bad english I try my best for explain the issue! If you want logs I can made it but before I've want to say this by words.

Thank you!
[G4 Android Development] steadfasterX:
how long do you wait for the SIM pin request? its a known issue that this can take some time (not more then 5min though).

other then that try the CALMDOWN build. it should at least fix the burning.

.-
[G4 Android Development] Chris_Za:
I disable PIN on my SIM many years ago, so sometimes when I restart it I don't touch the phone for a while (ex. when I'm at home and I don't need to use it right away) but even in these circumstances the sim is not read.

I remember that on the oreo build there was a command from the terminal to restart that process, I would not be wrong, however if this possibility exists I could still use it without problems as a temporary solution.

Thanks a lot, I had missed that build or rather I confused it with an experimental one.

I will try it soon
[G4 Android Development] steadfasterX:
well.. you have to set a SIM pin in order to make it work then. the watchdog listens for the PIN request and if you do not have a pin set it might / likely fail.

.-
[G4 Android Development] Chris_Za:
Oh damn, I would never have thought of that.

Thank you so much