Xbox 360 controller doesn’t work on Ubuntu

Learn how to fix configuration an issue on Ubuntu where the Xbox button of a controller keeps blinking and Ubuntu doesn't detect it. Additionally, the xboxdrv tool throws a LIBUSB_ERROR_NOT_FOUND error. This issue was experienced with the Mad Catz Arcade FightStick KE for the Xbox 360 on Ubuntu 18.04.

Follow these steps to reproduce the error:

  1. Connect the controller to an USB port in your computer.
  2. The Xbox button lights start blinking non stop.
  3. Type the following command sudo xboxdrv, the command throws the following error:

    Error couldn’t claim the USB interface: LIBUSB_ERROR_NOT_FOUND

Note: With Proton 4.11-3, games can access gamepads directly. You shouldn’t need to use the solution explained below. For example, our Mad Catz stick works okay in Samurai Shodown V Special withouth disabling the autosuspend feature. However, we are still experiencing the issue with the wrong mapping of buttons, which is resolved by the workaround explained in Additional steps.

Solution

Disable the autosuspend feature of the usbcore module. For more information, check Power Management for USB:

  1. Set the usbcore.autosuspend option to -1 in the GRUB_COMDLINE_LINUX line in the Grub configuration file /etc/default/grub:
    GRUB_CMDLINE_LINUX="usbcore.autosuspend=-1"
    
  2. Update the grub configuration:
    $ sudo update-grub
    
  3. Restart the computer.

Once you restart the computer, the Xbox button lights stop blinking.

Additional steps

If the controller has the button mapping wrong—for example, the Start button doesn’t work but others do—run the following commands:

$ sudo apt install xboxdrv
$ sudo xboxdrv --mimic-xpad --detach-kernel-driver

The buttons should work appropriately.