You are not logged in.
I noticed that my USB scanner is now detected only when I unplug it and plug in back.
It works from root without this workaround, so I checked permission:
cat /usr/lib/udev/rules.d/49-sane.rules |grep -A1 '1200 TA'
# Mustek BearPaw 1200 CS | Mustek BearPaw 1200 TA
ATTRS{idVendor}=="055f", ATTRS{idProduct}=="021e", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"
[mk@linux ~]$ ls -l /dev/bus/usb/001/007
crw-rw-r-- 1 root scanner 189, 6 Oct 16 00:13 /dev/bus/usb/001/007
[mk@linux ~]$ getfacl /dev/bus/usb/001/007
getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/001/007
# owner: root
# group: scanner
user::rw-
group::rw-
other::r--
Now, after a replug action:
[mk@linux ~]$ lsusb |grep Mustek
Bus 001 Device 008: ID 055f:021e Mustek Systems, Inc. BearPaw 1200 TA/CS
[mk@linux ~]$ ls -l /dev/bus/usb/001/008
crw-rw-r--+ <<< HERE IS PLUS SIGN 1 root scanner 189, 7 Oct 16 00:17 /dev/bus/usb/001/008
[mk@linux ~]$ getfacl /dev/bus/usb/001/008
getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/001/008
# owner: root
# group: scanner
user::rw-
user:mk:rw- <<< HERE
group::rw-
mask::rw-
other::r--
As you see, the ACL was added that my user (mk) has rw access (look for <<< HERE in the code). Why the udev rule is not applied without the need of a replug action?
Last edited by mkkot (2020-10-15 22:28:50)
Offline
I checked also:
udevadm info --attribute-walk --name=/dev/bus/usb/001/012 >/tmp/hotplugged
udevadm info --attribute-walk --name=/dev/bus/usb/001/007 >/tmp/coldplugged
But the only parameter that is not measuring some runtime is:
< ATTRS{urbnum}=="136"
---
> ATTRS{urbnum}=="141"
Offline
Okay, it seems that the rule that is used to fix the permission is actually run before kernel detects the device. I created a but for that:
https://bugs.archlinux.org/task/68284
Upstream bugreport:
https://github.com/systemd/systemd/issues/17373
Last edited by mkkot (2020-10-17 08:33:27)
Offline