ports/132270: xorg-server can't load usb keyboards via config/hal

Jose M Rodriguez josemi at freebsd.jazztel.es
Tue Mar 3 01:00:10 UTC 2009


>Number:         132270
>Category:       ports
>Synopsis:       xorg-server can't load usb keyboards via config/hal
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 03 01:00:09 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Jose M Rodriguez
>Release:        FreeBSD 7.1-RELEASE-p3 i386
>Organization:
Redes JM
>Environment:
System: FreeBSD hermes 7.1-RELEASE-p3 FreeBSD 7.1-RELEASE-p3 #0: Mon Mar 2 03:34:41 CET 2009 root at hermes:/usr/obj/usr/src/sys/HERMES i386

machine only with usb keyboard
kernel build without atkbd / kbdmux devices

>Description:
	xorg-server can't load usb keyboards via config/hal.
	It fails at device open, as hal have a device key.

	This is not noticeable in an stock system.
	The presence of an atkbd without a hal device key
	makes xorg-server load the module.

	Seems that xorg-server keyboard is not device oriented
	and hal must not have a device key for usb keyboard 

>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

>Fix:
	Don't add a device key for usb keyborads, as is done
	for at ones (PS/2)

	- hf_device_set_input(device, "keyboard", devname);
	+ hf_device_set_input(device, "keyboard", NULL);


--- pr.patch begins here ---
--- sysutils/hal/files/patch-hald_freebsd_hf-usb.c.old	2009-03-02 15:34:52.000000000 +0100
+++ sysutils/hal/files/patch-hald_freebsd_hf-usb.c	2009-03-02 04:27:23.000000000 +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 <config.h>
  #endif
@@ -31,7 +31,7 @@
  
  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]);
+ 
+   if ((devname = 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 = hf_usb_get_devname(di, "ums")))	/* USB mouse */
+     hf_device_set_input(device, "mouse", devname);
+   else if ((devname = 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 @@
  
        hf_device_add(device);
      }
-@@ -633,9 +646,18 @@ hf_usb_privileged_init (void)
+@@ -633,9 +646,18 @@
  {
    int i;
  
--- pr.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list