https://bugs.kde.org/show_bug.cgi?id=529231
Bug ID: 529231
Summary: [Regression 6.8.2 -> 6.8.3] Vulkan FIFO client
covering a whole output gets ~28 presents/s on a 120
Hz output and no presentation timestamps (NVIDIA, two
outputs)
Classification: Plasma
Product: kwin
Version First 6.8.3
Reported In:
Platform: Arch Linux
OS: Linux
Status: REPORTED
Keywords: regression
Severity: normal
Priority: NOR
Component: wayland-generic
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
Since the update from KWin 6.8.2 to 6.8.3, a native Wayland Vulkan client that
presents with FIFO and whose surface covers the whole of one of my two outputs
(fullscreen or maximised) only gets about 28 presents per second on a 119.88 Hz
output (about 20 when maximised), and its presentation feedback has no
timestamps. While this happens kwin_wayland uses about 0% CPU and the GPU is
idle. Downgrading only the kwin package to 6.8.2 fixes it.
STEPS TO REPRODUCE
1. Wayland session, NVIDIA GPU, two outputs laid out as described under
OUTPUTS. HDMI-A-1 is the affected one.
2. Play any 60 fps video fullscreen on that output with mpv 0.42.0, Vulkan,
FIFO (I used a 1920x1080 60 fps H.264 clip):
mpv --no-config --fs --fs-screen-name=HDMI-A-1 --vo=gpu-next
--gpu-api=vulkan --gpu-context=waylandvk --vulkan-swap-mode=fifo FILE
3. After 6 to 8 seconds look at mpv's frame-drop-count ("Dropped:" in the
terminal status line).
OBSERVED RESULT
About 240 of about 360 frames are dropped. Without --vulkan-swap-mode (mpv's
default) I got 279 and 319 dropped in 7 to 8 seconds.
I first saw it with a Vulkan application that uses FIFO with
VK_KHR_present_wait2 and VK_EXT_present_timing, on the same 3840x2160 output:
- fullscreen: 28.5 presents/s, and no first-pixel timestamps at all
- maximised (3840x2125 px surface): 19.5 presents/s
- window of 3835x2123 px: 119.9 presents/s, timestamps present
EXPECTED RESULT
No dropped frames; presents at the refresh rate with presentation timestamps,
as with KWin 6.8.2.
WHAT IS AND IS NOT AFFECTED
All with KWin 6.8.3 on HDMI-A-1, same mpv command with the change noted:
- Vulkan FIFO, fullscreen: AFFECTED (about 240 of 360 dropped)
- --vulkan-swap-mode=mailbox: 0 dropped
- --vulkan-swap-mode=immediate: 0 dropped
- --gpu-context=x11vk (XWayland): 0 dropped
- --vo=gpu --gpu-api=opengl --gpu-context=wayland (OpenGL, fullscreen): 0
dropped
- Vulkan FIFO with --no-fs --geometry=1280x720: 0 dropped
- A window only 5 px narrower than the screen: not affected (see above)
- Any of the above on the other output (DP-3): not affected
These made no difference: adaptive sync on the output set to Automatic or
Never; HDR or SDR surface; 8-bit or 10-bit swapchain; a small always-on-top
window over the fullscreen one; VK_LOADER_LAYERS_DISABLE=~implicit~; a reboot.
REGRESSION RANGE
kwin 6.8.2-2 (Arch package) is good, kwin 6.8.3-1 is bad. I downgraded only the
kwin package and logged in again; the rest of Plasma stayed at 6.8.3. Before
that, downgrading the NVIDIA driver (620.73.04 to 620.70.06) and the kernel
(7.3.5 to 7.3.4) with KWin 6.8.3 still installed did not help. I have not
bisected.
v6.8.2..v6.8.3 contains b145d8b5 "scene: only progress fifo and commit timing
on one SceneView", c1e44ffa "wayland/surface: remove the primary output" and
c7a6bdc3 "core/renderloop: fix scheduling with triple buffering and commit
timing". The first one refers to bug 498628 and bug 525619.
Guess, not verified: since b145d8b5 the surface's primary view may not be the
view of the output it covers (the 240 Hz output starts exactly where the
affected one ends, at x=3072), so FIFO would only advance on the fallback timer
(30 Hz at most, close to the rate I see) and the presentation feedback would be
dropped.
OUTPUTS (kscreen-doctor -o)
- HDMI-A-1, affected: LG C2 TV, [email protected], scale 1.25, geometry 0,0
3072x1728, priority 2, HDR and WCG enabled, VRR Automatic
- DP-3, not affected: monitor, [email protected], scale 1.45, geometry 3072,87
2649x1490, priority 1, HDR and WCG enabled, VRR Automatic
I do not know why only HDMI-A-1 is affected.
SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 6.8.3 (kwin 6.8.3-1 bad, kwin 6.8.2-2 good)
KDE Frameworks Version: 6.32.0
Qt Version: 6.12.0
Kernel Version: 7.3.5-arch1-1 and 7.3.4-arch1-2 (both tried)
Graphics Platform: Wayland
Graphics Processor: NVIDIA GeForce RTX 5090, nvidia-open 620.73.04 and
620.70.06 (both tried)
KWin compositing: OpenGL ES 3.2 on NVIDIA, atomic mode setting on
Other packages: wayland 1.26.0, egl-wayland 1.1.24, xorg-xwayland 24.1.15,
vulkan-icd-loader 1.4.363.0, mpv 0.42.0, libplacebo 7.387.0
ADDITIONAL INFORMATION
Not captured so far: KWin debug logging (QT_LOGGING_RULES), drm_info, which
Wayland protocols the NVIDIA Vulkan WSI used (fifo-v1, commit-timing, frame
callbacks), and a bisect. kwin_wayland logged nothing in the journal while it
happened, and neither did the NVIDIA kernel driver. I can provide any of these
and run further tests if that helps.
--
You are receiving this mail because:
You are watching all bug changes.