If your USB port gets mangled and a device isn't working as it should:
tward $ lspci | grep USB
00:1a.0 USB controller: ...
00:1d.0 USB controller: ...
Then do the following:
tward $ echo -n "00:1a.0" | \
sudo tee /sys/bus/pci/drivers/ehci_hcd/unbind
tward $ echo -n "00:1a.0" | \
sudo tee /sys/bus/pci/drivers/ehci_hcd/bind
For each of the above controllers.
Be aware that after you write to unbind, anything connected to that particular USB controller will be unavailable until you write to bind on the next command. So if your keyboard is connected to one of those, you may be in trouble.
Note: See the comment below for an updated procedure.
Note: See the comment below for an updated procedure.
I have do it and matching nomber/id into my devices but not reset my USB. My mouse is still unrecognized when my USB 3 is hang. But thank you for command. I love to learn ;)
ReplyDeleteIts been a while since I did this, its possible USB 3 has changed or uses different virtual devices under sys/bus...
ReplyDeleteI don't have USB3, and I'm using Arch now, so I can't really investigate...
Just did this on Saucy (13.10), and the EHCI folder had moved, so I had to run:
ReplyDeleteecho -n "0000:00:1a.0" | sudo tee /sys/bus/pci/drivers/ehci-pci/unbind
echo -n "0000:00:1a.0" | sudo tee /sys/bus/pci/drivers/ehci-pci/bind
echo -n "0000:00:1d.0" | sudo tee /sys/bus/pci/drivers/ehci-pci/unbind
echo -n "0000:00:1d.0" | sudo tee /sys/bus/pci/drivers/ehci-pci/bind