Hi,
On 07-04-15 12:23, David Herrmann wrote:
Hi
On Tue, Apr 7, 2015 at 12:09 PM, Hans de Goede <[email protected]> wrote:
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}"
You can read attributes of parents, but writing to them is not that
easy. _Writing_ to ATTR always affects the event-device, not the
matched parent.
Right, and that is what this rule does, it writes an ATTR using the path
from the event-device.
The series looks reasonable, but I wonder why we cannot merge it into
60-keyboard.rule (60-evdev.rule now) like Peter's series does? In that
case, please make this a builtin of input_id which uses
udev_device_get_parent_subsystem_devtype() and look for the
serio/atkbd (?) parent device, instead of hard-coding the path.
Why would we want to merge this into keyboard rules/hwdb? Trackpoints
always have a separate driver, input device and event node.
Regards,
Hans
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel