Find the answer to your Linux question:
Results 1 to 4 of 4
Hello,is there a command that would cut off the power of the usb ports?I was told to do echo "0" > /sys/bus/usb/devices/device/power/state but i have nothing like state in --/power/state... ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2009
    Posts
    11

    Turning off the power to usb ports - command


    Hello,is there a command that would cut off the power of the usb ports?I was told to do
    echo "0" > /sys/bus/usb/devices/device/power/state
    but i have nothing like state in --/power/state... none of these.
    Anyone know how to do this?

  2. #2
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Never thought about it before, but found this in the kernel documentation.

    Linux Kernel Documentation :: usb : power-management.txt

    So I would guess something like
    Code:
    echo suspend > /sys/bus/usb/devices/usb1/power/level
    Assuming the USB driver supported it, and the kernel was built with the CONFIG_USB_SUSPEND option enabled.

  3. #3
    Just Joined!
    Join Date
    Oct 2009
    Posts
    11
    Thanks for trying to help (nobody helped me elsewhere) but it does not work,as I may quote the kernel documentation
    "suspend" means that the device should remain
    suspended, and autoresume is not allowed. (But remote
    wakeup may still be allowed, since it is controlled
    separately by the power/wakeup attribute.)
    So this would work only when it is not doing anythink,which is for my purposes unusable,the device connected will be somewhat like lamp,or something that is not controlled by usb,and does not take data from computer,just the power.
    Any ideas?

  4. #4
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Unless you can disable the USB port from the BIOS, I don't know of a way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •