The Dropped Connection
Ubuntu Linux is designed to run efficiently on laptops, which means it employs aggressive power management strategies to extend battery life. One of these strategies is “USB Auto-Suspend.” If the kernel detects that a connected USB device (like a mouse, a webcam, or an external hard drive) has been idle for a short period, it will temporarily cut power to that specific USB port. While this saves milliwatts of power, it causes massive problems for devices that don’t wake up gracefully. Your mouse might suddenly stop tracking, your webcam might freeze during a Zoom call, or your external drive might randomly disconnect.
Keeping the Power Flowing
To ensure hardware stability and stop Ubuntu from automatically suspending power to your USB devices, you must disable the USB auto-suspend feature at the kernel level.
The most permanent and robust way to achieve this is by editing the GRUB bootloader configuration to pass a specific parameter to the kernel at startup. Open your terminal (Ctrl+Alt+T). You need to edit the GRUB file with root privileges, so type: sudo nano /etc/default/grub. Press Enter and provide your password. Look carefully through the file for the line that begins with GRUB_CMDLINE_LINUX_DEFAULT=. Inside the quotation marks on that line, append the following text: usbcore.autosuspend=-1. Ensure there is a space between it and any existing parameters (like “quiet splash”). The line should look something like: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1". Press Ctrl+O then Enter to save, and Ctrl+X to exit nano. Finally, you must update the bootloader for the changes to take effect by running: sudo update-grub. Reboot your machine, and your USB ports will now deliver continuous, uninterrupted power.