-wireless usb mouse freezes
-usb printer freezes or starts printing garbage (CUPS cancel jobs)
-wireless usb adapter freezes
-cell phone android usb cable freezes
Solution:
Debian 8.6.0 Jessie
try resetting the usb controllers by running this script
open terminal in su(super user)
sh usbreset.sh
edit usbreset.sh to your hci driver names (hci-usb host control interface)
/sys/bus/pci/drivers/uhci_hcd
/sys/bus/pci/drivers/ehci-pci
usbreset.sh can also be used to bring back any
usb flash drives that have been unmounted and not unplugged
usbreset.sh
Code: Select all
# Reset USB Host Controllers Interface, unbind/bind device to driver
#
# terminal in su(super user)
# sh usbreset.sh (to run script)
#edit usbreset.sh to your hci driver names
#/sys/bus/pci/drivers/uhci_hcd
#/sys/bus/pci/drivers/ehci-pci
#
# OHCI (Open Host Controller Interface)
# UHCI (Universal Host Controller Interface)
# EHCI (Enhanced Host Controller Interface)
# XHCI (eXtensible Host Controller Interface)
#
# OHCI and UHCI controllers supports USB 1 speed devices (1.5 Mbit/s and 12 Mbit/s)
# EHCI supports USB 2 devices (480 Mbit/s).
# xHCI supports all USB speeds, including SuperSpeed (5 Gbit/s) and future speeds
echo "----------.----------.----------."
lsusb
echo "----------.----------.----------."
lsusb -t
echo "----------.----------.----------."
#lsusb -v | grep -E 'Bus|USB|iProduct'
lsusb -v | grep -E 'Bus|iProduct|iSerial'
echo "----------.----------.----------."
echo "First number 0000: is not displayed, 00: is PCI bus ID"
lspci -vv | grep -E 'USB|hci'
echo "----------.----------.----------."
#ls /sys/bus/pci/drivers/*hci*
find /sys/bus/*/drivers/* -iname '*hci*'
echo "----------.----------.----------."
#ls /sys/bus/pci/devices/
find /sys/bus/pci/devices/
echo "----------.----------.----------."
echo "The kernel numbers PCI devices with a leading 0000:"
echo "Devices with an ID of 0000:00 are USB host controllers that drive the bus itself"
echo "----------.----------.----------."
# uhci_hcd (usb1 host controller), edit to your hci driver names
echo "reset usb1 device"
for usb_driver in /sys/bus/pci/drivers/uhci_hcd ; do
ls -l $usb_driver/0*
if ! cd $usb_driver ; then
echo "error, cannot change directory to" $usb_driver
exit 0
fi
for pci_device in ????:??:??.? ; do
echo "unbind device from driver, writing device bus id " $pci_device "to the driver unbind file, "$usb_driver"/unbind"
echo -n "$pci_device" > $usb_driver/unbind
echo "bind device to driver, writing device bus id " $pci_device "to the driver bind file, "$usb_driver"/bind"
echo -n "$pci_device" > $usb_driver/bind
done
done
echo "----------.----------.----------."
# ehci-pci (usb2 host controller), edit to your hci driver names
echo "reset usb2 device"
for usb_driver in /sys/bus/pci/drivers/ehci-pci ; do
ls -l $usb_driver/0*
if ! cd $usb_driver ; then
echo "error, cannot change directory to" $usb_driver
exit 0
fi
for pci_device in ????:??:??.? ; do
echo "unbind device from driver, writing device bus id " $pci_device "to the driver unbind file, "$usb_driver"/unbind"
echo -n "$pci_device" > $usb_driver/unbind
echo "bind device to driver, writing device bus id " $pci_device "to the driver bind file, "$usb_driver"/bind"
echo -n "$pci_device" > $usb_driver/bind
done
done
echo "----------.----------.----------."
exit 0