Bug 433664

Summary: Desktop becomes really slow after disabling and enabling the kwin compositor again (After 5.21 Update)
Product: [Plasma] kwin Reporter: Mateus Honorato <mateush.honorato>
Component: compositingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: major CC: daniel.eckl, gerafin1, katyaberezyaka, kde, kde, kishore96, luca, nate, openmindead, pedroarthur.jedi, phoenix_87_c, s.kde, tadej.rosa
Priority: NOR    
Version: 5.21.4   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: output of 'qdbus org.kde.KWin /KWin supportInformation'
Screen layout where issue is not present.
Screen layout where issue is present.
Alternate screen layout where issue is also present.
two screens side-by-side, one laptop below, issue is present

Description Mateus Honorato 2021-02-26 15:53:25 UTC
Created attachment 136197 [details]
output of 'qdbus org.kde.KWin /KWin supportInformation'

SUMMARY
After disabling and enabling the compositor, or restarting kwin with kwin_x11 --replace, the desktop becomes very slow, with like 1-2 fps, and becomes pretty much unusable. The only solution is to logout and login again. This started happening after the Plasma 5.21 update.

STEPS TO REPRODUCE
1. Restarting kwin or disabling and enabling the compositor in system settings

OBSERVED RESULT
Every window or plasmashell itself is stuttering, slow, just the mouse pointer is moving fine with normal framerate, the windows become slow and everything gets really slow.

EXPECTED RESULT
Normal behavior of the desktop.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE neon 5.21.1
KDE Plasma Version: 5.21.1
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Graphics platform: X11 (In the wayland session, everything seems fine)
Kernel Version: 5.4.0-66-generic
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-3230M CPU @ 2.60GHz
Memory: 7,7 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4000
Comment 1 Mateus Honorato 2021-02-26 15:55:56 UTC
https://drive.google.com/file/d/1m9SAKBYt1kY5zhtoY9i8JMs2rXKigaGB/view?usp=sharing

video of the issue
Comment 2 Mateus Honorato 2021-04-08 16:12:58 UTC
still present today. just found out this might have something to do with my dual display setup. when the problem happens, if I go to the display settings, disable and enable one of the displays, things come back to normal
Comment 3 Donovan Zimmerman 2021-04-10 02:38:08 UTC
I am observing this myself after upgrading to Plasma 5.21. I find that this only occurs under multi-screen setups with KWin operating in OpenGL mode. Interestingly, this issue stops immediately when my displays are top-aligned in the layout config. Any deviation from this causes the problem once more after cycling compositing.

Testing procedure used:
1. Change screen arrangement in the Display Configuration KCM
2. Restart compositing (Alt+Shift+F12 twice)

See attachments to see example layouts that cause the issue as well as one that doesn't.
Comment 4 Donovan Zimmerman 2021-04-10 02:40:54 UTC
Created attachment 137459 [details]
Screen layout where issue is not present.
Comment 5 Donovan Zimmerman 2021-04-10 02:41:37 UTC
Created attachment 137460 [details]
Screen layout where issue is present.
Comment 6 Donovan Zimmerman 2021-04-10 02:42:21 UTC
Created attachment 137461 [details]
Alternate screen layout where issue is also present.
Comment 7 Pedro Arthur Duarte (aka JEdi) 2021-05-15 21:27:08 UTC
I am experiencing this bug. I got observations similar to Donovan's, where the top-aligned screen layout with OpenGL compositor always work, but in my case, other layouts work sometimes after the following procedure: top-align, apply, switch to the desired configuration, apply. The problem happens again on logout/login half of the time.
Comment 8 Vladimir Yerilov 2021-08-23 15:52:36 UTC
I confirm this bug still present on 5.22.4.
Whenever I set my displays in Screens KCM more like they are set in reality (not aligned horizontally), this starts to happen after disabling/enabling the compositor.
This is a bummer for everyone whose displays are of different size and vertical position.
Comment 9 Vladimir Yerilov 2021-08-24 04:06:27 UTC
This bug doesn't exist when using KwinFT stack (KDisplay, Disman, Wrapland).
Comment 10 Andreas Kilgus 2021-11-04 21:57:09 UTC
Have you tried to switch "Keep window thumbnails" to "always" (s. https://bugs.kde.org/show_bug.cgi?id=425856)? For several users including me this option removes the laggy desktop experience caused by compositing enabled. This is more of a workaround than a solution but might lead the way to get rid of the bug if this solves the problem for different hardware/software setups …
Comment 11 Vladimir Yerilov 2021-11-05 15:45:15 UTC
Just tried that, no effect at all. Just same lagging animation as before until Screens are aligned horizontally.
Comment 12 mcdoogs 2021-11-09 13:48:10 UTC
Just ran into this bug for the first time today. Switching my monitors to top-aligned instead of my usual configuration fixes the issue - thanks for figuring that out. I'm on Plasma 5.23.2
Comment 13 Marco 2022-03-11 09:31:17 UTC
I also confirm the bug on plasma 5.24.3. Changing the display configuration as suggested fixed the issue. The configuration I had before that was causing the issue was to vertically align the displays.
Comment 14 Daniel Eckl 2022-03-23 12:26:18 UTC
Created attachment 147682 [details]
two screens side-by-side, one laptop below, issue is present

My setup has a laptop screen below one of two monitors. This setup is affected, too.
Comment 15 David Edmundson 2022-03-24 16:32:47 UTC

*** This bug has been marked as a duplicate of bug 444536 ***