From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Oct 3 18:20:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B42AB5D7 for ; Thu, 3 Oct 2013 18:20:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9271525CE for ; Thu, 3 Oct 2013 18:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r93IK07i079379 for ; Thu, 3 Oct 2013 18:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r93IK0PE079378; Thu, 3 Oct 2013 18:20:00 GMT (envelope-from gnats) Resent-Date: Thu, 3 Oct 2013 18:20:00 GMT Resent-Message-Id: <201310031820.r93IK0PE079378@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Matthieu Volat Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AEA525C5 for ; Thu, 3 Oct 2013 18:19:00 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8C82D25C4 for ; Thu, 3 Oct 2013 18:19:00 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r93IIx3X007998 for ; Thu, 3 Oct 2013 18:19:00 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r93IIxOI007997; Thu, 3 Oct 2013 18:18:59 GMT (envelope-from nobody) Message-Id: <201310031818.r93IIxOI007997@oldred.freebsd.org> Date: Thu, 3 Oct 2013 18:18:59 GMT From: Matthieu Volat To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/182609: [patch] x11-servers/xorg-server: really init and configure devd config backend X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Oct 2013 18:20:00 -0000 >Number: 182609 >Category: ports >Synopsis: [patch] x11-servers/xorg-server: really init and configure devd config backend >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Oct 03 18:20:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Matthieu Volat >Release: 9.2-RELEASE >Organization: >Environment: FreeBSD freedom.alkumuna.eu 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: I've found that the experimental devd config backend in xorg-server is not correctly initialized and listed in various source files. The problem is that without it, the xserver will not recognize and use devd. >How-To-Repeat: * build xorg-server with devd config backend * startx * take a look at /var/log/Xorg.0.log * X will report not enabling autoconf and lack of hotpluging backend, no config/devd lines about adding inputs >Fix: Here is a patch for config/config.c, include/dix-config.h, hw/xfree86/common/xf86Config.c and hw/xfree86/common/xf86Globals.c include/dix-config.h patch will harcode-enable devd, so only apply it if you don't want to use HAL backend. Patch attached with submission follows: --- config/config.c.orig 2013-10-03 20:05:57.000000000 +0200 +++ config/config.c 2013-10-03 20:07:21.000000000 +0200 @@ -35,7 +35,10 @@ void config_init(void) { -#ifdef CONFIG_UDEV +#if defined(CONFIG_DEVD) + if (!config_devd_init()) + ErrorF("[config] failed to initialise devd\n"); +#elif defined(CONFIG_UDEV) if (!config_udev_init()) ErrorF("[config] failed to initialise udev\n"); #elif defined(CONFIG_NEED_DBUS) @@ -61,7 +64,9 @@ void config_fini(void) { -#if defined(CONFIG_UDEV) +#if defined(CONFIG_DEVD) + config_devd_fini(); +#elif defined(CONFIG_UDEV) config_udev_fini(); #elif defined(CONFIG_NEED_DBUS) #ifdef CONFIG_HAL --- include/dix-config.h.in.orig 2013-10-03 19:44:37.000000000 +0200 +++ include/dix-config.h.in 2013-10-03 19:45:03.000000000 +0200 @@ -384,6 +384,9 @@ /* Support D-Bus */ #undef HAVE_DBUS +/* Use devd for input hotplug */ +#define CONFIG_DEVD 1 + /* Use libudev for input hotplug */ #undef CONFIG_UDEV --- hw/xfree86/common/xf86Config.c.orig 2013-10-03 19:42:26.000000000 +0200 +++ hw/xfree86/common/xf86Config.c 2013-10-03 20:08:21.000000000 +0200 @@ -1371,10 +1371,12 @@ } if (!xf86Info.forceInputDevices && !(foundPointer && foundKeyboard)) { -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) +#if defined(CONFIG_DEVD) || defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) const char *config_backend; -#if defined(CONFIG_HAL) +#if defined(CONFIG_DEVD) + config_backend = "devd"; +#elif defined(CONFIG_HAL) config_backend = "HAL"; #elif defined(CONFIG_UDEV) config_backend = "udev"; --- hw/xfree86/common/xf86Globals.c.orig 2013-10-03 19:43:25.000000000 +0200 +++ hw/xfree86/common/xf86Globals.c 2013-10-03 19:43:47.000000000 +0200 @@ -122,7 +122,7 @@ .log = LogNone, .disableRandR = FALSE, .randRFrom = X_DEFAULT, -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) +#if defined(CONFIG_DEVD) || defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) .forceInputDevices = FALSE, .autoAddDevices = TRUE, .autoEnableDevices = TRUE >Release-Note: >Audit-Trail: >Unformatted: