Cannot get USB gamepad to work in Ubuntu 12.04
I'm trying to get a cheap usb gamepad to work under Ubuntu 12.04 running on my arm chromebook (using chroot). After plugging in the gamepad, dmesg shows:
[ 5879.411510] usb 2-1: new low-speed USB device number 8 using exynos-ohci
[ 5879.610530] usb 2-1: New USB device found, idVendor=0079, idProduct=0011
[ 5879.610560] usb 2-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 5879.610584] usb 2-1: Product: USB GamepadOutput of lsusb is:
Bus 001 Device 003: ID 0424:3503 Standard Microsystems Corp.
Bus 002 Device 008: ID 0079:0011 DragonRise Inc. Gamepad
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 2232:1037I don't have /dev/input/ls0ls -l /dev/input:
drwxr-xr-x 2 root root 120 May 31 17:24 by-path
crw-rw---- 1 root 222 13, 64 May 31 17:24 event0
crw-rw---- 1 root 222 13, 65 May 31 17:24 event1
crw-rw---- 1 root 222 13, 66 May 31 17:24 event2
crw-rw---- 1 root 222 13, 67 May 31 17:24 event3
crw-rw---- 1 root 222 13, 68 May 31 17:24 event4
crw-rw---- 1 root 222 13, 69 May 31 17:24 event5Any ideas?
Edit: In case it helps here's what I see in usb-devices:
T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0
D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0079 ProdID=0011 Rev=01.06
S: Product=USB Gamepad
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhidEdit2: Here's the output of lsusb -v (the section for the gamepad)
Bus 002 Device 002: ID 0079:0011 DragonRise Inc. Gamepad
Couldn't open device, some information will be missing
Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x0079 DragonRise Inc. idProduct 0x0011 Gamepad bcdDevice 1.06 iManufacturer 0 iProduct 2 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 34 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 33 US bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 101 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 10 2 Answers
DragonRise gamepads use the hid_dr module, which can be loaded with modprobe hid_dr. If the module is not available, you have to compile it by enabling the HID_DRAGONRISE kernel option (in menuconfig, you can find it at Device Drivers -> HID support -> HID bus support -> Special HID drivers -> DragonRise Inc. game controller).
With the module loaded, the device will be properly recognized and /dev/input/js0 will be created.
[19229.563797] usb 3-3: new low-speed USB device number 11 using xhci_hcd
[19229.706682] usb 3-3: New USB device found, idVendor=0079, idProduct=0011
[19229.706688] usb 3-3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[19229.706692] usb 3-3: Product: USB Gamepad
[19229.706915] usb 3-3: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
[19229.710302] input: USB Gamepad as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/0003:0079:0011.000C/input/input13
[19229.710638] dragonrise 0003:0079:0011.000C: input,hidraw0: USB HID v1.10 Joystick [USB Gamepad ] on usb-0000:00:14.0-3/input0 Other then the missing js0 it looks good. Try modprobe joydev and see if that gives you a /dev/input/js0. If that fails install evtest and then do:
evtest /dev/input/event1
evtest /dev/input/event2
evtest /dev/input/event3
...till you have found your gamepad. Post info that evtest prints on startup, as when something fails with detecting it as joystick, there is probably something wrong with the button names.