Bug 510681 - Starting Discover wakes up all the drives in the system (all drives spun-up from suspend)
Summary: Starting Discover wakes up all the drives in the system (all drives spun-up f...
Status: REPORTED
Alias: None
Product: Discover
Classification: Applications
Component: discover (other bugs)
Version First Reported In: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: efficiency-and-performance
Depends on:
Blocks:
 
Reported: 2025-10-16 12:44 UTC by Vaclav Fiala
Modified: 2025-11-05 17:09 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vaclav Fiala 2025-10-16 12:44:20 UTC
SUMMARY
Each time Discover is started it first wakes / spins-up all the drives in the system. This delays its startup, increases power usage / noise levels and wears out the drives.

STEPS TO REPRODUCE
1. Put at least one drive you are currently not using in a standby mode, for example using:
  hdparm -y /dev/<drive_name>
2. Make sure the drive is in standby mode. You can use:
  smartctl -n standby,1 -a /dev/<drive_device_name> 2> /dev/null
3.  Start Discover

OBSERVED RESULT
All the drives are spun up.
You can observe that it was spun for example by again using:
smartctl -n standby,1 -a /dev/<drive_device_name> 2> /dev/null


EXPECTED RESULT
Only paths that need to be accessed should be affected. Definitely not data drives which are never used for SW installs.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Fedora release 42 (Adams)
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 5.116.0
Qt Version: 5.15.17


ADDITIONAL INFORMATION
Comment 1 Nate Graham 2025-10-20 16:55:26 UTC
It's definitely not doing that on purpose. The symptoms suggest that it's doing a lot of disk read activity on launch.

Can you do some debugging to find out what it's trying to access?
Comment 2 Bug Janitor Service 2025-11-04 03:47:48 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Vaclav Fiala 2025-11-05 17:09:37 UTC
Sorry about the delay. I was waiting to get Plasma 6.5 on Fedora to make sure I'm not reporting on something that has been already fixed. Just confirmed it's still present on my system using 6.5.1.

Used strace to find out what is it trying to open ( strace -ff -tt -e trace=%file,%desc plasma-discover ), but so far no luck. I suspect the culprit is not plasma-discover directly, but another process it's communicating with over D-Bus or so.

Right before the "hang" there was a bunch of poll calls (you can see the "hang" at 10:47:25.186699) :

[pid 3284674] 10:47:25.177047 ppoll([{fd=38, events=POLLIN}], 1, NULL, NULL, 8 <unfinished ...>
[pid 3284710] 10:47:25.177079 <... read resumed>, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 3284710] 10:47:25.177147 ppoll([{fd=20, events=POLLIN}, {fd=21, events=POLLIN}, {fd=36, events=POLLIN}], 3, NULL, NULL, 8 <unfinished ...>
[pid 3284718] 10:47:25.177682 write(38, "\1\0\0\0\0\0\0\0", 8 <unfinished ...>
[pid 3284674] 10:47:25.178192 <... ppoll resumed>) = 1 ([{fd=38, revents=POLLIN}])
[pid 3284718] 10:47:25.178235 <... write resumed>) = 8
[pid 3284674] 10:47:25.179173 read(38, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 3284674] 10:47:25.179751 write(21, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 3284674] 10:47:25.179898 write(21, "\1\0\0\0\0\0\0\0", 8 <unfinished ...>
[pid 3284710] 10:47:25.179954 <... ppoll resumed>) = 1 ([{fd=21, revents=POLLIN}])
[pid 3284674] 10:47:25.180074 <... write resumed>) = 8
[pid 3284710] 10:47:25.180239 read(21, "\2\0\0\0\0\0\0\0", 8) = 8
[pid 3284674] 10:47:25.180507 write(21, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 3284674] 10:47:25.180773 write(21, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 3284674] 10:47:25.181106 write(21, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 3284674] 10:47:25.181417 ppoll([{fd=38, events=POLLIN}], 1, {tv_sec=24, tv_nsec=999982000}, NULL, 8 <unfinished ...>
[pid 3284710] 10:47:25.181722 ppoll([{fd=20, events=POLLIN}, {fd=21, events=POLLIN}, {fd=36, events=POLLIN}], 3, {tv_sec=0, tv_nsec=0}, NULL, 8) = 2 ([{fd=21, revents=POLLIN}, {fd=
[pid 3284710] 10:47:25.181870 read(21, "\3\0\0\0\0\0\0\0", 8) = 8
[pid 3284710] 10:47:25.182009 write(21, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 3284710] 10:47:25.182211 poll([{fd=36, events=POLLIN}], 1, 0) = 1 ([{fd=36, revents=POLLIN}])
[pid 3284710] 10:47:25.182424 write(21, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 3284710] 10:47:25.182560 write(21, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 3284710] 10:47:25.182859 ppoll([{fd=20, events=POLLIN}, {fd=21, events=POLLIN}], 2, {tv_sec=0, tv_nsec=0}, NULL, 8) = 1 ([{fd=21, revents=POLLIN}], left {tv_sec=0, tv_nsec=0})
[pid 3284710] 10:47:25.183029 read(21, "\3\0\0\0\0\0\0\0", 8) = 8
[pid 3284710] 10:47:25.183249 poll([{fd=36, events=POLLIN}], 1, 0) = 1 ([{fd=36, revents=POLLIN}])
[pid 3284710] 10:47:25.183617 ppoll([{fd=20, events=POLLIN}, {fd=21, events=POLLIN}], 2, {tv_sec=0, tv_nsec=0}, NULL, 8) = 0 (Timeout)
[pid 3284710] 10:47:25.183773 poll([{fd=36, events=POLLIN}], 1, 0) = 1 ([{fd=36, revents=POLLIN}])
[pid 3284710] 10:47:25.184130 ppoll([{fd=20, events=POLLIN}, {fd=21, events=POLLIN}], 2, {tv_sec=0, tv_nsec=0}, NULL, 8) = 0 (Timeout)
[pid 3284710] 10:47:25.184355 poll([{fd=36, events=POLLIN}], 1, 0) = 1 ([{fd=36, revents=POLLIN}])
[pid 3284710] 10:47:25.184740 ppoll([{fd=20, events=POLLIN}, {fd=21, events=POLLIN}], 2, {tv_sec=0, tv_nsec=0}, NULL, 8) = 0 (Timeout)
[pid 3284710] 10:47:25.184910 poll([{fd=36, events=POLLIN}], 1, 0) = 1 ([{fd=36, revents=POLLIN}])
[pid 3284710] 10:47:25.185134 ppoll([{fd=20, events=POLLIN}, {fd=21, events=POLLIN}], 2, {tv_sec=0, tv_nsec=0}, NULL, 8) = 0 (Timeout)
[pid 3284710] 10:47:25.185334 poll([{fd=36, events=POLLIN}], 1, 0) = 1 ([{fd=36, revents=POLLIN}])
[pid 3284710] 10:47:25.185539 ppoll([{fd=20, events=POLLIN}, {fd=21, events=POLLIN}], 2, {tv_sec=0, tv_nsec=0}, NULL, 8) = 0 (Timeout)
[pid 3284710] 10:47:25.185684 poll([{fd=36, events=POLLIN}], 1, 0) = 1 ([{fd=36, revents=POLLIN}])
[pid 3284710] 10:47:25.185894 ppoll([{fd=20, events=POLLIN}, {fd=21, events=POLLIN}], 2, {tv_sec=0, tv_nsec=0}, NULL, 8) = 0 (Timeout)
[pid 3284710] 10:47:25.186120 poll([{fd=36, events=POLLIN}], 1, 0) = 0 (Timeout)
[pid 3284710] 10:47:25.186281 write(21, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 3284710] 10:47:25.186427 ppoll([{fd=20, events=POLLIN}, {fd=21, events=POLLIN}, {fd=36, events=POLLIN}], 3, NULL, NULL, 8) = 1 ([{fd=21, revents=POLLIN}])
[pid 3284710] 10:47:25.186572 read(21, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 3284710] 10:47:25.186699 ppoll([{fd=20, events=POLLIN}, {fd=21, events=POLLIN}, {fd=36, events=POLLIN}], 3, NULL, NULL, 8 <unfinished ...>
[pid 3284718] 10:47:40.680070 +++ exited with 0 +++
[pid 3284674] 10:47:50.206331 <... ppoll resumed>) = 0 (Timeout)
[pid 3284674] 10:47:50.206708 write(38, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 3284674] 10:47:50.209638 write(21, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 3284674] 10:47:50.209796 write(21, "\1\0\0\0\0\0\0\0", 8 <unfinished ...>
[pid 3284710] 10:47:50.209830 <... ppoll resumed>) = 1 ([{fd=21, revents=POLLIN}])
[pid 3284674] 10:47:50.209907 <... write resumed>) = 8
[pid 3284710] 10:47:50.210019 read(21, "\2\0\0\0\0\0\0\0", 8) = 8
[pid 3284674] 10:47:50.210233 write(21, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 3284674] 10:47:50.210547 close(38) = 0
[pid 3284674] 10:47:50.210783 write(5, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 3284710] 10:47:50.210867 ppoll([{fd=20, events=POLLIN}, {fd=21, events=POLLIN}, {fd=36, events=POLLIN}], 3, {tv_sec=0, tv_nsec=0}, NULL, 8 <unfinished ...>
[pid 3284674] 10:47:50.210979 write(2, "Fwupd Error 24 Chyba p\305\231i vol\303\241n"..., 105 <unfinished ...>
[pid 3284710] 10:47:50.211017 <... ppoll resumed>) = 2 ([{fd=21, revents=POLLIN}, {fd=36, revents=POLLIN}], left {tv_sec=0, tv_nsec=0})
Fwupd Error 24 Chyba při volání StartServiceByName pro org.freedesktop.fwupd: Časový limit vypršel
[pid 3284674] 10:47:50.211104 <... write resumed>) = 105
[pid 3284710] 10:47:50.211176 read(21, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 3284710] 10:47:50.211271 write(21, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 3284674] 10:47:50.211366 access("/run/ostree-booted", F_OK) = -1 ENOENT (Adresář nebo soubor neexistuje)
[pid 3284710] 10:47:50.211526 poll([{fd=36, events=POLLIN}], 1, 0) = 1 ([{fd=36, revents=POLLIN}])
[pid 3284710] 10:47:50.211778 write(21, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 3284710] 10:47:50.211860 write(21, "\1\0\0\0\0\0\0\0", 8 <unfinished ...>
[pid 3284674] 10:47:50.211895 write(2, "org.kde.plasma.libdiscover: Disc"..., 71 <unfinished ...>
org.kde.plasma.libdiscover: Discarding invalid backend "fwupd-backend"
[pid 3284710] 10:47:50.211931 <... write resumed>) = 8
[pid 3284674] 10:47:50.211956 <... write resumed>) = 71



Any suggestions how to continue with the investigation (useful tools etc)?

Did anyone try to replicate this (on Fedora & outside)?