SUMMARY KDE will double the framerate of mirrored high refresh rate screens in bursts, this will create stuttering and smoothness issues STEPS TO REPRODUCE 1. Set two monitors to a high refresh rate 2. Mirror the two monitors using Display configuration OBSERVED RESULT Frame rate will frequently swap between desired frame rate and the combined frame rates of the two screens. EXPECTED RESULT Both screens stay at the maximum framerate set in Display configuration SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch 6.12.8 KDE Plasma Version: 6.2.5 KDE Frameworks Version: 6.9.0 Qt Version: 6.8.1 ADDITIONAL INFORMATION Video of the effect here: https://imgur.com/a/T6HzVD6 along with screenshot of monitor settings
I'm not sure why this would come in bursts, but the issue is likely that we send frame callbacks for every time KWin renders the window, on any output. If we restrict that to only send frame callbacks for one output, then the problem should go away.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7713
Git commit 8424bf88b67800c3d22384022e60c08d26e50ea4 by Xaver Hugl. Committed on 03/06/2025 at 11:10. Pushed by zamundaaa into branch 'master'. scene/item: restrict frame callbacks based on the output rather than geometry Sending frame callbacks based on whether or not the bounding rect intersects with the rendered output has two big problems: - when a window is entirely off-screen, it never gets frame callbacks. This is particularly problematic when the application waits for frame callbacks to render the next frame, but KWin waits with moving them to an output until the application commits the surface - when a window is on two outputs at once (like with cloning), then it gets twice the amount of frame callbacks - which means the application ends up rendering twice as fast, which doesn't make any sense This commit replaces that approach with just checking if the output is the same as the one Workspace picks for the center of the window. If the window is entirely off-screen, that will still result in an output getting chosen, and it also can't be on two outputs at once. Related: bug 479694, bug 505060 M +2 -1 src/scene/item.cpp M +2 -3 src/scene/item.h M +9 -0 src/scene/rootitem.cpp M +2 -0 src/scene/rootitem.h https://invent.kde.org/plasma/kwin/-/commit/8424bf88b67800c3d22384022e60c08d26e50ea4
Git commit ada3f238db01027b7100afe60868f75b64828018 by Xaver Hugl. Committed on 03/06/2025 at 12:04. Pushed by zamundaaa into branch 'Plasma/6.4'. scene/item: restrict frame callbacks based on the output rather than geometry Sending frame callbacks based on whether or not the bounding rect intersects with the rendered output has two big problems: - when a window is entirely off-screen, it never gets frame callbacks. This is particularly problematic when the application waits for frame callbacks to render the next frame, but KWin waits with moving them to an output until the application commits the surface - when a window is on two outputs at once (like with cloning), then it gets twice the amount of frame callbacks - which means the application ends up rendering twice as fast, which doesn't make any sense This commit replaces that approach with just checking if the output is the same as the one Workspace picks for the center of the window. If the window is entirely off-screen, that will still result in an output getting chosen, and it also can't be on two outputs at once. Related: bug 479694, bug 505060 (cherry picked from commit 8424bf88b67800c3d22384022e60c08d26e50ea4) M +2 -1 src/scene/item.cpp M +2 -3 src/scene/item.h M +9 -0 src/scene/rootitem.cpp M +2 -0 src/scene/rootitem.h https://invent.kde.org/plasma/kwin/-/commit/ada3f238db01027b7100afe60868f75b64828018
Git commit dc3f798e74b5b049c1506246fa37e2751052565c by Xaver Hugl. Committed on 03/06/2025 at 12:08. Pushed by zamundaaa into branch 'Plasma/6.3'. scene/workspacescene: restrict frame callbacks based on the output rather than geometry Sending frame callbacks based on whether or not the bounding rect intersects with the rendered output has two big problems: - when a window is entirely off-screen, it never gets frame callbacks. This is particularly problematic when the application waits for frame callbacks to render the next frame, but KWin waits with moving them to an output until the application commits the surface - when a window is on two outputs at once (like with cloning), then it gets twice the amount of frame callbacks - which means the application ends up rendering twice as fast, which doesn't make any sense This commit replaces that approach with just checking if the output is the same as the one Workspace picks for the center of the window. If the window is entirely off-screen, that will still result in an output getting chosen, and it also can't be on two outputs at once. Related: bug 479694, bug 505060 (cherry picked from commit 8424bf88b67800c3d22384022e60c08d26e50ea4) M +1 -1 src/scene/workspacescene.cpp https://invent.kde.org/plasma/kwin/-/commit/dc3f798e74b5b049c1506246fa37e2751052565c