Skip to content

Instantly share code, notes, and snippets.

@bigFin
Created December 29, 2024 03:35
Show Gist options
  • Save bigFin/f42461e032c1a4c6aba63b06cab276a3 to your computer and use it in GitHub Desktop.
Save bigFin/f42461e032c1a4c6aba63b06cab276a3 to your computer and use it in GitHub Desktop.
reset all usb interfaces if devices are not being detected
#!/bin/bash
# Unload the USB related kernel modules
sudo modprobe -r ehci_hcd
sudo modprobe -r ohci_hcd
sudo modprobe -r uhci_hcd
# Reload the kernel modules to rescan the USB devices
sudo modprobe ehci_hcd
sudo modprobe ohci_hcd
sudo modprobe uhci_hcd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment