From owner-freebsd-x11@freebsd.org Wed Sep 30 19:32:01 2015 Return-Path: Delivered-To: freebsd-x11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4885A0B2CE for ; Wed, 30 Sep 2015 19:32:01 +0000 (UTC) (envelope-from isoa@kapsi.fi) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id A7F821080 for ; Wed, 30 Sep 2015 19:32:01 +0000 (UTC) (envelope-from isoa@kapsi.fi) Received: by mailman.ysv.freebsd.org (Postfix) id A7347A0B2CD; Wed, 30 Sep 2015 19:32:01 +0000 (UTC) Delivered-To: x11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CD1FA0B2CC for ; Wed, 30 Sep 2015 19:32:01 +0000 (UTC) (envelope-from isoa@kapsi.fi) Received: from mail.kapsi.fi (mx1.kapsi.fi [IPv6:2001:1bc8:1004::1:25]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F122107F for ; Wed, 30 Sep 2015 19:32:00 +0000 (UTC) (envelope-from isoa@kapsi.fi) Received: from 91-159-15-56.elisa-laajakaista.fi ([91.159.15.56] helo=[192.168.255.112]) by mail.kapsi.fi with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1ZhN6a-00017b-JD for x11@freebsd.org; Wed, 30 Sep 2015 22:31:56 +0300 To: x11@freebsd.org From: Arto Pekkanen Subject: X.org devd hotplug backend ignoring uhid devices, prevents using gamepads with X.org X-Enigmail-Draft-Status: N1110 Message-ID: <560C3890.7020004@kapsi.fi> Date: Wed, 30 Sep 2015 22:31:28 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="QD7nkNl30ALxgNP3jkfArPNvn2eqfIgdw" X-SA-Exim-Connect-IP: 91.159.15.56 X-SA-Exim-Mail-From: isoa@kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Sep 2015 19:32:02 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --QD7nkNl30ALxgNP3jkfArPNvn2eqfIgdw Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I have an XBox 360 controller that is attached as /dev/uhid0 by the kerne= l.=20 I have also declared a catch-all InputClass for hid devices in order to h= ave X.org use gamepads automatically: -- file: /usr/local/etc/X11/xorg.conf.d/30-joystick.conf Section "InputClass" Identifier "Game Controller" Driver "joystick" Option "MatchIsJoystick" "on" MatchDevicePath "/dev/uhid*" EndSection The above was derived from the man page of joystick(4x). As I understood,= here's how it works: - when X.org get notified about a /dev/uhid* device, it would dispatch th= e device to joystick(4x) (package: x11-drivers/xf86-input-joystick) - joystick(4x) would then test if the device is a hid joystick or not - if the device was a joystick, joystick(4x) would attach it to X.org as = input device, after which X11 applications could use it - by default the joystick directional input would double as main pointer = input, but that can be disabled with spesific options in InputClass However, this simply doesn't work, because the X.org devd backend ignores= all uhid devices. When I connect my gamepad, logfile Xorg.0.log outputs = the following: [(timestamp)] (II) config/devd: ignoring device uhid0 This means that my the InputClass definition is never matched, and joysti= ck(4x) is never attached to uhid0. Thus I can't get the gamepad to work w= ith X.org. I would like to get my gamepad working as a genuine X11 input device, pre= ferably 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 And yes, I do know there is uhidd(8) installable via pkg, and I could use= it as a replacement for X.org input layer. uhidd(8) enables specific per= -device configuration, similarly to the X.org InputClass. And some applic= ations (NOT all) can be forced to use the raw /dev/uhidX device. I know a= ll that, and could do it. I just think that the correct way of using hid = devices in X.org context would be to use then via X11 input layer. Is there a way to force the X.org devd backend to not ignore uhid devices= and have them configured as per InputClass definitions? If not, are ther= e any plans to incorporate a reliable uhid configuration function to the = devd backend? And finally, how would I get my gamepad to work as X.org input device? --=20 Arto Pekkanen, s=C3=A4=C3=A4t=C3=A4j=C3=A4 ksym@IRCnet --QD7nkNl30ALxgNP3jkfArPNvn2eqfIgdw 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) iF4EAREIAAYFAlYMOJMACgkQTBivhqtJa24VVgD/TtL6lQjbCLh59E8sEmEKU0ip 06RJlJe5Qp9ddICg0IMBAJLUO8vhZCi9oshvM3BBo/85Ely/GxuJEDk/PxlhfHve =LAFt -----END PGP SIGNATURE----- --QD7nkNl30ALxgNP3jkfArPNvn2eqfIgdw--