SnapShots: ~3s capture delay on KDE Plasma 6.8 — feedback QML 'Window' resolves to KWin::Window
Summary
On KDE Plasma 6.8 (Wayland), every SnapShot with Capture flash or Capture animations turned on lands in the draft about 3 seconds late. The KDE feedback helper's QML fails to load, so T3 waits for a "ready" event that never comes, then kills the helper.
On Plasma 6.7.5 the same build is near-instant.
Environment
| Affected | Not affected | |
|---|---|---|
| T3 Code | t3code-nightly-bin 0.1.7-nightly.20261104.4151 (Linux, Wayland) |
same nightly line |
| KWin | 6.8.1 | 6.7.5 |
| qt6-declarative | 6.12.0 | 6.12.0 |
| Distro | CachyOS (Arch) | CachyOS (Arch) |
Steps to reproduce
- On Plasma 6.8 Wayland, open Settings → SnapShots. Leave Capture flash and/or Capture animations on (the defaults).
- Press the capture shortcut on any window.
- The snapshot shows up in the composer about 3 s later.
- Turn both flash and animations off and capture again. The snapshot appears instantly.
Standalone repro (no UI)
Run the bundled helper's feedback command directly:
import base64, json, os, selectors, subprocess, tempfile, time
exe = os.path.expanduser('~/.local/share/t3code/kde-capture/t3-kde-snap-shot')
with tempfile.TemporaryDirectory(prefix='t3-feedback-timing-') as d:
open(d + '/capture.png', 'wb').write(base64.b64decode(
'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+aT1UAAAAASUVORK5CYII='))
opts = {'bounds': {'x': 0, 'y': 0, 'width': 1, 'height': 1}, 'pid': os.getpid(), 'flash': True, 'animate': False}
t = time.monotonic()
p = subprocess.Popen([exe, 'feedback', d, json.dumps(opts)], stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
sel = selectors.DefaultSelector(); sel.register(p.stdout, selectors.EVENT_READ)
print('ready' if sel.select(2) else 'NO ready event', round((time.monotonic() - t) * 1000), 'ms')
p.stdin.write('{"command":"close"}\n'); p.stdin.flush()
p.communicate(timeout=1)
On KWin 6.8.1 this prints NO ready event 2000 ms, and the user journal (journalctl --user -o cat) shows:
Component failed to load: QList(file:///tmp/t3-feedback-timing-xxxx/feedback.qml:60:19: Type cannot be created in QML.
delegate: Window {
^)
End to end that is 2 s waiting for readiness plus about 1 s before forced termination: 3,003 ms measured.
Cause
The generated feedback.qml imports:
import QtQuick.Window
import QtQml.Models
import org.kde.kwin
...
delegate: Window {
KWin 6.8 exports its own uncreatable Window type (KWin::Window) from org.kde.kwin. Because that import comes last, Window now resolves to KWin's type instead of QtQuick.Window.Window, so the component fails to load. KWin 6.7 didn't expose that name, so it worked there.
Suggested fix
- In the KDE helper's feedback QML (
src/feedback.rs), qualify the Qt type:import QtQuick.Window as QtWindowanddelegate: QtWindow.Window { ... }. - In the desktop app's native feedback startup (
startNativeCaptureFeedback, aroundmain.cjs:130408in the packaged build), fail fast when the helper exits or reports a load error instead of waiting out the readiness timeout. A broken feedback path shouldn't delay the capture itself.
Workaround: turn off both Capture flash and Capture animations.
Diagnosed and filed with Claude Code (Claude Opus 5.5) and Codex (GPT-6.1 Sol).
[GPT-6.1 Sol][Codex] on behalf of shivam.
Handing this issue to Julius’s existing fix in https://github.com/pingdotgg/t3code/pull/31247, head 121fbad45a477114e26c52dd159ca76935164a94. At main 67eebaca23f8f7bc46e8817434087fc9c5acf8e3, NativeCaptureFeedback.ts has the reported 2-second readiness deadline, then waits for helper exit with a 1-second forced termination deadline. The PR addresses the QML Window collision and records before/after QML test results. I made no changes and ran no runtime tests; live Plasma 6.8 Wayland behavior remains unverified by this thread.
Confirming this is still reproducible, and adding two data points that narrow it.
Environment: T3 Code nightly 0.1.10_nightly.20261113.4630, KWin 6.8.2-2, qt6-base 6.12.0-5, qt6-declarative 6.12.0-4, Plasma 6.8.2, Wayland session.
It is not a helper regression. I pulled the previous helper build out of a Btrfs snapshot (same version shipped before the 2026‑11‑13 nightly) and ran it with identical options. The feedback.qml it generates is identical to the current one except for the random bus name and script id, and it fails with the same feedback.qml:60:19: Type cannot be created in QML. at delegate: Window {. The breakage lines up with the KWin 6.7.5 → 6.8.0 upgrade on this machine (2026‑10‑16), not with any T3 release.
Timings from the desktop OpenTelemetry trace (desktop.trace.ndjson), desktop.snapShot.prepareCapture on four successive captures: 3803, 3793, 4782, 6029 ms. Isolating each step:
| step | time |
|---|---|
t3-kde-snap-shot capture |
0.32 s |
accessibility worker (started) |
0.39 s |
t3-kde-snap-shot activate (correct pid) |
0.02 s |
persistCapture |
0.01–0.05 s |
So the remaining ~2 s is exactly the readyDeadline in startNativeCaptureFeedback, as described above, and it is paid on every capture.
Minimal reproduction of the QML side, without T3 at all:
import QtQuick
import QtQuick.Window
import org.kde.kwin
Item {
Instantiator {
model: Workspace.screens
delegate: Window { visible: false }
}
}
loaded through org.kde.kwin.Scripting.loadDeclarativeScript + org.kde.kwin.Script.run gives Component failed to load: ...main.qml:9:19: Type cannot be created in QML. With Window as the root object instead, KWin reports the unrelated-looking File name case mismatch. Qualifying the type as import QtQuick.Window as QtWindow removes the error, which supports the suggested fix in the report.
Workaround confirmed: with snapShotFlash and snapShotAnimations off, the helper is no longer spawned and capture is fast again.
This comment was written by an AI assistant (opencode / DeepSeek V4.1 Flash) running on the reporter's machine. Every command above was executed by the assistant; the human only pressed the shortcut and observed the delay and the missing animation.