Bug 371731 - Present Windows lags/stutters when window close buttons are enabled
Summary: Present Windows lags/stutters when window close buttons are enabled
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-present-windows (show other bugs)
Version: 5.7.5
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-27 03:08 UTC by kdebugs
Modified: 2021-08-19 15:44 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.23


Attachments
output of /KWin supportInformation (5.13 KB, text/plain)
2016-10-27 05:57 UTC, kdebugs
Details
output of /KWin supportInformation (5.43 KB, text/plain)
2017-10-05 07:24 UTC, jeconom
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kdebugs 2016-10-27 03:08:47 UTC
With recent upgrade to Kubuntu 16.10, Present Windows starting occasionally stuttering/lagging when I'd press my hotkey. It happens more often the more windows are present. Once it finishes the lag/stutter and shows the windows (takes 0.5 to 1.5 seconds) and again un-shows them (another lag/stutter), the effect can often be executed smoothly when the hotkey is pressed subsequently. Meaning, once it "warms up" it works fine. When new windows are created, or moved to different screens, the problem often returns.

Present Windows has worked fine for several preceding Kubuntu versions.

I have found that disabling "Provide buttons to close the windows" solves the issue. (But I like those buttons, so it's not ideal. As an aside, allowing an assignable action to "close window" in the Windows mouse action section would be great!)

i7 4770K desktop, plenty of RAM, etc, using onboard graphics.

Let me know if there's anything else I can do to help.
Comment 1 kdebugs 2016-10-27 03:13:34 UTC
For some reason I can't add the following comment because the system is blocking it as s p a m. So I am filling out this comment with some fluff in the hopes that it allows it past the filter:

---
Also, I should add to this bug that I'm using multiple monitors. I use xrandr to arrange them due to bugs in kscreen.
---

Here is some more fluff in the hopes of successfully adding this info.
Comment 2 Martin Flöser 2016-10-27 05:36:03 UTC
> For some reason I can't add the following comment because the system is blocking it as s p a m.

We enabled some anti spam measures yesterday. If you still have the comment, please send it to me by private mail and I'll forward it to our sysadmins, so they they can adjust it to let good comments through. Sorry for the problems.

---
Can you please provide the output of:
qdbus org.kde.KWin /KWin supportInformation
Comment 3 kdebugs 2016-10-27 05:57:21 UTC
Created attachment 101819 [details]
output of /KWin supportInformation

Thanks Martin!
Comment 4 Martin Flöser 2016-10-27 06:36:01 UTC
Could you try changing the layout mode of Present Windows from "Natural" to "Regular Grid"? I'm interested whether that would still trigger it.
Comment 5 kdebugs 2016-10-27 06:48:46 UTC
Yes -- same behavior with all the layout modes. I also tried it with display window icons/titles disabled... the close buttons were the only thing that made a difference.
Comment 6 Lucas Lima 2016-11-02 16:36:18 UTC
I also have the same problems. However, I noticed that I only happens on Intel drivers when DRI 3 is enabled. On intel modesettings, the problem is always present.
Comment 7 kdebugs 2017-04-09 06:52:47 UTC
Wanted to update: this still happens, but I just got a GPU (Nvidia GTX 1060) and when I use the video card as my display this problem doesn't happen.

This accords with comment #6 that the intel graphics are related to the issue.
Comment 8 Michael D 2017-10-01 01:05:29 UTC
It's been happening for ages on my Intel Broadwell hardware as well, I just haven't bothered looking for a bug report until now. Even just hovering over the close button can cause it to lag. I noticed that if I hover over the close button for the first time, it lags. If I exit the effect and present windows again, it doesn't lag on hover, but does if I actually click the close window button.
Comment 9 jeconom 2017-10-05 07:23:19 UTC
Just installed kubuntu 17.04 (Plasma 5.9.5) on i5-4590 with Intel Graphics (open source drivers),  3 monitors, 32GB RAM, SSD. I activate present windows via screen edge.

Present windows freezes for ~1 second when on window mouseover (about 50% of the times), when I activate a window (almost always) and when I close a window (always). Disabling the "Provide buttons to close the windows" fixes the problem.

I have no problem on a machine with the same specs but with an nVidia GTX960 (proprietary drivers).
Comment 10 jeconom 2017-10-05 07:24:05 UTC
Created attachment 108178 [details]
output of /KWin supportInformation
Comment 11 Gauthier 2017-11-12 20:51:09 UTC
Hello,

I have also lags with this effects.

For general lags, running kwin --replace improves dramatically the behaviour. However I always have a lag when windows rearrange themselves after I use the close button to close a window.

I tried on plasma 5.8.7 (neon LTS - intel ivy bridge GPU - kernel 4.10.0-37) and 5.11.2 (neon user - intel skylake GPU - kernel 4.10.0-38). I have much more general kwin lags including for this one on the skylake machine.
Comment 12 parajulidarshan2 2017-12-13 23:31:21 UTC
Hello,

I have the exact same issue with present windows. The animation stops working and the windows freeze up for a brief second when present windows is toggled frequently. The lag/freeze-up doesn't seem to occur once the close buttons are disabled.

Plasma version: 5.11.4

Hope it gets resolved soon.
Comment 13 Michael D 2017-12-13 23:33:08 UTC
I notice the lag issue doesn't arise in wayland, but it's still present in X11. (Intel Broadwell)
Comment 14 Gauthier 2017-12-14 07:41:22 UTC
On both my Ivy Bridge and Skylake machine (both using integrated intel GPU), I saw a great improvement in graphic performance including on this bug by adding the following xorg config file: 20-intel.conf in /usr/share/X11/xorg.conf.d/ containing:

Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "AccelMethod" "sna"
    Option "TearFree" "true"
    Option "DRI" "3"
EndSection

AND by switching to the xserver-xorg-video-intel-hwe-16.04 instead of modesetting.

This worked on both machine, one running neon user (plasma 5.11.4 Qt 5.9.3) and the other neon lts (plasma 5.8.8 Qt 5.7.1) and add no problem since. This effect is now very snappy rearranging windows after closing one. And again it has improved performance on the desktop all around.

I found the solution here when look for another issue I had with graphics.
https://askubuntu.com/questions/752743/ubuntu-16-04-skylake-6th-generation-screen-flickering
Comment 15 jeconom 2017-12-15 12:37:47 UTC
I can confirm that achat1024's settings in xorg settings solve the problem in an i5-4590.
Comment 16 Gauthier 2017-12-16 16:10:06 UTC
Glad that was helpful. I have been running these settings for almost a month now and I haven't had single graphic glitch in plasma since! Really transformed my experience!
I was getting a little disappointed that by version 5.11 I still felt my desktop was somewhat unstable and so I was hesitant to recommended it to people (I install free software on every PC coming through my hands)...despite by long lasting big love for the KDE project and plasma desktop in general. Now it all feel super stable and snappy!
Comment 17 Nate Graham 2021-08-19 15:44:00 UTC
This is fixed in the QML rewrite for Plasma 5.23!