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

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Out of scope
    • Affects Version/s: 5.14.0
    • Fix Version/s: None
    • Component/s: GUI: OpenGL
    • Environment:
      Ubuntu 18.04 (default desktop installation), Mesa version: OpenGL 3.1 Mesa 18.1.9 (git-f57f37f3ba)
    • Platform/s:
      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

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

          Activity

            People

            Assignee:
            lagocs Laszlo Agocs
            Reporter:
            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