From 4b03374d502e637ed0f51d73d2d67f240ab89542 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 14 Jun 2023 09:16:27 +1000 Subject: [PATCH] doc/user: update the udev rule to handle bind/unbind events (part 2) 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 See cd37dcfa66d59ecbdf787ee1aa34bb65f2a38b6d where we did this already for the udev rules we use ourselves and a88d107c0d0c0c8a4bb6359f0ffd5b3b3516b099 for the patch where we already updated parts of the docs. Signed-off-by: Peter Hutterer --- doc/user/device-configuration-via-udev.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/user/device-configuration-via-udev.rst b/doc/user/device-configuration-via-udev.rst index e6848b64..56bca24f 100644 --- a/doc/user/device-configuration-via-udev.rst +++ b/doc/user/device-configuration-via-udev.rst @@ -71,7 +71,7 @@ Below is an example udev rule to assign "seat1" to a device from vendor ``0x012a`` with the model ID of ``0x034b``. :: $ cat /etc/udev/rules.d/99-my-device-is-on-seat1.rules - ACTION=="add|change", KERNEL=="event[0-9]*", \ + ACTION!="remove", KERNEL=="event[0-9]*", \ ENV{ID_VENDOR_ID}=="012a", \ ENV{ID_MODEL_ID}=="034b", \ ENV{ID_SEAT}="seat1" @@ -102,7 +102,7 @@ and change it into an **ID_INPUT_TABLET** setting. This rule would apply for a device with the vendor/model ID of ``012a``/``034b``. :: $ cat /etc/udev/rules.d/99-my-device-is-a-tablet.rules - ACTION=="add|change", KERNEL=="event[0-9]*", \ + ACTION!="remove", KERNEL=="event[0-9]*", \ ENV{ID_VENDOR_ID}=="012a", \ ENV{ID_MODEL_ID}=="034b", \ ENV{ID_INPUT_TOUCHPAD}="", ENV{ID_INPUT_TABLET}="1"