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

EGLFS_KMS - Qt apps crashes with segmentation faulth when eglfs.kms.conf display-1 is off

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.9.4
    • QPA: KMS
    • None

    Description

      Hello

      I am using Qt 5.9.3/5.9.4 port for Nvidia Tegra Linux x64.

      There was one case here, Qt Linux applications were crashing without any message except 'segmentation fault'. It was very time-consuming to finally discover that this happens when in /etc/qt.eglfs.kms.conf HDMI1 the display is set to off, when it has to be on. It was set on system level Qt to use the KMS configuration:

      export QT_QPA_EGLFS_KMS_CONFIG=/etc/qt.eglfs.kms.conf

      The content of this file is:

      vi /etc/qt.eglfs.kms.conf
      {"outputs":[
      {"name":"HDMI1","mode":"off"}
      ,
      {"name":"HDMI2","mode":"1920x720"}
      ]}
      

       

      When the conf file is not used at all (without the export) or when I fix it to use HDMI1 QT applications are running Ok, otherwise are just crashing with 'Segmentation Fault' error. So my question  is- why not add some print in KMS plugin, like - 'Display not found, see  /etc/qt.eglfs.kms.conf"? Only after enabling the QT logs (QT_QPA_EGLFS_DEBUG and  QT_LOGGING_RULES) I was able to see some logs suggesting that the problem is in qt.eglfs.kms.conf. The complete logs are:

      [DBG  | qt.qpa.eglfs.kms] Loading KMS setup from "/etc/qt.eglfs.kms.conf"                                                                  [qkmsdevice.cpp:553]
       [DBG  | qt.qpa.eglfs.kms] Requested configuration (some settings may be ignored):
               hwcursor: true 
               pbuffers: false 
               separateScreens: false 
               virtualDesktopLayout: 0 
               outputs: QMap(("HDMI1", QMap(("mode", QVariant(QString, "off"))("name", QVariant(QString, "HDMI1"))))("HDMI2", QMap(("mode", QVariant(QString, "1920x720"))("name", QVariant(QString, "HDMI2")))))        ]
       [DBG  | qt.qpa.eglfs.kms] New DRM/KMS on EGLDevice integration created                                                   [qeglfskmsegldeviceintegration.cpp:56]
       [DBG  | qt.qpa.eglfs.kms] platformInit: Opening DRM device                                                                        [qeglfskmsintegration.cpp:70]
       [DBG  | qt.qpa.eglfs.kms] Found 1 EGL devices                                                                           [qeglfskmsegldeviceintegration.cpp:278]
       [DBG  | qt.qpa.eglfs.kms] Using backend-provided DRM device drm-nvdc                                                                       [qkmsdevice.cpp:398]
       DEBUG: libnvdc will contact display server at ip=10.0.0.2
       DEBUG: Display Client is in VM 1
       DEBUG: Server is running in VM 0
       [DBG  | qt.qpa.eglfs.kms] Creating display                                                                               [qeglfskmsegldeviceintegration.cpp:73]
       nvrm_gpu: Bug[ 2474.337043] audit: type=1701 audit(1520353343.936:30): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=6252 comm="appman" exe="/opt/qt-5.9/bin/appman" sig=6
        200215060 workaround enabled.
       [DBG  | qt.qpa.eglfs.kms] Turning off output "HDMI1"       [qkmsdevice.cpp:214]
       [DBG  | qt.qpa.eglfs.kms] Sorted screen list: QVector()    [qkmsdevice.cpp:472]

      This is followed by application "segmentation fault'.

      Thanks.

       

       

       

       

       

       

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lagocs Laszlo Agocs
            amilev Anton Milev
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes