Skip to content

Commit 2ef5f0e

Browse files
committed
Fixed udev rule example to use DRIVER="usb"
It seems that DRIVER="hub" almost never works, but DRIVER="hub" always does.
1 parent 19dfdad commit 2ef5f0e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,23 +225,23 @@ To fix USB permissions, first run `sudo uhubctl` and note all `vid:pid` for hubs
225225
Then, add udev rules like below to file `/etc/udev/rules.d/52-usb.rules`
226226
(replace `2001` with your hub vendor id, or completely remove `ATTR{idVendor}` filter to allow any USB hub access):
227227

228-
SUBSYSTEM=="usb", DRIVER=="hub", MODE="0666", ATTR{idVendor}=="2001"
228+
SUBSYSTEM=="usb", DRIVER=="usb", MODE="0666", ATTR{idVendor}=="2001"
229229
# Linux 6.0 or later (its ok to have this block present for older Linux kernels):
230-
SUBSYSTEM=="usb", DRIVER=="hub", \
230+
SUBSYSTEM=="usb", DRIVER=="usb", \
231231
RUN="/bin/sh -c \"chmod -f 666 $sys$devpath/*-port*/disable || true\""
232232

233233
Note that for USB3 hubs, some hubs use different vendor ID for USB2 vs USB3 components of the same chip,
234234
and both need permissions to make uhubctl work properly.
235235
E.g. for Raspberry Pi 4B, you need to add these 2 lines (or remove idVendor filter):
236236

237-
SUBSYSTEM=="usb", DRIVER=="hub", MODE="0666", ATTR{idVendor}=="2109"
238-
SUBSYSTEM=="usb", DRIVER=="hub", MODE="0666", ATTR{idVendor}=="1d6b"
237+
SUBSYSTEM=="usb", DRIVER=="usb", MODE="0666", ATTR{idVendor}=="2109"
238+
SUBSYSTEM=="usb", DRIVER=="usb", MODE="0666", ATTR{idVendor}=="1d6b"
239239

240240
If you don't like wide open mode `0666`, you can restrict access by group like this:
241241

242-
SUBSYSTEM=="usb", DRIVER=="hub", MODE="0664", GROUP="dialout"
242+
SUBSYSTEM=="usb", DRIVER=="usb", MODE="0664", GROUP="dialout"
243243
# Linux 6.0 or later (its ok to have this block present for older Linux kernels):
244-
SUBSYSTEM=="usb", DRIVER=="hub", \
244+
SUBSYSTEM=="usb", DRIVER=="usb", \
245245
RUN+="/bin/sh -c \"chown -f root:dialout $sys$devpath/*-port*/disable || true\"" \
246246
RUN+="/bin/sh -c \"chmod -f 660 $sys$devpath/*-port*/disable || true\""
247247

udev/rules.d/52-usb.rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# sudo usermod -a -G dialout $USER
1717

1818
# This is for Linux before 6.0:
19-
SUBSYSTEM=="usb", DRIVER=="hub", MODE="0664", GROUP="dialout"
19+
SUBSYSTEM=="usb", DRIVER=="usb", MODE="0664", GROUP="dialout"
2020

2121
# This is for Linux 6.0 or later (ok to keep this block present for older Linux kernels):
2222
SUBSYSTEM=="usb", DRIVER=="hub", \

0 commit comments

Comments
 (0)