Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Solved, USB freezes, Mouse, Printer, Wireless, HCI Reset

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
KSR-33-VIP
Posts: 15
Joined: 2016-12-04 06:30

Solved, USB freezes, Mouse, Printer, Wireless, HCI Reset

#1 Post by KSR-33-VIP »

Problems:
-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

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: Solved, USB freezes, Mouse, Printer, Wireless, HCI Reset

#2 Post by pylkko »

I have this vague recollection of reading some Ubuntu support thread that such usb device freezes can also at times be resolved by powering down system, unplugging and leaving it be for some time.

sometihng like this:
http://www.sevenforums.com/hardware-dev ... utton.html


Not saying that your problem is this or that it would have helped. But apparently some times the motherboard can enter some kind of bizarre states that are released only by taking all power away from it for a long time.

Post Reply