Commit graph

6 commits

Author SHA1 Message Date
Peter Hutterer
cd37dcfa66 udev: update rules to handle bind/unbind events
Summary: we expect add, change or remove but kernel 4.12 added bind and
unbind. These events were previously discarded by udevd. Our rules should
handle any event *but* remove, so update as suggested in the announce email
linked below.

For a longer explanation, see the system 247rc2 announcement
https://lists.freedesktop.org/archives/systemd-devel/2020-November/045570.html

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-11-24 23:47:31 +00:00
Peter Hutterer
281ecf10d1 udev: don't use IMPORT+=
IMPORT really only supports == and != and for a short while udevd warned about
this before that warning was reverted again.

Where anything else is used, it falls back to ==. systemd upstream rules all
use a single = though, so let's stick with that to be consistent, even if it
is technically wrong (udevd will warn about this in debug mode).

See the long discussion in systemd upstream for details:
https://github.com/systemd/systemd/issues/14062

Fixes #461

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-30 00:35:43 +00:00
Peter Hutterer
19898eb2b2 udev: *add* the fuzz-to-zero program to the udev RUN list, don't overwrite
For historical reasons, the keyboard builtin that sets the EVDEV_ABS values is
added as RUN. When we add our own fuzz-to-zero tool we must use +=, just using
an equals overwrites the existing RUN list.

The same is true for the IMPORT command we use to extract the fuzz to begin
with.

Fixes #424

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-12 19:22:50 +10:00
Peter Hutterer
e7a9c07ffe udev: parse the EVDEV_ABS properties for a potential fuzz setting
Where a fuzz is defined in the 60-evdev.hwdb, we rely on a udev builtin to
set the kernel device to that fuzz value. Unfortunately that happens after our
program is called with this order of events:
1. 60-evdev.rules calls IMPORT(builtin) for the hwdb which sets the EVDEV_ABS_*
  properties. It also sets RUN{builtin}=keyboard but that's not invoked yet.
2. 90-libinput-fuzz-override.rules calls IMPORT{program} for our fuzz override
  bits. That sets the kernel fuzz value to 0 and sets the LIBINPUT_FUZZ_*
  propertie
3. The keyboard builtin is run once all the rules have been processed.

Our problem is that where the fuzz is set in a hwdb entry, the kernel fuzz is
still unset when we get to look at it, so we always end up with a fuzz of zero
for us and a nonzero kernel fuzz.

Work around this by checking the EVDEV_ABS property, extracting the fuzz from
there and re-printing that property without the fuzz. This way we ensure the
kernel remains at zero fuzz and we use the one from the hwdb instead.

Fixes #346

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-11 12:24:02 +10:00
Peter Hutterer
1f59f06266 udev: only change the fuzz on touchpads and touchscreens (v2)
If we don't handle a device, don't touch it. Especially joysticks that we
don't handle and thus should not touch either.

Related to !231

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-06-26 12:21:33 +10:00
Peter Hutterer
e65392c2f5 udev: rename libinput-model-quirks rules to libinput-fuzz-override.rules
Because these days, that's all it does

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-06-26 12:21:17 +10:00
Renamed from udev/90-libinput-model-quirks.rules.in (Browse further)