diff --git a/0001-udev-support-firmware-detection-for-pointing-sticks.patch b/0001-udev-support-firmware-detection-for-pointing-sticks.patch new file mode 100644 index 0000000..86d5a07 --- /dev/null +++ b/0001-udev-support-firmware-detection-for-pointing-sticks.patch @@ -0,0 +1,84 @@ +From efccf735355c498176fd5093aa89cfb46ef16c94 Mon Sep 17 00:00:00 2001 +From: Martin Wilck +Date: Tue, 29 May 2018 09:28:09 +0200 +Subject: [PATCH 1/2] udev: support firmware detection for pointing sticks + +Add support for firmware detection on pointing stick devices. This +is needed for ALPS only at this time. + +Signed-off-by: Martin Wilck +Signed-off-by: Peter Hutterer +--- + udev/90-libinput-model-quirks.rules.in | 15 +++++++++------ + udev/libinput-model-quirks.c | 15 +++++++++++++++ + 2 files changed, 24 insertions(+), 6 deletions(-) + +diff --git a/udev/90-libinput-model-quirks.rules.in b/udev/90-libinput-model-quirks.rules.in +index e7d56bb..b584513 100644 +--- a/udev/90-libinput-model-quirks.rules.in ++++ b/udev/90-libinput-model-quirks.rules.in +@@ -11,19 +11,22 @@ + ACTION!="add|change", GOTO="libinput_model_quirks_end" + KERNEL!="event*", GOTO="libinput_model_quirks_end" + +-# Touchpad firmware detection, two-stage process. ++# Firmware detection, two-stage process. + # First, run the program and import the LIBINPUT_MODEL_FIRMWARE_VERSION + # environment (if any) + KERNELS=="*input*", \ + ENV{ID_INPUT_TOUCHPAD}=="1", \ +- IMPORT{program}="@UDEV_TEST_PATH@libinput-model-quirks %S%p" +- +-# Second, match on anything with that env set and import from the hwdb ++ ENV{.DETECT_FWVERSION}="1" + KERNELS=="*input*", \ +- ENV{ID_INPUT_TOUCHPAD}=="1", \ +- ENV{LIBINPUT_MODEL_FIRMWARE_VERSION}!="", \ ++ ENV{ID_INPUT_POINTINGSTICK}=="1", \ ++ ENV{.DETECT_FWVERSION}="1" ++ENV{.DETECT_FWVERSION}!="1", GOTO="skip_fwversion" ++ ++IMPORT{program}="@UDEV_TEST_PATH@libinput-model-quirks %S%p" ++ENV{LIBINPUT_MODEL_FIRMWARE_VERSION}!="", \ + IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:fwversion:$env{LIBINPUT_MODEL_FIRMWARE_VERSION}'" + # End of touchpad firmware detection ++LABEL="skip_fwversion" + + # libinput:touchpad: + ENV{ID_INPUT_TOUCHPAD}=="1", \ +diff --git a/udev/libinput-model-quirks.c b/udev/libinput-model-quirks.c +index 2dc917d..411665d 100644 +--- a/udev/libinput-model-quirks.c ++++ b/udev/libinput-model-quirks.c +@@ -107,6 +107,19 @@ handle_touchpad(struct udev_device *device) + handle_touchpad_synaptics(device); + } + ++static void ++handle_pointingstick(struct udev_device *device) ++{ ++ const char *name = NULL; ++ ++ name = prop_value(device, "NAME"); ++ if (!name) ++ return; ++ ++ if (strstr(name, "AlpsPS/2 ALPS") != NULL) ++ handle_touchpad_alps(device); ++} ++ + int main(int argc, char **argv) + { + int rc = 1; +@@ -129,6 +142,8 @@ int main(int argc, char **argv) + + if (prop_value(device, "ID_INPUT_TOUCHPAD")) + handle_touchpad(device); ++ if (prop_value(device, "ID_INPUT_POINTINGSTICK")) ++ handle_pointingstick(device); + + rc = 0; + +-- +2.17.0 + diff --git a/0002-udev-default-to-a-trackpoint-range-of-160-for-the-ne.patch b/0002-udev-default-to-a-trackpoint-range-of-160-for-the-ne.patch new file mode 100644 index 0000000..e86a51e --- /dev/null +++ b/0002-udev-default-to-a-trackpoint-range-of-160-for-the-ne.patch @@ -0,0 +1,31 @@ +From 2c3dc66636672f54598fb799d7559ec4572201a7 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 25 May 2018 16:37:05 +1000 +Subject: [PATCH 2/2] udev: default to a trackpoint range of 160 for the new + ALPS trackpoints + +https://bugs.freedesktop.org/show_bug.cgi?id=106323 + +Signed-off-by: Peter Hutterer +Signed-off-by: Martin Wilck +--- + udev/90-libinput-model-quirks.hwdb | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb +index b45ffd9..79d775f 100644 +--- a/udev/90-libinput-model-quirks.hwdb ++++ b/udev/90-libinput-model-quirks.hwdb +@@ -43,6 +43,9 @@ libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:800 + libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:800 + LIBINPUT_ATTR_SIZE_HINT=100x55 + ++libinput:name:*AlpsPS/2 ALPS DualPoint Stick:fwversion:800 ++ LIBINPUT_ATTR_TRACKPOINT_RANGE=160 ++ + ########################################## + # Apple + ########################################## +-- +2.17.0 + diff --git a/libinput.changes b/libinput.changes index 6eba631..be036c2 100644 --- a/libinput.changes +++ b/libinput.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed May 30 07:57:31 UTC 2018 - mwilck@suse.com + +- Fix ALPS trackpoint speed (bsc#1013647, fdo#106323) + backported from upstream 1.10.902 + * added 0001-udev-default-to-a-trackpoint-range-of-160-for-the-ne.patch + * added 0002-udev-support-firmware-detection-for-pointing-sticks.patch +- spec file: use %license for COPYING + ------------------------------------------------------------------- Fri May 18 07:14:56 UTC 2018 - jengelh@inai.de diff --git a/libinput.spec b/libinput.spec index ba253f0..814649a 100644 --- a/libinput.spec +++ b/libinput.spec @@ -34,6 +34,8 @@ Source3: baselibs.conf Source4: %name.keyring Source5: libinput-rpmlintrc Patch1: kill-env.diff +Patch2: 0001-udev-support-firmware-detection-for-pointing-sticks.patch +Patch3: 0002-udev-default-to-a-trackpoint-range-of-160-for-the-ne.patch BuildRequires: doxygen BuildRequires: fdupes BuildRequires: gcc-c++ @@ -122,7 +124,7 @@ to develop applications that require libinput. %_prefix/lib/udev/rules.d %files -n %lname -%doc COPYING +%license COPYING %_libdir/libinput.so.10* %files tools