Revert "udev: copy the trackpoint sensitivity directly from sysfs"
authorPeter Hutterer <peter.hutterer@who-t.net>
Fri, 1 Jun 2018 01:19:49 +0000 (11:19 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Sun, 3 Jun 2018 22:44:11 +0000 (08:44 +1000)
The lenovo compact keyboard with trackpoint has a sensitivity of 5, which
causes the trackpoint range to be 0. This in turn causes inf/NaN during
pointer acceleration as we divide by 0 and makes the cursor go unpredictably
somewhere it probably shouldn't be.

This is part of a wider problem in that the current sensitivity handling
doesn't work well for values well below the default of 128. Any such values
are scaled up to multiples of pixels instead of just working as-is.

Reverting the automatic sensitivity parsing, any systemd udev property set to
change the sensitivity increases it, so we don't run into this bug.

https://bugzilla.redhat.com/show_bug.cgi?id=1583324

This reverts commit a4036a33ca6ca8da7d2417cac6b840a89b295e5f.

src/evdev.c
udev/90-libinput-model-quirks.rules.in

index ee61e4342b9c083c6c21a88367315714e5c2bedb..e93dda6ba79530326027ef0ea85c48112fedb09b 100644 (file)
@@ -1194,7 +1194,7 @@ evdev_get_trackpoint_range(struct evdev_device *device)
                       HTTP_DOC_LINK);
 
        prop = udev_device_get_property_value(device->udev_device,
-                                             "LIBINPUT_ATTR_TRACKPOINT_SENSITIVITY");
+                                             "POINTINGSTICK_SENSITIVITY");
        if (prop) {
                int sensitivity;
 
@@ -1210,7 +1210,7 @@ evdev_get_trackpoint_range(struct evdev_device *device)
                        sensitivity/DEFAULT_TRACKPOINT_SENSITIVITY;
 
                evdev_log_debug(device,
-                               "trackpoint sensitivity is %d\n",
+                               "trackpoint udev sensitivity is %d\n",
                                sensitivity);
        }
 
index cab8dcda89c1edfcf7203377f1b2b58f16bed720..75d5b368843001827a9ac61f780543e9cdea9607 100644 (file)
@@ -39,8 +39,4 @@ KERNELS=="input*", \
 KERNELS=="input*", \
   IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:dt:$attr{[devicetree/base]model}'"
 
-ENV{ID_INPUT_POINTINGSTICK}=="1", \
-  ATTRS{sensitivity}=="?*", \
-  ENV{LIBINPUT_ATTR_TRACKPOINT_SENSITIVITY}="$attr{sensitivity}"
-
 LABEL="libinput_model_quirks_end"