Bug 435123 - Plasmashell stops receiving mouse events temporarily when taking screenshots with bn flags
Summary: Plasmashell stops receiving mouse events temporarily when taking screenshots ...
Status: RESOLVED DUPLICATE of bug 425385
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 20.12.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-29 16:59 UTC by irchaika
Modified: 2021-05-18 19:00 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
video showing the issue (1.13 MB, video/mp4)
2021-04-01 20:59 UTC, irchaika
Details
stack trace from coredumpctl (10.84 KB, text/plain)
2021-04-01 22:59 UTC, irchaika
Details

Note You need to log in before you can comment on or make changes to this bug.
Description irchaika 2021-03-29 16:59:09 UTC
SUMMARY
When taking screenshots using -bn (or more, like -abn) plasmashell (and latte-dock as well) will stop responding to mouse events, it won't react to hover nor click events (I can still switch programs by alt tabbing during this,so it's not the whole ui being frozen), this lasts for around 4 seconds in my hardware, if it happens to others it might disappear fast enough they don't notice on their hardware.

STEPS TO REPRODUCE
1. take a screenshot with spectacle by using at least the -bn flags.

OBSERVED RESULT
plasmashell stops responding to mouse events for ~4 seconds.

EXPECTED RESULT
plasmashell doesn't freeze at all.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 5.11.6
(available in About System)
KDE Plasma Version: 5.21.3
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
the issue doesn't happen with spectacle -b nor spectacle -n, it only happens with at least both being used at the same time.
Comment 1 Nate Graham 2021-03-31 18:05:43 UTC
Works for me.
Comment 2 irchaika 2021-04-01 20:59:30 UTC
Created attachment 137251 [details]
video showing the issue

Attached a video showing the issue:
-That plasmashell "freezes" for a few seconds with "spectacle -nb"
-That while "frozen" it won't react to mouse over and mouse click events
-That if we clicked a program while it was "frozen", plasma would switch focus to that program after it unfreezes
-That while it's frozen we can still use alt+tab to change focus, to show that it's plasmashell and not everything that's frozen

I should have also noted in the original comment that this issue happens under XORG, I don't know if this issue happens under wayland, but if I test it I'll add a comment about it.
Comment 3 Nate Graham 2021-04-01 22:50:05 UTC
Is kinit crashing in the background? Does `coredumpctl` show any new crashes after the freeze?
Comment 4 irchaika 2021-04-01 22:59:14 UTC
Created attachment 137252 [details]
stack trace from coredumpctl

There were indeed 2 kdeinit5 crashes from the time I did the recording, however, taking more screenshots now doesn't cause further crashes despite still freezing.
Comment 5 Nate Graham 2021-04-01 23:01:47 UTC
Aha! In that case this is the same issue as in Bug 430862, which is already fixed in Frameworks 5.81. :)

*** This bug has been marked as a duplicate of bug 430862 ***
Comment 6 irchaika 2021-04-01 23:17:10 UTC
(In reply to Nate Graham from comment #5)
> Aha! In that case this is the same issue as in Bug 430862, which is already
> fixed in Frameworks 5.81. :)
> 
> *** This bug has been marked as a duplicate of bug 430862 ***

Seems weird that it only happens with the -bn flags. However, I'll keep an eye on my framework version and confirm either way if the problem stops or keeps happening when I get 5.81
Comment 7 Nate Graham 2021-04-01 23:39:31 UTC
It's the same issue. :)

*** This bug has been marked as a duplicate of bug 430862 ***
Comment 8 irchaika 2021-05-11 07:56:23 UTC
I believe this was wrongfully marked as duplicate, the thumbnailer crash must have been a red herring and caused by something else, because plasma framework 5.82 fixed that, but the freezing still persists, what remains on the log is the following: kwin_x11[549]: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 60217, resource id: 41953893, major code: 73 (GetImage), minor code: 0

Additionally, spectacle was set to store pics on webp (90% quality), but setting it to use png has the problem disappear.

So to reproduce this webp should be set as the image format along with using the -bn flags.
Comment 9 Nate Graham 2021-05-11 14:42:00 UTC
Cannot reproduce the issue when invoking spectacle with -bn with the image format set to webp
Comment 10 irchaika 2021-05-11 17:07:01 UTC
I guess I can't discount that it could be related to graphics drivers, so just in case I have an AMD card a using mesa 21.1 with it (though it'd have affected mesa 20 at the very least, too). It's also possible that faster computers can "recover" from this fast enough it's not noticeable to the user, as my CPU is from 2008.
Comment 11 Antonio Prcela 2021-05-17 21:54:30 UTC
I think this is very similar to https://bugs.kde.org/show_bug.cgi?id=425385
And I can reproduce it. Tho I can't tell if it's something caused by spectacle alone or something else that's going on in the background..
Comment 12 Nate Graham 2021-05-18 19:00:40 UTC
Ah yup, looks like a duplicate indeed.

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