Skip to content

Commit 1961aa0

Browse files
committed
Add explicit workaround for USB device not removed after port power down on Linux
1 parent 5db2487 commit 1961aa0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,14 @@ This is Linux kernel issue. It may be eventually fixed in kernel, see more discu
218218
Basically what happens here is that kernel USB driver knows about power off,
219219
but doesn't send notification about it to udev.
220220

221-
You can find workaround for this issue in [this article](https://goo.gl/qfrmGK).
221+
You can use this workaround for this issue:
222222

223+
sudo uhubctl -a off -l ${location} -p ${port}
224+
sudo udevadm trigger --action=remove /sys/bus/usb/devices/${location}.${port}/
225+
226+
Device file will be removed by udev, but USB device will be still visible in `lsusb`.
227+
Note that path `/sys/bus/usb/devices/${location}.${port}` will only exist if device was detected on that port.
228+
When you turn power back on, device should re-enumerate properly (no need to call `udevadm` again).
223229

224230
#### _Power comes back on after few seconds on Linux_
225231

0 commit comments

Comments
 (0)