Skip to content

Instantly share code, notes, and snippets.

@marcopeocchi
Created March 15, 2022 09:37
Show Gist options
  • Save marcopeocchi/baf904a7ad5e2f0bc995b6d07177c20d to your computer and use it in GitHub Desktop.
Save marcopeocchi/baf904a7ad5e2f0bc995b6d07177c20d to your computer and use it in GitHub Desktop.
Fix for thinkpad E-14 Gen 2 fried USB 2.0 port
#!/bin/bash
# fix for thinkpad E-14 Gen 2 fried USB 2.0 port
# /usr/lib/systemd/system-sleep/10-xhcihcd.sh
case $1/$2 in
pre/*)
# echo "Going to $2..."
echo "0000:04:00.3" > /sys/bus/pci/drivers/xhci_hcd/unbind
;;
post/*)
# echo "Waking up from $2..."
echo "0000:04:00.3" > /sys/bus/pci/drivers/xhci_hcd/bind
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment