Tetz95 / linux-g13-driver

Logitech G13 driver for Linux
https://github.com/Tetz95/linux-g13-driver/wiki
26 stars 7 forks source link

use TAG+="uaccess" in udev rule #22

Open pcfe opened 9 months ago

pcfe commented 9 months ago

(Since my suboptimal udev solution I posted in #21 kept nagging at the back of my head, I put some more time into this. and will close 21 momentarily.)

If you use the below udev rule and choose a name that is lexically before /usr/lib/udev/rules.d/73-seat-late.rules, then it works with mode 0660.

I went for /etc/udev/rules.d/70-g13.rules and after a udevadm control --reload-rules (plus a udevadm trigger because I could not be asked to reach for the connector to re-plug), running ./Linux-G13-Driver as a normal user now works as expected.

# a rule adding the uaccess tag needs to be in a file lexically before /usr/lib/udev/rules.d/73-seat-late.rules
# see: https://wiki.archlinux.org/title/Udev#Allowing_regular_users_to_use_devices
# see: https://github.com/systemd/systemd/issues/4288
SUBSYSTEM=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c21c", MODE="0660", TAG+="uaccess"

references