Results 1 to 8 of 8

Thread: Power saving mode USB 3.0

  1. #1

    Default Power saving mode USB 3.0

    Hello, everyone.
    I was wondering is there a tool to manage Opensuse power modes?

    Because I have a fallowing problem.
    From time to time, my external HDD is suddenly disconnects and connects again.
    I was reading here:
    http://www.tomshardware.com/answers/...onnecting.html

    That on Windows it could be solved by tweaking power supply of USB ports.
    Is there something similar on Linux?

    Or maybe I'm going in the wrong direction?

  2. #2
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,182
    Blog Entries
    1

    Default Re: Power saving mode USB 3.0

    To prevent USB autosuspend completely, you can add 'usbcore.autosuspend=-1' to GRUB. Alternatively, create a file in /etc/modprobe.d/ directory eg 20-usbsuspend.conf with the following entry
    Code:
    options usbcore autosuspend=-1
    Particular devices can be configured using a udev rule. For example, for a USB device '0xxx:0yyy' you could do
    Code:
    ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0xxx", ATR{idProduct}=="0xyyy", ATTR{Power/Control}="on"
    References
    https://wiki.archlinux.org/index.php...SB_autosuspend
    https://www.kernel.org/doc/Documenta...management.txt

    power/control

    This file contains one of two words: "on" or "auto".
    You can write those words to the file to change the
    device's setting.

    "on" means that the device should be resumed and
    autosuspend is not allowed. (Of course, system
    suspends are still allowed.)

    "auto" is the normal state in which the kernel is
    allowed to autosuspend and autoresume the device.

    (In kernels up to 2.6.32, you could also specify
    "suspend", meaning that the device should remain
    suspended and autoresume was not allowed. This
    setting is no longer supported.)

    power/autosuspend_delay_ms

    This file contains an integer value, which is the
    number of milliseconds the device should remain idle
    before the kernel will autosuspend it (the idle-delay
    time). The default is 2000. 0 means to autosuspend
    as soon as the device becomes idle, and negative
    values mean never to autosuspend. You can write a
    number to the file to change the autosuspend
    idle-delay time.

    Writing "-1" to power/autosuspend_delay_ms and writing "on" to
    power/control do essentially the same thing -- they both prevent the
    device from being autosuspended. Yes, this is a redundancy in the
    API.

  3. #3

    Default Re: Power saving mode USB 3.0

    Thank you for your help.
    I will test this settings and post results.

    But, there are some way to tweak system wide power settings?
    Like CPU governor, or like-Windows performance mode, balanced, power-saver?

  4. #4

    Default Re: Power saving mode USB 3.0

    Okay, adding:
    Code:
    options usbcore autosuspend=-1
    to:
    Code:
     /etc/modprobe.d/ directory eg 20-usbsuspend.conf 
    is not working, HDD is still disconnecting..

    I will test hardware.

  5. #5
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,182
    Blog Entries
    1

    Default Re: Power saving mode USB 3.0

    Did you reload usbcore after making those changes?

  6. #6

    Default Re: Power saving mode USB 3.0

    I reloaded laptop, its okay?

    But, anyway, its seems that problem is case of my HDD.

  7. #7
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,182
    Blog Entries
    1

    Default Re: Power saving mode USB 3.0

    Quote Originally Posted by galileo13 View Post
    I reloaded laptop, its okay?
    Yes, rebooting achieves the same.

    But, anyway, its seems that problem is case of my HDD.
    This may well be the case. I think many external HDD devices behave this way. I have read of a Windows utility called NoSleepHD which writes an empty text file periodically to prevent HDD devices from going into sleep mode. The same could be achieved in Linux via a suitable cron job, or perhaps hdparm will work for you

    https://wiki.archlinux.org/index.php..._configuration

  8. #8
    Join Date
    Nov 2013
    Location
    Kamloops, BC, Canada
    Posts
    3,974

    Default Re: Power saving mode USB 3.0

    Quote Originally Posted by deano_ferrari View Post
    Yes, rebooting achieves the same.


    This may well be the case. I think many external HDD devices behave this way. I have read of a Windows utility called NoSleepHD which writes an empty text file periodically to prevent HDD devices from going into sleep mode. The same could be achieved in Linux via a suitable cron job, or perhaps hdparm will work for you

    https://wiki.archlinux.org/index.php..._configuration
    Not sure and no time to refresh my memory at the moment, but I think that can be turned off with smartctl?

    I know at one time most manufacturers had a way for tweaking the HD settings with tools.
    -Gerry Makaro
    Fraser-Bell Info Tech
    Solving Tech Mysteries since the Olden Days!
    ~~
    If I helped you, consider clicking the Star at the bottom left of my post.

Tags for this Thread

Posting Permissions

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