Bug 434051 - Plasma freezes when opening applets' pop-ups while any app windows are open
Summary: Plasma freezes when opening applets' pop-ups while any app windows are open
Status: RESOLVED DOWNSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-performance (show other bugs)
Version: 5.21.2
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-06 09:19 UTC by Hugues Morisset
Modified: 2021-04-30 22:27 UTC (History)
2 users (show)

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


Attachments
glxinfo (160.61 KB, text/plain)
2021-03-06 09:19 UTC, Hugues Morisset
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hugues Morisset 2021-03-06 09:19:05 UTC
Created attachment 136429 [details]
glxinfo

SUMMARY
Panel freeze multiple seconds on actions

STEPS TO REPRODUCE
1. Click any widgets on the panel 
2. widget popup opens
3. panel and widget is freeze for multiple seconds 
4. The freeze also happens on widget closing

OBSERVED RESULT
I have the panel's clock configured to display seconds, and can clearly see the freeze happening. 

I used perf (`perf record -o /tmp/perf --call-graph dwarf --sample-cpu --pid $(pidof plasmashell`)
)
to see the flamegraph: https://ibb.co/BgyB7ft

So the problem seems to be with transparency and maybe a regression in libQt?



EXPECTED RESULT
Smooth usage


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

ADDITIONAL INFORMATION
Same freeze also happens with compositor disable

One CPU gets 100% usage during freeze

I've not been able to test with transparency/blur deactivated I didn't find where the option is, if someone got this information, I'm willing to test
Comment 1 Nate Graham 2021-03-08 19:16:18 UTC
What's using up all the CPU? Plasmashell? KWin? Something else?
Comment 2 Hugues Morisset 2021-03-08 20:29:31 UTC
Plasmashell process is using 100% of one core.

It sometimes also happens that it freeze on some notification pop-up, particularly file copy making dolphin also freeze until the pop-up appears. But kdeconnect or spotify notifications are fine.
Comment 3 Nate Graham 2021-03-20 01:31:14 UTC
Cannot reproduce FWIW. Does it only happen for panel applets? Or does it also happen when you click on a small desktop applet and it opens its pop-up?
Comment 4 Hugues Morisset 2021-03-20 09:19:46 UTC
In testing with desktop applet, it seems that it happens only when there is a window in the background, when opening an applet from the panel with only desktop image in the background no freeze happen.

I made a short screen record so it's clearer, you can see when plasmashell freezes with the clock at the top

https://streamable.com/ey1tug
Comment 5 Nate Graham 2021-03-20 20:01:55 UTC
Thanks, that's interesting for sure. I can clearly see the issue in your screen recording.

Does the window have to be maximized to trigger the issue? Or covering the area where the pop-up will appear? Or does it happen when the window appears anywhere else? Also does this only happen with KDE app windows, or from GNOME/GTK or Electron app windows?
Comment 6 Hugues Morisset 2021-03-21 09:22:08 UTC
Thanks a lot for your interest on this issue

Here another screen recording where I try suggestions you made https://streamable.com/xopt4f

Indeed, it doesn't happen if there is no window under the pop-up.
I don't really see any window type pattern :/

Also, I failed to mention that I made the previous video with krohnkite enable which I disabled for this one.
Comment 7 Nate Graham 2021-03-21 11:16:16 UTC
Does it ever happen at all when krohnkite is disabled?
Comment 8 Hugues Morisset 2021-03-21 11:30:04 UTC
Yep the second video as krohnkite disabled
Comment 9 Bug Janitor Service 2021-04-05 04:33:29 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 10 Hugues Morisset 2021-04-30 22:27:35 UTC
Hello, I've been able to fix the issues, it was actually caused by https://github.com/psifidotos/applet-window-buttons

There is a similar issue on the project https://github.com/psifidotos/applet-window-buttons/issues/123 which describe the problems I have

By disabling `Draw buttons inactive state when needed` option is instantly fixed the performance issue.