Bug 407196 - plasmashell wakes up a lot (eating CPU and battery) on stock configuration
Summary: plasmashell wakes up a lot (eating CPU and battery) on stock configuration
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) widget (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-03 21:02 UTC by Sebastian Krzyszkowiak
Modified: 2022-08-04 04:35 UTC (History)
4 users (show)

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


Attachments
strace (527.42 KB, image/png)
2019-05-04 23:16 UTC, Sebastian Krzyszkowiak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Krzyszkowiak 2019-05-03 21:02:31 UTC
SUMMARY

Seems like Application Launcher widget is somewhat responsible for elevated CPU (and battery) usage on plasmashell.

STEPS TO REPRODUCE
1. Run a vanilla clean Plasma session.
2. Wait a but until everything finishes launching and becomes idle.
3. Attach strace to a running plasmashell process ("sudo strace -f -p `pidof plasmashell`")

OBSERVED RESULT
Lots of repeated polls with timeout values less than 20ms, easily eating significant amounts of CPU (around 5% here).

EXPECTED RESULT
Some occasional polls, plasmashell achieving <1% CPU usage when idle.

--------------------------------------
Afterwards (additional info gathered when investigating):

STEPS TO REPRODUCE
1. Remove Application Launcher widget from the default panel.
2. Add it back.

OBSERVED RESULT
plasmashell becomes way more CPU friendly.

--------------------------------------

STEPS TO REPRODUCE
1. Restart plasmashell.

OBSERVED RESULT
plasmashell becomes CPU hungry again.

EXPECTED RESULT
plasmashell should still be CPU friendly.

--------------------------------------

STEPS TO REPRODUCE
1. Remove Application Launcher.
2. (optionally) Add Application Menu.
3. Restart plasmashell.

OBSERVED RESULT
Plasma is still CPU friendly 

SOFTWARE/OS VERSIONS

Tested with latest (2019-05-03) Neon Developer Edition ISO.

ADDITIONAL INFORMATION

All the steps above suggest that something is wrong with Application Launcher widget, but only when it's loaded together with Plasma and/or panel (adding it with a default panel causes the same result as restarting whole Plasma).
Comment 1 David Edmundson 2019-05-04 20:53:40 UTC
Not here. A bunch from the rendering every few seconds. Nothing special.

Can you paste a small snippet of your 

"sudo strace -f -p `pidof plasmashell`" output
Comment 2 Sebastian Krzyszkowiak 2019-05-04 23:16:38 UTC
Created attachment 119845 [details]
strace

A freshly booted Neon ISO in a virtual machine. The same thing I observed locally on my Arch with stable Plasma.
Comment 3 Sebastian Krzyszkowiak 2019-05-04 23:19:46 UTC
Since 15-16 ms timeouts suggest that it's likely some rendering loop, let me add that I use Intel Mesa drivers on Arch and llvmpipe in the VM, if that makes any difference.
Comment 4 Bug Janitor Service 2019-05-19 04:33:08 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 5 Sebastian Krzyszkowiak 2019-05-19 17:13:12 UTC
Updating the status (info already provided above).
Comment 6 David Edmundson 2019-05-19 20:41:52 UTC
I did reproduce it on a VM.
There's something animating in the hidden window. I don't know what. 

Possibly (yet more) fallout from b257029afc3bfcd6366d2c2b910b8d91403ab8aa ?

I can't reproduce on my dev machines where I can just attach the QML debugger.
Comment 7 Nate Graham 2021-01-07 19:07:26 UTC
Can you see if this is fixed with the new Kickoff UI in Plasma 5.21 (currently in git master)? A lot of this code was rewritten which means there's a chance it got fixed in the process.

Thanks!
Comment 8 Bug Janitor Service 2021-01-22 04:33:16 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 9 Sebastian Krzyszkowiak 2021-01-23 17:48:37 UTC
Just booted neon-unstable-20210122-1501.iso in a VM (using gnome-boxes) and it's still happening straight out-of-box until I edit the panel and remove Application Launcher.

It's easily reproducible and super simple to check by anyone with "sudo strace -f -p `pidof plasmashell`".
Comment 10 Mikel Johnson 2021-01-25 07:34:50 UTC
Does this happen with other launchers as well (kicker, kickerdash)?
Comment 11 valdikss 2021-08-19 21:11:14 UTC
I can reproduce this issue right after reboot. Sometimes just opening Application Lanucher fixes polling spam, sometimes it's not.

Other launchers (Application Dashboard and Application Menu) does not have this issue.

I'm running the release version of Plasma, this may be already fixed in https://bugs.kde.org/show_bug.cgi?id=433103#c15


Operating System: Fedora 34
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2
Kernel Version: 5.13.10-200.fc34.x86_64 (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i7-2640M CPU @ 2.80GHz
Memory: 7,6 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 3000
Comment 12 Nate Graham 2022-07-05 16:42:58 UTC
Is it fixed now for you in Plasma 5.24, 5.25, or git master?
Comment 13 Bug Janitor Service 2022-07-20 04:36: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 14 Bug Janitor Service 2022-08-04 04:35:32 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!