usb Hello Reader,

Recently, I encountered an issue where every time I powered on my computer, the externally connected mouse and keyboard would automatically disconnect. It was a frustrating experience, and despite my initial attempts to troubleshoot and resolve the problem, none of the conventional solutions seemed to work.

After some persistent digging, I stumbled upon a potential solution that finally addressed the issue. If you’re facing a similar problem, give the following steps a try:

Disable USB Autosuspend

One common culprit for intermittent disconnections of USB devices is the USB autosuspend feature. This feature, designed to save power, can sometimes cause compatibility issues with certain peripherals. To disable USB autosuspend, run the following command:

echo -1 | sudo tee /sys/module/usbcore/parameters/autosuspend

This command instructs the system to disable USB autosuspend, potentially resolving the automatic disconnection problem.

Additional Steps

If the above solution doesn’t completely resolve your issue, consider checking for the following:

  • Update System Packages: Ensure that your system packages are up-to-date. On Debian-based systems, you can use the following commands:

    sudo apt update
    sudo apt upgrade
    
  • Restart udev Service: Restart the udev service to apply any changes made to USB configurations:

    sudo service udev restart
    
  • Check Kernel Messages: Examine kernel messages related to USB for any hints about the disconnection issue:

    dmesg | grep -i usb
    

These steps collectively form a comprehensive approach to addressing USB-related problems. Remember to adapt commands based on your specific Linux distribution.

I hope these solutions prove helpful in resolving your external mouse and keyboard disconnection issue. If you have any questions or encounter further challenges, feel free to reach out.

Happy computing!

Anson Sarosh Dsouza