https://bugs.kde.org/show_bug.cgi?id=524682

            Bug ID: 524682
           Summary: Overview effect fails to delete render time queries
                    ("no context is current"), corrupting render-time
                    measurement
    Classification: Plasma
           Product: kwin
      Version First 6.7.4
       Reported In:
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: effects-overview
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Every invocation of the Overview effect (Meta+W) causes KWin to emit 2-4 copies
of:

    kwin_wayland[PID]: Could not delete render time query because no context is
current

The messages appear immediately after the Overview QML component loads, and
recur on
every open/close cycle. Because these are the GL timer queries KWin uses to
measure
render time -- and render time feeds frame scheduling against vblank -- the
practical
effect is degraded frame pacing: stutter during ordinary compositing, and
KWin's own
showfps frame-time graph sticking at maximum until the output pipeline is torn
down
and rebuilt.

STEPS TO REPRODUCE
1. Log into a Plasma Wayland session.
2. In a terminal run:  journalctl --user -f | grep --line-buffered "render time
query"
3. Press Meta+W to open Overview, then close it. Repeat several times.

OBSERVED RESULT
2-4 error lines are logged per invocation. Sample showing the correlation with
Overview's QML loading:

00:30:29 kwin_wayland[3030]:
qrc:/qt/qml/org/kde/kwin/overview/qml/Main.qml:851:5: QML Connections:
Implicitly defined onFoo properties in Connections are deprecated.
00:30:31 kwin_wayland[3030]: Could not delete render time query because no
context is current
00:30:31 kwin_wayland[3030]: Could not delete render time query because no
context is current
00:30:31 kwin_wayland[3030]: Could not delete render time query because no
context is current
00:30:56 kwin_wayland[3030]:
qrc:/qt/qml/org/kde/kwin/overview/qml/Main.qml:851:5: QML Connections: ...
00:30:57 kwin_wayland[3030]: Could not delete render time query because no
context is current
00:30:57 kwin_wayland[3030]: Could not delete render time query because no
context is current
00:30:57 kwin_wayland[3030]: Could not delete render time query because no
context is current

Setting overviewEnabled=false in kwinrc [Plugins] stops the errors entirely and
resolves the associated frame-time misbehaviour.

EXPECTED RESULT
Overview's teardown path should make the GL context current before deleting its
render time query objects, or defer deletion until a context is available. No
errors
should be logged and render-time measurement should remain valid.

INVESTIGATION -- WHAT HAS BEEN RULED OUT
This was originally suspected to be a multi-GPU context-management problem. It
is
not. The error reproduces identically in all three of the following
configurations:

1. Two GPUs present (AMD Raphael iGPU + NVIDIA RTX 5090), KWin managing both
   ("Atomic Mode Setting on GPU 0: true", "GPU 1: true").
2. Two GPUs present, KWin restricted to one via
   Environment=KWIN_DRM_DEVICES=/dev/dri/card2 in a
plasma-kwin_wayland.service.d
   drop-in. Confirmed GPU 0 only. Error rate unchanged.
3. Single GPU -- AMD iGPU disabled in firmware, so only the NVIDIA card exists
in
   the system at all (/dev/dri contains only card1 and renderD128). Error rate
   unchanged.

So the defect is in Overview's own GL context handling, independent of GPU
count.

Also of note: toggling HDR off/on on the affected output (which tears down and
rebuilds the output's pipeline) temporarily restores a sane frame-time reading,
consistent with the query objects being left in a bad state rather than the
compositor genuinely rendering slowly.

SOFTWARE / HARDWARE
Operating System: Fedora Linux 44
KDE Plasma Version: 6.7.4
KWin: kwin-6.7.4-2.fc44.x86_64
Qt Version: 6.11.1
Kernel Version: 7.1.9-200.fc44.x86_64
Graphics Platform: Wayland
Graphics Processor: NVIDIA GeForce RTX 5090
Driver: NVIDIA proprietary 610.57.04
CPU: AMD Ryzen 9 9950X3D

Displays at time of capture: LG 3440x1440@240Hz (HDR + WCG enabled) and a
second
2560x1440@120Hz panel rotated 270 degrees. The error reproduces regardless of
which
output is focused.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to