Bug 406918 - Freeze on certain effects (NVidia)
Summary: Freeze on certain effects (NVidia)
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 5.15.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-26 11:14 UTC by Allan Sandfeld
Modified: 2023-02-24 03:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Kwin support info (6.01 KB, text/plain)
2019-04-26 11:21 UTC, Allan Sandfeld
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Allan Sandfeld 2019-04-26 11:14:11 UTC
Certain screen edge effects: Tiling a window, triggering Desktop Grid, and mouse-over on a window in Present Windows (before it zooms in a little), causes KWin to freeze for ~10s before resuming. Doing the same effect immediately after has no such stall, but doing it again a few minutes later will have the stall once more.

Has only been observed with proprietary NVidia drivers. With both OpenGL 2.0 and 3.1 backends.

Using KDE stable from kdesrc-build, and Qt 5.13 from git. Has been observed for a few months. Kwin produces no relevant console log output.
Comment 1 Vlad Zahorodnii 2019-04-26 11:18:05 UTC
Can you post output of qdbus org.kde.KWin /KWin supportInformation ?
Comment 2 Allan Sandfeld 2019-04-26 11:21:56 UTC
Created attachment 119649 [details]
Kwin support info
Comment 3 Vlad Zahorodnii 2019-04-26 12:25:38 UTC
Argh, support information for desktop grid doesn't include information I'm interested in.

Anyways, if you uncheck "Show buttons to alter count of virtual desktops" in Desktop Grid settings and "Provide buttons to close the windows" in Present Windows settings, does KWin freeze when either one of those effects is active?
Comment 4 Allan Sandfeld 2019-04-26 13:24:11 UTC
Yes disabling those two options for those effects fixes the issue for them.
Comment 5 Vlad Zahorodnii 2019-04-26 13:30:44 UTC
Okay, it looks this is a duplicate of bug 406180.
Comment 6 Vlad Zahorodnii 2019-04-26 13:31:21 UTC
Do you build KWin from source code?
Comment 7 Allan Sandfeld 2019-04-26 13:32:26 UTC
Yes, I use kdesrc-build. I can also patch and build separately if you want to test something
Comment 8 David Edmundson 2019-04-26 13:46:37 UTC
To temporarily fix your issue you can revert 22a441e071515e9c630f3bdac743c678052f88be

But given you can reproduce, it would be great if you can help investigate.

We deadlock in
#6  0x00007f7579c88750 in QOpenGLContext::swapBuffers(QSurface*) () at /usr/lib/libQt5Gui.so.5
After a QtQuick render.

(DesktopGrid is using QtQuick for the buttons on the bottom)

This happens when env var "__GL_MaxFramesAllowed" is set to 1
Which we do to work round a kwin timing expectation.

Can you see if this we get the freeze with an animation in qmlscene?
Comment 9 Allan Sandfeld 2019-04-26 15:16:04 UTC
I can't see that deadlock when breaking in gdb, but if I enable debug logging for qt.scenegraph.time.renderloop I get output like this:

qt.scenegraph.renderloop:                     (RT) - rendering started
qt.scenegraph.renderloop:                     (RT) - rendering done
qt.scenegraph.renderloop:                     (RT) - wake Gui after initial expose
qt.scenegraph.time.renderloop: Frame rendered with 'threaded' renderloop in 13148ms, sync=0, render=0, swap=13148 - (on render thread)

So it waits 13 seconds apperently doing gl->swapBuffer()
Comment 10 David Edmundson 2019-04-28 22:19:49 UTC
> I can't see that deadlock when breaking in gdb

It'll be blocking in the render thread. Thread 0 will be polling on that.
Comment 11 Allan Sandfeld 2019-04-29 07:00:53 UTC
(In reply to David Edmundson from comment #10)
> > I can't see that deadlock when breaking in gdb
> 
> It'll be blocking in the render thread. Thread 0 will be polling on that.

None of the threads were blocking, but I was running it in the ALT+2 terminal, so perhaps it unblocked whenever I changed screens. I couldn't run it in X11 as everything freezes when the issue happens.
Comment 12 David Edmundson 2019-05-08 19:05:41 UTC
Could you test kwin with https://phabricator.kde.org/P385
Comment 13 Vlad Zahorodnii 2023-01-25 12:39:35 UTC
Is it still an issue in 5.26 or 5.27?
Comment 14 Bug Janitor Service 2023-02-09 03:53:28 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-24 03:45:44 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!