Last active
May 5, 2023 13:33
-
-
Save barron9/5554e87451059d8dc106facb4649eb1f to your computer and use it in GitHub Desktop.
ubuntu 22.04 a4tech fstyler wireless keyboard wake fix service
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
[Unit] | |
Description=Run script after screen unlock/wake | |
After=sleep.target | |
After=suspend.target | |
[Service] | |
User=root | |
Type=oneshot | |
ExecStart=/home/berkin/wakefix.sh | |
[Install] | |
WantedBy=suspend.target | |
WantedBy=sleep.target | |
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
for port in $(lspci | grep USB | cut -d' ' -f1); do | |
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind; | |
sleep 5; | |
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind; | |
sleep 5; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment