AllowEmptyInput and HAL

Peter Hutterer peter.hutterer at who-t.net
Wed Apr 29 18:59:25 PDT 2009


On Wed, Apr 29, 2009 at 10:09:05AM +1000, Daniel Stone wrote:
> On Tue, Apr 28, 2009 at 10:01:25PM +0100, Phil Endecott wrote:
> > Specifically, when X started I had no keyboard or mouse.   After 
> > power-cycling [no other way to escape!] I found a message in the log 
> > saying that "AllowEmptyInput" was enabled and that my keyboard and 
> > mouse configuration was being ignored.  Having looked this up in man 
> > xorg.conf I see that this mode is the default.  I'll try to be polite: 
> > This does not seem like the most useful behaviour.
> 
> AllowEmptyInput does not mean that your keyboard and mouse configuration
> is being ignored; conversely, it means that it's not a fatal error to
> have no keyboard and mouse configuration whatsoever.  So if AEI changes
> anything, you don't have a keyboard and mouse configured.

AEI on disables xorg.conf devices. Simply because it's the most reliable
indicator whether we might get hot-plugged devices later that will interfere
and it has this nasty effect of forcing default devices if off.
There's probably a more complete check that includes AEI and AutoAddDevices
and parsing the devices actually configured, but I haven't thought in detail
about it because the current alternative ('delete the xorg.conf') works well
enough.

> > I also noticed some messages in the log where "config/hal" complained 
> > that "NewInputDeviceRequest failed".  Presumably this is because of my 
> > AutoAddDevices.  I had noticed that Debian installed "hal"; I had not 
> > previously heard of it.  It looks like something that sits on top of udev.
> 
> Yes, it is.  NewInputDeviceRequest failing sounds like the evdev driver
> isn't installed.  BTW, attaching complete logs instead of two-word
> snippets often leads to significantly more happiness.

NIDR throws errors if AutoAddDevices is disabled, which may lead to confusion,
see patch below.

Cheers,
  Peter

>From 5ae8a7857c2833872c10ca66e6dbfefbbde003ec Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer at who-t.net>
Date: Thu, 30 Apr 2009 11:39:50 +1000
Subject: [PATCH] xfree86: print a message if NIDR fails due to AutoAddDevices off.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 hw/xfree86/common/xf86Xinput.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index a035fca..3859741 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -620,12 +620,11 @@ NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev)
         /* Right now, the only automatic config we know of is HAL. */
         if (strcmp(option->key, "_source") == 0 &&
             strcmp(option->value, "server/hal") == 0) {
+            is_auto = 1;
             if (!xf86Info.autoAddDevices) {
                 rval = BadMatch;
                 goto unwind;
             }
-
-            is_auto = 1;
         }
     }
     if (!idev->driver || !idev->identifier) {
@@ -654,6 +653,8 @@ NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev)
         return Success;
 
 unwind:
+    if (is_auto && !xf86Info.autoAddDevices)
+        xf86Msg(X_INFO, "AutoAddDevices is off - not adding device.\n");
     if(idev->driver)
         xfree(idev->driver);
     if(idev->identifier)
-- 
1.6.3.rc1.1.g81c43.dirty




More information about the xorg mailing list