If this is theoretically available for Linux/Android, it is highly problematic under Windows.
#TURN OFF USB POWER WHEN COMPUTER OFF DRIVER#
Therefore you would need the usb driver source code to implement new custom calls and functions. Enabling port power is the first standard function for any root (or normal) hub port, and turning it off is not in the standard USB protocol. port function are integrated steps of USB protocol, and are implemented at kernel level. Second, USB port power, connect, reset, enable etc. You will have a better luck with external hubs, although it will be also a challenge. (Surprisingly not suggested in responses given that this is an Electrical Engineering site)įirst, not all desktop PC have individual port power control, actually very few have it.
![turn off usb power when computer off turn off usb power when computer off](https://i.ytimg.com/vi/0vBXjpbJLCI/maxresdefault.jpg)
Then either run Linux or program a way to make it work in Windows.
#TURN OFF USB POWER WHEN COMPUTER OFF SOFTWARE#
![turn off usb power when computer off turn off usb power when computer off](https://images.recyclereminders.com/img/lg/S/turn-off-notice-sign-s-1245.png)
This is not because I am prototyping or breadboarding, and nor is this my first foray into electronics making an LED blink on and off I require a long-term reliable solution. I am looking to have a true cross-platform solution to be able to selectively power USB ports down and up from software, for totally arbitrary lengths of time.
![turn off usb power when computer off turn off usb power when computer off](https://www.top-password.com/blog/wp-content/uploads/2017/11/change-advanced-power-settings.png)
It is reasonable to require that the +5V DC voltage line be able to be switched off from the host computer, but this is by no means guaranteed across every mainstream PC/laptop running every widespread OS. USB interfaces as a means of controlling external hardware from a desktop or laptop computer are ubiquitous many thousands of hardware models are available, ranging in price from 10 -1 to 10 6 USD. (Edited and expanded from original question for clarity)