Re: [systemd-devel] [PATCH v3 2/4] udev: Update pointingstick rules to allow setting ibm trackpoint sensitivity
Hi On Tue, Apr 7, 2015 at 12:09 PM, Hans de Goede hdego...@redhat.com 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. 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. Thanks David LABEL=pointingstick_end -- 2.3.4 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH v3 2/4] udev: Update pointingstick rules to allow setting ibm trackpoint sensitivity
Hi, On 07-04-15 12:23, David Herrmann wrote: Hi On Tue, Apr 7, 2015 at 12:09 PM, Hans de Goede hdego...@redhat.com 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 systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH v3 2/4] udev: Update pointingstick rules to allow setting ibm trackpoint sensitivity
Hi, On 07-04-15 13:46, David Herrmann wrote: Hi On Tue, Apr 7, 2015 at 1:40 PM, Hans de Goede hdego...@redhat.com wrote: 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. Right now, we do hwdb lookups for keyboard:foobar, evdev:foobar and now trackpoint:foobar, instead of a single lookup for evdev:foobar. To me, it looks much easier if we have one generic evdev rule, which searches the hwdb based on the input-modalias via evdev:input:modalias and the legacy fallback, evdev:name:name:dmi Depending on what properties where found, we simply apply them to the evdev node. Ah, I see so what you're suggesting is in essence dropping the ENV{ID_INPUT_KEY}==, GOTO=keyboard_end Rule from rules/60-keyboard.rules And s/keyboard/evdev/ as one of Peter's updated patches is already doing, while keeping the hwdb bits the same, except that the prefix for the matches would be evdev instead of pointingstick ? And teaching the keyboard^Wevdev builtin to handle POINTINGSTICK_SENSITIVITY and write the sysfs attribute ? Regards, Hans ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH v3 2/4] udev: Update pointingstick rules to allow setting ibm trackpoint sensitivity
Hi On Tue, Apr 7, 2015 at 1:52 PM, Hans de Goede hdego...@redhat.com wrote: Hi, On 07-04-15 13:46, David Herrmann wrote: Hi On Tue, Apr 7, 2015 at 1:40 PM, Hans de Goede hdego...@redhat.com wrote: 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. Right now, we do hwdb lookups for keyboard:foobar, evdev:foobar and now trackpoint:foobar, instead of a single lookup for evdev:foobar. To me, it looks much easier if we have one generic evdev rule, which searches the hwdb based on the input-modalias via evdev:input:modalias and the legacy fallback, evdev:name:name:dmi Depending on what properties where found, we simply apply them to the evdev node. Ah, I see so what you're suggesting is in essence dropping the ENV{ID_INPUT_KEY}==, GOTO=keyboard_end Rule from rules/60-keyboard.rules And s/keyboard/evdev/ as one of Peter's updated patches is already doing, while keeping the hwdb bits the same, except that the prefix for the matches would be evdev instead of pointingstick ? And teaching the keyboard^Wevdev builtin to handle POINTINGSTICK_SENSITIVITY and write the sysfs attribute ? Exactly. Peter already did most of this in his series, so we might wanna wait for him to push it. I'm actually only waiting for Kay to ACK the prefix 'evdev', then I'd push it myself and we can rebase your series. Thanks David ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH v3 2/4] udev: Update pointingstick rules to allow setting ibm trackpoint sensitivity
Hi On Tue, Apr 7, 2015 at 1:40 PM, Hans de Goede hdego...@redhat.com wrote: 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. Right now, we do hwdb lookups for keyboard:foobar, evdev:foobar and now trackpoint:foobar, instead of a single lookup for evdev:foobar. To me, it looks much easier if we have one generic evdev rule, which searches the hwdb based on the input-modalias via evdev:input:modalias and the legacy fallback, evdev:name:name:dmi Depending on what properties where found, we simply apply them to the evdev node. Thanks David ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH v3 2/4] udev: Update pointingstick rules to allow setting ibm trackpoint sensitivity
On Tue, Apr 07, 2015 at 02:06:33PM +0200, David Herrmann wrote: Hi On Tue, Apr 7, 2015 at 1:52 PM, Hans de Goede hdego...@redhat.com wrote: Hi, On 07-04-15 13:46, David Herrmann wrote: Hi On Tue, Apr 7, 2015 at 1:40 PM, Hans de Goede hdego...@redhat.com wrote: 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. Right now, we do hwdb lookups for keyboard:foobar, evdev:foobar and now trackpoint:foobar, instead of a single lookup for evdev:foobar. To me, it looks much easier if we have one generic evdev rule, which searches the hwdb based on the input-modalias via evdev:input:modalias and the legacy fallback, evdev:name:name:dmi Depending on what properties where found, we simply apply them to the evdev node. Ah, I see so what you're suggesting is in essence dropping the ENV{ID_INPUT_KEY}==, GOTO=keyboard_end Rule from rules/60-keyboard.rules And s/keyboard/evdev/ as one of Peter's updated patches is already doing, while keeping the hwdb bits the same, except that the prefix for the matches would be evdev instead of pointingstick ? And teaching the keyboard^Wevdev builtin to handle POINTINGSTICK_SENSITIVITY and write the sysfs attribute ? Exactly. Peter already did most of this in his series, so we might wanna wait for him to push it. I'm actually only waiting for Kay to ACK the prefix 'evdev', then I'd push it myself and we can rebase your series. just in case, the current tree is here: https://github.com/whot/systemd/tree/wip/abs-override Once I have Kay's ack I'll push it unless you beat me to it. Cheers, Peter ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel