Quote:
Originally Posted by ssanthshtech
hii
In my laptop need to control power flowing through usbport which connected with usb fan . Tried some methods results as usbport is not working now. its possible to control power without blocking usbports.
|
Maybe, but probably not. You don't tell us what version/distro of Linux you're using, on what kind of hardware, but for Linux >= 2.6.38, the answer is no.
There is a file "/sys/bus/usb/devices/usb2/power/level", but its use is deprecated now, in favor of the power/control. It accepts only "auto" and "on", not "suspend", as it used to. The "auto" is smart enough, and if the power isn't turned off while the attached device is idle, then it's the device's fault. For lower kernels, you can try to echo "off" into the power/level file for the corresponding USB port. Replace the "usb2" with whatever port number you're using, but chances are it won't work. A small bit of research would lead you to the power control stuff for Linux:
https://www.kernel.org/doc/Documenta...management.txt