[systemd-devel] [PATCH v3 2/4] udev: Update pointingstick rules to allow setting ibm trackpoint sensitivity

Hans de Goede hdegoede at redhat.com
Tue Apr 7 03:09:49 PDT 2015


IBM / Lenovo trackpoints allow specifying a sensitivity setting through a
ps/2 command, which changes the range of the deltas sent when using the
trackpoint. On some models with normal usage only deltas of 1 or 2 are send,
resulting in there only being 2 mouse cursor movement speeds, rather than
the expected fluid scale.

Changing the sensitivity to a higher level than the bootup default fixes this,
the rule additions in this commit allows specifying a new sensitivity default
through hwdb giving a better ootb experience.
---
 hwdb/70-pointingstick.hwdb   | 12 ++++++++++++
 rules/70-pointingstick.rules |  9 +++++++--
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/hwdb/70-pointingstick.hwdb b/hwdb/70-pointingstick.hwdb
index a893da6..89f4b8a 100644
--- a/hwdb/70-pointingstick.hwdb
+++ b/hwdb/70-pointingstick.hwdb
@@ -42,6 +42,7 @@
 #
 # Allowed properties are:
 #   POINTINGSTICK_CONST_ACCEL
+#   POINTINGSTICK_SENSITIVITY
 #
 #########################################
 #      POINTINGSTICK_CONST_ACCEL        #
@@ -54,6 +55,17 @@
 # by how much to multiply deltas generated by the pointingstick to get
 # normalized deltas.
 #
+#########################################
+#      POINTINGSTICK_SENSITIVITY        #
+#########################################
+#
+# TPPS/2 IBM TrackPoint driver sensitivity sysfs setting
+#    POINTINGSTICK_SENSITIVITY=<sensitivity>
+#
+# Where <sensitivity> is a number between 0 and 255, note this property
+# only applies to TPPS/2 IBM TrackPoint devices, see
+# drivers/input/mouse/trackpoint.c in the Linux kernel sources.
+#
 
 #
 # Sort by by brand, model
diff --git a/rules/70-pointingstick.rules b/rules/70-pointingstick.rules
index 5a853f3..15e34a0 100644
--- a/rules/70-pointingstick.rules
+++ b/rules/70-pointingstick.rules
@@ -6,11 +6,16 @@ ENV{ID_INPUT_POINTINGSTICK}=="", GOTO="pointingstick_end"
 
 # skip later rules when we find something for this input device
 IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=pointingstick:", \
-  GOTO="pointingstick_end"
+  GOTO="pointingstick_apply_settings"
 
 # device matching the input device name and the machine's DMI data
 KERNELS=="input*", \
   IMPORT{builtin}="hwdb 'pointingstick:name:$attr{device/name}:$attr{[dmi/id]modalias}'", \
-  GOTO="pointingstick_end"
+  GOTO="pointingstick_apply_settings"
+
+LABEL="pointingstick_apply_settings"
+
+TEST=="../../../sensitivity", ENV{POINTINGSTICK_SENSITIVITY}!="", \
+  ATTR{../../../sensitivity}="$env{POINTINGSTICK_SENSITIVITY}"
 
 LABEL="pointingstick_end"
-- 
2.3.4



More information about the systemd-devel mailing list