4 ms·
Would be nice if someone could intergrate this with the OS itself so that if some USB device stops responding, the OS "unplugs and plugs" it automatically until
by dheera 3y ago
Would be nice if someone could intergrate this with the OS itself so that if some USB device stops responding, the OS "unplugs and plugs" it automatically until it works.
USB was always a shitty standard to begin with, nothing should ever require unplugging and plugging to get it to work, yet I have to do that to my webcam every day.
- tcas 3y agoUSB has a built in protocol level reset that should achieve the same thing. The only change is 5V power is not cut. It's basically the same as doing an OS reboot from the peripheral's perspective. If the USB device still doesn't respond then it means that they have some buggy firmware that requires a hard reboot to work. Example for a USB reset in linux: https://marc.info/?l=linux-usb&m=121459435621262&w=2 https://marc.info/?l=linux-usb&m=121459435621262&w=2
- dheera 3y agoI've tried that, my RealSense camera and several other USB devices I've used require physically unplugging and plugging after every reboot or it refuses to work. That Linux USB reset does not work.
- gertlex 3y agoI've got experience with this... `reboot` won't work, as it doesn't cut power, but if you can do `rtcwake -m off -s 30`, the power to the USB ports gets cut in between the computer being off and booting back up again. (I even replace `reboot` with a script warning of this gotcha :) ) Caveat: this is with a typical x86 motherboard. Not all SBCs have RTCs needed to use rtcwake (e.g. RPi doesn't I think?)
- TheRealPomax 3y agoYou need to cut the power for certain USB devices to actually reset their in-device memory though (like an iLok dongle). Just "disconnecting and reconnecting" via software without a power cycle won't do anything for those. And that's not a bug, in dongles that's literally an anti-piracy feature.
- gorkish 3y agoSome devices (mostly security devices) trigger things based on the physical connection state, cycle count, etc. and it's useful to have a means to test these. I've never seen a device so far that has a physical switch to make sure it's really been unplugged, but I'd imagine someone could find a use case.
- XorNot 3y agoThat doesn't solve the problem that I still need to do it though. I've got this problem right now with my Blue microphone: it hates being rebooted without being power-cycled for some reason.
- deleted 3y ago[deleted]
- Nursie 3y agoYeah, this would be really useful for my RP2040Zero project. I don't know if it's the board or if it's down to circuitpython, but being able to software powercycle the USB ports on my motherboard would be really useful, particularly as the RP2040 is mounted inside the PC.