Bug 486624 - Mounting drives increases CPU usage until hitting 100%
Summary: Mounting drives increases CPU usage until hitting 100%
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: Disks & Devices widget (other bugs)
Version First Reported In: 6.0.2
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-05 12:06 UTC by Maarten Steevens
Modified: 2024-06-04 03:45 UTC (History)
1 user (show)

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


Attachments
Screenshot showing plasmashell at 103% cpu usage. Usually it's somewhere around 1%. (21.01 KB, image/png)
2024-05-05 12:06 UTC, Maarten Steevens
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maarten Steevens 2024-05-05 12:06:53 UTC
Created attachment 169212 [details]
Screenshot showing plasmashell at 103% cpu usage. Usually it's somewhere around 1%.

SUMMARY
I have been playing around with microcontrollers such as the Raspberry Pi Pico recently and noticed that every time I plug in the board and mount it to flash a new uf2 file my cpu usage increases. After mounting it several times to flash new builds the cpu usage increases to 100% percent making plasma practically unusable. At that point I restart plasmashell and then the cycle begins again until it reaches 100%. So it appears that plasma is maybe not really keeping track of the device disappearing upon it being flashed causing it to keep track of many devices that are no longer there?

STEPS TO REPRODUCE
Not sure how reproducable this will be but it happens every time on my system.
1. Mount a USB mass storage device (in my case the Raspberry Pi Pico)
2. Place a uf2 file on the board resulting in it disappearing  (Maybe just unplugging will also work, but I feel like the disappearing part might actually be what causes the issue with plasma keeping track of a device that's no longer there.)
3. Unplug and mount again
4. Go back to step 1, repeat this for a while

OBSERVED RESULT
The cpu usage of plasmashell will be 100%.

EXPECTED RESULT
No increase in cpu usage, cpu usage should not increase when mounting devices and later unmounting  them.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
Operating System: KDE neon 6.0
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.5.0-25-generic (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-8565U CPU @ 1.80GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: HP
Product Name: HP ProBook 450 G6
Comment 1 Nate Graham 2024-05-05 21:33:02 UTC
Sounds like you're a developer; can you profile plasmashell and see what's going on? You can use the Hotspot app to attach to plasmashell and record what it's doing for a few seconds when it's at 100% CPU, then look at the flame graph to see where it's spending all of its time. If you're having a hard time interpreting the graph, you can save the .perfparser file and attach it here.
Comment 2 Bug Janitor Service 2024-05-20 03:45:22 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 3 Bug Janitor Service 2024-06-04 03:45:49 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!