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

hellogl2 example crashs on Linux if swrast is not found

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • None
    • 5.12.4
    • GUI: OpenGL
    • None
    • Linux/X11

    Description

      I have a simliar problem like https://bugreports.qt.io/browse/QTCREATORBUG-15728 

      System

      • Windows 10 (host) with Intel HD Graphics 4600 and Nvidia GeForce GT 730M
      • Xming Version 7.7.0.36
      • Ubuntu 18.04 (client) -> Let's name it UbuClient

      Configuration

      • Xming must be activated with  Accelerated OpenGL with WGL "AIGLX"

      Steps to reproduce

      • Connect via Xming to UbuClient
      • Open QtCreator 4.9.1 from downloaded Qt 5.12.4 SDK
      • Open Qt hellogl2 example
      • Run the example
      • Observe the console 

      libGL error: No matching fbConfigs or visuals found
      libGL error: failed to load driver: swrast
      qt.glx: qglx_findConfig: Failed to finding matching FBConfig (8 8 8 8)
      ...
      QOpenGLWidget: Failed to make context current
      ...
      QOpenGLWidget: Failed to make context current
      QOpenGLShaderProgram: could not create shader program
      QOpenGLShader: could not create shader
      Could not link shader program:
      ""
      16:54:52: The program has unexpectedly finished.
      16:54:52: The process was ended forcefully.

      Further information

      I tried to check why swrast (software rendering) could not be loaded. First I entered on UbuClient this:

      find /usr -iname "*libGL.so*" -exec ls -l – {} +

      Result:

      lrwxrwxrwx 1 root root 14 May 10 14:17 /usr/lib/x86_64-linux-gnu/libGL.so -> libGL.so.1.0.0
      lrwxrwxrwx 1 root root 14 May 10 14:17 /usr/lib/x86_64-linux-gnu/libGL.so.1 -> libGL.so.1.0.0
      rw-rr- 1 root root 567624 May 10 14:17 /usr/lib/x86_64-linux-gnu/libGL.so.1.0.0

      Then I check with "LIBGL_DEBUG=verbose glxgears > /dev/null" the errors:

      libGL: Can't open configuration file /etc/drirc: No such file or directory.
      libGL: Can't open configuration file /home-user/.drirc: No such file or directory.
      libGL: Can't open configuration file /etc/drirc: No such file or directory.
      libGL: Can't open configuration file /home-user/.drirc: No such file or directory.
      libGL error: No matching fbConfigs or visuals found
      libGL error: failed to load driver: swrast

      And the command "glxinfo | grep render" returns:

      libGL error: No matching fbConfigs or visuals found
      libGL error: failed to load driver: swrast
      direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
      GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
      OpenGL renderer string: Intel(R) HD Graphics 4600

      References

      https://superuser.com/questions/563130/libgl-debug-verbose-not-working

      https://askubuntu.com/questions/541343/problems-with-libgl-fbconfigs-swrast-through-each-update

      https://debianforum.de/forum/viewtopic.php?t=171404

      https://forum.qt.io/topic/40538/failed-to-load-driver-swrast/4

      https://www.mesa3d.org/envvars.html

       

      Surprise Surprise

      If I rename the qt plugin folder xcbglintegrations to xcbglintegrations_bak, then hellogl2 doesn't crash but the rendering is not working anymore with the output:

      XcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
      QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
      QOpenGLWidget: Failed to create context
      QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
      QOpenGLWidget: Failed to create context
      QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
      qt.qpa.backingstore: composeAndFlush: QOpenGLContext creation failed
      qt.qpa.backingstore: composeAndFlush: makeCurrent() failed

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            lamb Thomas Lämmlein
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes