Bug 408475 - kwin hangs when changing workspaces and manually maximize windows
Summary: kwin hangs when changing workspaces and manually maximize windows
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.15.5
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-09 08:29 UTC by RaitaroH
Modified: 2023-02-23 03:45 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
output of qdbus org.kde.KWin /KWin supportInformation (6.67 KB, text/plain)
2019-06-09 08:29 UTC, RaitaroH
Details
kwinrc files (6.92 KB, text/plain)
2019-06-12 06:38 UTC, RaitaroH
Details

Note You need to log in before you can comment on or make changes to this bug.
Description RaitaroH 2019-06-09 08:29:24 UTC
Created attachment 120714 [details]
output of qdbus org.kde.KWin /KWin supportInformation

SUMMARY
When I try to change a desktop either by keyboard shortcut or with pager kwin hangs for around 10 seconds or more. In that state I can still see the screen, move the cursor around, hear the audio. Sometimes I don't even move to the next desktop and it looks like I moved back to where I was. Same thing happens if I grab a windows and I snap it to any side of the screen (it does not affect the tile shortcuts).

STEPS TO REPRODUCE
1. change virtual desktop (workspace)
2. manually snap a window


OBSERVED RESULT
Kwin lags for a long time.


EXPECTED RESULT
Kwin working as it should.

OS VERSIONS
SOFTWARE/Operating System: KDE neon 5.15
KDE Plasma Version: 5.15.5
KDE Frameworks Version: 5.58.0
Qt Version: 5.12.0
Kernel Version: 4.15.0-51-generic
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-7700HQ CPU @ 2.80GHz
Memory: 7.4 GiB of RAM
Kwin 5.15.5
Nvidia driver version: 430.14 (GeForce GTX 1050 Ti 4GB)
X.org version: 1.19.6 (11906000)

ADDITIONAL INFORMATION
I have tried with no effect

    update the kernel

    updated the nvidia driver to 430.9

    disable fade animation

    disable wobbly windows

    set render loop to basic

    use OpenGL 2.0 and Smooth under compositor

    disable the FORCE BLUR script that might be causing this

    disable my force transparency which is global

 
This is what happens when kwin is in that state:

PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
13997 raitaro   25   5 3549848 127484  95120 S   6,7  1,6   0:42.05 kwin
13997 raitaro   25   5 3549848 127484  95120 S   0,0  1,6   0:42.05 kwin
13997 raitaro   25   5 3549848 127484  95120 S   0,0  1,6   0:42.44 kwin
13997 raitaro   25   5 3549848 127484  95120 S   0,7  1,6   0:42.46 kwin
13997 raitaro   25   5 3549848 127484  95120 S   0,0  1,6   0:42.46 kwin
13997 raitaro   25   5 3549844 127484  95120 S  20,0  1,6   0:43.06 kwin
13997 raitaro   25   5 3549844 127484  95120 S  99,3  1,6   0:46.05 kwin
13997 raitaro   25   5 3549844 127584  95120 D  46,7  1,6   0:47.45 kwin
13997 raitaro   25   5 3549844 127584  95120 D   0,0  1,6   0:47.45 kwin

The command kwin --replace  gives me a few things:
Could not create scene graph context for backend 'opengl' - check that plugins are installed correctly in /usr/lib/x86_64-linux-gnu/qt5/plugins
trying to show an empty dialog
trying to show an empty dialog
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 3720, resource id: 29360256, major code: 18 (ChangeProperty), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 4299, resource id: 29360239, major code: 2 (ChangeWindowAttributes), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 8641, resource id: 29360580, major code: 2 (ChangeWindowAttributes), minor code: 0
WobblyWindowsConfig::instance called after the first use - ignoring

I also attached the output of qdbus org.kde.KWin /KWin supportInformation
Comment 1 Vlad Zahorodnii 2019-06-11 06:12:07 UTC
Can you post your kwinrc?
Comment 2 RaitaroH 2019-06-12 06:38:40 UTC
Created attachment 120811 [details]
kwinrc files
Comment 3 RaitaroH 2019-06-12 06:41:55 UTC
(In reply to Vlad Zagorodniy from comment #1)
> Can you post your kwinrc?

I have posted the kwinrc.
Comment 4 Vlad Zahorodnii 2019-06-12 09:09:27 UTC
> desktopchangeosdEnabled=true

Hmm, this one uses QtQuick. Most likely a duplicate of bug 406180.
Comment 5 RaitaroH 2019-06-13 16:03:04 UTC
(In reply to Vlad Zagorodniy from comment #4)
> > desktopchangeosdEnabled=true
> 
> Hmm, this one uses QtQuick. Most likely a duplicate of bug 406180.

Actually I think it is, ALT+TAB does hang but is not as severe in my case, switching desktops is.
Also, I want to mention I upgraded to Neon 5.16 and the issue is gone for some reason. Knowing my system it will be coming back shortly.
Comment 6 RaitaroH 2019-06-20 11:23:26 UTC
And as I thought...
5.16 fixed the kwin problem...
And now is back a bit over a week later.
Comment 7 Vlad Zahorodnii 2019-06-20 12:19:26 UTC
(In reply to RaitaroH from comment #6)
> And now is back a bit over a week later.
Hmm, does the problem still persist?
Comment 8 RaitaroH 2019-06-22 07:02:56 UTC
(In reply to Vlad Zagorodniy from comment #7)
> Hmm, does the problem still persist?
Is a lot better than the last message. I can't say is completely gone, but at worst it takes 2 seconds to switch the desktop now.
Comment 9 RaitaroH 2019-06-23 16:12:07 UTC
(In reply to RaitaroH from comment #8)
> (In reply to Vlad Zagorodniy from comment #7)
> > Hmm, does the problem still persist?
> Is a lot better than the last message. I can't say is completely gone, but
> at worst it takes 2 seconds to switch the desktop now.

I think it might have something to do with many wake cycles / logout-login cycles. In #8 it happened because I had to suspend a bunch of times during the day. I can't seem to consistently reproduce it myself though.

I am happy if it doesn't come back but I cannot be 100% certain is gone. I also have, from time to time, a weird bug in konsole too when opening vim (same kind of run-eproducible, happens only sometimes bug)
Comment 10 Vlad Zahorodnii 2019-06-24 08:31:34 UTC
What version of Qt do you have?
Comment 11 RaitaroH 2019-06-24 08:50:04 UTC
(In reply to Vlad Zagorodniy from comment #10)
> What version of Qt do you have?

Operating System: KDE neon 5.16
KDE Plasma Version: 5.16.1
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.3
Kernel Version: 4.15.0-52-generic
Comment 12 RaitaroH 2019-07-16 11:53:27 UTC
Well, I have discovered something, maybe. 
I have a bug with waterfox alpha here: https://github.com/MrAlex94/Waterfox/issues/1057
I have noticed right now that changing workspaces caused the waterfox issue. After a bit of testing I can say that, perhaps, changing the power states AC > Battery, or vice-versa seems to cause kwin to hang pretty bad. Therefore, I logged out, than I logged back in. After I got the wifi notification kwin was able to switch workspaces as intended, but 2-3 sec later my fans start spinning and kwin went all snail again. 

Also, changing from workspace 1 > 2 is really slow, but if I go from 2 to 1 is pretty close to how is supposed to be. I am not sure how small is the time window in which I can change from 2 to 1 and still be fast.
Comment 13 Vlad Zahorodnii 2023-01-24 12:58:08 UTC
Is it still an issue in 5.27?
Comment 14 Bug Janitor Service 2023-02-08 03:53:19 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 15 Bug Janitor Service 2023-02-23 03:45:48 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!