Bug 428195 - System Tray triggers constant repaints on Wayland
Summary: System Tray triggers constant repaints on Wayland
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray widget (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2020-10-24 19:52 UTC by Martin Flöser
Modified: 2020-12-12 06:58 UTC (History)
4 users (show)

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


Attachments
Wayland debug output (360.74 KB, text/plain)
2020-10-25 09:55 UTC, Martin Flöser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Flöser 2020-10-24 19:52:33 UTC
I observed very high cpu usage in kwin_wayland. Investigation with the show paint effect showed that KWin is constantly repainting the complete screen. By closing all application windows I could identify plasmashell as the offender (also high cpu usage but lower than kwin and confirmed by killing and restarting plasmashell). By making the panel auto-hide I could end the constant repaint, as soon as the panel is visible, one can observe the constant repaints again.

I added an empty panel and added plasmoids untill the problem started and could identify SystemTray. 


STEPS TO REPRODUCE
1. Enable show paint effect
2. Make plasma panel autohide
3. hide/show panel

OBSERVED RESULT

the show paint effect shows constant repaint when enabled, which ends as soon as auto-hide gets enabled, restarts when shown.

EXPECTED RESULT

My notebook doesn't burn my legs :-)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon Unstable Edition
(available in About System)
KDE Plasma Version: 5.20.80
KDE Frameworks Version: 5.75
Qt Version: 5.15.0

ADDITIONAL INFORMATION

Obviously a Wayland system. When starting Plasma it takes a few seconds till the Problem emerges, the same is the case when adding system tray to a panel.

If you have any question, please let me know.

Items shown in systray:
* Discover
* keepassx
* owncloud
* telegram
* yakuake
* night-color
* klipper
* battery monitor
* audio
* network manager
Comment 1 Konrad Materka 2020-10-24 22:29:58 UTC
Hi, if that is the System Tray, it might be one applet/application that is causing repaints. Can you disable all applets (from System Tray settings) and close all applications, then run one by one?
Comment 2 David Edmundson 2020-10-24 23:11:11 UTC
Does

QSG_VISUALIZE=changes plasmashell --replace     

tell use anything?

It's effectively client side show paint
Comment 3 Martin Flöser 2020-10-25 09:50:02 UTC
(In reply to David Edmundson from comment #2)
> Does
> 
> QSG_VISUALIZE=changes plasmashell --replace     
> 
> tell use anything?

Nothing repaints...

(In reply to Konrad Materka from comment #1)
> Hi, if that is the System Tray, it might be one applet/application that is
> causing repaints. Can you disable all applets (from System Tray settings)
> and close all applications, then run one by one?
yep, none is causing it.
Comment 4 Martin Flöser 2020-10-25 09:55:54 UTC
Created attachment 132718 [details]
Wayland debug output

Run with WAYLAND_DEBUG=1 - we can nicely see the constant repaints.
Comment 5 Nate Graham 2020-10-26 14:48:50 UTC
Cannot reproduce on X11 FWIW.
Comment 6 Vlad Zahorodnii 2020-10-31 21:28:58 UTC
Can confirm this issue. I found that disabling the bluetooth applet reduces the number of draw calls issued by latte-dock.
Comment 7 Vlad Zahorodnii 2020-10-31 21:30:50 UTC
What's even more weird is that if I disable and then enable the bluetooth applet the number of repaints drops down to reasonable values.
Comment 8 Vlad Zahorodnii 2020-10-31 21:32:43 UTC
... and stays at that level.
Comment 9 Konrad Materka 2020-10-31 22:09:43 UTC
(In reply to Martin Flöser from comment #3)
> yep, none is causing it.
Do I understand correctly, that even if you disable all applets and close all applications (s) just empty System Tray), it still causes constant repaints?

(In reply to Vlad Zahorodnii from comment #6)
> Can confirm this issue. I found that disabling the bluetooth applet reduces
> the number of draw calls issued by latte-dock.
Latte dock uses it's own fork of system tray, please report any issues with Latte in a separate bug report and assign it to correct product/component.
Comment 10 Martin Flöser 2020-11-01 09:21:25 UTC
(In reply to Konrad Materka from comment #9)
> (In reply to Martin Flöser from comment #3)
> > yep, none is causing it.
> Do I understand correctly, that even if you disable all applets and close
> all applications (s) just empty System Tray), it still causes constant
> repaints?

I disabled one after another, checked whether it changed the state and then re-enabled it. So I never was in a state with empty System Tray.

Currently (after a system restart) I am not able to reproduce. I'm monitoring the situation to notice when it happens again.
Comment 11 Vlad Zahorodnii 2020-11-01 09:31:10 UTC
(In reply to Konrad Materka from comment #9)
> Latte dock uses it's own fork of system tray, please report any issues with
> Latte in a separate bug report and assign it to correct product/component.

Disabling bluetooth applet also results in lower number of repaints when using plasma's default panel.
Comment 12 David Edmundson 2020-12-09 14:16:00 UTC
@Martin can you confirm if this is still an issue.

Around this time we found an issue with invisible busy indicators causing repaints which was fixed.
Comment 13 Martin Flöser 2020-12-12 06:58:01 UTC
I didn't observe the problem lately. So I assume it was the invisible spinner, which would match my observation as I couldn't blame any individual item.