How to Stop Ubuntu Linux from Automatically Suspending USB Devices

The Disconnecting Peripherals

Ubuntu Linux employs aggressive power management features to extend laptop battery life, one of which is USB Auto-Suspend. If the operating system detects that a connected USB device (like a mouse, external hard drive, or audio interface) has been idle for a short period, it cuts the power to that specific USB port. While efficient, this feature is notorious for causing hardware bugs. Your USB mouse might require a few seconds of shaking to “wake up,” your external drive might randomly unmount during a file transfer, or your USB microphone might drop its connection in the middle of a Discord call.

How to Disable USB Auto-Suspend Globally

If you are experiencing random disconnects and you use a desktop PC (where battery life is irrelevant), the most reliable solution is to completely disable the USB Auto-Suspend feature at the kernel level via the GRUB bootloader.

1. Open your terminal application (Ctrl+Alt+T).

2. Run the following command to edit the GRUB configuration file with root privileges: sudo nano /etc/default/grub

3. Find the line that begins with GRUB_CMDLINE_LINUX_DEFAULT. It usually looks like this: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

4. You need to add a kernel parameter inside those quotes. Change the line to look exactly like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1"

5. Save the file by pressing Ctrl+O then Enter, and exit nano by pressing Ctrl+X.

6. Update the bootloader by running: sudo update-grub

7. Reboot your computer.

Understanding the Change

By setting the autosuspend parameter to `-1`, you are telling the Linux kernel that the “idle time” required before cutting power is infinite. As a result, the kernel will deliver continuous, uninterrupted power to every USB port on your machine from the moment it boots until the moment it shuts down, permanently resolving any aggressive power-saving disconnects.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.