Closed mungewell closed 7 months ago
Please read this FAQ item https://github.com/mvp/uhubctl?tab=readme-ov-file#power-comes-back-on-after-few-seconds-on-linux
Long story short, by bar most reliable way to fix this is to upgrade your host to Linux kernel 6.x.
Thanks for the link, but I don't think that this applies in my case.
Mostly my automation script is able cycle the power as required, as seen in the grep
of syslog
previously the ttyACM
s came back on-line with gap between. In the (occasional) reset case, the hub appears to enable them together and they are quickly enumerated.
I'm not sure whether this is a code or hardware problem, it could even be the Pico glitching and getting stuck...
It is most likely Linux kernel USB and/or USB serial driver doing something unexpected. Not likely that uhubctl can fix that. But, that said, for kernel 6.x, uhubctl is using different method to control USB power compared to older kernels - main difference being that for kernel 6.x uhubctl makes use of explicit power off control provided by kernel itself, whereas in older kernels this is not as well defined - power off is sent directly to the hub, anf kernel doesn't explicitly know current power state, which sometimes makes it sporadically trigger device reset.
Closing this as not actionable by uhubctl
I picked up some 'Pluggable' 7-port USB3.x Hubs (Model: USB3-HUB7BC) for some automated testing. These are mostly working well, however I have the occasional reset causing issue.
When first connected (and with a number of Picos connected) it reports as:
My automation script looks for all the 'ttyACM's on the system and enumerates where they are connected. It then turns them all off in turn, and then back on in turn (with the idea to keep Linux enumeration the same - ie ttyACM0 is the same physical device).
When processing the 'turn on' I occasionally see a reset in
syslog
, and then magically all the devices are powered on.... the following my best understanding on what happens.All devices are turned off, and (in this specific case) I request to power on the port where
ttyACM0
is expected.At this point
grabserial
failed to bond to thettyACM0
serial port, and complained it didn't exist.Just after this happening, I see this message in
syslog
And all the Pico enumerate in quick succession, where as they would normally be spaced by ~12s
I also suspect that the reset is 'de-enumerating' the previous devices which were turned on during that cycle. I may be able to script around that issue - although devices may not enum in the same order!