ports/182609: [patch] x11-servers/xorg-server: really init and configure devd config backend
Matthieu Volat
mazhe at alkumuna.eu
Thu Oct 3 18:20:00 UTC 2013
>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 at 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:
More information about the freebsd-ports-bugs
mailing list