M BUZZ CRAZE NEWS
// general

How to Reset a USB device after improper shutdown(device no longer visible) without unplugging

By Emma Johnson

I am on Ubuntu 16.04 and am running the Realsense D435 sensor through a USB3 port. Unfortunately when the device is not shut down properly it disappears from the USB list and does not reappear unless I unplug and re-insert. I am trying to figure out how to reset this without unplugging.

I found the links below , but it seems like all of those need the device to be present on the lsusb list.

How to reconnect a logically disconnected USB device | Unix & Linux

How do you reset a USB device from the command line?

I also tried the script below to unbind and re-bind my USB hubs:

echo -n "0000:00:14.0" | tee /sys/bus/pci/drivers/xhci_hcd/unbind
echo -n "0000:00:1a.0" | tee /sys/bus/pci/drivers/ehci-pci/unbind
echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci-pci/unbind
sleep 5s
echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci-pci/bind
echo -n "0000:00:1a.0" | tee /sys/bus/pci/drivers/ehci-pci/bind
echo -n "0000:00:14.0" | tee /sys/bus/pci/drivers/xhci_hcd/bind 

This script 100% kills power to all devices connected, i.e. keyboard, mouse, Bluetooth dongle, so I think it does cut the power, but unfortunately the Realsense D435 sensor does not re-appear!

Nothing short of unplugging (or shutdown > kill power > restart PC) helps. Any suggestions?

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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