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.

Linux/AM3358: QQuickWindow issue

Part Number: AM3358

Tool/software: Linux

Hi,

I would like to take a screenshot of a QML GUI with QQuickWindow (grabWindow).

An image file is created, but it shows only a few colored lines on a black background.
During termination of this process I get "PVR:(Error): glReadPixels: Failed to get strided data [0, ]".

I've found a few other topics with the same error message:
https://e2e.ti.com/support/arm/sitara_arm/f/791/t/619737
http://e2e.ti.com/support/arm/automotive_processors/f/1020/t/662725
https://e2e.ti.com/support/omap/f/885/t/421553

I use this repository: git://git.ti.com/graphics/omap5-sgx-ddk-um-linux.git
If it is a bug, I need a bugfix for TARGET_PRODUCT=ti335x within the next few days.

Thanks in advance!

Stefan

  • Hi Stefan,

    We will look into this and get back. 

    Regards,

    Manisha

  • Hi Stefan,

    This is a known issue for us and the fix will be available as part of next Processor SDK release scheduled on end of 1Q, 2018.
  • Hi Manisha,

    Thanks for your reply.

    Will it also be available in repo git://git.ti.com/graphics/omap5-sgx-ddk-um-linux.git?

    BR,
    Stefan

  • Hi Stefan,

    Are you using QT over wayland or QT with eglfs??

    Regards,

    Manisha

  • Hi Manisha,

    We use Qt with eglfs (git://git.ti.com/graphics/omap5-sgx-ddk-linux.git, git://git.ti.com/graphics/omap5-sgx-ddk-um-linux.git, git://git.ti.com/glsdk/libgbm.git).
    But it doesn't work without libwayland-server.so.0. This library is required.


    Regards,
    Stefan

  • Hi Stefan,

    It doesn't make sense that eglfs will depend upon libwayland-server.so. Are you using weston compositor or any other wayland compositor? If not, then it might be a build dependency issue.

    If your application only use libpvrGBMWSEGL.so, it should work already.

    If indeed you are using wayland, then you will need the patch for the fix. Unfortunately, I cannot get you fix anytime soon. Please expect it to be available in 3Q, 2018 release.
  • Hi Manisha,

    Thanks for your support!

    libpvrGBMWSEGL.so, libsrv_um.so.1, libGLESv2.so, ... need libwayland-server.so.0 e.g.:
    objdump -p libpvrGBMWSEGL.so | grep NEEDED
      NEEDED               libdrm.so.2
      NEEDED               libgbm.so.2
      NEEDED               libudev.so.1
      NEEDED               libwayland-server.so.0
      NEEDED               libdrm_omap.so.1
      NEEDED               libffi.so.6
      NEEDED               libdbm.so.1
      NEEDED               libsrv_um.so.1
      NEEDED               libpthread.so.0
      NEEDED               libc.so.6
      NEEDED               ld-linux-armhf.so.3

    libpvrGBMWSEGL.so, libsrv_um.so.1, libGLESv2.so, ... (repo: git://git.ti.com/graphics/omap5-sgx-ddk-um-linux.git) are pre-compiled by TI.

    I am not using weston compositor or any other wayland compositor.

    I don't know how to solve this issue.

  • We are investigating why libpvrGBMWSEGL.so depends upon libwayland-server.so.0.

    The known issue that I was referring in my prior post is not applicable to libGBM egl. Are you using eglfs_kms QPA?
  • Hi Manisha,

    I set "QT_QPA_EGLFS_INTEGRATION=none" before Qt application is started, because I am using only one display.
    If this environment variable is not set, I get an error message:
    [   26.149737] loaded module : gbm_pvr.so
    [   26.152029] found valid GBM backend : gbm_pvr.so
    [   26.327490] Failed to move cursor on screen LVDS1: -14

    I am not using LVDS. The display is connected parallel with LCD_DATA0...23.

  • Please set QT_QPA_EGLFS_INTEGRATION=eglfs_kms even though you are using single display. That QPA need to be used when using libGBM egl. Let us know the behavior of your application after using that QPA.

  • Hi Manisha,

    If I set QT_QPA_EGLFS_INTEGRATION=eglfs_kms I get the same messages as described in my last post:
    [   26.149737] loaded module : gbm_pvr.so
    [   26.152029] found valid GBM backend : gbm_pvr.so
    [   26.327490] Failed to move cursor on screen LVDS1: -14

    tilcdc creates a LVDS device:
    # ls -l /sys/class/drm
    total 0
    lrwxrwxrwx    1 root     root             0 Jul 12 14:01 card0 -> ../../devices/platform/ocp/4830e000.lcdc/drm/card0
    lrwxrwxrwx    1 root     root             0 Jul 12 14:01 card0-LVDS-1 -> ../../devices/platform/ocp/4830e000.lcdc/drm/card0/card0-LVDS-1
    lrwxrwxrwx    1 root     root             0 Jul 12 14:01 card1 -> ../../devices/platform/ocp/56000000.sgx/drm/card1
    lrwxrwxrwx    1 root     root             0 Jul 12 14:01 controlD64 -> ../../devices/platform/ocp/4830e000.lcdc/drm/controlD64
    lrwxrwxrwx    1 root     root             0 Jul 12 14:01 renderD128 -> ../../devices/platform/ocp/56000000.sgx/drm/renderD128

  • Hi Manisha,

    I've set these environment variables:
    QT_QPA_EGLFS_NO_LIBINPUT=1
    QT_QPA_EGLFS_HIDECURSOR=1   (prevents error message: "Failed to move cursor on screen LVDS1: -14")
    QT_LOGGING_RULES=qt.qpa.*=true

    ...and I get the following logging messages:
    qt.qpa.egldeviceintegration: EGL device integration plugin keys: ("eglfs_emu", "eglfs_kms")
    qt.qpa.egldeviceintegration: EGL device integration plugin keys (sorted): ("eglfs_kms", "eglfs_emu")
    qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_kms"
    qt.qpa.eglfs.kms: New DRM/KMS via GBM integration created
    qt.qpa.egldeviceintegration: Using EGL device integration "eglfs_kms"
    qt.qpa.eglfs.kms: platformInit: Opening DRM device
    qt.qpa.input: udev device discovery for type QFlags<QDeviceDiscovery::QDeviceType>(Device_DRM|Device_VideoMask)
    qt.qpa.input: Found matching devices ("/dev/dri/card0", "/dev/dri/card1")
    qt.qpa.eglfs.kms: Found the following video devices: ("/dev/dri/card0", "/dev/dri/card1")
    qt.qpa.eglfs.kms: Using "/dev/dri/card0"
    qt.qpa.eglfs.kms: Using backend-provided DRM device /dev/dri/card0
    qt.qpa.eglfs.kms: Creating GBM device for file descriptor 5 obtained from "/dev/dri/card0"
    loaded module : gbm_pvr.so
    found valid GBM backend : gbm_pvr.so
    qt.qpa.eglfs.kms: "LVDS1" mode count: 1
    qt.qpa.eglfs.kms: mode 0 320 x 240 @ 84 hz
    qt.qpa.eglfs.kms: Selected mode 0 : 320 x 240 @ 84 hz for output "LVDS1"
    qt.qpa.eglfs.kms: Physical size is QSizeF(70, 52) mm for output "LVDS1"
    qt.qpa.eglfs.kms: Creating new global GBM mouse cursor
    qt.qpa.eglfs.kms: Sorted screen list: QVector(OrderedScreen(QPlatformScreen=0x3e0e60 ("LVDS1") : 2147483647 / QPoint(0,0) / primary: false))
    qt.qpa.eglfs.kms: Adding QPlatformScren 0x3e0e60 ( "LVDS1" ) to QPA with geometry QRect(0,0 320x240) and isPrimary= false
    qt.qpa.input: evdevkeyboard: Using device discovery
    qt.qpa.input: udev device discovery for type QFlags<QDeviceDiscovery::QDeviceType>(Device_Keyboard)
    qt.qpa.input: Found matching devices ("/dev/input/event1")
    qt.qpa.input: Adding keyboard at "/dev/input/event1"
    qt.qpa.input: Try to create keyboard handler for "/dev/input/event1" ""
    qt.qpa.input: Opening keyboard at "/dev/input/event1"
    qt.qpa.input: Create keyboard handler with for device "/dev/input/event1"
    qt.qpa.input: Unload current keymap and restore built-in
    qt.qpa.input: numlock=0 , capslock=0, scrolllock=0
    qt.qpa.input: evdevmouse: Using device discovery
    qt.qpa.input: udev device discovery for type QFlags<QDeviceDiscovery::QDeviceType>(Device_Mouse|Device_Touchpad)
    qt.qpa.input: Found matching devices ()
    qt.qpa.input: evdevtouch: Using device discovery
    qt.qpa.input: udev device discovery for type QFlags<QDeviceDiscovery::QDeviceType>(Device_Touchpad|Device_Touchscreen)
    qt.qpa.input: Found matching devices ("/dev/input/event0")
    qt.qpa.input: evdevtouch: Adding device at "/dev/input/event0"
    qt.qpa.input: evdevtouch: Using device /dev/input/event0
    qt.qpa.input: evdevtouch: /dev/input/event0: Protocol type B  (multi), filtered=no
    qt.qpa.input: evdevtouch: /dev/input/event0: min X: 0 max X: 319
    qt.qpa.input: evdevtouch: /dev/input/event0: min Y: 0 max Y: 239
    qt.qpa.input: evdevtouch: /dev/input/event0: min pressure: 0 max pressure: 0
    qt.qpa.input: evdevtouch: /dev/input/event0: device name: cyttsp5_mt
    qt.qpa.eglfs.kms: Creating window for screen "LVDS1"

    After "Creating window for screen "LVDS1"" nothing happens...

    qt.qpa.eglfs.kms: Creating window for screen "LVDS1"
    systemd[1]: gui.service: Main process exited, code=dumped, status=11/SEGV
    systemd[1]: gui.service: Unit entered failed state.
    systemd[1]: gui.service: Failed with result 'core-dump'.



    BR,
    Stefan

  • Qt config

    Qt Gui:
    Accessibility .......................... yes
    FreeType ............................... yes
    Using system FreeType ................ yes
    HarfBuzz ............................... yes
    Using system HarfBuzz ................ no
    Fontconfig ............................. yes
    Image formats:
    GIF .................................. no
    ICO .................................. yes
    JPEG ................................. yes
    Using system libjpeg ............... yes
    PNG .................................. yes
    Using system libpng ................ yes
    EGL .................................... yes
    OpenVG ................................. no
    OpenGL:
    Desktop OpenGL ....................... no
    OpenGL ES 2.0 ........................ yes
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no

    QPA backends:
    DirectFB ............................... no
    EGLFS .................................. yes
    EGLFS details:
    EGLFS i.Mx6 .......................... no
    EGLFS i.Mx6 Wayland .................. no
    EGLFS EGLDevice ...................... no
    EGLFS GBM ............................ yes
    EGLFS Mali ........................... no
    EGLFS Raspberry Pi ................... no
    EGL on X11 ........................... no
  • Hi Stefan,

    I will consult graphics backend expert and get back.

    Regards,
    Manisha
  • Hi Stefan,

    Can you share standalone minimal test application that can help us to replicate the issue at our end?

    Regards,
    Manisha
  • Hi Manisha,

    Attached is a simple standalone test application: /cfs-file/__key/communityserver-discussions-components-files/791/ti_5F00_test_5F00_app.zip

    "ti_test_app" is the compiled binary with Qt5.9.0

    Regards,
    Stefan

  • Hi Stefan,

    We do not support QT 5.9 in Processor SDK. We ran your application with QT 5.7 using QtQuick 2.0 version. We are able to run the application at our end with this changes. We see a red square on the blue background and below logs on the serial port. Is this what your application intend to do?

    root@am335x-evm:~# ./ti_test_app -platform eglfs
    failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object file: No such file or directory share/qt5/examples/widgets/widgets/analogclock/analogcloc
    failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No such file or directory
    loaded module : gbm_pvr.so
    found valid GBM backend : gbm_pvr.so