Skip to content
HN On Hacker News ↗

GitHub - mvp/uhubctl: uhubctl - USB hub per-port power control

▲ 69 points • 16 comments • by gregsadetsky • 4mo ago • HN discussion ↗

Pangram verdict · v3.3

We believe that this document is fully human-written

0 %

AI likelihood · overall

Human
100% human-written 0% AI-generated
SEGMENTS · HUMAN 11 of 11
SEGMENTS · AI 0 of 11
WORD COUNT 1,543
PEAK AI % 1% · §7
Analyzed
Jul 21
backend: pangram/v3.3
Segments scanned
11 windows
avg 140 words each
Distribution
100 / 0%
human / AI fraction
Verdict
Human
Pangram v3.3

Article text · 1,543 words · 11 segments analyzed

Human AI-generated
§1 Human · 0%

uhubctl is utility to control USB power per-port on smart USB hubs. Smart hub is defined as one that implements per-port power switching. Original idea for this code was inspired by hub-ctrl.c by Niibe Yutaka: https://www.gniibe.org/development/ac-power-control-by-USB-hub Compatible USB hubs Note that not many USB hubs correctly support per-port power switching. Some of them are no longer manufactured and can be hard to find. This is list of known compatible USB hubs:

Manufacturer Product Ports USB VID:PID Release EOL

Acer BE270U monitor (see) 4 3.0 2109:2811 2016

AmazonBasics HU3641V1 (RPi issue) 4 3.0 2109:2811 2013

AmazonBasics HU3770V1 (RPi issue) 7 3.0 2109:2811 2013

AmazonBasics HU9003V1EBL, HUC9003V1EBL 7 3.1 2109:2817 2018

AmazonBasics HU9002V1SBL, HU9002V1EBL, HU9002V1ESL, HHU9002V1EZPR01 (note) 10 3.1 2109:2817 2018

AmazonBasics HUC9002V1SBL, HUC9002V1EBL,

§2 Human · 1%

HUC9002V1ESL 10 3.1 2109:2817 2018

AmazonBasics U3-7HUB (only works for 1 charge port) 7 3.0 2109:2813 2020

Anker AK-68ANHUB-BV7A-0004 (note) 7 3.0 2109:0812 2014

Apple Mac Mini M4 (2 front ports only) 2 3.2 05AC:800B 2024

Apple MacBook Air (Late 2010) 2 2.0 1D6B:0002 2010 2020

Apple Pro Display XDR MWPE2LL/A (internal USB hub) 4 2.0 05AC:9139 2019

Apple Thunderbolt Display 27" (internal USB hub) 6 2.0

2011 2016

Apple USB Keyboard With Numeric Pad (internal USB hub) 3 2.0

2011

Asus Z77 Sabertooth Motherboard (onboard USB hub) 6 2.0

2012

Asus Z87-PLUS Motherboard (onboard USB hub) 4 3.0

2013 2016

Aukey CB-C59 4 3.0 2109:2813 2017

B+B SmartWorx UHR204 4 2.0 0856:DB00 2013

B+B SmartWorx USH304 4 3.0 04B4:6506 2017 2019

Basler 2000036234 4 3.0 0451:8046 2016

Belkin F5U101 4 2.0 0451:2046

§3 Human · 1%

2005 2010

Belkin F5U238UKCRL-MOB 4 2.0 0409:0059 2004 2010

BenQ PD2700U 4K Monitor (works only in USB2 mode) 4 3.0 05E3:0610 2018

BenQ PD3220U 4 3.1 05E3:0610 2019

Bytecc BT-UH340 (warning) 4 3.0 2109:8110 2010

Centech CT-USB4HUB ReTRY HUB (note) 4 3.0 0424:2744 2017

Circuitco Beagleboard-xM (internal USB hub) 4 2.0 0424:9514 2010

Club3D CSV-3242HD Dual Display Docking Station 4 3.0 2109:2811 2015

Coolgear USBG-12U2ML 12 2.0 05E3:0607 2015

Cypress CY4608 HX2VL (note) 4 2.0 04B4:6570 2012

D-Link DUB-2332 rev A1 3 3.0

2022

D-Link DUB-H4 rev D,E (black). Note: rev A,C,F not supported 4 2.0 05E3:0608 2012

D-Link DUB-H7 rev A (silver) 7 2.0 2001:F103 2005 2010

D-Link DUB-H7 rev D,E (black).

§4 Human · 1%

Rev B,C,F,G not supported 7 2.0 05E3:0608 2012

Dell DA300 USB-C Mobile Adapter 2 3.0 2109:2820 2018

Dell P2416D 24" QHD Monitor (note) 4 2.0

2017

Dell S2719DGF 27" WQHD Gaming-Monitor 5 3.0 0424:5734 2018

Dell UltraSharp 1704FPT 17" LCD Monitor 4 2.0 0424:A700 2005 2015

Dell UltraSharp U2415 24" LCD Monitor 5 3.0

2014

Dell UltraSharp U3419W 34" Curved Monitor 6 3.0

2020

Dell Wyse 3040 (-f required) 6 3.0

2017

Delock 62537 4 3.0

2017 2021

Delock 87445 (note) 4 2.0 05E3:0608 2009 2013

Elecom U2H-G4S 4 2.0

2006 2011

Gigabyte G27Q monitor (see) 4 3.0 2109:0817 2020

GlobalScale ESPRESSObin SBUD102 V5 1 3.0 1D6B:0003 2017

Hardkernel ODROID-C4 (note) 4 3.0

2020

Hawking

§5 Human · 1%

Technology UH214 4 2.0

2003 2008

Hewlett Packard USB-C Dock G5 5TW10AA 5 3.0 03F0:076B 2019

Hewlett Packard P5Q58UT 3 3.0

2019

IBM SK-8815 USB Keyboard 3 1.1 04B3:301A 2004

Inateck HB2025A (USB2 only) 4 3.1 2109:2822 2021

IOI U3H415E1 4 3.0

2012

j5create JUH377 (note) 7 3.0

2016

j5create JUH470 (note) 3 3.0 05E3:0610 2014

Juiced Systems 6HUB-01 7 3.0 0BDA:0411 2014 2018

KUNBUS GmbH RevPi Connect (+) / S / SE 2 2.0 0424:9514 2018

KUNBUS GmbH RevPi Connect 4 2 3.0

2022

KUNBUS GmbH RevPi Core 3 / S / SE 2 2.0 0424:9514 2017

LG Electronics 27MD5KL-B monitor 4 3.0 043E:9A60 2019

LG Electronics 27GL850-B monitor 4 3.0 0451:8142 2019

LG Electronics 27UK850-W monitor 2 3.0

2018

§6 Human · 1%

LG Electronics 27UN83A-W monitor 2 3.0 0451:8142 2020

LG Electronics 38WK95C-W monitor 4 3.0 0451:8142 2018

Lenovo ThinkPad Mini Dock Series 3 (433710U) 6 2.0 17EF:100A 2016

Lenovo ThinkPad Ultra Docking Station (40A20090EU) 6 2.0 17EF:100F 2015

Lenovo ThinkPad Ultra Docking Station (40AJ0135EU) 7 3.1 17EF:3070 2018

Lenovo ThinkPad X200 Ultrabase 42X4963 3 2.0 17EF:1005 2008 2011

Lenovo ThinkPad X6 Ultrabase 42W3107 4 2.0 17EF:1000 2006 2009

Lenovo ThinkPlus 4-in-1 USB-C hub 4X90W86497 3 3.0

2021

Lenovo ThinkVision T24i-10 Monitor 4 2.0 17EF:0610 2018

Lenovo USB-C to 4 Port USB-A Hub (USB2 only) 4 2.0 17EF:103A 2020

Lindy USB serial converter 4 port 4 1.1 058F:9254 2008

Linksys

§7 Human · 1%

USB2HUB4 (note) 4 2.0

2004 2010

Maplin A08CQ (red ports only) 7 2.0 0409:0059 2008 2011

Metadot Das Keyboard 4 2 3.0

2014

Microchip EVB9512 2 2.0

2009

Microchip EVB-USB2517 7 2.0

2008

Microchip EVB-USB2534BC 4 2.0

2013

Microchip EVB-USB5807 7 3.0

2016

Moxa Uport-407 7 2.0 110A:0407 2009

NVidia Jetson Nano B01 (details) 4 3.0

2019

NVidia Jetson Xavier NX (details) 4 3.0

2020

Phidgets HUB0003_0 7 2.0 1A40:0201 2017

Philips 346B1C UltraWide 34" Curved Monitor 4 3.0 05E3:0610 2019

Plugable USB3-HUB7BC 7 3.0 2109:0813 2015

Plugable USB3-HUB7C (only works for 2 charge ports) 7 3.0 2109:0813 2015

Plugable USBC-HUB7BC (works for 6/7 ports, not the rightmost) 7 3.0 2109:0817 2021

§8 Human · 1%

Plugable USB3-HUB10-C2 (only works for 2 charge ports) 10 3.0

2014

Port Inc NWUSB01 4 1.1 0451:1446 1999 2003

Raspberry Pi B+, 2B, 3B (see below) 4 2.0

2011

Raspberry Pi 3B+ (see below) 4 2.0 0424:2514 2018

Raspberry Pi 4B (see below) 4 3.0 2109:3431 2019

Raspberry Pi 5 (see below) 4 3.0 1D6B:0002 2023

Renesas uPD720202 PCIe USB 3.0 host controller 2 3.0

2013

Rosewill RHUB-210 4 2.0 0409:005A 2011 2014

Rosonway RSH-518C (note) 7 3.0 2109:0817 2021

Rosonway RSH-A10 (see) 10 3.0 0BDA:0411 2020

Rosonway RSH-A13 (warning) 13 3.1 2109:2822 2021

Rosonway RSH-A16 (note, warning) 16 3.0 0bda:0411 2020

Rosonway RSH-A37S 7 3.0 2109:2822 2021

Rosonway RSH-A104

§9 Human · 1%

(USB2 only) 4 3.1 2109:2822 2022

Rosonway RSH-ST07C (only 4) 7 3.0 2109:2822 2023

Rosonway RSH-ST10C-6 (note) 10 3.1 0BDA:0423 2024

Sanwa Supply USB-HUB14GPH 4 1.1

2001 2003

Satechi Mac Mini Hub (M1/M2) 4 3.0 2109:2817 2023

Seagate Backup Plus Hub STEL8000100 2 3.0 0BC2:AB44 2016

Seeed Studio reTerminal CM4104032 2 2.0 0424:2514 2021

StarTech DKT30CSDHPD3 USB-C Travel Dock 3 3.0 2109:2817 2018

StarTech HB30A4AIB (warning) 4 3.0 2109:2817 2018

StarTech HB31C2A2CB (note) 5 3.0 14B0:013D 2020

StarTech HB31C3A1CPD3 (note) 5 3.1 14B0:013A 2019

Sunix SHB4200MA 4 2.0 0409:0058 2006 2009

System Talks Sugoi USB2-HUB4X (warning) 4 2.0

2007

Targus ACH155 (port 3 controls all ports)

§10 Human · 0%

4 3.0

2022

Targus PA095UZ 2 2.0

2004

Targus PAUH212/PAUH212U 7 2.0

2004 2009

Texas Instruments TUSB4041PAPEVM 4 2.1 0451:8142 2015

UUGear MEGA4 (for Raspberry Pi 4B) 4 3.0 2109:0817 2021

VirtualHere USB3 4-port hub (note) 4 3.0

2024

This table is by no means complete. If your hub works with uhubctl, but is not listed above, please report it by opening new issue at https://github.com/mvp/uhubctl/issues, so we can add it to supported table. In your report, please provide exact product model and add output from uhubctl and please test VBUS off support as described below in FAQ. Note that quite a few modern motherboards have built-in root hubs that do support this feature - you may not even need to buy any external hub. USB 3.0 duality note If you have USB 3.0 hub connected to USB3 upstream port, it will be detected as 2 independent virtual hubs: USB2 and USB3, and your USB devices will be connected to USB2 or USB3 virtual hub depending on their capabilities and connection speed. To control power for such hubs, it is necessary to turn off/on power on both USB2 and USB3 virtual hubs for power off/on changes to take effect. uhubctl will try to do this automatically (unless you disable this behavior with option -e). Unfortunately, while most hubs will cut off data USB connection, some may still not cut off VBUS to port, which means connected phone may still continue to charge from port that is powered off by uhubctl.

§11 Human · 0%

Installing For Linux and MacOS uhubctl is available in standard package managers and can be installed with following commands:

MacOS: brew install uhubctl or sudo port install uhubctl

⚠ MacOS 26+ requires libusb 1.0.30 or later!

Ubuntu/Debian/Raspbian: sudo apt install uhubctl Redhat/EPEL/Fedora/CentOS: sudo yum install uhubctl OpenSUSE: sudo zypper install uhubctl FreeBSD: cd /usr/ports/sysutils/uhubctl && sudo make install

However, uhubctl installed from standard package manager may not necessarily be latest version, or even severely lag behind current version. If latest published uhubctl version is newer than what your package manager offers, you may need to compile and install from source as described below. Compiling This utility was tested to compile and work on Linux (Ubuntu/Debian/Raspbian, Redhat/EPEL/Fedora/CentOS, Arch Linux, Gentoo, openSUSE, Buildroot), FreeBSD, NetBSD, SunOS and MacOS. While uhubctl compiles on Windows, USB power switching does not work on Windows because libusb is using winusb.sys driver, which according to Microsoft does not support necessary USB control requests. This may be fixed if libusb starts supporting different driver on Windows. Note that it is highly recommended to have utility pkgconf (or pkg-config) installed (often it is installed by default). First, you need to install library libusb-1.0 (version 1.0.13 or later is required, 1.0.23 or later is recommended):

Ubuntu: sudo apt-get install libusb-1.0-0-dev pkgconf Redhat: sudo yum install libusb1-devel pkgconf OpenSUSE: sudo zypper install libusb-1_0-devel pkgconf MacOS: brew install libusb pkgconf, or sudo port install libusb-devel pkgconf FreeBSD: pkg install gmake pkgconf (libusb is included by default) NetBSD: sudo pkgin install libusb1 gmake pkgconf Windows: TBD?