Powering on/off usb ports?

Is it possible to power on /off usb ports?

I’m thinking of programmatically power on/off usb cooling fan checking the SoC temperature.
What do you think?

My device is Mecool KII Pro which has S905

It might be possible, but it depends on the kernel. So you have to dive into this by your own unless some CE members have some experience from this. Lookup USB power management for kernel 3.14-nougat.

I’ve not looked into this, yet I’m not sure if you can cut the power. You can signal the device to power on/off, but it’s up to the fan controller to activate/deactivate from the signal received. There should be allot of information to find from RPI users which could be useful. uhubctl could be worth checking out

Normally not because there is no extra hardware switch included to power on/off the USB +5V.
Sometimes it is connected with the HDMI power. So If HDMI power get switched off, the USB will be also be off. But you will not see anything on the TV/display after power off :wink:

Like here as example:
Sheet 10, A1.
USB is at fix +5V, HDMI can be switched on/off.

The only way I see is to find a free gpio pin what can be accessed and do PWM and/or on/off control with a external electronic.

1 Like

Are KII Pro and Khadas VIM2 identical devices?

I don’t know if KII Pro has available any GPIO pin. AFAIK all the GPIO pins are used for DVB-S2 tuner. Am I correct?

I was thinking about communicating with an Arduino Nano over serial to control fan.

I think you can do that too with the help of a small script in which you change the state of the bConfigurationValue.



echo 1 > /sys/devices/c9000000.dwc3/xhci-hcd.0.auto/usb1/1-1/bConfigurationValue


echo 0 > /sys/devices/c9000000.dwc3/xhci-hcd.0.auto/usb1/1-1/bConfigurationValue

I have not tested this on CE.

Hi all,
just purchased a Vontar X3 (s905x3) with 4/64 GB and installed CE 9.2.7 on a micro SD card. I noticed that powering the box off leaves the usb2.0 port on and keeps the attached fan running. I have been searching the forum but failed to find any solution. And I was unable to toggle the USB power switch on the Hardware page of Coreelec settings since it is absent from that page. This is from a screenshot I stumbled on during my search. Does anybody have a solution to shut the port off or shall I just live with that and unplug the fan each time I turn the box off. Not the most user friendly …

You need to inject bl301 that this option get available.

Ah I see. Thank you for taking the time. Any potential risks attached to doing so to this particular box?

It´s on Your own risk !

Thanks but I meant “Has anybody on this forum encountered any difficulty in doing so on the Vontar X3?”. I’m well aware of the warnings written in red in the BL301 injection guide. Just want to spare myself the headache of having to unbrick the device.

About | FAQ | Terms of Service | Privacy Policy | Legal Notice