Yes, it is often feasible to turn off a USB port using software settings on your device or operating system.
Yes, it is often feasible to turn off a USB port using software settings on your device or operating system.
I checked online resources for options, but most guidance focuses on turning off USB devices or disabling thumb drives entirely. My situation involves a few USB devices on my front panel that stay bright even when powered, including a speaker that only uses USB power without any data connection. I want to disable them automatically at night from my desktop using commands like CMD or PowerShell. While I tried the Windows DevKit and USB Device Viewer, I wasn’t able to locate a method to disable specific devices programmatically. It seems this level of control isn’t readily available in standard tools.
Yes, certain USB chipsets can handle this. However, it's unclear if your specific model supports it.
You might turn off the USB controller in Device Manager, but unless you’re certain which ports belong to which controller (there could be more than one), you risk also disabling your mouse or keyboard. I’m not sure if there’s a better approach... a hub for the back of your PC is often available for a low cost.
I’m not sure about this setup. I think it might be possible with a high-end motherboard, but it’s unlikely. Disabling it through the device manager only affects the connected device, not the port. My speaker works via USB for power but doesn’t transfer data, so Windows doesn’t detect it as plugged in.
I've observed switching USB ports via the BIOS, but I haven't noticed a software setting for USB ports...
You start with Linux and run a command to check USB ports. You search for any mention of power switching in the output. It seems your motherboard likely doesn’t have this capability. I only know about chipset support in certain USB hubs, and none that use this feature. If it did work, you might find examples on GitHub like https://github.com/mvp/uhubctl and adapt them for Windows.