Summary: | Fullscreen game stutter when Plasma receives notifications. | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Robert <robert.bielski> |
Component: | performance | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kde.roundish, linx.system.adm, massimiliano.torromeo, miranda, nate, xaver.hugl |
Priority: | NOR | ||
Version: | 6.0.5 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/kwin/-/commit/07e9d09611d1de307b7ce9724fc5dcea5a9cc4d7 | Version Fixed In: | 6.2.0 |
Sentry Crash Report: | |||
Attachments: |
attachment-3246432-0.html
attachment-4014901-0.html |
Description
Robert
2024-05-30 03:58:12 UTC
Can you test the same scenario after putting KWIN_DRM_NO_DIRECT_SCANOUT=1 into /etc/environment and rebooting? Do you still see stutter then? Created attachment 170194 [details] attachment-3246432-0.html Yes, I will do that when I get the chance tomorrow and follow up with you. Thanks, Robert ________________________________ From: Zamundaaa <bugzilla_noreply@kde.org> Sent: June 5, 2024 6:00 AM To: robert.bielski@outlook.com <robert.bielski@outlook.com> Subject: [kwin] [Bug 487780] Fullscreen game stutter when Plasma receives notifications. https://bugs.kde.org/show_bug.cgi?id=487780 Zamundaaa <xaver.hugl@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REPORTED |NEEDSINFO CC| |xaver.hugl@gmail.com Resolution|--- |WAITINGFORINFO --- Comment #1 from Zamundaaa <xaver.hugl@gmail.com> --- Can you test the same scenario after putting KWIN_DRM_NO_DIRECT_SCANOUT=1 into /etc/environment and rebooting? Do you still see stutter then? -- You are receiving this mail because: You reported the bug. Just following up, I can confirm that after setting the environment variable KWIN_DRM_NO_DIRECT_SCANOUT=1 and rebooting, there is no stutter present and everything is perfectly smooth in the same gaming scenario when receiving desktop notifications. This likely points to a bug in the direct scanout implementation. okay, then direct scanout is definitely getting interrupted, when it shouldn't be. Do you have any effects that would be acting on notifications? Created attachment 170350 [details] attachment-4014901-0.html Reviewing the Desktop Effects KCM, the only thing that stands out is the effect called "Fading Popups" as they seem to smoothly fade in and out when they show and disappear. I didn't make any changes to this module and use the default effect settings as packaged by Arch/EndeavourOS. Thanks for looking into this minor, but still important issue. ________________________________ From: Zamundaaa <bugzilla_noreply@kde.org> Sent: June 9, 2024 12:42 PM To: robert.bielski@outlook.com <robert.bielski@outlook.com> Subject: [kwin] [Bug 487780] Fullscreen game stutter when Plasma receives notifications. https://bugs.kde.org/show_bug.cgi?id=487780 Zamundaaa <xaver.hugl@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Resolution|WAITINGFORINFO |--- Status|NEEDSINFO |CONFIRMED --- Comment #4 from Zamundaaa <xaver.hugl@gmail.com> --- okay, then direct scanout is definitely getting interrupted, when it shouldn't be. Do you have any effects that would be acting on notifications? -- You are receiving this mail because: You reported the bug. A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6086 Git commit de8bd8f12664f054165d64d18e8b3febfa71d4d9 by Xaver Hugl. Committed on 11/07/2024 at 14:54. Pushed by zamundaaa into branch 'master'. plugins/fadingpopups: don't block direct scanout The effect only modifies the opacity of individual windows that WorkspaceScene::scanoutCandidate will reject anyways, so there's no reason for it to block direct scanout. Once a more proper solution for blocking direct scanout on individual items is in place, this can be removed again M +1 -1 autotests/integration/dont_crash_cancel_animation.cpp M +1 -0 src/plugins/fadingpopups/package/metadata.json M +8 -2 src/scripting/scriptedeffect.cpp M +3 -1 src/scripting/scriptedeffect.h https://invent.kde.org/plasma/kwin/-/commit/de8bd8f12664f054165d64d18e8b3febfa71d4d9 Git commit 07e9d09611d1de307b7ce9724fc5dcea5a9cc4d7 by Xaver Hugl. Committed on 11/07/2024 at 15:06. Pushed by zamundaaa into branch 'Plasma/6.1'. plugins/fadingpopups: don't block direct scanout The effect only modifies the opacity of individual windows that WorkspaceScene::scanoutCandidate will reject anyways, so there's no reason for it to block direct scanout. Once a more proper solution for blocking direct scanout on individual items is in place, this can be removed again (cherry picked from commit de8bd8f12664f054165d64d18e8b3febfa71d4d9) Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com> M +1 -1 autotests/integration/dont_crash_cancel_animation.cpp M +1 -0 src/plugins/fadingpopups/package/metadata.json M +8 -2 src/scripting/scriptedeffect.cpp M +3 -1 src/scripting/scriptedeffect.h https://invent.kde.org/plasma/kwin/-/commit/07e9d09611d1de307b7ce9724fc5dcea5a9cc4d7 Awesome, thanks for fixing it, much appreciated. I'm just following up on this bug and have noticed that despite having 6.1.3 and the latest updates, there is still a pronounced stutter that occurs consistently when notifications are received. I'm not sure if this is now direct scanout being interrupted or another problem with the code. I believe that all the code paths that block direct scanout are not solved for this use case. After further evaluation, your patch does improve things as the stutter only happens once now and it's not caused by the notification pop up. I believe that when the new notifications icon appears within the system tray on the panel, this also blocks direct scanout once and this is probably the stutter I observe now. I'm going to re-open the bug, it's not a huge issue, however, if you have some time, you might want to look into this, thanks. This issue still occurs for me under KDE 6.1.4. Every single notification causes a frametime spike/framedrop. Tested with openSUSE Tumbleweed, kernel 6.10.5 under Wayland. VRR is enabled and I use a dual monitor setup. CPU: AMD Ryzen 9 7950X3D GPU: AMD Radeon RX 7800 XT There are some remaining code paths that can block direct scanout - namely effects that haven't been fixed, or that may need to block direct scanout in some situations. There's a new API in 6.2 that effects can use though, https://invent.kde.org/plasma/kwin/-/merge_requests/6203, which blocks direct scanout only when really necessary. It's implemented for all built in effects, and external javascript effects automatically make use of this API too. |