How to get gamepads to work?

I have two USB wireless game controllers I'd like to use for my games. I have found this arch wiki article, but I'm not sure how to follow it. How do I find which modules are correct for my gamepads and how do I load them?

What is your gamepad model ?

It's a cheap product from some obscure, non-existent on Google, (probably) Asian company. Model is Roar PT-671. When I used this on Windows it worked out of the box just by plugging in the USB.

Well assuming that this joystick is compatible with ps3( and even ps2!!) install xboxdrv and use instructions from arch wiki

If you own a PS3 controller and can connect with USB, xboxdrv has the mappings built in. Just run the program (and detach the running driver) and it works!
#xboxdrv --silent --detach-kernel-driver

https://wiki.archlinux.org/index.php/Gamepad#PlayStation_3_controller_via_USB

I'm not sure but since my game controller is wireless, shouldn't I follow the "PlayStation 3 controller via Bluetooth" section (please correct me on this)? Because after running sudo xboxdrv --silent --detach-kernel-driver it still doesn't work.

For PlayStation 3/4 controllers, the wiki advises to check if bluetooth devices are connected, but Bluedevil says there are no bluetooth devices connected.

Googling a bit, it seems like the device is connected through a 2.4GHz USB receiver instead of bluetooth, like many wireless mouse/keyboard these days.

First things first, find out what compatibility this device has. Unplug the receiver, open a terminal, execute dmesg -w, then plug the receiver back. Copy paste here the messages that appear after you plug it back.

Here they are:

[ 8204.375564] usb 3-3.3: new full-speed USB device number 11 using xhci_hcd
[ 8204.467517] usb 3-3.3: New USB device found, idVendor=2563, idProduct=0575, bcdDevice= 2.00
[ 8204.467521] usb 3-3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 8204.467524] usb 3-3.3: Product: USB WirelessGamepad 
[ 8204.467527] usb 3-3.3: Manufacturer: ShanWan
[ 8204.554792] input: ShanWan USB WirelessGamepad  as /devices/pci0000:00/0000:00:07.1/0000:11:00.3/usb3/3-3/3-3.3/3-3.3:1.0/0003:2563:0575.0007/input/input35
[ 8204.555132] hid-generic 0003:2563:0575.0007: input,hidraw4: USB HID v1.10 Gamepad [ShanWan USB WirelessGamepad ] on usb-0000:11:00.3-3.3/input0
[ 8204.683513] usb 3-3.3: USB disconnect, device number 11
[ 8205.402202] usb 3-3.3: new full-speed USB device number 12 using xhci_hcd
[ 8205.494099] usb 3-3.3: New USB device found, idVendor=045e, idProduct=028e, bcdDevice= 1.10
[ 8205.494104] usb 3-3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 8205.494106] usb 3-3.3: Product: XBOX 360 For Windows
[ 8205.494109] usb 3-3.3: Manufacturer: ShanWan
[ 8205.577022] input: Microsoft X-Box 360 pad as /devices/pci0000:00/0000:00:07.1/0000:11:00.3/usb3/3-3/3-3.3/3-3.3:1.0/input/input36
[ 8205.604465] xpad 3-3.3:1.0: xpad_try_sending_next_out_packet - usb_submit_urb failed with result -2

Just to make sure, install usbutils package and execute usb-devices and see if my guess is right: the gamepad is being controlled by xpad driver. If this is true, blacklist xpad from being loaded first (reboot might be required, I'm not sure but it doesn't hurt) then you can use xboxdrv. Again, to make sure the correct driver is the one that's being used, check usb-devices output.

you may try installing
linuxconsole
or
joyutils
to see if they help

1 Like

The gamepad was being controlled by xpad driver. I blacklisted it and now it's showing that it's being being controlled by usbfs. Now after running xboxdrv, I get the following error:

-- [ ERROR ] ------------------------------------------------------
 Error couldn't claim the USB interface: LIBUSB_ERROR_BUSY
Try to run 'rmmod xpad' and then xboxdrv again or start xboxdrv with the option --detach-kernel-driver.

The xboxdrv service is running and I can't get past this error, even with sudo. rmmod xpad returns nothing and xboxdrv --detach-kernel-driver retuns the same error. Does it have a problem replacing the usbfs driver?

Joyutils is already installed, but maybe I'll try linuxconsole later.

It's useless, you already blacklist it. You need to rmmod the driver that's controlling the device, which is usbfs.

Alright, I managed to work around it by reinstalling xboxdrv. After sudo xboxdrv --detach-kernel-driver it now displays

Your Xbox/Xbox360 controller should now be available as:
  /dev/input/js0
  /dev/input/event2

and xboxdrv -L returns

 id | wid | idVendor | idProduct | Name
----+-----+----------+-----------+--------------------------------------
  0 |   0 |   0x045e |    0x028e | Microsoft X-Box 360 pad
  1 |   0 |   0x045e |    0x028e | Microsoft X-Box 360 pad

which means xboxdrv detects both of my controllers. However after jstest /dev/input/js0, it seems that no input is interpreted at all. I'm pressing all of the buttons but no numbers seem to be changing. The same goes for the game I'm trying to use the controller for (FIFA): it detects the controller but it doesn't detect any input. Am I doing something wrong here?

Try using evtest instead, any button/trigger press/analog movement should display output: the key code for corresponding action. That's the basis of how you should map the keys into corresponding Xbox controller key.

No luck. No input detected at all. I select my controller and pressing buttons doesn't display anything. I tried with xpad and with xboxdrv. Has to be a driver issue. Librewish suggested installing linuxconsole or joyutils but I'm not sure how I can use them after installing them...

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by