Does your computer miss keystrokes if you type too quickly? Does your mouse or trackball randomly lock up for a few seconds? If so, a new-ish kernel feature, USB autosuspend, might be to blame. The feature is intended to extend the life of battery powered USB devices such as wireless mice. Unfortunately, it targets all USB devices including ones without a battery like wired USB keyboards.

Fortunately, autosuspend can be disabled via the usbcore.autosuspend kernel command line flag. Most distros use GRUB to boot so you’ll need to edit /etc/default/grub.

  1. Append usbcore.autosuspend=-1 to the GRUB_CMDLINE_LINUX_DEFAULT variable in /etc/default/grub. For most distros the variable is near the beginning of the file.
  2. Save the updated file.
  3. Run sudo update-grub to re-generate GRUB’s boot configuration.
  4. Reboot.
  5. Verify the change by running cat /sys/module/usbcore/parameters/autosuspend. The command should print -1.

If autosuspend was the underlying cause USB device responsiveness should be back to normal.