@@ -222,25 +222,25 @@ This is why there are additional rules for 6.0+ kernels.
222
222
There is no harm in having these rules on systems running older kernel versions.
223
223
224
224
To fix USB permissions, first run ` sudo uhubctl ` and note all ` vid:pid ` for hubs you need to control.
225
- Then, add one or more udev rules like below to file ` /etc/udev/rules.d/52-usb.rules ` (replace 2001 with your vendor id):
225
+ Then, add udev rules like below to file ` /etc/udev/rules.d/52-usb.rules `
226
+ (replace ` 2001 ` with your hub vendor id, or completely remove ` ATTR{idVendor} ` filter to allow any USB hub access):
226
227
227
- SUBSYSTEM=="usb", ATTR{idVendor}=="2001", MODE="0666"
228
-
229
- # Linux 6.0 or later (its ok to have this block present in older Linux):
228
+ SUBSYSTEM=="usb", DRIVER=="hub", MODE="0666", ATTR{idVendor}=="2001"
229
+ # Linux 6.0 or later (its ok to have this block present for older Linux kernels):
230
230
SUBSYSTEM=="usb", DRIVER=="hub", \
231
231
RUN="/bin/sh -c \"chmod -f 666 $sys$devpath/*-port*/disable || true\""
232
232
233
233
Note that for USB3 hubs, some hubs use different vendor ID for USB2 vs USB3 components of the same chip,
234
- and both need permissions to make uhubctl work properly. E.g. for Raspberry Pi 4B, you need to add these 2 lines:
234
+ and both need permissions to make uhubctl work properly.
235
+ E.g. for Raspberry Pi 4B, you need to add these 2 lines (or remove idVendor filter):
235
236
236
- SUBSYSTEM=="usb", ATTR{idVendor} =="2109 ", MODE="0666"
237
- SUBSYSTEM=="usb", ATTR{idVendor} =="1d6b ", MODE="0666"
237
+ SUBSYSTEM=="usb", DRIVER =="hub ", MODE="0666", ATTR{idVendor}=="2109 "
238
+ SUBSYSTEM=="usb", DRIVER =="hub ", MODE="0666", ATTR{idVendor}=="1d6b "
238
239
239
240
If you don't like wide open mode ` 0666 ` , you can restrict access by group like this:
240
241
241
- SUBSYSTEM=="usb", ATTR{idVendor}=="2001", MODE="0664", GROUP="dialout"
242
-
243
- # Linux 6.0 or later (its ok to have this block present in older Linux):
242
+ SUBSYSTEM=="usb", DRIVER=="hub", MODE="0664", GROUP="dialout"
243
+ # Linux 6.0 or later (its ok to have this block present for older Linux kernels):
244
244
SUBSYSTEM=="usb", DRIVER=="hub", \
245
245
RUN+="/bin/sh -c \"chown -f root:dialout $sys$devpath/*-port*/disable || true\"" \
246
246
RUN+="/bin/sh -c \"chmod -f 660 $sys$devpath/*-port*/disable || true\""
@@ -253,6 +253,7 @@ For your `udev` rule changes to take effect, reboot or run:
253
253
254
254
sudo udevadm trigger --attr-match=subsystem=usb
255
255
256
+ For your convenience, ready to use udev rule is provided [ here] ( https://github.com/mvp/uhubctl/blob/master/udev/rules.d/52-usb.rules ) .
256
257
257
258
258
259
FAQ
0 commit comments