# Xboxdrv and LIBUSB error [solved]

## alienjon

While I did upgrade my kernel recently, I haven't used my XBox controller in a while (it's a Microsoft brand wireless) and I think that something happened where it stopped working the last time I tried using it.  Recently I wanted to play some Monoco with it and found that it wasn't working at all.  Here's the initial error, found in RC output:

```
 * Starting xboxdrv ...

 [ ok ]

[ERROR] XboxdrvDaemon::process_match(): failed to launch ControllerThread: USBController::usb_submit_read(): libusb_submit_transfer(): LIBUSB_ERROR_IO
```

```
[ebuild   R    ] games-util/xboxdrv-0.8.5-r1  0 kB

[ebuild   R    ] dev-libs/libusb-1.0.18:1  USE="udev -debug -doc -examples -static-libs {-test}" ABI_X86="(64) (-32) (-x32)" 0 kB
```

```
Bus 002 Device 003: ID 045e:0719 Microsoft Corp. Xbox 360 Wireless Adapter
```

```
uinput                  7633  1 

joydev                  9364  0 
```

```
crw-rw---- 1 root uinput 10, 223 Sep 10 22:15 /dev/uinput
```

```
[    2.444325] usb 2-1.1: Product: Xbox 360 Wireless Receiver for Windows

[   20.616853] input: Xbox Gamepad (userspace driver) as /devices/virtual/input/input6
```

In looking around a few places I noticed that udev permissions were problems for some people.  The error seems to indicate something else for me, but I tried it anyway.  The following is my udev rules file (this adds the rw- for the group of the above /dev/uinput device).

```
KERNEL=="uinput", GROUP="uinput", MODE:="0660"
```

Finally, my xboxdrv configuration:

```
XBOXDRV_OPTS="--mimic-xpad"
```

The controller seems to be recognized (lsusb sees it, the input device section of system settings - I use KDE - sees it, even Steam sees it) however none of the buttons seem to work and nothing happens if I try to calibrate the damn thing.  I do have the center 4 lights blinking regularly, though I believe this was the case previously as well (I can't exactly remember, as it has been a while, so that may be wrong)...Last edited by alienjon on Thu Nov 06, 2014 1:24 am; edited 1 time in total

----------

## mf2

Try running xboxdrv as root manually (not as a daemon).

----------

## alienjon

 *mf2 wrote:*   

> Try running xboxdrv as root manually (not as a daemon).

 

Hmmm...  Seems to work fine that way, actually.  At least, the ksystemsettings joystick calibration now recognizes it and the 4 central lights don't blink (only the first one stays on, as it should).  Makes me think this is a permissions issue now and not with LIBUSB.

As a side note (as my user):

```
wheel audio cdrom video games mysql cdrw apache usb users netdev kdm plugdev lpadmin locate sudoers chrome-remote-desktop boinc wireshark input tor avahi-autoipd avahi alienjon uinput truecrypt
```

----------

## alienjon

I've done a bit more testing and if I run xboxdrv as either root or as my user (even without any options) it works fine (I tried in both Steam big picture mode and Monoco).  Only running the init script doesn't work for me.  Thinking it was a permissions question, I even changed (temporarily) uinput and the event/js to rwx, but still no avail.  Now I'm thinking it probably isn't permissions (as full permissions doesn't seem to have an effect on it).  Could this somehow be a problem with the init script?  Could someone that has this driver working let me know what their setup is like? (permissions/xboxdrv options/etc...)

----------

## mf2

I am not sure about this, but I observed the same in my setup when using xboxdrv in an init script.

A (not very good) workaround is to add xboxdrv to the autostart list of your desktop environment, that at least works for me.

----------

## alienjon

Got it.  It seems that it was something in my kernel I neglected to enable that messed this up.  I needed both 'Root Hub Transaction Translators' and 'Improved Transaction Translator scheduling' enabled under Device Drivers->USB Support->EHCI HCD (USB 2.0) support.  I think it is actually only the second of these that's needed, but as the first is noted 'safe to use' even if it doesn't apply, I added both.

----------

