From owner-freebsd-x11@freebsd.org Sun Feb 12 20:01:39 2017 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 2A234CDC2A4 for ; Sun, 12 Feb 2017 20:01:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 141D61D1F for ; Sun, 12 Feb 2017 20:01:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 1383CCDC2A3; Sun, 12 Feb 2017 20:01:39 +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 132C7CDC2A2 for ; Sun, 12 Feb 2017 20:01:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 033A91D1E for ; Sun, 12 Feb 2017 20:01:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v1CK1cSF005396 for ; Sun, 12 Feb 2017 20:01:38 GMT (envelope-from bugzilla-noreply@freebsd.org) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: x11@FreeBSD.org Subject: maintainer-feedback requested: [Bug 217047] x11-drivers/xf86-input-joystick: driver does not pass PreInit Date: Sun, 12 Feb 2017 20:01:38 +0000 X-Bugzilla-Type: request X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: x11@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2017 20:01:39 -0000 Matthias Apitz has reassigned Bugzilla Automation 's request for maintainer-feedback to x11@FreeBSD.org: Bug 217047: x11-drivers/xf86-input-joystick: driver does not pass PreInit https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D217047 --- Description --- My son wants to play games/flightgear on his FreeBSD laptop and I have installed him a joystick THRUSTMASTER T-FLIGHT STICK X. The used software stack is: FreeBSD CURRENT r292778-amd64 Xorg 7.7.2 ... uhidd-0.2.1_3 xf86-input-joystick-1.6.2_4. all compiled from ports. The essential lines of the configuration in xorg.conf are: Section "ServerLayout" Identifier "X.org Configured" Screen 0 "Screen0" 0 0 InputDevice "Mouse0" "CorePointer" InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Joystick0" "SendCoreEvents" EndSection Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/sysmouse" Option "ZAxisMapping" "4 5 6 7" EndSection Section "InputDevice" Identifier "Joystick0" Driver "joystick" Option "MatchIsJoystick" "on" Option "Device" "/dev/uhid0" Option "DebugLevel" "7" Option "StartKeysEnabled" "True" Option "StartMouseEnabled" "True" Option "MapButton1" "button=3D1" Option "MapButton2" "button=3D2" Option "MapButton3" "button=3D3" Option "MapButton4" "none" Option "MapAxis1" "mode=3Drelative axis=3D+1x deadzone=3D5000" Option "MapAxis2" "mode=3Drelative axis=3D+1y deadzone=3D5000" Option "MapAxis3" "mode=3Drelative axis=3D+1zx deadzone=3D5000" Option "MapAxis4" "mode=3Drelative axis=3D+1zy deadzone=3D5000" Option "MapAxis5" "mode=3Daccelerated axis=3D+1x deadzone=3D5000" Option "MapAxis6" "mode=3Daccelerated axis=3D+1y deadzone=3D5000" Option "MapAxis7" "mode=3Dnone" EndSection ... The device /dev/uhid0 is there and gives data on move/buttons: $ od -tx1 /dev/uhid0 0000000 00 f0 ff 80 3a 80 ff 00 00 00 00 01 02 00 00 00 0000020 00 00 00 00 f0 ff 4f 10 80 ff 00 00 00 00 01 02 0000040 00 00 00 00 00 00 00 f0 ff 42 2e 80 ff 00 00 00 ... But in Xorg.0.log it says about the device: [ 7698.519] (II) LoadModule: "joystick" [ 7698.520] (II) Loading /usr/local/lib/xorg/modules/input/joystick_drv.so [ 7698.520] (II) Module joystick: vendor=3D"X.Org Foundation" [ 7698.520] compiled for 1.17.4, module version =3D 1.6.2 [ 7698.520] Module class: X.Org XInput Driver [ 7698.520] ABI class: X.Org XInput driver, version 21.0 ... [ 7698.925] (II) Using input driver 'joystick' for 'Joystick0' [ 7698.925] Option "MatchIsJoystick" "on" [ 7698.925] Option "Device" "/dev/uhid0" [ 7698.925] Option "DebugLevel" "7" [ 7698.925] Option "StartKeysEnabled" "True" [ 7698.925] Option "StartMouseEnabled" "True" [ 7698.925] Option "MapButton1" "button=3D1" [ 7698.925] Option "MapButton2" "button=3D2" [ 7698.925] Option "MapButton3" "button=3D3" [ 7698.925] Option "MapButton4" "none" [ 7698.925] Option "MapAxis1" "mode=3Drelative axis=3D+1x deadzone=3D5= 000" [ 7698.925] Option "MapAxis2" "mode=3Drelative axis=3D+1y deadzone=3D5= 000" [ 7698.925] Option "MapAxis3" "mode=3Drelative axis=3D+1zx deadzone=3D5= 000" [ 7698.925] Option "MapAxis4" "mode=3Drelative axis=3D+1zy deadzone=3D5= 000" [ 7698.925] Option "MapAxis5" "mode=3Daccelerated axis=3D+1x deadzone=3D5= 000" [ 7698.925] Option "MapAxis6" "mode=3Daccelerated axis=3D+1y deadzone=3D5= 000" [ 7698.925] Option "MapAxis7" "mode=3Dnone" [ 7698.925] Option "SendCoreEvents" [ 7698.925] Option "driver" "joystick" [ 7698.925] Option "identifier" "Joystick0" [ 7698.925] (**) Option "SendCoreEvents" [ 7698.925] (**) Joystick0: always reports core events [ 7698.926] (EE) PreInit returned 11 for "Joystick0" [ 7698.926] (II) UnloadModule: "joystick" I re-compiled x11-drivers/xf86-input-joystick with additional logging=20 statements in jstk.c jstk_key.c and it turned out that this initial sequence is not passed with success resulting in jstk.c the return value of 11 (BadAlloc):=20 ... xf86Msg(X_CONFIG, "debug: doing jstkKeyboardHotplug() \n"); while(opts) { xf86Msg(X_CONFIG, "debug: %s %s \n", xf86OptionName(opts), xf86OptionValue(opts)); iopts =3D input_option_new(iopts, xf86OptionName(opts), xf86OptionValue(opts)); opts =3D xf86NextOption(opts); } /* duplicate attribute list */ attrs =3D DuplicateInputAttributes(pInfo->attrs); rc =3D NewInputDeviceRequest(iopts, attrs, &dev); input_option_free_list(&iopts); FreeInputAttributes(attrs); xf86Msg(X_CONFIG, "debug: jstkKeyboardHotplug() end with rc =3D %d\n", = rc); return (rc =3D=3D Success) ? dev->public.devicePrivate : NULL; } The resulting additional "debug: ..." lines in Xorg.0.log are: [ 7698.925] (**) debug: doing jstkKeyboardHotplug()=20 [ 7698.925] (**) debug: MatchIsJoystick on=20 [ 7698.926] (**) debug: Device /dev/uhid0=20 [ 7698.926] (**) debug: DebugLevel 7=20 [ 7698.926] (**) debug: StartKeysEnabled True=20 [ 7698.926] (**) debug: StartMouseEnabled True=20 [ 7698.926] (**) debug: MapButton1 button=3D1=20 [ 7698.926] (**) debug: MapButton2 button=3D2=20 [ 7698.926] (**) debug: MapButton3 button=3D3=20 [ 7698.926] (**) debug: MapButton4 none=20 [ 7698.926] (**) debug: MapAxis1 mode=3Drelative axis=3D+1x deadzone= =3D5000=20 [ 7698.926] (**) debug: MapAxis2 mode=3Drelative axis=3D+1y deadzone= =3D5000=20 [ 7698.926] (**) debug: MapAxis3 mode=3Drelative axis=3D+1zx deadzone= =3D5000=20 [ 7698.926] (**) debug: MapAxis4 mode=3Drelative axis=3D+1zy deadzone= =3D5000=20 [ 7698.926] (**) debug: MapAxis5 mode=3Daccelerated axis=3D+1x deadzone= =3D5000=20 [ 7698.926] (**) debug: MapAxis6 mode=3Daccelerated axis=3D+1y deadzone= =3D5000=20 [ 7698.926] (**) debug: MapAxis7 mode=3Dnone=20 [ 7698.926] (**) debug: SendCoreEvents (null)=20 [ 7698.926] (**) debug: Driver joystick=20 [ 7698.926] (**) debug: identifier Joystick0=20 [ 7698.926] (**) debug: Name Joystick0 (keys)=20 [ 7698.926] (**) debug: _source _driver/joystick=20 [ 7698.926] (**) debug: jstkKeyboardHotplug() end with rc =3D 1 [ 7698.926] (**) debug: jstkCorePreInit(): return BadAlloc In general, the port of xf86-input-joystick-1.6.2_4 is not well adopted to FreeBSD, at least not its man page, which says: ... The evdev(4) driver will suffice for those in most cases. Do we have any evdev(4) driver in FreeBSD?