When removing a USB device from the system by clicking the eject icon on the Device Notifier applet, the message says "This device can now be safely removed." I think this message is not accurate, because the device cannot be removed at this moment but can only be safely removed after the icon for this device disappears. I learned this after my USB stick being broken several times. So the expected message should be something like "This device is being safely removed" or "Please wait for safely removing this device".
The message is supposed to only show up once the unmount process has finished, ie. you click "unmount", you get a spinny thing, and only thereafter you should get said message?
(In reply to Kai Uwe Broulik from comment #1) > The message is supposed to only show up once the unmount process has > finished, ie. you click "unmount", you get a spinny thing, and only > thereafter you should get said message? Yes, I guess that what you described should be the correct sequence. However, I plugged out USB stick during the display of this message several times after the spinny thing (it's slow blinking for me), and the USB stick was caused sort of file structure damage. The damage could be easily fixed by "Error Check" in Windows though. After these, I always wait for the device to disappear from Device Notification widget and then plug out the USB stick. And based on this, I think the notifying message should be altered to reflect this fact.
That's not very concrete evidence to suggest it hasn't actually been unmounted properly. The Solid code definitely waits for udisks to reply that the unmount call has finished before emitting it's finished and the device notifier plasmoid definitely waits for solid to reply before it displays that notification. I've done a brief code review and I can't see anything wrong on KDE's side. We should check that you're using the udisks backend though: Can you include the output of "solid-hardware5 list"
Can you also include the output of solid-hardware5 listen whilst trying to recreate this.
Output of `solid-hardware5 list`: ` udi = '/org/freedesktop/UDisks2/block_devices/sdb' udi = '/org/freedesktop/UDisks2/drives/Kingston_DataTraveler_3_2e0' ` I trimmed the output to only include those related to the USB stick. Hopefully it is enough for the investigation. And output of `solid-hardware5 listen` while detaching the udisk when it is still being removed. There is no other operation on this USB stick this time. ` ~> solid-hardware5 listen Listening to add/remove events: "/org/freedesktop/UDisks2/block_devices/sdb1" lost interfaces: ("org.freedesktop.UDisks2.Filesystem") "/org/freedesktop/UDisks2/block_devices/sdb" lost interfaces: ("org.freedesktop.UDisks2.PartitionTable") "/org/freedesktop/UDisks2/block_devices/sdb1" lost interfaces: ("org.freedesktop.UDisks2.Partition", "org.freedesktop.UDisks2.Block") Device Removed: udi = '/org/freedesktop/UDisks2/block_devices/sdb1' "/org/freedesktop/UDisks2/block_devices/sdb" lost interfaces: ("org.freedesktop.UDisks2.Block") Device Removed: udi = '/org/freedesktop/UDisks2/block_devices/sdb' "/org/freedesktop/UDisks2/drives/Kingston_DataTraveler_3_2e0" lost interfaces: ("org.freedesktop.UDisks2.Drive") Device Removed: udi = '/org/freedesktop/UDisks2/drives/Kingston_DataTraveler_3_2e0' ` Another output of `solid-hardware5 listen` while detaching the udisk after making a file-syncing using FreeFileSync. But the udisk is removed after the messages disappeared. I could not catch the timing because there was a long time display of "Removing", and then, "Removing" on top of "This device can now be safely removed." In other words, there is no time of only showing the message of "This device can now be safely removed", or the time is too short for me to see. ` ~> solid-hardware5 listen Listening to add/remove events: "/org/freedesktop/UDisks2/block_devices/sdb1" lost interfaces: ("org.freedesktop.UDisks2.Filesystem") "/org/freedesktop/UDisks2/block_devices/sdb" lost interfaces: ("org.freedesktop.UDisks2.PartitionTable") "/org/freedesktop/UDisks2/block_devices/sdb1" lost interfaces: ("org.freedesktop.UDisks2.Partition", "org.freedesktop.UDisks2.Block") Device Removed: udi = '/org/freedesktop/UDisks2/block_devices/sdb1' "/org/freedesktop/UDisks2/block_devices/sdb" lost interfaces: ("org.freedesktop.UDisks2.Block") Device Removed: udi = '/org/freedesktop/UDisks2/block_devices/sdb' "/org/freedesktop/UDisks2/drives/Kingston_DataTraveler_3_2e0" lost interfaces: ("org.freedesktop.UDisks2.Drive") Device Removed: udi = '/org/freedesktop/UDisks2/drives/Kingston_DataTraveler_3_2e0' ` Since there were several updates to FreeFileSync and many updates to openSUSE Tumbleweed, maybe the problem have vanished. I have not tried this since I filed this bug report. I am really sorry for wasting your time checking this if this is not a bug in this component.
I doubt the 'unmount' process waits for kernel I/O to finish before returning.
It might now, actually. I've had a few times where clicking unmount has resulted in a delay before the message appeared. Is this still an issue for people?
I have not experienced any glitch of such issue for a long time. I consider this had been fixed for me. Thanks a lot for the work!
You're welcome!