Preventing USB mass storage to power off after safely removing it?

When safely removing (Leap 15.1, KDE, Dolphin) USB mass storage, it powers off and can’t be remounted from Dolphin without plugging out/in or powering off/on. This is a really annoying problem for me and it did not happen with Leap 42.

How can I prevent powering off USB mass storage after safely removing it? Or how can I turn power back on? All that without plugging anything out/in or powering off/on.

It is assumed that if you are ‘safely removing’ a removable device via Dolphin that you are about to unplug it, otherwise why select that function?

Anyway, it is possible to reinitialise a USB device (without physically disconnecting and reconnecting again) using ‘usb-reset’ or similar code…

I am running virtual Leap 15.1 guest under Leap 15.1 host. When I safely remove USB mass storage from the guest, I can’t access it from the host (or the guest) any more. I can’t access the physical devices because I am operating the host computer remotely.

Anyway, it is possible to reinitialise a USB device (without physically disconnecting and reconnecting again) using ‘usb-reset’ or similar code…

GitHub - ralight/usb-reset

Nope, it can’t see the USB mass storage device after it has been powered off after safely removing.

I found a solution. Drive can be safely removed with udisksctl without powering off:

udisksctl unmount -b /dev/sde1

If needed drive can be powered off (after unmounting all partitions):

udisksctl power-off -b /dev/sde

This information should have been mentioned in your opening post.

The usb-reset needs to be done from real-hardware (the host).

Yes, unmounting is all that is required.

Although not specifically answering your question…

You may find this bug report 402660 – Device notifier clears a device after unmount, but before unplug worth reading, particularly some of the later posts, as initially it may not seem relevant.

I tried that (running as root) with real hardware. After power is off, usb-reset can’t find the device. It works for the devices that lsusb sees and lsusb can’t see powered off USB mass storage.