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
usbcore.autosuspend=-1to the GRUB_CMDLINE_LINUX_DEFAULT variable in
/etc/default/grub. For most distros the variable is near the beginning of the file.
sudo update-grubto re-generate GRUB’s boot configuration.
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.