# issue with gamepad (Microsoft Corporation. Controller, rev 2.00/1.00)



## skeletonboss12 (Jul 6, 2020)

I have a generic xbox USB controller (think for the 360) that I am trying to get working on FreeBSD 12 x64 on my laptop that I have tried connecting with and without usb 3.0


I installed "x11-drivers/xf86-input-joystick" and "sysutils/uhidd"

And configured uhidd like so:


```
uhidd_flags="-kmohs"
uhidd_enable="YES"
```

However, the controller does not connect properly (the light will not stay in) and xev detects no input from it. And as such, there is no device to write mappings for in my x11 conf files..

It can be seen loading at boot....

```
ugen1.3: <Microsoft Corporation. Controller> at usbus1
```
and being connected/disconnected...

```
ugen1.3: <Microsoft Corporation. Controller> at usbus1 (disconnected)
uhid0: at uhub3, port 3, addr 3 (disconnected)
uhid0: detached
ugen1.3: <Microsoft Corporation. Controller> at usbus1
uhid0 on uhub3

uhid0: <Microsoft Corporation. Controller, rev 2.00/1.00, addr 3> on usbus1
```

Any ideas? freebsd has such a wide array of emulators available, even a ps3 debugging/emulator tool available, so some people must have functioning gamepads..



I have not been able to try linux-js, because like many packages these days it is broken dead and gone.


----------



## SirDice (Jul 6, 2020)

My Logitech F710 (Xbox360 compatible) works, sort of. Only the analog sticks and buttons work,  the direction pad does not. And  you typically don't need a driver, things like SDL seem to pick up the joysticks regardless. But as I said, the direction pad doesn't seem to work and I have no idea why.


----------



## skeletonboss12 (Jul 6, 2020)

SirDice said:


> My Logitech F710 (Xbox360 compatible) works, sort of. Only the analog sticks and buttons work,  the direction pad does not. And  you typically don't need a driver, things like SDL seem to pick up the joysticks regardless. But as I said, the direction pad doesn't seem to work and I have no idea why.



I don't mind mapping the d-pad in particular to arrow keys.  Your issue seems to be shared among many here, it makes me wonder why so many emulators have the effort of being ported here put into them. 

May I have your xorg conf file for this device, please?


----------



## SirDice (Jul 6, 2020)

skeletonboss12 said:


> May I have your xorg conf file for this device, please?


There is none. There's no need to configure anything. I need to check again now that evdev(4) is enabled though. But so far the focus seems to be on keyboards and mice.


----------



## skeletonboss12 (Jul 6, 2020)

I see, so if my device will not load then there is nothing I can do?


----------



## SirDice (Jul 6, 2020)

There's nothing you _should_ do. There is no device for it, and this doesn't matter, you don't need one.


----------



## shkhln (Jul 6, 2020)

skeletonboss12 said:


> "x11-drivers/xf86-input-joystick"



Does not provide gamepad input to applications.


----------



## skeletonboss12 (Jul 7, 2020)

So how can I get this to work then? xev detects no input from this thing and I do not think xorg recognizes it as something that can give input..


----------



## shkhln (Jul 7, 2020)

Let's restate the problem. Imagine you are writing a program receiving gamepad events. What will you use?


----------



## skeletonboss12 (Jul 7, 2020)

shkhln said:


> Let's restate the problem. Imagine you are writing a program receiving gamepad events. What will you use?



antimicro and various emulators do not pick up any uhidd joystick device.

Anyways, I just plugged in my ds4 controller via usb and it seems to actually work, d-pad and all. maybe freebsd just did not like my xbox controller


----------

