[systemd-devel] [PATCH v2 2/4] udev: Update pointingstick rules to allow setting ibm trackpoint sensitivity
Hans de Goede
hdegoede at redhat.com
Fri Apr 3 07:11:58 PDT 2015
The IBM / Lenovo trackpoints are special, they allow specifying a sensitivity
setting through a ps/2 command, which changes the range of the deltas send when
using the trackpoint. One some models with normal usage one only deltas
of 1 or 2 are send, resulting in there only being 2 mouse cursor movement
speeds, rather then the expected fluid scale.
Changing the sensitivity to a higher level then 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 | 11 +++++++++++
rules/70-pointingstick.rules | 9 +++++++--
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/hwdb/70-pointingstick.hwdb b/hwdb/70-pointingstick.hwdb
index a893da6..d92434e 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,16 @@
# 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.
+#
#
# 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