openSUSE 13.2 - weird behaviour of xbox 360 wireless controller

Hi,

I just tried using a pair of XBox 360 controllers with openSUSE 13.2 . A couple of weird issues prevent me from using them:

  1. for each plugged-in controller I get 4 input devices

When I plug in the first one, /dev/input/js[0-3] get created, for the second one /dev/input/js[4-7]. This breaks games which expect at most two controllers

  1. whenever plugging in I get a kernel warnings ( see below )

Any advice on how to get the two controllers working properly?


2015-03-19T21:18:15.294746+02:00 rmuntean-w7 kernel: [202067.296679] usb 3-2: new full-speed USB device number 7 using xhci_hcd
2015-03-19T21:18:15.500781+02:00 rmuntean-w7 kernel: [202067.503580] usb 3-2: New USB device found, idVendor=045e, idProduct=0719
2015-03-19T21:18:15.500827+02:00 rmuntean-w7 kernel: [202067.503590] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
2015-03-19T21:18:15.500829+02:00 rmuntean-w7 kernel: [202067.503596] usb 3-2: Product: Xbox 360 Wireless Receiver for Windows
2015-03-19T21:18:15.500830+02:00 rmuntean-w7 kernel: [202067.503601] usb 3-2: Manufacturer: ©Microsoft
2015-03-19T21:18:15.500843+02:00 rmuntean-w7 kernel: [202067.503604] usb 3-2: SerialNumber: E0B05040
2015-03-19T21:18:15.505733+02:00 rmuntean-w7 kernel: [202067.507902] input: Xbox 360 Wireless Receiver as /devices/pci0000:00/0000:00:1c.6/0000:0e:00.0/usb3/3-2/3-2:1.0/input/input57
2015-03-19T21:18:15.505750+02:00 rmuntean-w7 kernel: [202067.508489] input: Xbox 360 Wireless Receiver as /devices/pci0000:00/0000:00:1c.6/0000:0e:00.0/usb3/3-2/3-2:1.2/input/input58
2015-03-19T21:18:15.506739+02:00 rmuntean-w7 kernel: [202067.508972] input: Xbox 360 Wireless Receiver as /devices/pci0000:00/0000:00:1c.6/0000:0e:00.0/usb3/3-2/3-2:1.4/input/input59
2015-03-19T21:18:15.506749+02:00 rmuntean-w7 kernel: [202067.509424] input: Xbox 360 Wireless Receiver as /devices/pci0000:00/0000:00:1c.6/0000:0e:00.0/usb3/3-2/3-2:1.6/input/input60
2015-03-19T21:18:15.509066+02:00 rmuntean-w7 kernel: [202067.511556] ------------ cut here ]------------
2015-03-19T21:18:15.509078+02:00 rmuntean-w7 kernel: [202067.511568] WARNING: CPU: 0 PID: 0 at ../drivers/usb/core/urb.c:450 usb_submit_urb.part.6+0x156/0x5b0()
2015-03-19T21:18:15.509081+02:00 rmuntean-w7 kernel: [202067.511572] usb 3-2: BOGUS urb xfer, pipe 3 != type 1
2015-03-19T21:18:15.509092+02:00 rmuntean-w7 kernel: [202067.511573] Modules linked in: xpad nls_iso8859_1 nls_cp437 vfat fat mmc_block tun rfcomm fuse ctr ccm af_packet vboxpci(O) vboxnetadp(O) vboxnetflt(O) vboxdrv(O) bnep snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_codec_generic iTCO_wdt iTCO_vendor_support x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm arc4 pcspkr serio_raw uvcvideo thinkpad_acpi i2c_i801 videobuf2_vmalloc snd_seq iwldvm videobuf2_memops videobuf2_core v4l2_common snd_hda_intel mac80211 snd_hda_controller joydev snd_hda_codec lpc_ich snd_hwdep ecb mfd_core snd_pcm_oss videodev snd_pcm btusb bluetooth 6lowpan_iphc iwlwifi snd_seq_device sdhci_pci cfg80211 sdhci mmc_core snd_timer e1000e ptp pps_core thermal snd_mixer_oss mei_me mei shpchp snd battery tpm_tis soundcore rfkill ac tpm processor sha256_generic dm_crypt algif_skcipher af_alg uas usb_storage nvidia_uvm(PO) nvidia(PO) crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64 glue_helper lrw gf128mul ablk_helper cryptd sr_mod cdrom firewire_ohci xhci_hcd firewire_core crc_itu_t hid_logitech_dj drm wmi video button dm_mirror dm_region_hash dm_log dm_mod sg
2015-03-19T21:18:15.509095+02:00 rmuntean-w7 kernel: [202067.511668] CPU: 0 PID: 0 Comm: swapper/0 Tainted: P        W  O  3.16.7-7-desktop #1
2015-03-19T21:18:15.509097+02:00 rmuntean-w7 kernel: [202067.511671] Hardware name: LENOVO 4284BZ4/4284BZ4, BIOS 8BET58WW (1.38 ) 07/06/2012
2015-03-19T21:18:15.509098+02:00 rmuntean-w7 kernel: [202067.511674]  0000000000000009 ffffffff8161bd03 ffff88033dc03d20 ffffffff8105cad7
2015-03-19T21:18:15.509100+02:00 rmuntean-w7 kernel: [202067.511678]  ffff8801df953400 ffff88033dc03d70 0000000000000003 0000000000000001
2015-03-19T21:18:15.509101+02:00 rmuntean-w7 kernel: [202067.511681]  0000000000000003 ffffffff8105cb3c ffffffff81a8a8a0 ffff880300000030
2015-03-19T21:18:15.509102+02:00 rmuntean-w7 kernel: [202067.511685] Call Trace:
2015-03-19T21:18:15.509104+02:00 rmuntean-w7 kernel: [202067.511711]  <ffffffff810051ee>] dump_trace+0x8e/0x350
2015-03-19T21:18:15.509105+02:00 rmuntean-w7 kernel: [202067.511719]  <ffffffff81005556>] show_stack_log_lvl+0xa6/0x190
2015-03-19T21:18:15.509106+02:00 rmuntean-w7 kernel: [202067.511725]  <ffffffff81006c51>] show_stack+0x21/0x50
2015-03-19T21:18:15.509108+02:00 rmuntean-w7 kernel: [202067.511733]  <ffffffff8161bd03>] dump_stack+0x49/0x6a
2015-03-19T21:18:15.509109+02:00 rmuntean-w7 kernel: [202067.511741]  <ffffffff8105cad7>] warn_slowpath_common+0x77/0x90
2015-03-19T21:18:15.509110+02:00 rmuntean-w7 kernel: [202067.511748]  <ffffffff8105cb3c>] warn_slowpath_fmt+0x4c/0x50
2015-03-19T21:18:15.509112+02:00 rmuntean-w7 kernel: [202067.511755]  <ffffffff8147edd6>] usb_submit_urb.part.6+0x156/0x5b0
2015-03-19T21:18:15.509113+02:00 rmuntean-w7 kernel: [202067.511764]  <ffffffffa0ffca88>] xpad_irq_in+0x348/0x480 [xpad]
2015-03-19T21:18:15.509115+02:00 rmuntean-w7 kernel: [202067.511787]  <ffffffff8147beb3>] __usb_hcd_giveback_urb+0x73/0x100
2015-03-19T21:18:15.509116+02:00 rmuntean-w7 kernel: [202067.511805]  <ffffffffa0111f5d>] handle_tx_event+0x23d/0x12f0 [xhci_hcd]
2015-03-19T21:18:15.509117+02:00 rmuntean-w7 kernel: [202067.511836]  <ffffffffa01132c6>] xhci_irq+0x2b6/0xa10 [xhci_hcd]
2015-03-19T21:18:15.509118+02:00 rmuntean-w7 kernel: [202067.511871]  <ffffffff810b7785>] handle_irq_event_percpu+0x35/0x1d0
2015-03-19T21:18:15.509120+02:00 rmuntean-w7 kernel: [202067.511879]  <ffffffff810b795e>] handle_irq_event+0x3e/0x60
2015-03-19T21:18:15.509121+02:00 rmuntean-w7 kernel: [202067.511886]  <ffffffff810ba4b5>] handle_edge_irq+0x85/0x150
2015-03-19T21:18:15.509122+02:00 rmuntean-w7 kernel: [202067.511892]  <ffffffff8100514d>] handle_irq+0x1d/0x30
2015-03-19T21:18:15.509123+02:00 rmuntean-w7 kernel: [202067.511899]  <ffffffff816256f9>] do_IRQ+0x49/0xe0
2015-03-19T21:18:15.509125+02:00 rmuntean-w7 kernel: [202067.511905]  <ffffffff816236ad>] common_interrupt+0x6d/0x6d
2015-03-19T21:18:15.509126+02:00 rmuntean-w7 kernel: [202067.511915]  <ffffffff814dd2af>] cpuidle_enter_state+0x4f/0xc0
2015-03-19T21:18:15.509127+02:00 rmuntean-w7 kernel: [202067.511923]  <ffffffff810a1aa0>] cpu_idle_loop+0x2f0/0x440
2015-03-19T21:18:15.509129+02:00 rmuntean-w7 kernel: [202067.511929]  <ffffffff810a1c46>] cpu_startup_entry+0x56/0x60
2015-03-19T21:18:15.509130+02:00 rmuntean-w7 kernel: [202067.511936]  <ffffffff81f13048>] start_kernel+0x48d/0x498
2015-03-19T21:18:15.509131+02:00 rmuntean-w7 kernel: [202067.511942]  <ffffffff81f126fb>] x86_64_start_kernel+0x14d/0x15c
2015-03-19T21:18:15.509132+02:00 rmuntean-w7 kernel: [202067.511947] --- end trace a8fc85b7ff75a8c5 ]---
2015-03-19T21:18:15.510377+02:00 rmuntean-w7 mtp-probe: checking bus 3, device 7: "/sys/devices/pci0000:00/0000:00:1c.6/0000:0e:00.0/usb3/3-2"
2015-03-19T21:18:15.510487+02:00 rmuntean-w7 mtp-probe: bus: 3, device: 7 was not an MTP device


The solution for me was to use xboxdrv instead of xpad. Locally complied and executed after rmmod-ing xpad -> everything works like a charm.

There is a patch for xpad upstream and not applied in 13.2
So for those who prefer the kernel driver we should fix this. Can you give “lsusb -v” for your device to make sure the patch is aimed at the right devices?

Please see https://gist.github.com/rombert/6902ab691e12ab478e31 . Sorry for the off-site hosting, but I couldn’t get the formatting right