| Summary: | Choppy video playback on Wayland | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Patrick Silva <bugseforuns> |
| Component: | performance | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | mirh, nate, noeerover, postix, xaver.hugl |
| Priority: | NOR | ||
| Version First Reported In: | 5.24.90 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Patrick Silva
2022-05-20 17:06:30 UTC
Is this regression compared to 5.24? No. It's an old issue. Huh, I see. Regardless, it's odd that even not resource demanding apps such as glxgears stutter. Does changing latency policy make things any better? (In reply to Vlad Zahorodnii from comment #3) > Huh, I see. Regardless, it's odd that even not resource demanding apps such > as glxgears stutter. Does changing latency policy make things any better? No. I can't reproduce the stuttering with glxgears using another user account. Video playback is also better, but it is still stuttering a bit with certain videos even on X11. Operating System: Arch Linux KDE Plasma Version: 5.25.4 KDE Frameworks Version: 5.96.0 Qt Version: 5.15.5 Kernel Version: 5.19.0-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 2 × Intel® Celeron® CPU G1820 @ 2.70GHz Memory: 7,6 GiB of RAM Graphics Processor: Mesa Intel® HD Graphics I can repro this but only if I set scaling for my screen to something > 100%, like say 120%. Playback of regular HD videos stutters greatly, MPV reports many dropped frames and the new FPS tool shows 30fps instead of 60. My monitor is a TCL 43" HDR TV, 3840x2160@60Hz. Running wayland session, kwin from git master, MPV from git master as well. MPV reports (shift+i) really weird scaled resolution, like 6104x2880, not sure where that comes from. When I switch back to 100% scaling, all works as expected and the FPS tool show 60fps as well as MPV. I should add, using AmdGPU driver, RX560, I've tried with mpv --no-config and mpv with my normal config, which is vulkan and wayland: [code] ... gpu-api=vulkan gpu-context=waylandvk vo=gpu-next ao=pipewire vulkan-async-compute=yes af=lavfi=[loudnorm=I=-16:TP=-3:LRA=4] audio-channels=2 hwdec=auto-copy ... [/code] bug 449951 is related to display scale. Putting aside that in no way, shape or connotation in the dictionary glxgears could be considered as "video playback", bug 449951 was supposedly addressed in the KDE 6 beta. Yep, appears fixed in 5.27 (tumbleweed) and for sure is fixed in 6.x. Great! This bug persists on my system. There is a considerable lag when the credits slide in the end of a movie, for example.
On X11, the lag is less noticeable, but it is present too. I can reproduce with a new user account too. I can reproduce with VLC player, mpv, mplayer and gstreamer-based players like Totem and Glide.
va-api is working:
$ vainfo
Trying display: wayland
vainfo: VA-API version: 1.20 (libva 2.20.1)
vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Desktop - 2.4.1
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
I have Windows 10 installed on the same computer and the mentioned lag does not exist when playing the same videos on it.
Operating System: Arch Linux
KDE Plasma Version: 5.93.0
KDE Frameworks Version: 5.249.0
Qt Version: 6.7.0
Kernel Version: 6.7.5-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-4670K CPU @ 3.40GHz
Memory: 15,5 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 4600
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B85M-D3PH
Git commit 40a9f08dd34948264ba5b533da5373a0a51ad3f1 by Xaver Hugl. Committed on 24/05/2024 at 15:32. Pushed by zamundaaa into branch 'master'. backends/drm: allow up to two composited frames to be pending at the same time This should improve responsiveness on setups where rendering each frame takes longer than the refresh cycle of the display. Related: bug 452119 M +4 -0 src/backends/drm/drm_output.cpp https://invent.kde.org/plasma/kwin/-/commit/40a9f08dd34948264ba5b533da5373a0a51ad3f1 Git commit 192232e8d1736307f93792ea77de80e61f746bd3 by Xaver Hugl. Committed on 24/05/2024 at 15:59. Pushed by zamundaaa into branch 'Plasma/6.1'. backends/drm: allow up to two composited frames to be pending at the same time This should improve responsiveness on setups where rendering each frame takes longer than the refresh cycle of the display. Related: bug 452119 M +4 -0 src/backends/drm/drm_output.cpp https://invent.kde.org/plasma/kwin/-/commit/192232e8d1736307f93792ea77de80e61f746bd3 Beyond keeping compositing responsive, we can't fix video playback issues. If they're still visible with 6.1, please check again if the problem is actually triggered by compositing, or if it's the video player not keeping up with the screen |