Bug 480454 - Kwin (wayland) renders at ca. 1 fps when mpv plays fullscreen
Summary: Kwin (wayland) renders at ca. 1 fps when mpv plays fullscreen
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-01-28 19:33 UTC by Schlaefer
Modified: 2024-01-29 09:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Example maximizing mpv reduces kwin rendering speed (3.59 MB, video/webm)
2024-01-28 19:33 UTC, Schlaefer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Schlaefer 2024-01-28 19:33:34 UTC
Created attachment 165315 [details]
Example maximizing mpv reduces kwin rendering speed

See attached video for an example.

STEPS TO REPRODUCE
1. Play a video in mpv and maximize the window to fullscreen (hit F key/double click window)

OBSERVED RESULT

1. Kwin rendering is reduced to roughly one frame per second
2. "kwin_wayland_drm: Presentation failed! Invalid argument" is emitted in system log when a frame renders

EXPECTED RESULT

1. Kwin rendering should be unaffected

SOFTWARE/OS VERSIONS
Operating System: Garuda Linux 
KDE Plasma Version: 5.92.90
KDE Frameworks Version: 5.249.0
Qt Version: 6.6.1
Kernel Version: 6.7.1-zen1-1.1-zen (64-bit)
Graphics Platform: Wayland
Processors: 12 × 11th Gen Intel® Core™ i5-11400 @ 2.60GHz
Memory: 31,2 GiB of RAM
Graphics Processor: Mesa Intel® Arc
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B560M AORUS PRO AX

ADDITIONAL INFORMATION

The people at Garuda where very helpful triaging. Going back the plasma/6.0 branch the commit introducing the issue for me is: https://invent.kde.org/plasma/kwin/-/commit/2d08593522e17a4043141cf3e95ede78eb1db073
Comment 1 Zamundaaa 2024-01-28 21:24:05 UTC
hmm, that sounds like the Intel driver rejects the atomic commits because of the content type property. That in itself would be pretty weird, but as we haven't really seen any benefit to passing through the content type from the app we might as well remove that and sidestep this issue entirely
Comment 2 Bug Janitor Service 2024-01-28 21:26:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5055
Comment 3 Schlaefer 2024-01-28 21:44:46 UTC
Applying the suggested patch on plasma/6.0 latest fixes the issue. 👍
Comment 4 Vlad Zahorodnii 2024-01-29 09:56:21 UTC
Git commit b05fa94d327a61a61da56a59d8fadd4662c94a5b by Vlad Zahorodnii, on behalf of Xaver Hugl.
Committed on 29/01/2024 at 09:55.
Pushed by vladz into branch 'master'.

backends/drm: don't set the content type drm property

We haven't seen any benefit from passing it through from apps and apparently
it can make atomic commits fail in some cases.

M  +0    -5    src/backends/drm/drm_output.cpp

https://invent.kde.org/plasma/kwin/-/commit/b05fa94d327a61a61da56a59d8fadd4662c94a5b
Comment 5 Vlad Zahorodnii 2024-01-29 09:56:55 UTC
Git commit 2b0358736496de2b4843c6daf5b109a89fe8a503 by Vlad Zahorodnii, on behalf of Xaver Hugl.
Committed on 29/01/2024 at 09:56.
Pushed by vladz into branch 'Plasma/6.0'.

backends/drm: don't set the content type drm property

We haven't seen any benefit from passing it through from apps and apparently
it can make atomic commits fail in some cases.


(cherry picked from commit b05fa94d327a61a61da56a59d8fadd4662c94a5b)

M  +0    -5    src/backends/drm/drm_output.cpp

https://invent.kde.org/plasma/kwin/-/commit/2b0358736496de2b4843c6daf5b109a89fe8a503