I have this event when the device gets connected but the rule never matches:
$udevadm monitor -u -p...UDEV [2452.171028] add /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.0/serial0/serial0-0/bluetooth/hci0/hci0:13/0005:004C:0269.0012/input/input30 (input)ACTION=addDEVPATH=/devices/pci0000:00/0000:00:1e.0/dw-apb-uart.0/serial0/serial0-0/bluetooth/hci0/hci0:13/0005:004C:0269.0012/input/input30SUBSYSTEM=inputPRODUCT=5/4c/269/192NAME="Magic Mouse"PHYS="14:7d:da:4d:ff:d9"UNIQ="bc:d0:74:c7:69:ab"PROP=0EV=1fKEY=70001 0 0 0 0REL=1943ABS=273800000000000MSC=10MODALIAS=input:b0005v004Cp0269e0192-e0,1,2,3,4,k100,110,111,112,r0,1,6,8,B,C,a2F,30,31,34,35,36,39,m4,lsfwSEQNUM=9683USEC_INITIALIZED=2452170577ID_INPUT=1ID_INPUT_MOUSE=1ID_BUS=bluetoothID_PATH=pci-0000:00:1e.0-platform-dw-apb-uart.0ID_PATH_TAG=pci-0000_00_1e_0-platform-dw-apb-uart_0ID_FOR_SEAT=input-pci-0000_00_1e_0-platform-dw-apb-uart_0TAGS=:seat:CURRENT_TAGS=:seat:
The udev rule
ACTION=="add", SUBSYSTEM=="input", ENV{NAME}=="Magic Mouse", RUN+="/bin/sh -c 'echo Y >> /sys/module/hid_magicmouse/parameters/scroll_acceleration'"ACTION=="add", SUBSYSTEM=="input", ENV{NAME}=="Magic Mouse", RUN+="/bin/sh -c 'echo 50 >> /sys/module/hid_magicmouse/parameters/scroll_speed'"
I tested it with
udevadm test --action=add /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.0/serial0/serial0-0/bluetooth/hci0/hci0:13/0005:004C:0269.0012/input/input30
I even applied the changes and tried to see if it'd just work:
udevadm control --reload-rules && udevadm trigger
I also set the service logs to DEBUG (udevadm control --log-priority=debug
), and it doesn't run. I tried changing from NAME to UNIQ and using the bluetooth device, but it made no difference. The event happens, but the rule is not matching it.
Any ideas?
Running on Fedora 36.