uinput device doesn't show in gamepad/joystick list

Peter Hutterer peter.hutterer at who-t.net
Sat Oct 10 22:02:45 PDT 2015


On Sat, Oct 10, 2015 at 06:39:23PM +0300, Coşku Baş wrote:
> Hi there,
> 
> I have created a virtual gamepad that mimics the events received from a
> physical gamepad over a network connection.
> 
> To test if the system works I have run evtest and surely the virtual device
> emits the correct events.
> 
> The problem is I can't seem to get any game recognize the virtual gamepad.
> Most of the games I tried use SDL2 so I have run sdl2-jstest application
> and expectedly the virtual device was not listed. Is it possible to
> advertise my uinput device as a real gamepad so that games can make use of
> it?
> 
> As a side note, evtest only lists the device if it's ran as root. Running
> sdl2-jstest as root did not made a difference though.
> 
> Any help would be appreciated.
> Thanks.

first guess here is that the ID_INPUT_JOYSTICK or some other tag isn't
applied by udev, so the rest of the system doesn't identify it correctly.
that could lead to e.g. the X server not initializing it. Usually the
solution to that is to either add a specific set of axes/buttons to trigger
the tag, or assign the tag manually with a custom rule.

What's the evemu-describe output of the device?

Cheers,
   Peter


More information about the Input-tools mailing list