@@ -159,6 +159,103 @@ For your `udev` rule changes to take effect, reboot or run:
159
159
160
160
161
161
162
+ FAQ
163
+ ===
164
+
165
+ #### _ What is USB per-port power switching?_
166
+
167
+ According to USB 2.0 specification, USB hubs can advertise no power switching,
168
+ ganged (all ports at once) power switching or per-port (individual) power switching.
169
+ Note that ` uhubctl ` will only detect USB hubs which support per-port power switching.
170
+ You can find what kind of power switching your hardware supports by using ` sudo lsusb -v ` :
171
+
172
+ No power switching:
173
+
174
+ wHubCharacteristic 0x000a
175
+ No power switching (usb 1.0)
176
+ Per-port overcurrent protection
177
+
178
+ Ganged power switching:
179
+
180
+ wHubCharacteristic 0x0008
181
+ Ganged power switching
182
+ Per-port overcurrent protection
183
+
184
+ Per-port power switching:
185
+
186
+ wHubCharacteristic 0x0009
187
+ Per-port power switching
188
+ Per-port overcurrent protection
189
+
190
+
191
+ #### _ How do I check if my USB hub is supported by ` uhubctl ` ?_
192
+
193
+ 1 . Run ` sudo uhubctl ` . If your hub is not listed, it is not supported.
194
+ Alternatively, you can run ` sudo lsusb -v ` and check for
195
+ ` Per-port power switching ` - if you cannot see such line in lsusb output,
196
+ hub is not supported.
197
+ 2 . Check for VBUS (voltage) off support: plug a phone, USB light
198
+ or USB fan into USB port of your hub.
199
+ Try using ` uhubctl ` to turn power off on that port, and check
200
+ that phone stops charging, USB light stops shining or USB fan stops spinning.
201
+ If VBUS doesn't turn off, your hub manufacturer did not include circuitry
202
+ to actually cut power off. Such hub would still work
203
+ to cut off USB data connection, but it cannot turn off power,
204
+ and we do not consider this supported device.
205
+ 3 . If tests above were successful, please report your hub
206
+ by opening new issue at https://github.com/mvp/uhubctl/issues ,
207
+ so we can add it to list of supported devices.
208
+
209
+
210
+ #### _ USB devices are not removed after port power down on Linux_
211
+
212
+ After powering down USB port, udev does not get any event, so it keeps the device files around.
213
+ However, trying to access the device files will lead to an IO error.
214
+
215
+ This is Linux kernel issue. It may be eventually fixed in kernel, see more discussion [ here] ( https://bit.ly/2JzczjZ ) .
216
+ Basically what happens here is that kernel USB driver knows about power off,
217
+ but doesn't send notification about it to udev.
218
+
219
+ You can find workaround for this in article https://goo.gl/qfrmGK .
220
+
221
+
222
+ #### _ Power comes back on after few seconds on Linux_
223
+
224
+ Some device drivers in kernel are surprised by USB device being turned off and automatically try to power it back on.
225
+
226
+ You can use option ` -r N ` where N is some number from 10 to 1000 to fix this -
227
+ ` uhubctl ` will try to turn power off many times in quick succession, and it should suppress that.
228
+ This may be eventually fixed in kernel, see more discussion [ here] ( https://bit.ly/2JzczjZ ) .
229
+
230
+
231
+ #### _ Multiple 4-port hubs are detected, but I only have one 7-port hub connected_
232
+
233
+ Many hub manufacturers build their USB hubs using basic 4 port USB chips.
234
+ E.g. to make 7 port hub, they daisy-chain two 4 port hubs - 1 port is lost to daisy-chaining,
235
+ so it makes it 4+4-1=7 port hub. Simularly, 10 port hub could be built as 3 4-port hubs
236
+ daisy-chained together, which gives 4+4+4-2=10 usable ports.
237
+
238
+ Note that you should never try to change power state for ports used to daisy-chain internal hubs together.
239
+ Doing so will confuse internal hub circuitry and will cause unpredictable behavior.
240
+
241
+
242
+ #### _ Raspberry Pi turns power off on all ports, not just the one I specified_
243
+
244
+ This is limitation of Raspberry Pi hardware design.
245
+ For reference, Raspberry Pi models have following internal USB topology:
246
+
247
+ * B+/2B/3B: one USB hub ` 1-1 ` , with port ` 1 ` for Ethernet+wifi, and ports ` 2-5 ` ganged, controlled by port ` 2 ` .
248
+ (Trying to control ports 3,4,5 won't do anything).
249
+ * 3B+: 2 hubs - main hub ` 1-1 ` , all 4 ports ganged, all controlled by port ` 2 ` .
250
+ Second hub ` 1-1.1 ` (daisy-chained to main): 3 independently controlled ports, ` 1 ` is used for Ethernet+wifi,
251
+ and ports ` 2,3 ` are available with proper per-port power switching.
252
+ In other words, 2 out of total 4 ports wired outside do support independent power switching on 3B+.
253
+
254
+ As a workaround, you can buy any external USB hub from supported list,
255
+ attach it to any USB port of Raspberry Pi, and control power on its ports independently.
256
+
257
+
258
+
162
259
Notable projects using uhubctl
163
260
==============================
164
261
| Project | Description |
0 commit comments