Qtwebengine 6.3 fails with lima driver
-
Hello,
I cross-compiled Qt6.3 for armhf and built a QtQuick QtWebengine based app. After deployment, other aspects of the app worked fine, but failed to load QtWebengine.When I run:
export QT_QPA_EGLFS_INTEGRATION=eglfs_kms export QT_QPA_PLATFORM=eglfs ./App -platform eglfs
I got the following log, then my App crashes:
... 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 App * browser-subprocess-path /usr/lib/qt/6.3/libexec/QtWebEngineProcess * disable-features ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture * disable-setuid-sandbox * disable-speech-api * disable-viz-display-compositor * enable-features NetworkServiceInProcess,TracingServiceInProcess * enable-logging * enable-threaded-compositing * ignore-certificate-errors * in-process-gpu * no-sandbox * touch-events enabled * use-gl egl * v 1 [21792:21792:0202/024540.453003:VERBOSE1:zygote_main_linux.cc(220)] ZygoteMain: initializing 0 fork delegates [16993:21827:0202/024540.501593:VERBOSE1:media_stream_manager.cc(705)] MSM::InitializeMaybeAsync([this=0x438d498]) [16993:21827:0202/024540.541143:VERBOSE1:media_stream_manager.cc(705)] MDM::MediaDevicesManager() [21789:21789:0202/024540.529747:VERBOSE1:zygote_main_linux.cc(220)] ZygoteMain: initializing 0 fork delegates [16993:21827:0202/024540.542481:VERBOSE1:media_stream_manager.cc(705)] MSM::MediaStreamManager([this=0x438d498])) [16993:21837:0202/024540.632444:VERBOSE1:gl_surface_egl_qt.cpp(278)] eglCreatePbufferSurface failed with error EGL_BAD_MATCH [16993:21837:0202/024541.158139:VERBOSE1:gl_surface_egl_qt.cpp(278)] eglCreatePbufferSurface failed with error EGL_BAD_MATCH [16993:21837:0202/024541.182178:VERBOSE1:gl_surface_egl_qt.cpp(278)] eglCreatePbufferSurface failed with error EGL_BAD_MATCH [16993:21837:0202/024541.243120:VERBOSE1:gpu_init.cc(845)] Vulkan disabled or failed to initialize [16993:21914:0202/024541.532660:VERBOSE1:multi_log_ct_verifier.cc(85)] Adding CT log: Google 'Argon2021' log ... [16993:21914:0202/024541.683305:VERBOSE1:multi_log_ct_verifier.cc(85)] Adding CT log: Symantec log [16993:21837:0202/024542.506963:ERROR:gl_context_egl.cc(279)] eglCreateContext failed with error EGL_BAD_ALLOC [16993:21837:0202/024542.509330:ERROR:gles2_command_buffer_stub.cc(316)] ContextResult::kFatalFailure: Failed to create context. ./runUI.sh: line 12: 16993 Bus error ./App -platform eglfs
The Errors:
[16993:21837:0202/024540.632444:VERBOSE1:gl_surface_egl_qt.cpp(278)] eglCreatePbufferSurface failed with error EGL_BAD_MATCH
[16993:21837:0202/024542.506963:ERROR:gl_context_egl.cc(279)] eglCreateContext failed with error EGL_BAD_ALLOC
[16993:21837:0202/024542.509330:ERROR:gles2_command_buffer_stub.cc(316)] ContextResult::kFatalFailure: Failed to create context.
./runUI.sh: line 12: 16993 Bus error ./App -platform eglfsAfter several attempts I also get the following error:
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 App * browser-subprocess-path /usr/lib/qt/6.3/libexec/QtWebEngineProcess * disable-features ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture * disable-setuid-sandbox * disable-speech-api * disable-viz-display-compositor * enable-features NetworkServiceInProcess,TracingServiceInProcess * enable-logging * enable-threaded-compositing * ignore-certificate-errors * in-process-gpu * no-sandbox * touch-events enabled * use-gl egl * v 1 [18650:18650:0202/043550.047239:VERBOSE1:zygote_main_linux.cc(220)] ZygoteMain: initializing 0 fork delegates [13233:18676:0202/043550.104185:VERBOSE1:media_stream_manager.cc(705)] MSM::InitializeMaybeAsync([this=0x36a1448]) [13233:18676:0202/043550.104841:VERBOSE1:media_stream_manager.cc(705)] MDM::MediaDevicesManager() [13233:18676:0202/043550.105165:VERBOSE1:media_stream_manager.cc(705)] MSM::MediaStreamManager([this=0x36a1448])) [18648:18648:0202/043550.225994:VERBOSE1:zygote_main_linux.cc(220)] ZygoteMain: initializing 0 fork delegates [13233:18685:0202/043550.467378:ERROR:gl_context_egl.cc(279)] eglCreateContext failed with error EGL_BAD_ALLOC ./runUI.sh: line 12: 13233 Segmentation fault ./App -platform eglfs
The Errors:
[13233:18685:0202/043550.467378:ERROR:gl_context_egl.cc(279)] eglCreateContext failed with error EGL_BAD_ALLOC ./runUI.sh: line 12: 13233 Segmentation fault ./App -platform eglfs
My armhf Spec:
- Qt version is 6.3.0, debian Bookworm 12.8, Linux 5.4.47-a98aab5-sunxi #1 SMP Wed Dec 11 11:47:48 UTC 2024 armv7l GNU/Linux (Bookworm released with linux kernel 6.1, but I use Linux 5.4.47)
- Allwinner A20 Dual-core 1.0GHz CPU
- Graphics: Mali-400 MP2 with Open GL ES 2.0/1.1.
- Memory: 495Mi Ram, Swap is 0
Built mesa manually with the following parametrs:
...
"mesa"
"https://gitlab.freedesktop.org/mesa/mesa.git"
"mesa-24.2.6"
"meson-ninja"
"build"
"--optimization s --buildtype=release --prefix=${BUILD_PATH} --cross-file=${CROSS_FILE_PATH}
--libdir=${LIB_DIR} -Degl=enabled -Dplatforms=wayland -Dgallium-drivers=lima -Dglx=disabled -Dllvm=disabled
-Dgbm=enabled -Ddebug=false -Dxmlconfig=enabled -Dopengl=false -Dgles2=enabled -Dgles1=enabled -Dvulkan-drivers= "
...Qt Configuration for compilation:
-force-debug-info -platform linux-g++ -xplatform linux-arm-gnueabihf-g++ -openssl-runtime -opengl es2 -no-cups -opensource -confirm-license -no-feature-relocatable -no-feature-qtpdf-build -qt-host-path /usr/lib/qt/6.3-host -extprefix /usr/lib/qt/6.3 -prefix /usr/lib/qt/6.3 -qt-sqlite -shared -skip qtconnectivity -skip qtsensors -skip qttranslations -nomake examples -nomake tests -qt-libpng -qt-libjpeg -xcb -xcb-xlib -bundled-xcb-xinput -device-option CONFIG+=lang-all -no-use-gold-linker -no-gbm -kms -- -DCMAKE_TOOLCHAIN_FILE=/usr/lib/qt/6.3/lib/cmake/cross-arm-linux-gnueabihf.cmake -DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON -DQT_QPA_DEFAULT_PLATFORM=eglfs -DQT_QPA_DEFAULT_EGLFS_INTEGRATION=eglfs_kms -DCMAKE_BUILD_TYPE=RelWithDebInfo -DFEATURE_clang:BOOL=OFF -DFEATURE_clangcpp:BOOL=OFF
Config Summary:
Building for: linux-arm-gnueabihf-g++ (arm, CPU features: neon) Compiler: gcc 12.2.0 Build options: Mode ................................... release (with debug info) Optimize release build for size ........ no Fully optimize release builds (-O3) .... no Building shared libraries .............. yes Using C standard ....................... C11 Using C++ standard ..................... C++17 Using ccache ........................... no Using new DTAGS ........................ yes Generating GDB index ................... no Relocatable ............................ no Using precompiled headers .............. yes Using LTCG ............................. no Target compiler supports: Extensions ........................... NEON Sanitizers: Addresses ............................ no Threads .............................. no Memory ............................... no Fuzzer (instrumentation only) ........ no Undefined ............................ no Build parts ............................ libs tools Qt modules and options: Qt Concurrent .......................... yes Qt D-Bus ............................... yes Qt D-Bus directly linked to libdbus .... yes Qt Gui ................................. yes Qt Network ............................. yes Qt PrintSupport ........................ yes Qt Sql ................................. yes Qt Testlib ............................. yes Qt Widgets ............................. yes Qt Xml ................................. yes Support enabled for: Using pkg-config ....................... yes udev ................................... yes Using system zlib ...................... yes Zstandard support ...................... no Thread support ......................... yes Common build options: Linker can resolve circular dependencies yes Qt Core: backtrace .............................. yes DoubleConversion ....................... yes Using system DoubleConversion ........ no GLib ................................... yes ICU .................................... no Using system libb2 ..................... no Built-in copy of the MIME database ..... yes cpp/winrt base ......................... no Tracing backend ........................ <none> Logging backends: journald ............................. no syslog ............................... no slog2 ................................ no PCRE2 .................................. yes Using system PCRE2 ................... yes CLONE_PIDFD support in forkfd .......... yes Qt Sql: SQL item models ........................ yes Qt Network: getifaddrs() ........................... yes IPv6 ifname ............................ yes libproxy ............................... no Linux AF_NETLINK ....................... yes OpenSSL ................................ yes Qt directly linked to OpenSSL ........ no OpenSSL 1.1 ............................ yes DTLS ................................... yes OCSP-stapling .......................... yes SCTP ................................... no Use system proxies ..................... yes GSSAPI ................................. no Brotli Decompression Support ........... yes Core tools: Android deployment tool ................ no macOS deployment tool .................. no Windows deployment tool ................ no qmake .................................. yes Qt Gui: Accessibility .......................... yes FreeType ............................... yes Using system FreeType ................ yes HarfBuzz ............................... yes Using system HarfBuzz ................ no Fontconfig ............................. yes Image formats: GIF .................................. yes ICO .................................. yes JPEG ................................. yes Using system libjpeg ............... no PNG .................................. yes Using system libpng ................ no Text formats: HtmlParser ........................... yes CssParser ............................ yes OdfWriter ............................ yes MarkdownReader ....................... yes Using system libmd4c ............... no MarkdownWriter ....................... yes EGL .................................... yes OpenVG ................................. no OpenGL: Desktop OpenGL ....................... no OpenGL ES 2.0 ........................ yes OpenGL ES 3.0 ........................ yes OpenGL ES 3.1 ........................ yes OpenGL ES 3.2 ........................ yes Vulkan ................................. no Session Management ..................... yes Features used by QPA backends: evdev .................................. yes libinput ............................... yes HiRes wheel support in libinput ........ yes INTEGRITY HID .......................... no mtdev .................................. yes tslib .................................. no xkbcommon .............................. yes X11 specific: XLib ................................. yes XCB Xlib ............................. yes EGL on X11 ........................... yes xkbcommon-x11 ........................ yes xcb-sm ............................... no QPA backends: DirectFB ............................... no EGLFS .................................. yes EGLFS details: EGLFS OpenWFD ........................ no EGLFS i.Mx6 .......................... no EGLFS i.Mx6 Wayland .................. no EGLFS RCAR ........................... no EGLFS EGLDevice ...................... yes EGLFS GBM ............................ yes EGLFS VSP2 ........................... no EGLFS Mali ........................... no EGLFS Raspberry Pi ................... no EGLFS X11 ............................ yes LinuxFB ................................ yes VNC .................................... yes VK_KHR_display ......................... no QNX: lgmon ................................ no IMF .................................. no XCB: Using system-provided xcb-xinput ..... no GL integrations: GLX Plugin ......................... no XCB GLX .......................... no EGL-X11 Plugin ..................... yes Windows: Direct 2D ............................ no Direct 2D 1.1 ........................ no DirectWrite .......................... no DirectWrite 3 ........................ no Qt Widgets: GTK+ ................................... no Styles ................................. Fusion Windows Qt Testlib: Tester for item models ................. yes Qt PrintSupport: CUPS ................................... no Qt Sql Drivers: DB2 (IBM) .............................. no InterBase .............................. no MySql .................................. no OCI (Oracle) ........................... no ODBC ................................... no PostgreSQL ............................. no SQLite ................................. yes Using system provided SQLite ......... no Further Image Formats: JasPer ................................. no MNG .................................... no TIFF ................................... yes Using system libtiff ................. no WEBP ................................... yes Using system libwebp ................. yes Qt QML: QML network support .................... yes QML debugging and profiling support .... yes QML just-in-time compiler .............. yes QML sequence object .................... yes QML XML http request ................... yes QML Locale ............................. yes Qt QML Models: QML list model ......................... yes QML delegate model ..................... yes Qt Quick: AnimatedImage item ..................... yes Canvas item ............................ yes Support for Qt Quick Designer .......... yes Flipable item .......................... yes GridView item .......................... yes ListView item .......................... yes TableView item ......................... yes TreeView item .......................... yes Path support ........................... yes PathView item .......................... yes Positioner items ....................... yes Repeater item .......................... yes ShaderEffect item ...................... yes Sprite item ............................ yes Qt Quick Templates 2: Hover support .......................... yes Multi-touch support .................... yes Calendar support ....................... yes Qt Quick Controls 2: Styles ................................. Basic Fusion Imagine Material Universal macOS Windows Qt Multimedia: GStreamer 1.0 .......................... yes Video for Linux ........................ yes Linux DMA buffer support ............... yes MMRenderer ............................. no AVFoundation ........................... no Windows Media Foundation ............... no Qt 3D: Assimp ................................. yes System Assimp .......................... no Use SSE2 instructions .................. no Use AVX2 instructions .................. no Aspects: Render aspect ........................ yes Input aspect ......................... yes Logic aspect ......................... yes Animation aspect ..................... yes Extras aspect ........................ yes Qt 3D APIs: Vulkan ................................. no Qt 3D Renderers: OpenGL Renderer ........................ yes RHI Renderer ........................... no Qt3D Geometry Loaders: Autodesk FBX ........................... no Qt 5 Compatibility Libraries: iconv .................................. yes Qt Charts Types: Area Chart ............................. yes Line Chart ............................. yes Spline Chart ........................... yes Scatter Chart .......................... yes Bar Chart .............................. yes Pie Chart .............................. yes Boxplot Chart .......................... yes Candlestick Chart ...................... yes Qt Axis Types: DateTime Axis .......................... yes Qt Tools: Qt Assistant ........................... yes QDoc ................................... no Clang-based lupdate parser ............. no Qt Designer ............................ yes Qt Distance Field Generator ............ yes Qt Linguist ............................ yes pixeltool .............................. yes qdbus .................................. yes Qt Attributions Scanner ................ yes qtdiag ................................. yes qtplugininfo ........................... yes Qt Opcua: Open62541 .............................. yes Unified Automation C++ SDK ............. no Support for namespace 0 NodeId names ... yes Namespace 0 NodeIds generator .......... no Open62541 security support ............. yes Support for global discovery server .... yes Serial Port: ntddmodm ............................... no QtQuick3D: Assimp ................................. yes System Assimp .......................... no Qt Remote Objects: High Availability Manager (ham) ........ no Qt Scxml: ECMAScript data model for QtScxml ...... yes Qt Scxml: ECMAScript data model for QtScxml ...... yes Qt SerialBus: Socket CAN ............................. yes Socket CAN FD .......................... yes SerialPort Support ..................... yes Qt Virtualkeyboard: Desktop integration .................... yes Built-in layouts ....................... yes Key navigation ......................... no Retro style as default ................. no Sensitive Debug ........................ no Cerence ................................ no Static Linking ....................... no Handwriting .......................... no Alphabetic ......................... no CJK ................................ no XT9 .................................. no XT9 Debug .......................... no XT9 9-key layouts .................. no Bundle resources ..................... no Handwriting ........................ no XT9 ................................ no Hunspell ............................... no Using Hunspell copy from 3rdparty/ ... no OpenWnn ................................ yes MyScript ............................... no Language support enabled for: Arabic ............................... yes Bulgarian ............................ yes Czech ................................ yes Danish ............................... yes German ............................... yes Greek ................................ yes English GB ........................... yes English US ........................... yes Spanish .............................. yes Spanish Mexico ....................... yes Estonian ............................. yes Farsi ................................ yes Finnish .............................. yes French Canada ........................ yes French France ........................ yes Hebrew ............................... yes Hindi ................................ yes Croatian ............................. yes Hungarian ............................ yes Indonesian ........................... yes Italian .............................. yes Japanese ............................. yes Korean ............................... yes Malay ................................ yes Norwegian ............................ yes Dutch ................................ yes Polish ............................... yes Portuguese Brazil .................... yes Portuguese Portugal .................. yes Romanian ............................. yes Russian .............................. yes Slovak ............................... yes Slovenian ............................ yes Albanian ............................. yes Serbian .............................. yes Swedish .............................. yes Thai ................................. yes Turkish .............................. yes Ukrainian ............................ yes Vietnamese ........................... yes Simplified Chinese ................... yes Traditional Chinese .................. yes HongKong Chinese ..................... no Traditional chinese input methods: Zhuyin ............................... yes Cangjie .............................. yes Qt Wayland TextInput Protocol V4(WIP) .... no Qt Wayland Client ........................ yes Qt Wayland Compositor .................... yes Qt Wayland Drivers: EGL .................................... yes Raspberry Pi ........................... no DRM EGL ................................ yes libhybris EGL .......................... no Linux dma-buf server buffer integration yes Shm emulation server buffer integration yes Vulkan-based server buffer integration . no Qt Wayland Client Shell Integrations: xdg-shell .............................. yes ivi-shell .............................. yes wl-shell (deprecated) .................. yes qt-shell ............................... yes Qt Wayland Compositor Layer Plugins: VSP2 hardware layer integration ........ no WebEngine Repository Build Options: Build Ninja ............................ no Build Gn ............................... no Jumbo Build ............................ yes Developer build ........................ no Build QtWebEngine Modules: Build QtWebEngineCore ................ yes Build QtWebEngineWidgets ............. yes Build QtWebEngineQuick ............... yes Build QtPdf Modules: Build QtPdfWidgets ................... no Build QtPdfQuick ..................... no Optional system libraries: re2 .................................. no icu .................................. no libwebp, libwebpmux and libwebpdemux . yes opus ................................. no ffmpeg ............................... no libvpx ............................... no snappy ............................... no glib ................................. yes zlib ................................. yes minizip .............................. no libevent ............................. no libxml2 and libxslt .................. no lcms2 ................................ no png .................................. no jpeg ................................. no harfbuzz ............................. no freetype ............................. yes libpci ............................... no Qt WebEngineCore: Embedded build ......................... yes Full debug information ................. no Sanitizer support ...................... no Pepper Plugins ......................... no Printing and PDF ....................... no Proprietary Codecs ..................... no Spellchecker ........................... yes WebRTC ................................. no PipeWire over GIO ...................... no Geolocation ............................ yes WebChannel support ..................... yes Kerberos Authentication ................ no Extensions ............................. no Support GLX on qpa-xcb ................. yes Use ALSA ............................... yes Use PulseAudio ......................... no Qt WebEngineQuick: UI Delegates ........................... yes Note: Hunspell in Qt Virtual Keyboard is not enabled. Spelling correction will not be available. WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation. Either set CMAKE_PREFIX_PATH or LLVM_INSTALL_DIR to the location of your llvm installation. On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution. On macOS, you can use Homebrew's llvm package. You will also need to set the FEATURE_clang CMake variable to ON to re-evaluate this check. WARNING: Clang-based lupdate parser will not be available. LLVM and Clang C++ libraries have not been found. You will need to set the FEATURE_clangcpp CMake variable to ON to re-evaluate this check. WARNING: Thumb instruction set is required to build ffmpeg for QtWebEngine.
Moreover, I cross-compiled Qt 6.2 for armhf debian bullseye. If I run Qt 6.2 App with the Mali proprietary blobs, QtWebengine works. But If I run it with Lima, it crashes. I also tested Qt 6.4 QtWebengine example with armbian debian bookworm os for armhf on OrangePi pc plus (ram 1GB). By default armbian bookworm comes with lima and linux 6.6. In that case I also got the same error.
After testing Qt6.2, 6.3 and 6.4 with bullseye and bookworm I got the same error. It looks like QtWebengine has the issue with Mesa(Lima). Because It works with the Mali proprietary blobs.
Please, how can I fix this to make QtWebengine work on armhf with Lima driver?