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

Black screen in QtOpenGL apps under Xvnc4 when using Mesa with Gallium or XLib drivers

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 5.14.0
    • GUI: OpenGL
    • Ubuntu 18.04 (default desktop installation), Mesa version: OpenGL 3.1 Mesa 18.1.9 (git-f57f37f3ba)
    • Linux/X11

    Description

      Used hellogl2 sample to reproduce the issue. Built it from source in QtCreator.

      Here are the steps:

      1. Launch the sample in the default desktop: it works.

      2. Start VNC server with: vnc4server and see which display it occupies

      3. Launch DISPLAY=:<number-of-vnc-display> hellogl2

      Result: there are errors like that

      qt.qpa.xcb: failed to initialize XRandr
      qt.qpa.xcb: XKeyboard extension not present on the X server
      qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 0, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
      Unsupported screen format: depth: 16, bits_per_pixel: 16, red_mask: 3f, blue_mask: f800
      Using RGB16 fallback, if this works your X11 server is reporting a bad screen format.

      and the app is black.

      4. Get Mesa libGL.so* with Gallium or Xlib driver and put it into any directory

      5. Launch DISPLAY=:<number-of-vnc-display> LD_LIBRARY_PATH=<path-to-mesa-dir> hellogl2

      Result:

      There is still an error but it looks not so severe:

      qt.qpa.xcb: failed to initialize XRandr
      qt.qpa.xcb: XKeyboard extension not present on the X server

      Result: 

      Buttons and sliders appeared but the OpenGL widget is still black.

      6. Launch: DISPLAY=:<number-of-vnc-display> LD_LIBRARY_PATH=<path-to-mesa-dir> glxgears

      Result: it works.
       

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            eaverin Evgeny Averin
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes