Last active
September 14, 2016 20:29
-
-
Save v6ak/1a1f90f9f07f03d8c9c812dd9b817f0e to your computer and use it in GitHub Desktop.
USB in Qubes dom0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
MODS="xhci_pci xhci_hcd ehci_pci ehci_hcd" | |
suspend_usb() | |
{ | |
rmmod $MODS | |
} | |
resume_usb() | |
{ | |
modprobe -a $MODS | |
} | |
echo "$(date): $1" >> /tmp/suspend-usb.log | |
case "$1" in | |
resume) resume_usb ;; | |
suspend) suspend_usb ;; | |
*) exit 0 ;; | |
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… | |
ExecStartPre=/usr/lib64/pm-utils/sleep.d/53usb suspend suspend | |
… | |
ExecStopPost=/usr/lib64/pm-utils/sleep.d/53usb resume suspend | |
… |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment