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

All Qt6 video playback fails on Linux/X11 Laptop with Old Nvidia GPU

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • None
    • 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.2.4, 6.3.0, 6.3.1, 6.4.0 Beta1
    • Multimedia
    • KUbuntu 20.04.4 LTS

      RENDERER: NVIDIA GeForce GTX 860M/PCIe/SSE2 VERSION: 4.6.0 NVIDIA 510.73.05

      Linux 5.13.0-51-generic #58~20.04.1-Ubuntu SMP Tue Jun 14 11:29:12 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

    Description

      To demonstrate this problem, consider the Qt6 example app Examples/Qt-6.4.0/multimedia/video/qmlvideo – video playback is occassionally played back "corrupted" but usually plays a few seconds of audio and freezes on a green screen. The same example under Qt5.15.2 works fine, as does all video playback using the QML Video element. This report is not about the qmlvideo app, I'm just using it to demonstrate the problem that occurs across-the board on Qt6 (6.2.3, 6.3.0, 6.3.1, 6.4.0 beta1 all show the issue) using QML Video playback. (Audio-only playback is not affected).

      Running with QSG_INFO=1 produces the following output:

      Starting /opt/QtCo/Examples/Qt-6.4.0/multimedia/video/qmlvideo/qmlvideo...
      qt.scenegraph.general: Using QRhi with backend OpenGL
       Graphics API debug/validation layers: 0
       QRhi profiling and debug markers: 0
       Shader/pipeline cache collection: 0
      qt.scenegraph.general: threaded render loop
      qt.scenegraph.general: Using sg animation driver
      qt.scenegraph.general: Animation Driver: using vsync: 16.68 ms
      qt.scenegraph.general: Using sg animation driver
      qt.scenegraph.general: Animation Driver: using vsync: 16.68 ms
      qt.rhi.general: Created OpenGL context QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 0, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QColorSpace(), profile QSurfaceFormat::CompatibilityProfile)
      qt.rhi.general: OpenGL VENDOR: NVIDIA Corporation RENDERER: NVIDIA GeForce GTX 860M/PCIe/SSE2 VERSION: 4.6.0 NVIDIA 510.73.05
      qt.scenegraph.general: MSAA sample count for the swapchain is 1. Alpha channel requested = no.
      qt.scenegraph.general: rhi texture atlas dimensions: 1024x512
      qt.scenegraph.general: Window 0x7ffe74f2a610 is determined to have broken vsync throttling (7.619048 < 8.338497) switching to system timer to drive gui thread animations to remedy this (however, render thread animators will likely advance at an incorrect rate).

      Enclosed are images of the output showing corrupted video playback (showing a framerate of 8 FPS while video at 24FPS), or frozen green video (showing a framerate of 2 FPS, with app completely locked up).

      In the case of the frozen video & application hang, the following output is produced before the app requires a force-kill – note the 0 FPS framerate output prior to application hang.

      qrc:/qml/qmlvideo/SceneMulti.qml:165:9: QML Connections: Cannot assign to non-existent property "onError"
      [frequencymonitor] FrequencyMonitor::trace "instant 0.00 average 0.00"
      [frequencymonitor] FrequencyMonitor::trace "instant 0.00 average 0.00"
      qrc:/qml/qmlvideo/SceneMulti.qml:145: Error: Cannot assign to non-existent property "centerIn"
      [frequencymonitor] FrequencyMonitor::trace "instant 0.00 average 0.00"
      [frequencymonitor] FrequencyMonitor::trace "instant 0.00 average 0.00"
      [frequencymonitor] FrequencyMonitor::trace "instant 0.00 average 0.00"
      [frequencymonitor] FrequencyMonitor::trace "instant 0.00 average 0.00"
      [frequencymonitor] FrequencyMonitor::trace "instant 0.00 average 0.00"
      [frequencymonitor] FrequencyMonitor::trace "instant 0.00 average 0.00"
      [frequencymonitor] FrequencyMonitor::trace "instant 0.00 average 0.00"
      [frequencymonitor] FrequencyMonitor::trace "instant 0.00 average 0.00"
      13:17:16: The process crashed.
      

      For comparison, an almost indentical installation using AMD "Zen3" APU on a Ryzen Desktop has no such corruption or freezing problems. It also doesn't display this ominous warning and associated problems of animations playing at wrong rate:

      qt.scenegraph.general: Window 0x7ffe74f2a610 is determined to have broken vsync throttling (7.619048 < 8.338497) switching to system timer to drive gui thread animations to remedy this (however, render thread animators will likely advance at an incorrect rate).
      

      On the NVidia GPU laptop having these problems, the video corruption occurs with both 4K resolution 3840x2048 running at 48Hz as well as 1920x1024 running at 60Hz; the only difference is different timings printed for 48Hz refresh vs 60Hz refresh which prints:

      qt.scenegraph.general: Animation Driver: using vsync: 16.68 ms
      

      Note that any other apps, vlc, mpv, chromium, etc have no problems playing video on this NVidia laptop, neither do any other Qt5 apps; it is strictly a problem seen with all released versions of Qt6 that support Multimedia.

      Attachments

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

        Activity

          People

            timblechmann tim blechmann
            nielsmayer Niels Mayer
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes