X.org devd hotplug backend ignoring uhid devices, prevents using gamepads with X.org
Jan Beich
jbeich at vfemail.net
Fri Oct 2 00:01:36 UTC 2015
Arto Pekkanen <isoa at kapsi.fi> writes:
> Section "InputClass"
> Identifier "Game Controller"
> Driver "joystick"
> Option "MatchIsJoystick" "on"
MatchIsJoystick only works on devices that are assigned ATTR_JOYSTICK.
config/devd currently only does so for joy(4) devices but not uhid(4) as
the latter isn't specific to joysticks. The proper detection may require
teaching it to speak usbhid(3) but for now see inlined patch at the end.
MatchIsJoystick is specified just like the following line. It isn't an
option passed to a X11 driver.
> MatchDevicePath "/dev/uhid*"
config/devd is a bit too pessimistic. Any device not in hw_types table
seems to be ignored by default, so MatchDevicePath may not be applied.
For one, config/udev only ignores non-ID_INPUT devices which translates
for USB into intclass=0x03 in devd(8).
> EndSection
[...]
> I would like to get my gamepad working as a genuine X11 input device,
> preferably hot pluggable. There are plenty applications that support
> the X11 input layer and can use gamepads and other widgets. One such
> application that comes to mind is Wine.
FWIW, emulators/joytran maybe more useful for Wine unless all your games
have the same keybindings.
Index: x11-servers/xorg-server/files/patch-config_devd.c
===================================================================
--- x11-servers/xorg-server/files/patch-config_devd.c (revision 398150)
+++ x11-servers/xorg-server/files/patch-config_devd.c (working copy)
@@ -1,6 +1,6 @@
--- config/devd.c.orig 2015-05-19 19:41:49 UTC
+++ config/devd.c
-@@ -0,0 +1,531 @@
+@@ -0,0 +1,533 @@
+/*
+ * Copyright (c) 2012 Baptiste Daroussin
+ * Copyright (c) 2013, 2014 Alex Kozlov
@@ -80,9 +80,11 @@
+ { "ums", ATTR_POINTER, "mouse" },
+ { "psm", ATTR_POINTER, "mouse" },
+ { "vboxguest", ATTR_POINTER, "vboxmouse" },
-+ { "joy", ATTR_JOYSTICK, NULL },
-+ { "atp", ATTR_TOUCHPAD, NULL },
-+ { "uep", ATTR_TOUCHSCREEN, NULL },
++ { "joy", ATTR_JOYSTICK, "void" },
++ /* XXX joystick is more useful than void by default */
++ { "uhid", ATTR_JOYSTICK, "joystick" },
++ { "atp", ATTR_TOUCHPAD, "mouse" },
++ { "uep", ATTR_TOUCHSCREEN, "egalax" },
+ { NULL, -1, NULL },
+};
+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 602 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-x11/attachments/20151002/ba9b9d1b/attachment.bin>
More information about the freebsd-x11
mailing list