linux-sunxi / meta-sunxi

Official sunxi OpenEmbedded layer for Allwinner-based boards.
MIT License
140 stars 172 forks source link

Bad qtwebengine performance with lima #373

Closed WArnauer closed 11 months ago

WArnauer commented 1 year ago

Hi!

I am testing the web performance with lima on a Lime2(A20) using meta-qt6 and the quicknanobrowser example. Building was pretty much straight forward with this settings(there is more but I think the rest is not relevant): MACHINEOVERRIDES .= ":use-mailine-graphics" DEFAULTTUNE = "cortexa7hf-neon-vfpv4" IMAGE_INSTALL:append = " qtwebengine "

With default settings(QTWEBENGINE_CHROMIUM_FLAGS="--no-sandbox") it's nearly unusable. Images are flickering during loading and scrolling also causes the site to jump around. Can send a video if needed. After messing around with the chromium flags I found that --disable-gpu-compositing avoids this issue and the browser becomes usable.

Performance is still worse than my old setup which is an all custom built(no yocto) 5.4.x kernel + mali-blobs + Debian Buster + Qt 5.12.x.

Any idea how to speed this up with build options, chromium flags... ? Or is it expected that lima is slower than the old mali-blobs?

Thanks, Wolfgang

nandra commented 1 year ago

@WArnauer just found out in my notes that running chromium using lima I was using this: chromium --no-sandbox --start-maximized --kiosk --use-gl=egl https://youtube.com so maybe --use-gl=egl can help? Just my 2 cents

WArnauer commented 1 year ago

There are some init parameters already set, including the egl. Not sure if any of the other messages(locale, cursor) may cause performance issues.

QTWEBENGINE_CHROMIUM_FLAGS="--no-sandbox" /config/quicknanobrowser https://orf.at
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, but has failed to switch to one.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Failed to move cursor on screen LVDS1: -14
Failed to move cursor on screen LVDS1: -14
qt.webenginecontext:

GL Type: egl
Surface Type: OpenGLES
Surface Profile: NoProfile
Surface Version: 2.0
QSG RHI Backend: OpenGL
Using Supported QSG Backend: yes
Using Software Dynamic GL: no
Using Multithreaded OpenGL: yes

Init Parameters:
  *  application-name Quick%20Nano%20Browser
  *  browser-subprocess-path /usr/libexec/QtWebEngineProcess
  *  disable-composited-antialiasing
  *  disable-features ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture
  *  disable-setuid-sandbox
  *  disable-speech-api
  *  enable-features NetworkServiceInProcess2,TracingServiceInProcess,OverlayScrollbar
  *  enable-threaded-compositing
  *  enable-viewport
  *  in-process-gpu
  *  no-sandbox
  *  use-gl egl

Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, but has failed to switch to one.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, but has failed to switch to one.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
nandra commented 1 year ago

Don't think so it can cause an issues.

nandra commented 1 year ago

@WArnauer I've tried mickledore and chromium using wayland and performance seems to be fine (didn't do any measurements though). Did you check that pls? Thanks.

nandra commented 11 months ago

@WArnauer any update on your end please? Thanks.

WArnauer commented 11 months ago

I didn't manage to get the combination of mickledore + chromium + wayland working with my setup and had to pause this project for now. Still planing to test QtWebengine with Wayland as backend at some point but no planned date yet.

nandra commented 11 months ago

OK will close it for now, then we can re-open. Thanks!