Skip to content

Instantly share code, notes, and snippets.

@stripedpurple
Created July 18, 2017 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stripedpurple/c3a93852ec5cc4bc25e4e4bbe6e8d604 to your computer and use it in GitHub Desktop.
Save stripedpurple/c3a93852ec5cc4bc25e4e4bbe6e8d604 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Creating a backup of /etc/default/grub
cp /etc/default/grub /opt/bht/etc/grub.original
# reconfiguring grub to disable usb power mangement
sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT=".*"/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1"/g' /etc/default/grub
sudo update-grub
sudo reboot
@stripedpurple
Copy link
Author

To test run cat /sys/module/usbcore/parameters/autosuspend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment