Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-91882

eglfs with a cloned screen cause app to flicker

    XMLWordPrintable

Details

    • Linux/Yocto
    • 91d1ec3589 (qt/qtbase/dev) 91d1ec3589 (qt/tqtc-qtbase/dev) dddd08e1e7 (qt/qtbase/6.4) dddd08e1e7 (qt/tqtc-qtbase/6.4) dddd08e1e7 (qt/tqtc-qtbase/6.4.1) dddd08e1e7 (qt/tqtc-qtbase/tqtc/qtinsight-6.4) 7dd9363b5f (qt/tqtc-qtbase/6.2)

    Description

      Context

      We ported an app from Qt 5.14.X to Qt 5.15 in a yocto image and everything i working fine, except when we connect an external screen in clone mode, both sreens start to flicker and they becore very unresponsive.

      The probleme can be reproduce with any of the example app if you configure the output in clone mode.

      We want to have the Qt 5.15 LTS version in our project. The version Qt 5.14.2 is working fines, and every version in Qt 5.15.X have the issue.

      Behavior

      In the output of the app, we can see a new warning appearing that was not present in the version 5.14:

      2021-03-16T12:38:03 WARNING : QEGLPlatformContext: eglSwapBuffers failed: 3003 (:0, )
      2021-03-16T12:38:03 WARNING : Could not lock GBM surface front buffer! (:0, )

      According to the following documentation:  

      Advanced eglfs_kms Features

      However, this feature can only work if the resolutions are the same, there are no incompatibilities when it comes to accepted buffer formats, and the application doesn't have any output on the QScreen associated with a clone destination. In practice, the latter means that no QWindow associated with the QScreen in question - DP1 in the example - must ever perform a QOpenGLContext::swapBuffers() operation. It's up to the configuration and the application to ensure these.

      I think the version 5.15 introduce a call to swapBuffer somewhere, which causes our app to have this behavior.

      Setup/Configurations:

      We use a yocto image (dunfell) build with meta-qt5 (lts-5.15). The Qt configuration is in the attached files. We used:

      PACKAGECONFIG_append = " eglfs gles2 kms gbm accessibility"
      

      The eglfskms.json file used for screen cloning:

      { 
        "device": "/dev/dri/card0",
        "hwcursor": false, 
        "pbuffers": true, 
        "outputs": [ 
          { "name": "eDP1",  "mode": "1024x768" },  
          { "name": "VGA1",  "mode": "1024x768", "clones": "eDP1" }, 
          { "name": "DP1",   "mode": "1024x768", "clones": "eDP1" },
          { "name": "HDMI1", "mode": "1024x768", "clones": "eDP1" } 
        ] 
      }
      

      The environnement variables exported:

      export QT_QPA_PLATFORM=eglfs 
      export QT_QPA_EGLFS_INTEGRATION=eglfs_kms 
      export QT_LOGGING_RULES="qt.qpa.*=true" 
      export QT_QPA_EGLFS_KMS_CONFIG=/usr/share/opm/eglfskms_k767.json 
      export QT_QPA_EGLFS_HIDECURSOR=1
      

      I also included in the attached files the output of the app.

       

      If you need anything else, let me know.

       

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-91882
          # Subject Branch Project Status CR V

          Activity

            People

              lagocs Laszlo Agocs
              bouchards Simon Bouchard
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: