From owner-freebsd-gnome@FreeBSD.ORG Tue Mar 3 03:17:18 2009 Return-Path: Delivered-To: gnome@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D63A5106566B; Tue, 3 Mar 2009 03:17:18 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id 990D38FC18; Tue, 3 Mar 2009 03:17:18 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from [192.168.1.2] (adsl-1-207-68.bna.bellsouth.net [65.1.207.68]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id n233Fs2A053659 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 2 Mar 2009 22:15:55 -0500 (EST) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: Jose M Rodriguez In-Reply-To: <200903030039.n230dfYk083990@redesjm.local> References: <200903030039.n230dfYk083990@redesjm.local> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-J1hog6M5UqvHqyp/EoaK" Organization: FreeBSD Date: Mon, 02 Mar 2009 21:17:07 -0600 Message-Id: <1236050227.1384.3.camel@widget.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.24.4 FreeBSD GNOME Team Port X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_PBL, RCVD_IN_SORBS_DUL,RDNS_DYNAMIC autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: gnome@freebsd.org, FreeBSD-gnats-submit@freebsd.org Subject: Re: xorg-server can't load usb keyboards via config/hal X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2009 03:17:19 -0000 --=-J1hog6M5UqvHqyp/EoaK Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tue, 2009-03-03 at 01:39 +0100, Jose M Rodriguez wrote: > >Submitter-Id: current-users > >Originator: Jose M Rodriguez > >Organization: Redes JM > >Confidential: no > >Synopsis: xorg-server can't load usb keyboards via config/hal > >Severity: serious > >Priority: medium > >Category: ports > >Class: sw-bug > >Release: FreeBSD 7.1-RELEASE-p3 i386 > >Environment: > System: FreeBSD hermes 7.1-RELEASE-p3 FreeBSD 7.1-RELEASE-p3 #0: Mon Mar = 2 03:34:41 CET 2009 root@hermes:/usr/obj/usr/src/sys/HERMES i386 >=20 > machine only with usb keyboard > kernel build without atkbd / kbdmux devices >=20 > >Description: > xorg-server can't load usb keyboards via config/hal. > It fails at device open, as hal have a device key. >=20 > This is not noticeable in an stock system. > The presence of an atkbd without a hal device key > makes xorg-server load the module. >=20 > Seems that xorg-server keyboard is not device oriented > and hal must not have a device key for usb keyboard=20 >=20 > >How-To-Repeat: > You can see this on the Xorg logs. > In systems without kernel atkbd device, xorg-server > can't get a functional keyboad >=20 > >Fix: > Don't add a device key for usb keyborads, as is done > for at ones (PS/2) >=20 > - hf_device_set_input(device, "keyboard", devname); > + hf_device_set_input(device, "keyboard", NULL); >=20 This appears to be correct, though incomplete. It doesn't address usb2, but I fixed that up. The keyboard driver does have the ability to open character devices, but in our case syscons always takes control of the device nodes. This will likely also fix the cases where people set keyboard options in fdi files on usb keyboards. robert. > --- pr.patch begins here --- > --- sysutils/hal/files/patch-hald_freebsd_hf-usb.c.old 2009-03-02 15:34:5= 2.000000000 +0100 > +++ sysutils/hal/files/patch-hald_freebsd_hf-usb.c 2009-03-02 04:27:23.00= 0000000 +0100 > @@ -1,5 +1,5 @@ > ---- hald/freebsd/hf-usb.c.orig 2008-05-07 19:24:02.000000000 -0400 > -+++ hald/freebsd/hf-usb.c 2009-02-27 14:01:46.000000000 -0500 > +--- hald/freebsd/hf-usb.c.orig 2008-05-08 01:24:02.000000000 +0200 > ++++ hald/freebsd/hf-usb.c 2009-03-02 04:23:32.000000000 +0100 > @@ -25,13 +25,18 @@ > # include > #endif > @@ -31,7 +31,7 @@ > =20 > typedef struct > { > -@@ -231,7 +241,7 @@ hf_usb_get_full_config_descriptor (int f > +@@ -231,7 +241,7 @@ > * Adapted from usb_compute_udi() in linux2/physdev.c and > * usbclass_compute_udi() in linux2/classdev.c. > */ > @@ -40,7 +40,7 @@ > hf_usb_device_compute_udi (HalDevice *device) > { > g_return_if_fail(HAL_IS_DEVICE(device)); > -@@ -250,12 +260,13 @@ hf_usb_device_compute_udi (HalDevice *de > +@@ -250,12 +260,13 @@ > hf_device_set_udi(device, "usb_device_%x_%x_%s", > hal_device_property_get_int(device, "usb_device.vendor_id"), > hal_device_property_get_int(device, "usb_device.product_id"), > @@ -56,7 +56,16 @@ > hf_usb_add_webcam_properties (HalDevice *device) > { > int unit; > -@@ -575,6 +586,8 @@ hf_usb_probe_device (HalDevice *parent, > +@@ -424,7 +435,7 @@ > + hf_devtree_device_set_name(device, di->udi_devnames[0]); > +=20 > + if ((devname =3D hf_usb_get_devname(di, "ukbd"))) /* USB keyboard */ > +- hf_device_set_input(device, "keyboard", devname); > ++ hf_device_set_input(device, "keyboard", NULL); > + else if ((devname =3D hf_usb_get_devname(di, "ums"))) /* USB mouse */ > + hf_device_set_input(device, "mouse", devname); > + else if ((devname =3D hf_usb_get_devname(di, "uhid"))) /* UHID device= */ > +@@ -575,6 +586,8 @@ > { > if (hal_device_has_capability(device, "hiddev")) > hf_runner_run_sync(device, 0, "hald-probe-hiddev", NULL); > @@ -65,7 +74,7 @@ > =20 > hf_device_add(device); > } > -@@ -633,9 +646,18 @@ hf_usb_privileged_init (void) > +@@ -633,9 +646,18 @@ > { > int i; > =20 > --- pr.patch ends here --- >=20 >=20 > _______________________________________________ > freebsd-gnome@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-gnome > To unsubscribe, send any mail to "freebsd-gnome-unsubscribe@freebsd.org" --=20 Robert Noland FreeBSD --=-J1hog6M5UqvHqyp/EoaK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEABECAAYFAkmsoTMACgkQM4TrQ4qfROMrrwCeOIKQu5JL93pw2k9qUIAlpKub TJYAnAsY2x+fZ2rmG1vjd6NQfhFTbf08 =8P6F -----END PGP SIGNATURE----- --=-J1hog6M5UqvHqyp/EoaK--