This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: QtwebEngine EGLConfig

Part Number: AM5728

Dear support!

I would like to continue in discussion from previous thread https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1011825/am5728-am5728-qtwebengine-eglconfig because it's still hasn't been solved.

Reproducer:

// main.qml
import QtQuick 2.0
import QtQuick.Window 2.0
import QtWebEngine 1.1

Window {
    id: window
 
    WebEngineView {
        id: webView
        anchors.fill: parent

        url: "https://google.com"
    }
}

// main.cpp
#include <QtGui/QGuiApplication>
#include <QtCore/QCoreApplication>
#include <QtQml/QQmlApplicationEngine>
#include <QtWebEngine/QtWebEngine>
#include <QtQuick/QQuickWindow>

int main(int argc, char **argv) {
    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);

    QGuiApplication app(argc, argv);
    //QtWebEngine::initialize();
    
    QQmlApplicationEngine engine;
    engine.load(QStringLiteral("./main.qml"));

    QQuickWindow *window = qobject_cast<QQuickWindow*>(engine.rootObjects().first());
    window->show();

    return app.exec();
}

If you run the application with --platform eglfs, it shows the mentioned error. If you run it with --platform linuxfb, it works, but without OpenGL acceleration.

So is it possible to reproduce it on your side with QT 5.15 from community?

Thank you,
Andy

  • Hello Andy,

    Can you please reconfirm the version of SW that you are using? From the previous thread, you seem to be using "zeus" version of the graphics driver. We also understand that if you take dunfell version of libgbm, the problem goes away. We looked into this but they seem to be the same binary. Can we please get the exact version of SW baseline.

    Regards

    Hemant

  • Hello Andy,

    In addition to Hemant's note, could you please try running kmscube: https://gitlab.freedesktop.org/mesa/kmscube ? If libgbm is indeed the problem, kmscube will also fail with a similar error code.

    Regards,
    Krunal

  • Hello Hemant,

    Yes, we're using the version from zeus. I didn't say, that, if we use the version from dunfell, problem is solved. I've just said, that other colleague told that libgbm from zeus is broken, but version from dunfell works for his application.

    I will re-test it with libgbm and Qt 5.15 community version.

    Regards,
    Andy

  • Andy,

    Okay. I misunderstood from the call. There is no difference in libgbm in those versions. So not sure what your colleague was facing - but worth a try just to be sure. I doubt that will change anything.

    Regards

    Hemant

  • Hello Hemant,

    I've tried the same tests on QT community versions 5.15.2, but the results are the same. Still not working. I also tried to replace the libgbm library, but without success.

    The info about not working libgbm library from my colleague is:

    The libgm library from the Thud branch makes some applications fail (e.g. Weston, Cage) but using libgbm from the Dunfell branch works fine and plays ball with the rest of the Thud userland.

    But that's a different story, which is not blocking. The focus is to get QT 5.15 working.

    Regards,
    Andy

  • Hi Andy,

    As an experiment, I took a AM5728 GPEVM and installed Qt5.15.2 from meta-qt5. While running a sample hellogl2 application, I observe the message "Cannot find EGLConfig, returning null config" but the application still runs. Here is the log:

    root@am57xx-evm:/usr/share/qt5/examples/opengl/hellogl2# ./hellogl2 --platform eglfs
    [ 162.295109] ti-sysc 4807c000.target-module: OCP softreset timed out
    qt.qpa.input: xkbcommon not available, not performing key mapping
    Created context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 0, stencil:
    EGL_BUFFER_SIZE: 24
    EGL_ALPHA_SIZE: 0
    EGL_BLUE_SIZE: 8
    EGL_GREEN_SIZE: 8
    EGL_RED_SIZE: 8
    EGL_DEPTH_SIZE: 24
    EGL_STENCIL_SIZE: 8
    EGL_CONFIG_CAVEAT: 12344
    EGL_CONFIG_ID: 7
    EGL_LEVEL: 0
    EGL_MAX_PBUFFER_HEIGHT: 0
    EGL_MAX_PBUFFER_PIXELS: 0
    EGL_MAX_PBUFFER_WIDTH: 0
    EGL_NATIVE_RENDERABLE: 1
    EGL_NATIVE_VISUAL_ID: 875713112
    EGL_NATIVE_VISUAL_TYPE: 12344
    EGL_SAMPLES: 0
    EGL_SAMPLE_BUFFERS: 0
    EGL_SURFACE_TYPE: 4
    EGL_TRANSPARENT_TYPE: 12344
    EGL_TRANSPARENT_BLUE_VALUE: 0
    EGL_TRANSPARENT_GREEN_VALUE: 0
    EGL_TRANSPARENT_RED_VALUE: 0
    EGL_BIND_TO_TEXTURE_RGB: 0
    EGL_BIND_TO_TEXTURE_RGBA: 0
    EGL_MIN_SWAP_INTERVAL: 1
    EGL_MAX_SWAP_INTERVAL: 1
    Created context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize -1, stenci:
    EGL_BUFFER_SIZE: 24
    EGL_ALPHA_SIZE: 0
    EGL_BLUE_SIZE: 8
    EGL_GREEN_SIZE: 8
    EGL_RED_SIZE: 8
    EGL_DEPTH_SIZE: 24
    EGL_STENCIL_SIZE: 8
    EGL_CONFIG_CAVEAT: 12344
    EGL_CONFIG_ID: 7
    EGL_LEVEL: 0
    EGL_MAX_PBUFFER_HEIGHT: 0
    EGL_MAX_PBUFFER_PIXELS: 0
    EGL_MAX_PBUFFER_WIDTH: 0
    EGL_NATIVE_RENDERABLE: 1
    EGL_NATIVE_VISUAL_ID: 875713112
    EGL_NATIVE_VISUAL_TYPE: 12344
    EGL_SAMPLES: 0
    EGL_SAMPLE_BUFFERS: 0
    EGL_SURFACE_TYPE: 4
    EGL_TRANSPARENT_TYPE: 12344
    EGL_TRANSPARENT_BLUE_VALUE: 0
    EGL_TRANSPARENT_GREEN_VALUE: 0
    EGL_TRANSPARENT_RED_VALUE: 0
    EGL_BIND_TO_TEXTURE_RGB: 0
    EGL_BIND_TO_TEXTURE_RGBA: 0
    EGL_MIN_SWAP_INTERVAL: 1
    EGL_MAX_SWAP_INTERVAL: 1
    Cannot find EGLConfig, returning null config
    Created context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 0, stencil:
    EGL_BUFFER_SIZE: 24
    EGL_ALPHA_SIZE: 0
    EGL_BLUE_SIZE: 8
    EGL_GREEN_SIZE: 8
    EGL_RED_SIZE: 8
    EGL_DEPTH_SIZE: 24
    EGL_STENCIL_SIZE: 8
    EGL_CONFIG_CAVEAT: 12344
    EGL_CONFIG_ID: 7
    EGL_LEVEL: 0
    EGL_MAX_PBUFFER_HEIGHT: 0
    EGL_MAX_PBUFFER_PIXELS: 0
    EGL_MAX_PBUFFER_WIDTH: 0
    EGL_NATIVE_RENDERABLE: 1
    EGL_NATIVE_VISUAL_ID: 875713112
    EGL_NATIVE_VISUAL_TYPE: 12344
    EGL_SAMPLES: 0
    EGL_SAMPLE_BUFFERS: 0
    EGL_SURFACE_TYPE: 4
    EGL_TRANSPARENT_TYPE: 12344
    EGL_TRANSPARENT_BLUE_VALUE: 0
    EGL_TRANSPARENT_GREEN_VALUE: 0
    EGL_TRANSPARENT_RED_VALUE: 0
    EGL_BIND_TO_TEXTURE_RGB: 0
    EGL_BIND_TO_TEXTURE_RGBA: 0
    EGL_MIN_SWAP_INTERVAL: 1
    EGL_MAX_SWAP_INTERVAL: 1
    Cannot find EGLConfig, returning null config
    Created context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize -1, stenci:
    EGL_BUFFER_SIZE: 24
    EGL_ALPHA_SIZE: 0
    EGL_BLUE_SIZE: 8
    EGL_GREEN_SIZE: 8
    EGL_RED_SIZE: 8
    EGL_DEPTH_SIZE: 24
    EGL_STENCIL_SIZE: 8
    EGL_CONFIG_CAVEAT: 12344
    EGL_CONFIG_ID: 7
    EGL_LEVEL: 0
    EGL_MAX_PBUFFER_HEIGHT: 0
    EGL_MAX_PBUFFER_PIXELS: 0
    EGL_MAX_PBUFFER_WIDTH: 0
    EGL_NATIVE_RENDERABLE: 1
    EGL_NATIVE_VISUAL_ID: 875713112
    EGL_NATIVE_VISUAL_TYPE: 12344
    EGL_SAMPLES: 0
    EGL_SAMPLE_BUFFERS: 0
    EGL_SURFACE_TYPE: 4
    EGL_TRANSPARENT_TYPE: 12344
    EGL_TRANSPARENT_BLUE_VALUE: 0
    EGL_TRANSPARENT_GREEN_VALUE: 0
    EGL_TRANSPARENT_RED_VALUE: 0
    EGL_BIND_TO_TEXTURE_RGB: 0
    EGL_BIND_TO_TEXTURE_RGBA: 0
    EGL_MIN_SWAP_INTERVAL: 1
    EGL_MAX_SWAP_INTERVAL: 1
    Cannot find EGLConfig, returning null config

    Regards,
    Krunal

  • Hello Krunal,

    That's fine, that you can reproduce it. Now we have the same results.
    Just for clarification, I didn't say, that application crash. It can run, but I guess without acceleration.

    Regards,
    Andy

  • Hi Andy,

    Please correct me if I am wrong but I thought your application only launches with the linuxfb flag? In my case, I am able to launch the application with the eglfs flag despite the null config warning. 

    Regards,
    Krunal

  • Hello Krunal,

    No, application starts in both cases (linuxfb, eglfs), but eglfs creates the exact warning.

    linuxfb:
     

    export QSG_INFO=1       
    browser -platform linuxfb --no-sandbox          
    This plugin does not support createPlatformOpenGLContext!                       
    qt.scenegraph.general: Loading backend software

    eglfs:
     

    browser -platform eglfs --no-sandbox            
    qt.scenegraph.general: threaded render loop                                     
    qt.scenegraph.general: Using sg animation driver                                
    qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms                  
    Cannot find EGLConfig, returning null config                                    
    qt.scenegraph.general: Using sg animation driver                                
    qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms                  
    qt.scenegraph.general: opengl texture atlas dimensions: 1024x1024               
    qt.scenegraph.general: R/G/B/A Buffers:   8 8 8 0                               
    qt.scenegraph.general: Depth Buffer:      24                                    
    qt.scenegraph.general: Stencil Buffer:    8                                     
    qt.scenegraph.general: Samples:           0                                     
    qt.scenegraph.general: GL_VENDOR:         Imagination Technologies              
    qt.scenegraph.general: GL_RENDERER:       PowerVR SGX 544MP                     
    qt.scenegraph.general: GL_VERSION:        OpenGL ES 2.0 build 1.17@4948957      
    qt.scenegraph.general: GL_EXTENSIONS:    GL_EXT_blend_minmax GL_EXT_discard_fram
    ebuffer GL_EXT_draw_buffers GL_EXT_multi_draw_arrays GL_EXT_multisampled_render_
    to_texture GL_EXT_occlusion_query_boolean GL_EXT_shader_framebuffer_fetch GL_EXT
    _shader_texture_lod GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_text
    ure_storage GL_IMG_multisampled_render_to_texture GL_IMG_program_binary GL_IMG_r
    ead_format GL_IMG_shader_binary GL_IMG_texture_compression_pvrtc GL_IMG_texture_
    compression_pvrtc2 GL_IMG_texture_format_BGRA8888 GL_IMG_texture_npot GL_IMG_uni
    form_buffer_object GL_KHR_debug GL_OES_EGL_image GL_OES_EGL_image_external GL_OE
    S_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_depth_texture GL_OES_egl_sy
    nc GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_fragment_precision_
    high GL_OES_get_program_binary GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_O
    ES_required_internalformat GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_
    surfaceless_context GL_OES_texture_float GL_OES_texture_half_float GL_OES_textur
    e_npot GL_OES_vertex_array_object GL_OES_vertex_half_float                      
    qt.scenegraph.general: Max Texture Size: 4096                                   
    qt.scenegraph.general: Debug context:    false

    Does it means, that warning is there, but acceleration works?


    Regards,
    Andy

  • Andy,

    Not sure how QT handles this. One way to try this out would be to run PVRTune.

    Regards

    Hemant

  • Hello Hemant,

    I've looked at the application via PVRTune and showed, that GPU shaders are being used. So looks like that OpenGL works even if, there is an error during start-up.

    Regards,
    Andy