You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 16.04下USB鼠标失效,执行sudo rmmod usbhid报错如何解决?

Troubleshooting Your Non-Working USB Mouse on Ubuntu 16.04

Hey there, let's work through this USB mouse issue step by step. Since it works perfectly in Windows, we can rule out hardware failure—so the problem is definitely with Ubuntu's USB/HID subsystem. Let's start with the basics:

  • First, check if Ubuntu even detects your mouse
    Open a terminal and run:

    lsusb
    

    Look for an entry that matches your mouse (it might say something like "USB Optical Mouse" or the brand name). If you don't see it, try plugging it into a different USB port (preferably a USB 2.0 port, since 16.04 can have quirks with USB 3.0 sometimes) and run the command again.

  • Verify HID module status (since usbhid isn't loaded)
    The error tells us usbhid isn't active, but let's check related modules that might be handling your mouse:

    lsmod | grep hid
    

    You should see modules like hid_generic, hid_microsoft (if it's a Microsoft mouse), or other brand-specific HID modules. If usbhid is missing entirely, let's try loading it manually:

    sudo modprobe usbhid
    

    After running this, wiggle your mouse—does it start working? If yes, we can make sure it loads automatically on boot by adding it to /etc/modules:

    echo "usbhid" | sudo tee -a /etc/modules
    
  • Check system logs for USB/HID errors
    If loading usbhid doesn't fix it, let's dig into the kernel logs to find clues. Run:

    dmesg | grep -i usb
    

    Or narrow it down to HID-specific messages:

    dmesg | grep -i hid
    

    Look for lines with words like error, fail, unable, or disconnect related to your mouse. For example, you might see a message about a failed HID descriptor or USB device reset.

  • Disable USB auto-suspend (a common culprit)
    Ubuntu 16.04 sometimes enables USB auto-suspend to save power, which can break certain peripherals. Let's disable it:

    1. Open the GRUB config file:
      sudo nano /etc/default/grub
      
    2. Find the line starting with GRUB_CMDLINE_LINUX and add usbcore.autosuspend=-1 inside the quotes. It should look something like:
      GRUB_CMDLINE_LINUX="quiet splash usbcore.autosuspend=-1"
      
    3. Save the file (Ctrl+O, then Enter) and exit (Ctrl+X).
    4. Update GRUB and reboot:
      sudo update-grub
      sudo reboot
      

    After rebooting, test your mouse again.

  • Try resetting the USB subsystem
    If all else fails, you can reset the entire USB stack without rebooting:

    sudo echo 0 > /sys/bus/usb/devices/usb1/power/autosuspend
    sudo echo 1 > /sys/bus/usb/devices/usb1/power/level
    sudo echo 0 > /sys/bus/usb/devices/usb1/power/level
    

    (Note: If usb1 doesn't work, try usb2 or usb3—you can list USB buses with ls /sys/bus/usb/devices/.)

Give these steps a shot one by one, and let me know if any of them get your mouse working again!

内容的提问来源于stack exchange,提问作者7k7

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 07:19:50