Take Control: Power Individual USB Ports with uhubctl

Uhubctl – control USB power per-port on smart USB hubs

I created uhubctl to give you granular control over power on smart USB hubs, allowing you to switch individual ports on and off. This utility works with a wide range of compatible devices from brands like AmazonBasics, Apple, Dell, and Anker, helping you manage power consumption or reset stubborn peripherals without unplugging them.

Note that not many USB hubs correctly support per-port power switching, and some of them are no longer manufactured and can be hard to find.
  1. ValdikSS

    My display has USB hub with several USB ports in it.

    I've taped a LED strip on the back of the display and powered it from one of the USB ports.

    By running `uhubctl --vendor 0451 --action toggle --port 4` from the desktop shortcut, I can toggle LED strip on and off, Philips Ambilight-style.

  2. redpinelabs

    Super useful, just wish it was easier to find supported devices. I ended up ordering 3 from Amazon that looked like they should work from the list, but ended up not completely cutting power, or having other issues. I think especially the cheap hubs will changes the parts used overtime and not update the revision.

    Using on a CI pipeline to dfu flash and devices and run some tests. If anyone has some know to work that I order today let me know!

  3. EvanAnderson

    Turning things on and off with a computer is always fun to me (think X10 modules, blinking LEDs with an Arduino, etc). That in itself makes this neat to me.

    There's probably a way this could be used to floating batteries at around 80% on devices that support throttling their own charging.

More from this day

2026-07-21