Date: Fri, 2 Oct 2015 05:09:17 +0300 From: Arto Pekkanen <isoa@kapsi.fi> To: Jan Beich <jbeich@vfemail.net> Cc: x11@freebsd.org Subject: Re: X.org devd hotplug backend ignoring uhid devices, prevents using gamepads with X.org Message-ID: <560DE74D.7020409@kapsi.fi> In-Reply-To: <wpv6-tcp1-wny@vfemail.net> References: <560C3890.7020004@kapsi.fi> <wpv6-tcp1-wny@vfemail.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--jJ8fSDWuN0vmrvoo6jkqXSboPF4GnOLeU
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
On 2.10.2015 2:02, Jan Beich wrote:
> Arto Pekkanen <isoa@kapsi.fi> writes:
>=20
>> Section "InputClass"
>> Identifier "Game Controller"
>> Driver "joystick"
>> Option "MatchIsJoystick" "on"
>=20
> MatchIsJoystick only works on devices that are assigned ATTR_JOYSTICK.
> config/devd currently only does so for joy(4) devices but not uhid(4) a=
s
> the latter isn't specific to joysticks. The proper detection may requir=
e
> teaching it to speak usbhid(3) but for now see inlined patch at the end=
=2E
>=20
> MatchIsJoystick is specified just like the following line. It isn't an
> option passed to a X11 driver.
Thank you very much for the reply!
Okay, I had a minor malfunction there. MatchIsJoystick should not be an o=
ption, true that.
I will patch xorg-server and rebuild & install, see if it helps.
Also, the patch you provided was really helpful for me to learn about whe=
re all the important bits of code reside. I've not looked at the devd bac=
kend code yet, but I suppose learning how it works would be for the bette=
r. Well, supposing I have enough talent to understand the code. We shall =
see.
>> MatchDevicePath "/dev/uhid*"
>=20
> 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=3D0x03 in devd(8).
Hmm, so my conclusion was at least partially correct. Very well.
>> 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.
>=20
> FWIW, emulators/joytran maybe more useful for Wine unless all your game=
s
> have the same keybindings.
Good for you to mention, I do know of emulators/joytran. I've used that i=
n Linuxen to get emulators and similar software working properly. Some (a=
ctually, too many) programs have horribly buggy or lacking hid subsystems=
, and only keyboard input works properly.
But in my case there are certain (Windows) games that have very specific =
control schemes that practically require a game pad with two analog stick=
s. So I shall try if I can get the game pad to attach into X input layer.=
> Index: x11-servers/xorg-server/files/patch-config_devd.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- 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 */=20
> ++ { "uhid", ATTR_JOYSTICK, "joystick" },
> ++ { "atp", ATTR_TOUCHPAD, "mouse" },
> ++ { "uep", ATTR_TOUCHSCREEN, "egalax" },
> + { NULL, -1, NULL },
> +};
> +
>=20
Thank you very much for the patch, I will try this as soon as I wake up f=
rom sleep and get my brain functioning again.
--jJ8fSDWuN0vmrvoo6jkqXSboPF4GnOLeU
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (MingW32)
iF4EAREIAAYFAlYN51QACgkQTBivhqtJa25F5gD+JbgmAEZ85W8H067ZYZyvyRxV
25jYhNCIjV6GjSodp3gBAMIfOQDrxF6oLT23JY25vU5SSacw9XmTmneaOAkwi1uE
=j2Jr
-----END PGP SIGNATURE-----
--jJ8fSDWuN0vmrvoo6jkqXSboPF4GnOLeU--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?560DE74D.7020409>
