3

Is there a way in Linux to cleanly remove (i.e. 'safely remove') a USB device that is not a mass storage device before it is unplugged?

My problem:

I have a USB TV stick - a 'Mygica T230 DVB-T/T2/C'.

It works ok, and usually when I unplug it, syslog reports that it is 'successfully disconnected' and then the USB port can subsequently be used again as normal.

However, sometimes this isn't the case: I unplug it and the system doesn't realize that it has been disconnected. lsusb reports that it is still connected and the USB port is unusable until I reboot the computer. When I do reboot the computer it hangs, forcing me to hold the power button.

What I need is to be able to tell the computer to disconnect the device before I unplug it.

For an external hard drive I would use:

$ udisksctl power-off -b /dev/sdx

Is there an equivalent command for non mass storage devices?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.