Skip to content

Commit 4deae17

Browse files
committed
Update README, bump copyright year
* Remove mention of MacOS bug only applicable to old MacOS 12.4 x86 * Simplify docs related to Linux kernel 6.0 fixes * Bump copyright year
1 parent 5cc9f15 commit 4deae17

File tree

4 files changed

+13
-17
lines changed

4 files changed

+13
-17
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
uhubctl – USB hub per-port power control.
22

3-
Copyright (c) 2009-2023, Vadim Mikhailov
3+
Copyright (c) 2009-2024, Vadim Mikhailov
44

55
This program is free software; you can redistribute it and/or modify
66
it under the terms of the GNU General Public License as published by

README.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,6 @@ Compiling
149149
This utility was tested to compile and work on Linux
150150
(Ubuntu/Debian, Redhat/Fedora/CentOS, Arch Linux, Gentoo, openSUSE, Buildroot), FreeBSD, NetBSD, SunOS and MacOS.
151151

152-
> :warning: MacOS 12.4 x86 has [USB stack bug](https://github.com/libusb/libusb/issues/1156) which breaks `uhubctl` operation.
153-
Solution is to upgrade to MacOS 12.5 which has this bug fixed.
154-
155152
While `uhubctl` compiles on Windows, USB power switching does not work on Windows because `libusb`
156153
is using `winusb.sys` driver, which according to Microsoft does not support
157154
[necessary USB control requests](https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f680b63f-ca4f-4e52-baa9-9e64f8eee101).
@@ -320,16 +317,13 @@ Per-port power switching:
320317

321318
#### _USB devices are not removed after port power down on Linux_
322319

323-
> :arrow_right: This is fixed by [#450](https://github.com/mvp/uhubctl/pull/450) if you are using Linux kernel 6.0 or later.
324-
325320
After powering down USB port, udev does not get any event, so it keeps the device files around.
326321
However, trying to access the device files will lead to an IO error.
327322

328-
This is Linux kernel issue. It may be eventually fixed in kernel, see more discussion [here](https://bit.ly/2JzczjZ).
329-
Basically what happens here is that kernel USB driver knows about power off,
330-
but doesn't send notification about it to udev.
323+
This is Linux kernel [issue](https://bit.ly/2JzczjZ) and is [fixed](https://github.com/mvp/uhubctl/pull/450)
324+
since uhubctl 2.5.0 for systems with Linux kernel 6.0 or later.
331325

332-
You can use this workaround for this issue:
326+
If you are still using Linux 5.x or older, you can use this workaround for this issue:
333327

334328
sudo uhubctl -a off -l ${location} -p ${port}
335329
sudo udevadm trigger --action=remove /sys/bus/usb/devices/${location}.${port}/
@@ -340,13 +334,15 @@ When you turn power back on, device should re-enumerate properly (no need to cal
340334

341335
#### _Power comes back on after few seconds on Linux_
342336

343-
> :arrow_right: This is fixed by [#450](https://github.com/mvp/uhubctl/pull/450) if you are using Linux kernel 6.0 or later.
344-
345337
Some device drivers in kernel are surprised by USB device being turned off and automatically try to power it back on.
346338

347-
You can use option `-r N` where N is some number from 10 to 1000 to fix this -
339+
This is Linux kernel [issue](https://bit.ly/2JzczjZ) and is [fixed](https://github.com/mvp/uhubctl/pull/450)
340+
since uhubctl 2.5.0 for systems with Linux kernel 6.0 or later.
341+
342+
If you are still using Linux 5.x or older:
343+
344+
You can use option `-r N`, where N is some number from 10 to 1000 to fix this -
348345
`uhubctl` will try to turn power off many times in quick succession, and it should suppress that.
349-
This may be eventually fixed in kernel, see more discussion [here](https://bit.ly/2JzczjZ).
350346

351347
Disabling USB authorization for device in question before turning power off with `uhubctl` should help:
352348

@@ -449,7 +445,7 @@ Notable projects using uhubctl
449445
Copyright
450446
=========
451447

452-
Copyright (C) 2009-2023 Vadim Mikhailov
448+
Copyright (C) 2009-2024 Vadim Mikhailov
453449

454450
This file can be distributed under the terms and conditions of the
455451
GNU General Public License version 2.

udev/rules.d/52-usb.rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# uhubctl – USB hub per-port power control https://github.com/mvp/uhubctl
22
#
3-
# Copyright (c) 2009-2023, Vadim Mikhailov
3+
# Copyright (c) 2009-2024, Vadim Mikhailov
44
#
55
# This file can be distributed under the terms and conditions of the
66
# GNU General Public License version 2.

uhubctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2023 Vadim Mikhailov
2+
* Copyright (c) 2009-2024 Vadim Mikhailov
33
*
44
* Utility to turn USB port power on/off
55
* for USB hubs that support per-port power switching.

0 commit comments

Comments
 (0)