[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#576719: udev backwards compatibility



tags 576719 + patch
thanks

I also ran into this problem after upgrading xserver-xorg-core to
version 2:1.7.6-2

I'm using a customized udev rule to set two options for the touchpad on
my laptop, using "x11_options.*" environment variables:

bjorn@nemi:~$ udevadm info --query=all --path=/devices/platform/i8042/serio1/input/input6/event6
P: /devices/platform/i8042/serio1/input/input6/event6
N: input/event6
S: char/13:70
S: input/by-path/platform-i8042-serio-1-event-mouse
E: UDEV_LOG=3
E: DEVPATH=/devices/platform/i8042/serio1/input/input6/event6
E: MAJOR=13
E: MINOR=70
E: DEVNAME=/dev/input/event6
E: SUBSYSTEM=input
E: ID_INPUT=1
E: ID_INPUT_MOUSE=1
E: ID_INPUT_TOUCHPAD=1
E: ID_SERIAL=noserial
E: ID_PATH=platform-i8042-serio-1
E: x11_driver=synaptics
E: x11_options.SHMConfig=on
E: x11_options.TapButton1=1
E: DMI_VENDOR=LENOVO
E: DEVLINKS=/dev/char/13:70 /dev/input/by-path/platform-i8042-serio-1-event-mouse


AFAIK, this is currently the only way to configure the synaptics
driver, and I do need at least the TapButton1 configuration.

The attached patch enhances the udev backwards compatibilty by adding
any "x11_options." prefixed option to the config.  I really don't have a
clue whether this is a good idea or not, but it does at least restore
the previous behaviour for me.  YMMV


Bjørn


Attachment: pgpEFUPclBgKj.pgp
Description: PGP signature

From: Bjørn Mork <bjorn@mork.no>
Subject: Keep looking for x11_options in udev for now

Our drivers don't ship xorg.conf.d snippets for now, so keep using
x11_options from udev in the transition period.

Index: xorg-server/config/udev.c
===================================================================
--- xorg-server.orig/config/udev.c
+++ xorg-server/config/udev.c
@@ -36,6 +36,7 @@
 #include "os.h"
 
 #define UDEV_XKB_PROP_KEY "xkb"
+#define UDEV_X11OPTIONS_KEY "x11_options."
 
 static struct udev_monitor *udev_monitor;
 
@@ -120,6 +121,10 @@
                 add_option(&options, "xkb_options", value);
         } else if (!strcmp(key, "x11_driver")) {
             add_option(&options, "driver", value);
+	} else if (!strncasecmp(key, UDEV_X11OPTIONS_KEY,
+                                sizeof(UDEV_X11OPTIONS_KEY) - 1)) {
+            tmp = key + sizeof(UDEV_X11OPTIONS_KEY) - 1;
+	    add_option(&options, tmp, value);
         } else if (!strcmp(key, "ID_VENDOR")) {
             attrs.vendor = value;
         } else if (!strcmp(key, "ID_INPUT_KEY")) {

Reply to: