yashsingh1/xdaforums huggingface dataset:
[Fire HD 8 and HD 10 Original Android Development] Klaus R:
Had magisk installed in the beginning and disabled it due to ggow's wish to have a clean Installation when reporting issues. But all my root needing apps, mainly afwall, are running with developer options
[Fire HD 8 and HD 10 Original Android Development] psi78:
I just noted when i was in a terminal running from twrp that a process consumes a lot of cpu, when i did cd /system/xbin and executed ./htop

then with ps -ef| grep (process id)

it showed that a process named recovery is using a lot of cpu resources and it has subprocesses named like [pigz], apparently a variant of gzip.

Does anyone know more about this?

Or anyone with high idle cpu usage has similar processes running?

See screenshot

Edit: ok, apparently twrp has some kind of backup mechanism🤔🤔,

At least in twrp version 3.4.0.0 changelog under the section twrpTar there's pigz mentioned (https://twrp.me/site/update/2020/06/24/twrp-3.4.0-0-released.html)
[Fire HD 8 and HD 10 Original Android Development] Klaus R:
Noticed that viewing any video in any app caused all 4 cores running high... and keeping that state even After stopping video. Maybe that is the reason for my shutdowns later, over heating. I set cpu governor in smart pack from interactive to ondemand. First impression, it helped.
[Fire HD 8 and HD 10 Original Android Development] smithbill:
I've no idea if turning on 'Battery Saver Mode' actually helps with the CPU overheating problem, but just in case it's useful to others, you can use MacroDroid (or Tasker I guess) to switch on 'Battery Saver Mode' if the temperature is above a certain level (see simple macro image attached).

I'm using 'battery temperature' because CPU temperature isn't available to MacroDroid directly. You could also have the macro power off the tablet (reboot obviously doesn't seem to fix the overheating issue).

The free version of MacroDroid allows upto 5 macros.
[Fire HD 8 and HD 10 Original Android Development] psi78:
ok, i think my hypotheses regarding compiled code and cpu optimization may have been wrong:

when the cpu load is high on cores 2 and 3, and you enable in Smartpack "schedule workqueue on awake CPUs to save power" then cores 0 and 1 are running on full throttle instead of cpu cores 2 and 3. So probably it's just a part of the system, which is using cpu resources up

Edit: when i deactivated Battery Saver, reproduced high idle cpu usage (core 2 on full throttle and core 3 sometimes on full throttle in idle mode) and used htop from adb shell then it showed two processes of com.android.launcher3 (Trebuchet / the LineageOS launcher) hogging cpu (cpu cores 0 and 2 in that case, sometimes core 3), and sometimes also two processes of system_server

Edit: logcat attached

Edit2: I installed Nova Launcher as launcher and deleted Trebuchet out of /system/priv-app from twrp terminal, but cpu usage of core 2 was still kinda high, and cpu temperature goin up to like 53-55 degrees Celsius in idle mode (with Battery Saver off). With Battery saver on, CPU temp was like 33-35 degrees Celsius in idle mode.

Edit3: Well i guess it's not Trebuchet, but the ROMs opengl renderer causing the high idle cpu usage.

But the weird thing is, it doesn't happen at every boot (with Battery Saver off), sometimes CPU cores 2 and 3 are powering down normally in idle mode then.

Or maybe it's also the defective LiveDisplay / lights service, causing errors in logcat all the time

@ggow do you think it'possible to disable that?

Edit4: Reinstalled with current version of the rom (back on standard installed launcher Trebuchet), no magisk, no gapps, just fdroid, cpu info, duckduckgo browser, ffupdater and update of bromite webview.

Was writing this post, left the tablet for a minute, then not only the screen was off as it shoud be, but the tablet was completely off (or i couldn't turn on the screen anymore), this happened two times in a row. So the service shutting down the screen /possibly in conjunction with the renderer/ may be bugged too
[Fire HD 8 and HD 10 Original Android Development] psi78:
Yeah, you were right, the rom is pre-rooted (/system/xbin/su), activating it in developer options works for granting root to apps or adb
[Fire HD 8 and HD 10 Original Android Development] ggow:
https://xdaforums.com/t/rom-testing-suez-lineage-16-0-06-may-2022.4232785/post-84518967

I am looking into the high burn on the surfaceflinger process and thermal stuff in general.
[Fire HD 8 and HD 10 Original Android Development] psi78:
The interesting thing is also though, that on another device, my Xperia Z5 with crDroid/Android 11 and MSM8994 chipset with 4x A53 and 4x A57 CPU the Smartpack Kernel Manager shows separate configuration options for the big and little CPUs. It doesn't do on this rom, so the kernel isn't configured/compiled to support the big little setup. I don't know what would be needed to make that work, and

i don't fully understand why you need to stick to gcc 4.9 but, as i wrote in an earlier post it supports at least a57.a53 big little setup. So if the gcc compiled stuff optimized for a53 works also on the a72 in the current state of the rom, then it could be worth a shot to enable the big little setup with the mcpu option, even if the big cpu configuration then is not directly a72.

quote from https://gcc.gnu.org/gcc-4.9/changes.html:

Initial big.LITTLE tuning support for the combination of Cortex-A57 and Cortex-A53 was added through the -mcpu=cortex-a57.cortex-a53 option."
[Fire HD 8 and HD 10 Original Android Development] psi78:
I also noted btw that /etc/ld.config.txt is very minimal on this rom.

On Maverick with amazon stock rom/android 9 it looks much more complex. In newer versions of android the linker config file is auto generated, but not on android 9 as far as i know. So updating this file could maybe be worth something too🤔
[Fire HD 8 and HD 10 Original Android Development] Klaus R:
Concerning my probs videos not shown in any browser... Is it possible this issue refers to bromite web view? All my other lineage devices are using Android Web view. Can I change? If yes, how? Or do I have to update bromite? But where to get it?
[Fire HD 8 and HD 10 Original Android Development] psi78:
Easy way to update bromite webview is the app ffupdater (get it on github or fdroid), or download it directly here i guess: https://www.bromite.org/system_web_view
[Fire HD 8 and HD 10 Original Android Development] Klaus R:
Thanx. Updated to 10x anything, but it didn't help. Still no vids on some Websites. Any chance to switch to androidwebview?
[Fire HD 8 and HD 10 Original Android Development] psi78:
Yes. It has to be installed as a system app and a user app. Download Android System Webview apk from apkmirror.com and copy the apk to /system/app/ (to do that in twrp: mount system partition first, then you can copy the file with twrp file manager from your internal download folder /sdcard/Download/ to /system/app/). Then after reboot also manually install the apk as a user app.

You could also test your app furthermore by disabling bromite webview in app settings (when it its the only webview), then restart the app you use. If the app doesn't crash then, then it doesn't use bromite webview and the cause is somewhere else.

Duckduckgo browser or german Rossmann app rely on the system's webview for example and will crash if you disable it. Whereas german DM app relies on the default browser (the browser set in settings/apps/standard apps, so lineageos browser Jelly as default on this rom). Some apps also have their own browser engine i think tho.
[Fire HD 8 and HD 10 Original Android Development] Klaus R:
Hmm, not a prob with other apps than browser. German webside n-tv.de, e.g.. Lots of videos there, but none is shown

Will give your advice a try... Thanx. Saw each system app has its own directory containing apk file. What name for the new one, "Android system webview"? Or just "Android webview"?
[Fire HD 8 and HD 10 Original Android Development] psi78:
Doesn't really matter, you could just put the apk directly inside the folder /system/app, or give the subdirectory and the apk a name like GoogleWebView if you wanna follow the naming schemes. Permissions of the dir should be set to 755 with chmod and 644 for the apk
[Fire HD 8 and HD 10 Original Android Development] Klaus R:
Succeeded finally, thanx a lot. Very helpful, your Informations. Changed from bromite to Android Web view in settings, rebooted. But i see it was not the cause for Videos on websites not being shown
[Fire HD 8 and HD 10 Original Android Development] psi78:
Which browser are you using then?

When i use DuckDuckGo Browser with bromite webview or Android System webview i can play videos on n-tv.de

The only other mainstream browser than Duckduckgo i know of which uses the systems webview is Via browser.

Most other mainstream browsers like Chrome, Brave, Opera, Firefox have their own browser engine and don't use webview. Even Google Playstore uses it's own browser.

So you could try another browser.

The thing what makes it more complex is that starting with android 10 there's the trichrome library which i think is used in conjunction with webview.

Edit: see https://hackanons.com/2021/06/com-google-android-trichromelibrary.html?amp

If you use playstore then it will automatically install and update this library in the background.

But as i said, Duckduckgo browser with webview works for me on this rom/LOS16 is Android 9 anyway/ so i guess the trichrome library isn't the culprit. Unless ( which i'm not sure of) there exists a constellation where a chromium based browser made for android 10+ depends on it.

If you use other browsers like Firefox then i guess videos not playing is a problem of the browser depending on the website and maybe also the omx codecs on this rom. In the latter case a logcat for ggow would be fitting;)

But more probable: n-tv.de is displaying ads with their videos too, so possibly the adblocking functions of the browser you use lead to a malfunctioning of playing videos on that website, and it doesn't have to do with the suez rom. So you'd have to whitelist the site in your adblocker.

I noted also that Fennec is behind in the versioning compared to Firefox, so maybe an update to Firefox would help in case you use Fennec.
[Fire HD 8 and HD 10 Original Android Development] Klaus R:
Hey, you were right. Duckduckgo shows and plays vids. So my browsers were the culprit

Using fennec, but also tried firefox and chrome. Other device with lineage 17 and Androidwebview has no probs with these browsers

Never did one. Installed Catlog from fdroid and will have a look...
[Fire HD 8 and HD 10 Original Android Development] psi78:
Hmm yes, installed current Firefox version with ffupdater, videos from n-tv.de played for me, but the graphics were distorted as in the attached screenshot
[Fire HD 8 and HD 10 Original Android Development] psi78:
Here's an interesting article from a Firefox Mobile developer about using buffers by egl and opengl to enhance performance.

So the problem with firefox not playing videos could be related to the other SurfaceFlinger problems on this rom, as it also uses EGL and Opengl to create buffers for displaying graphics

The magic of Android GraphicBuffer---direct texture - Code World

www.codetd.com

Edit: Here's a nice presentation about how android graphics system works, including SurfaceFlinger

Design and Concepts of Android Graphics

Design and Concepts of Android Graphics - Download as a PDF or view online for free

www.slideshare.net

Edit2: The possible AOSP build flags for SurfaceFlinger are listed here:

Creating the HAL Interface | Android Open Source Project

source.android.com

and here:

Configuration overview | Android Open Source Project

source.android.com

The SurfaceFlinger configuration of the current suez rom 20220506 can be seen with:

:/ # dumpsys SurfaceFlinger

Build configuration: [sf DISABLE_TRIPLE_BUFFERING PRESENT_TIME_OFFSET=0 FORCE_HWC_FOR_RBG_TO_YUV=1 MAX_VIRT_DISPLAY_DIM=0 RUNNING_WITHOUT_SYNC_FRAMEWORK=1 NUM_FRAMEBUFFER_SURFACE_BUFFERS=3] [libui] [libgui]
[Fire HD 8 and HD 10 Original Android Development] Klaus R:
Strange. This morning even duckduckgo won't show up vids... Yesterday it did....
[Fire HD 8 and HD 10 Original Android Development] psi78:
I think it may have to do with the sometimes happening cpu overload of SurfaceFlinger. I played around with Firefox and at one point i could play the videos fine with Firefox, but everything felt kinda sluggish and at other times the video was distorted like in the Screenshot i posted.
[Fire HD 8 and HD 10 Original Android Development] Klaus R:
Hmm, ok. If I can distribute in any way to analyze or even solve that issue.... But i'm afraid my expierience is not wide enough 😉
[Fire HD 8 and HD 10 Original Android Development] psi78:
Did a clean reinstall oft current suez rom 20220506, no magisk, no gapps, activated power saving, installed Android system webview manually, also duckduckgo Browser, matlog and fennec. In fennec i set the prevent tracking mode to normal (not strict) and activated Storage access for Fennec manually in APP settings. I could play videos then. Interestingly Fennec also crashed and put a crash dump into logcat file, pointing to /system/vendor/lib64/egl/libGLESv2_POWERVR_ROGUE.so

@ggow when looking at this chart

Design and Concepts of Android Graphics

Design and Concepts of Android Graphics - Download as a PDF or view online for free

www.slideshare.net

possibly SurfaceFlinger itself is not the culprit but maybe SurfaceFlinger trying to access already deregistered Buffers, leading to high CPU usage because of compositing surfaces anew instead of utilizing the buffer. So possibly the gralloc, libegl, libgles, or liboverlay libraries have a malfunction.
[Fire HD 8 and HD 10 Original Android Development] likwidchz:
Neat find, I'm a new person here. Been trying different versions of Lineage OS as the latest MAY release made my processing.org sketch slow slow.

lineage-16.0-20220301-UNOFFICIAL-suez.zip ~55 FPS

lineage-16.0-20220506-UNOFFICIAL-suez.zip ~22 FPS = Sad Panda.

I also found that the surface flinger app was using lots of CPU when I ran TOP. Hopefully you folks can get to the bottom of it!

**Edit, my processing.org app is drawing lots of shapes, animations on screen. lots of 2D items happening.
[Fire HD 8 and HD 10 Original Android Development] psi78:
@ggow Just noted when looking at the malfunctioning LiveDisplay Service

/system/etc/init/lineage-livedisplay.rc

that this service tries to make changes to

/sys/devices/virtual/graphics/fb0

whereas in the current state of the rom

/sys/devices/virtual/graphics

and fb0 as framebuffer device doesn't exist,

instead there is a

/sys/devices/virtual/pvr

directory though, but don't know where a frambuffer device like fb0 is there

Why is the FrameBuffer missing on some Android devices? - Sample Code and Directory of libraries for Android Developers - AndroidHiro.com

Why is the FrameBuffer missing on some Android devices?.Im curious about the display device on Android. I know that on Linux, device devices are represented as /dev/fbX, which "fb" stands for FrameBuffer. I also heard that Android uses FrameBuffer as wellin Android itâ€™s /dev/graphics/fbX...

www.androidhiro.com

mentions how to create a framebuffer on android but it uses the path

/dev/fb0

So for a virtual device - not sure what would be needed to enable that

Edit: this page mentions though that virtual framebuffer should be enabled only for testing purposes, wondering why LOS LiveDisplay Service needs it then 🤔

or how to check if kernel framebuffer works correctly: https://cateee.net/lkddb/web-lkddb/FB_VIRTUAL.html

Edit: ok, virtual devices are for using android emulator apparently and /dev/graphics/fb0 is created during runtime while dev is tmpfs partition
[Fire HD 8 and HD 10 Original Android Development] Creeju:
Just installed the latest 20220506-build on my tablet, using TWRP 3.6.1-9.2.

Some notes:

Magisk install via TWRP always resulted in a bootloop. The only way I got Magisk working, is patching boot.img. It will complain about the abundant su-library, but should work fine with LineageOS-su turned off in developer settings.

NanoDroid will not work without Magisk, due to the small system partition size (in standard config with all the apps).

Thank you so much for the work and the rom! Will start testing now. :)
[Fire HD 8 and HD 10 Original Android Development] psi78:
I get repeated errors from IMGSRV and gralloc reporting a broken pipe. See Screenshot,

so maybe it would be helpful to trace I/O for gralloc, surfaceflinger. Don't know how to do that though other than potentially using Android SDK and the Rom in Android Emulator, enable a trace and analyze it🤔
[Fire HD 8 and HD 10 Original Android Development] likwidchz:
Can you compare one release to another? Perhaps if you did that you could compare with what changed..

Not sure if thats how you would do it, or technically how much stuff changes between one version and another... but ideas.
[Fire HD 8 and HD 10 Original Android Development] psi78:
Those gralloc errors occured also with 20220413

Back in the times when i used 20220301 worked kinda fine in some regards, though it had massive battery performance drain sometimes, don't know if those gralloc errors occured also there, but i guess it. Some other changes of the rom probably in the meantime (blob libraries i guess), of which only ggow probably knows.

Interesting thing is though that for ROM version 20220506 CPU2 and CPU3 (which have the high cpu usage malfunction errors) dmesg shows errors like this (which i didn't see in 20220413, but may depend on the boot state - 20220413 and i think also 20220301 had no problems after cold boot, but after reboot):

[ 2251.278622] -(2)[0:swapper/2]SANITY CHECK: Unexpected variation in id_mmfr0. Boot CPU: 0x00000010101105, CPU2: 0x00000010201105

[ 2251.280158] -(3)[0:swapper/3]SANITY CHECK: Unexpected variation in id_mmfr0. Boot CPU: 0x00000010101105, CPU3: 0x00000010201105

Apparently these errors are a sign for mismatching CPU features in version 20220506 of the ROM.

See also https://patchwork.kernel.org/projec...215922.2021550-1-dmitry.baryshkov@linaro.org/

Edit:

I tested the ROM versions 20220301 / 20220316 / 20220406 / 20220413 / 20220506 with Passmark Performance Test app from Playstore, and Power Saving mode enabled:

2D score was 9089 / x / 15786 / 16712 / 17150 respectively. (x: Passmark 2D didn't work with 20220316)

CPU Score was 912 / x / 1390 / 1398 / 1482 respectively.

So latest version of the rom had the best performance overall (in that benchmark at least).

But not when CPU2 was hogged by SurfaceFlinger in idle mode with 20220301 or 20220506 version of the rom (mostly occuring with Power Saving off in idle mode), the Passmark CPU score was like 900-1000, so worse then.

The interesting thing is (tested with current ROM 20220506):

After running the "Unreal System Benchmark" from Playstore, exiting that app, then restarting "Passmark Performance Test" the 2D score of passmark goes down to like ~6000 (!) compared to ~17000 before, and CPU2 and CPU3 are at full throttle in idle mode then, and Passmark CPU score goes down to like 600 compared to 1400 before. This didn't happen everytime though and i had the impression with Power Saving on the risk was less.

Your best bet at the current state of the rom is:

Enable Power Saving mode to minimize the risk of the CPUs getting hogged by SurfaceFlinger (for whatever reason).

And before you continue doing anything after startup, check with a program like CPU info if the CPU cores 2 and 3 are powering down normally.

Edit: Also tested 20220301 and 20220316 (see above)
[Fire HD 8 and HD 10 Original Android Development] likwidchz:
You are over my head man :) Just getting into this and understanding things. I just hope someone figures it out, which I'm sure they will at some point.

Take care,
[Fire HD 8 and HD 10 Original Android Development] luk2009:
Hi

Is there any update planned for this rom?

my tablet work fine except for the youtube video zoom and the random netflix crack .

thanks in advance
[Fire HD 8 and HD 10 Original Android Development] likwidchz:
Have you tried older roms?

lineageos - Google Drive

drive.google.com

**Not my link.

I have some lineage 14 and 12 roms also, currently trying the 12 rom out now.

Lineage-12.1-20200505-UNOFFICIAL-suez.zip

As old as it is, it seems to work, but I'm only using it for one thing and that's a custom processing.org sketch. All other versions of lineage seem to run really mixed framerates due to that surface flinger process gobbling up a bunch of CPU.

One of the older posts mentioned that one of the cores just keep using high cpu.

I'm wondering if it can be fixed with an adb command at boot or something.
[Fire HD 8 and HD 10 Original Android Development] ggow:
ℹ️ New Build is Up

Dated: 05 July 2022

- [fixed] Backlight HAL Errors

- [fixed] LiveDisplay not working
[Fire HD 8 and HD 10 Original Android Development] Nosepull:
Thanks for updating. Is Magisk working again with this version?
[Fire HD 8 and HD 10 Original Android Development] ggow:
I haven't tried it, but it should work. Let me know how you get on.
[Fire HD 8 and HD 10 Original Android Development] tuniel:
thanks for the update!

heads up: the file size is about 10MB larger than before, hence even with pico gapps there is not enough space in the system partition. i removed the stock email and calendar to make some room.

thanks
[Fire HD 8 and HD 10 Original Android Development] Nosepull:
Which would mean that any update with GApps should fail?!
[Fire HD 8 and HD 10 Original Android Development] tuniel:
That's indeed what I experienced. I wiped system, cache and davlik. Then installed rom, rebooted to recovery, installed gapps and got error 70.
[Fire HD 8 and HD 10 Original Android Development] Nosepull:
Thanks for the warning.
[Fire HD 8 and HD 10 Original Android Development] ggow:
Try bitgapps arm64 9.0.0 R45. It's more than half the size compressed.
[Fire HD 8 and HD 10 Original Android Development] Nosepull:
How to switch GApp provider? What do I have wipe (without loosing data)?
[Fire HD 8 and HD 10 Original Android Development] ggow:
Unfortunately I don't know the answer. I don't use gapps.
[Fire HD 8 and HD 10 Original Android Development] Legitsu:
/system should be resized by 100MB anyway to make accommodations for
[Fire HD 8 and HD 10 Original Android Development] jmw0235:
If you are watching the application AFREECA TV, the screen will stop. (Infinite buffering)

I can still see the sound and the chat.

I asked AFREECA TV about this problem, but it is not compatible because it is an abnormal Android.

Please modify it to be compatible.
[Fire HD 8 and HD 10 Original Android Development] ggow:
I just had a thought if you are doing a dirty update then you shouldn't need to flash gapps again
[Fire HD 8 and HD 10 Original Android Development] ggow:
I have never tried to resize or mess with the partitions on an android device. Can it be done safely on our device?
[Fire HD 8 and HD 10 Original Android Development] Legitsu:
uh not easily no if I remember correctly partition stuff should be done directly after doing the bootloader unlock I forget why, I could be wrong and newer trwp might do it
[Fire HD 8 and HD 10 Original Android Development] ggow:
I'll add it to the list for now, I might need to do some reading.
[Fire HD 8 and HD 10 Original Android Development] Nosepull:
Yes. It re-installs itself. But that's the problem when switching to another provider of GApps - the old ones always get reinstalled.

And judging from the posts here, I assume that dirty flashing with too big GApps will fill up /system.
[Fire HD 8 and HD 10 Original Android Development] Rortiz2:
You may want to talk with k4y0z. amonet already modifies the GPT, so maybe everything can be done there.
[Fire HD 8 and HD 10 Original Android Development] Legitsu:
yea that was in something in the exploit is what defines the gpt

even without gapps /system is a tight fit its always a good idea to have more room since we are not

treble

btw @ggow when are we getting LOS 18.1 :p /s