Bug 487480

Summary: Stutters on some menus and items using Wayland and Adaptive Sync
Product: [Plasma] kwin Reporter: Davut <davutdemir16>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: albertobonalumi00, nate, xaver.hugl
Priority: NOR Keywords: qt6, wayland
Version: 6.0.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: example of stuttering panels

Description Davut 2024-05-24 13:40:09 UTC
Created attachment 169777 [details]
example of stuttering panels

SUMMARY
While using Wayland and Adaptive Sync some menus and items are stuttering. Especially some dropdown elements and menus.

STEPS TO REPRODUCE
1. Use Wayland and enable adaptive sync
2. Try to open system tray sliding menu and clock menu.

OBSERVED RESULT
It hangs for a moment and when i hover the mouse over it some time, it goes back to normal

EXPECTED RESULT
Menus to show up without stuttering.

SOFTWARE/OS VERSIONS 
Linux/KDE Plasma: Arch Linux 
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.0

ADDITIONAL INFORMATION
It doesnt occur in X11. Just in wayland and while adaptive sync open.

There is a video of it in reddit: https://www.reddit.com/r/kde/comments/1ckq6p9/adaptive_sync_screws_some_animations/

I also attached an example of hanging menu when trying to open it
Comment 1 Bug Janitor Service 2024-05-28 17:10:16 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5790
Comment 2 Zamundaaa 2024-05-29 13:00:48 UTC
Git commit 2cf36e640ff35ca777f989aee43cfbf4300d1ace by Xaver Hugl.
Committed on 29/05/2024 at 12:46.
Pushed by zamundaaa into branch 'master'.

core/renderloop: honor repaint scheduling requests from effects with vrr

Until effects are converted to schedule repaints on the item they're modifying,
we need to allow repaint scheduling from nullptr items, and handle repaints on
the (cursor) render layers to still be filtered out

M  +0    -2    src/compositor_wayland.cpp
M  +2    -2    src/core/renderlayer.cpp
M  +2    -2    src/core/renderloop.cpp
M  +2    -1    src/core/renderloop.h

https://invent.kde.org/plasma/kwin/-/commit/2cf36e640ff35ca777f989aee43cfbf4300d1ace
Comment 3 Zamundaaa 2024-05-29 14:44:16 UTC
Git commit bc40f0fe60123fdd2725e74e14c1cb7b5e8f99a7 by Xaver Hugl.
Committed on 29/05/2024 at 13:14.
Pushed by zamundaaa into branch 'Plasma/6.1'.

core/renderloop: honor repaint scheduling requests from effects with vrr

Until effects are converted to schedule repaints on the item they're modifying,
we need to allow repaint scheduling from nullptr items, and handle repaints on
the (cursor) render layers to still be filtered out


(cherry picked from commit 2cf36e640ff35ca777f989aee43cfbf4300d1ace)

M  +0    -2    src/compositor_wayland.cpp
M  +2    -2    src/core/renderlayer.cpp
M  +2    -2    src/core/renderloop.cpp
M  +2    -1    src/core/renderloop.h

https://invent.kde.org/plasma/kwin/-/commit/bc40f0fe60123fdd2725e74e14c1cb7b5e8f99a7
Comment 4 Zamundaaa 2024-06-03 16:51:12 UTC
*** Bug 487960 has been marked as a duplicate of this bug. ***