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

QOpenGLWindow refresh rate matches the screen with slowest refresh rate

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.8.3
    • None
    • Linux/X11

    Description

      On a system with three monitors (two 60 fps and one with 30 fps) and with each window on it's own monitor, all windows will paint with refresh rate of monitor with slowest refresh rate, regadless which monitor is the primary monitor.

      Our application captures video frames from a capture device, which we want to show on different monitors (simplified use case). For each monitor, we create a QOpenGLWindow with custom paintGL implementation, that renders a frame stored in a texture. To match monitor's refesh rate, we emit a signal after paintGL is done so we can schedule a new frame to be displayed. When we schedule a frame, we call QOpenGLWindow::update method to schedule a repaint. We assume repaint will be triggered soon after frameSwapped signal. We also configured QOpenGLWindow with NoPartialUpdate UpdateBehaviour.

      We learned, that QOpenGLWindow on monitor with 60 fps requests as many new frames that would suffice with slowest monitor's refresh rate (30 fps) instead of current monitor's refresh rate (60 fps).

      To work around the issue, we had to disable vertical sync (setSwapInterval(0)) and schedule new frames using timers.

      From afar, it seems issue could be linked with QTBUG-117388.

      Behaviour does not change if we enable AsyncFlipSecondaries on XOrg. We use AMD graphics card with open source amdgpu driver. Desktop manager is openbox and picom compositor with glx backend and enabled vsync. We also tried without picom, and behaviour was the same.

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            gogo Gregor Kališnik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes