Summary: | Mounting a removable disk (BTFS / EXT4) systematically forces a very long scan, leading to a timeout | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Sigmund <qwe2968> |
Component: | Disks & Devices widget | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | 4wy78uwh, bogdan.onofriuchuk, godlike64, groszdanielpub, hartmann.christian, ipominov, kde, mahen, martin.schnitkemper, moyamat555, nate, norbert, s_chriscollins, wenzezlaus |
Priority: | NOR | Keywords: | efficiency-and-performance, regression |
Version First Reported In: | 6.4.0 | ||
Target Milestone: | 1.0 | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/plasma-workspace/-/commit/a30f314d9fe646080f314f2070489ec897467c43 | Version Fixed In: | 6.5.0 |
Sentry Crash Report: | |||
Attachments: |
It is slow.
Logs of devicenotifier. workaround |
It seems it's due to the new feature of checking disks for errors by default. For me it either outright fails or has an error message like An error occurred while accessing 'LinuxDisk', the system responded: An unspecified error has occurred: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. After trying twice, it ultimately succeeds, despite the errors. Can you collect the logs please, because I don't have any disks. 1. In terminal execute: QT_LOGGING_RULES="org.kde.applets.devicenotifier=true" plasmawindowed org.kde.plasma.devicenotifier &> log.txt 2. Reproduce the bug 3. stop the process in terminal 4. attach the file log.txt here Created attachment 182481 [details]
Logs of devicenotifier.
Add logs.
Looks like this is expected behavior. Before mounting it checks the device for errors. The slowness of checking is proportional to the disk size and read speed. You have a 2Tb drive so that why it is so slow. The solution here would be to make the check operation optional. (In reply to Bogdan Onofriuchuk from comment #4) > Looks like this is expected behavior. Before mounting it checks the device > for errors. The slowness of checking is proportional to the disk size and > read speed. You have a 2Tb drive so that why it is so slow. The solution > here would be to make the check operation optional. Thanks. Hope it can be an optional choice. (In reply to Sigmund from comment #5) > (In reply to Bogdan Onofriuchuk from comment #4) > > Looks like this is expected behavior. Before mounting it checks the device > > for errors. The slowness of checking is proportional to the disk size and > > read speed. You have a 2Tb drive so that why it is so slow. The solution > > here would be to make the check operation optional. > > Thanks. > > Hope it can be an optional choice. Is it possible to disable the this check? But how A workaround is suggested. Open System settings -- > Connected devices --> Disks & Cameras --> Device actions", add new action by the button "Add", give it any non-existing name and then enter the data as shown in the screenshot attached. Use new action instead of "Mount" to mount the removable disk. Created attachment 182549 [details]
workaround
Sorry, no screenshot is attached in my previous comment
A workaround is suggested.
Open System settings -- > Connected devices --> Disks & Cameras --> Device actions", add new action by the button "Add", give it any non-existing name and then enter the data as shown in the screenshot attached.
Use new action instead of "Mount" to mount the removable disk.
Hi ! Same issue since the 6.4 upgrade, with an USB harddrive with ext 4 partitions. Actually, I have waited several minutes to no avail and had to reboot :-/ Is it really the expected behaviour ? For some reason, the check does not occur when mounting the partition through Dolphin. (pfew !) BTW, may I suggest the bug report name is changed accordingly, to something like : "Mounting a removable hadrrive (BTFS / EXT4) systematically forces a very long scan, leading to a timeout". I really wonder if that is the expected behaviour... I can confirm this behavior. Mounting a fully loaded 4TB external hard drive now takes four minutes, during that time I can hear the drive activity. After about a minute, I get a message saying I'm not authorized to mount the device. After the four minutes, I see in the log that the device has been mounted. This is new since version 6.4; before, mounting the device was done instantly, and when I mount the device on the console as root, it's done immediately. A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5624 Happens here too, with an almost full, 2 TB BTRFS hard disk. The extreme slowness is new. The btrfsck check takes 20 minutes. Mounting was somewhat slow earlier too (maybe half a minute); Idk if it's the plasma shell's behavior that changed, or perhaps the default operation of btrfsck became much slower, or perhaps Solid via udisks now reports that it can check the drive, while previously it couldn't. Also note that btrfsck doesn't even repair anything by default, its repair functionality is considered unsafe, while AFAIK btrfs automatically repairs errors that can be safely repaired when mounting, so btrfsck should be unnecessary. Perhaps a reasonable behavior would be to try mounting first, and only fsck (with no timeout) if mounting fails with an error that indicates that the file system is damaged, and then try to mount again. Even then, ideally only run fsck if the file system has an fsck tool that can safely repair some kinds of errors, otherwise just report that the file system is damaged (Idk if there's a way to get this information from udisks). Git commit a30f314d9fe646080f314f2070489ec897467c43 by Bohdan Onofriichuk. Committed on 14/07/2025 at 18:14. Pushed by littlesweet into branch 'master'. applets/devicenotifier: don't do check in mount action Don't do check in the mount action. Create another action for check. Also change the name of the mount action to just "mount" if check was done. M +1 -0 applets/devicenotifier/CMakeLists.txt A +82 -0 applets/devicenotifier/actions/checkaction.cpp [License: GPL(v2.0+)] C +5 -9 applets/devicenotifier/actions/checkaction.h [from: applets/devicenotifier/actions/mountaction.h - 059% similarity] M +8 -19 applets/devicenotifier/actions/mountaction.cpp M +0 -1 applets/devicenotifier/actions/mountaction.h M +10 -1 applets/devicenotifier/actionscontrol.cpp M +5 -2 applets/devicenotifier/devicemessagemonitor_p.cpp https://invent.kde.org/plasma/plasma-workspace/-/commit/a30f314d9fe646080f314f2070489ec897467c43 (In reply to Martin Schnitkemper from comment #11) > I can confirm this behavior. Mounting a fully loaded 4TB external hard drive > now takes four minutes, during that time I can hear the drive activity. > After about a minute, I get a message saying I'm not authorized to mount the > device. After the four minutes, I see in the log that the device has been > mounted. This is new since version 6.4; before, mounting the device was done > instantly, and when I mount the device on the console as root, it's done > immediately. Same here, but with a 4 TB drive on USB 2 it takes up to two hours. Has the default action "Mount and Open" changed lately to "*Always* do a check first and mount after" behavior? Does it ignore a 'clean' flag in partitions super block (if something like this exists)? more observations: https://discuss.kde.org/t/mounting-external-usb-disks-now-checks-before-mounting/37439/2 (In reply to Mahendra Tallur from comment #9) > For some reason, the check does not occur when mounting the partition > through Dolphin. (pfew !) Can confirm this. It is only the Widget, that checks before mounting. Dolphin mounts immediately without any complaints, a clean unmounted disk, whereas the default action triggers checking. I miss seeing the point in doing so, when the drive is clean - without errors. |
Created attachment 182428 [details] It is slow. SUMMARY It is slow while I mount the removable disk(btrfs) in plasma 6.4. Maybe a bug. STEPS TO REPRODUCE 1. Mount a removable disk 2. It checks it every time. OBSERVED RESULT It checks it every time. EXPECTED RESULT Hope it can be mounted as fast as before. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.4.0 KDE Frameworks Version: 6.15.0 Qt Version: 6.9.1 Kernel Version: 6.15.2-zen1-1-zen (64-bit) Graphics Platform: Wayland ADDITIONAL INFORMATION