Prevent sleeping HDD from waking up?

Page 3 of 3 FirstFirst 123

  1. Posts : 7,606
    Windows 10 Home 20H2
       #21

    hdmi said:
    I have built another command to put the HDD to sleep
    Do you mean a command like the following?

    Code:
    "D:\HDDScan\HDDScan.exe" "\\?\scsi#disk&ven_seagate&prod_one_touch_w#pw#6&18fe36a7&0&000000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}" -Z

    It could be useful when I have failed to spin down the HDD via "Safely Remove Hardware and Eject Media".
      My Computer


  2. Posts : 1,203
    11 Home
       #22

    Matthew Wai said:
    Do you mean a command like the following?

    Code:
    "D:\HDDScan\HDDScan.exe" "\\?\scsi#disk&ven_seagate&prod_one_touch_w#pw#6&18fe36a7&0&000000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}" -Z
    Yes

    @Shade850

    So here's what works for me. In beforeSleep.bat, I have put a command that sets the Idle Timer [of the HDD's Power Management] to 5 seconds, which is the shortest time that it can allow:
    "C:\tools\HDDScan\HDDScan.exe" %3 -PM 1
    In afterSleep.bat, you can put a command that changes the Idle Timer back to whatever the value that you prefer. So, I have set the value to 0 to disable the Idle Timer:
    "C:\tools\HDDScan\HDDScan.exe" %3 -PM 0
    (Substitute C:\tools\HDDScan with the path of your folder that contains the file HDDScan.exe.)

    In revoSleep (doubleclick on its systray icon to un-hide it) I have clicked on Show details for my HDD and I have unticked the Sleep checkbox:

    Prevent sleeping HDD from waking up?-revosleep.png

    I have tested this with my 8TB Seagate ST8000DM002 that I have hooked up via USB 3.0 (ASMT 2105 SATA-to-USB3 adapter piece) to my laptop─System One in my specs─running on Windows 11 build 376 (official release, with full updates).
      My Computers


  3. Posts : 7,606
    Windows 10 Home 20H2
       #23

    I ran the following commands via a CMD script. Then, my USB HDD went to sleep and did not wake up until I ran Disk Management.

    Code:
    CD /d "%~dp0" & MountVol K:\ /d & Set "[EXE]=HDDScan.exe"
    "%[EXE]%" "\\?\scsi#disk&ven_seagate&prod_one_touch_w#pw#6&18fe36a7&0&000000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}" -Z

    K is the driver letter of the USB HDD, i.e. Seagate One Touch.
      My Computer


  4. Posts : 8
    10
    Thread Starter
       #24

    hdmi said:
    Yes

    @Shade850

    So here's what works for me. In beforeSleep.bat, I have put a command that sets the Idle Timer [of the HDD's Power Management] to 5 seconds, which is the shortest time that it can allow:
    "C:\tools\HDDScan\HDDScan.exe" %3 -PM 1
    In afterSleep.bat, you can put a command that changes the Idle Timer back to whatever the value that you prefer. So, I have set the value to 0 to disable the Idle Timer:
    "C:\tools\HDDScan\HDDScan.exe" %3 -PM 0
    (Substitute C:\tools\HDDScan with the path of your folder that contains the file HDDScan.exe.)

    In revoSleep (doubleclick on its systray icon to un-hide it) I have clicked on Show details for my HDD and I have unticked the Sleep checkbox:

    Prevent sleeping HDD from waking up?-revosleep.png

    I have tested this with my 8TB Seagate ST8000DM002 that I have hooked up via USB 3.0 (ASMT 2105 SATA-to-USB3 adapter piece) to my laptop─System One in my specs─running on Windows 11 build 376 (official release, with full updates).
    I've disabled the services mentioned in the Youtube clip, and added the registry key and value. I think it's some kind of improvement because the drives stay at sleep if I leave the computer for a while. However, as soon as a touch keyboard or mouse and the screen lits up, the drives spin up again. Unless it was random luck, since the drives always successfully go to sleep after 5min anyhow.

    I can try the HDDScan commands. Just one question, how do you configure revoSleep to use your custom bat-files?
    EDIT: I found it

    - - - Updated - - -

    hdmi said:
    Yes

    @Shade850

    So here's what works for me. In beforeSleep.bat, I have put a command that sets the Idle Timer [of the HDD's Power Management] to 5 seconds, which is the shortest time that it can allow:
    "C:\tools\HDDScan\HDDScan.exe" %3 -PM 1
    In afterSleep.bat, you can put a command that changes the Idle Timer back to whatever the value that you prefer. So, I have set the value to 0 to disable the Idle Timer:
    "C:\tools\HDDScan\HDDScan.exe" %3 -PM 0
    (Substitute C:\tools\HDDScan with the path of your folder that contains the file HDDScan.exe.)

    In revoSleep (doubleclick on its systray icon to un-hide it) I have clicked on Show details for my HDD and I have unticked the Sleep checkbox:

    Prevent sleeping HDD from waking up?-revosleep.png

    I have tested this with my 8TB Seagate ST8000DM002 that I have hooked up via USB 3.0 (ASMT 2105 SATA-to-USB3 adapter piece) to my laptop─System One in my specs─running on Windows 11 build 376 (official release, with full updates).
    As I've understood, the beforeSleep and afterSleep is executed for each disk. So exactly does %3 argument do?

    - - - Updated - - -

    Matthew Wai said:
    I ran the following commands via a CMD script. Then, my USB HDD went to sleep and did not wake up until I ran Disk Management.

    Code:
    CD /d "%~dp0" & MountVol K:\ /d & Set "[EXE]=HDDScan.exe"
    "%[EXE]%" "\\?\scsi#disk&ven_seagate&prod_one_touch_w#pw#6&18fe36a7&0&000000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}" -Z

    K is the driver letter of the USB HDD, i.e. Seagate One Touch.
    -Z is short for SpinDown. So if manually spinning down drives with HDDScan works for me, and keeps them down, I guess this would do it.
      My Computer


  5. Posts : 1,203
    11 Home
       #25

    Shade850 said:
    As I've understood, the beforeSleep and afterSleep is executed for each disk. So exactly does %3 argument do?
    Yes. On line 6 in beforeSleep.bat, it clearly states:
    :: %3 contains the device path (e.g. "\\?\ide#diskwdc_wd800jb-00...")

    I have been testing it for several more days now. It works, and, it works also in spite of the fact that the documentation on the website of revoSleep explains that USB is not supported, so, basically what I have found is an easy workaround that makes it work on USB drives─at least for me. I haven't touched the mechanical pushbutton switch for the port on my RSHTECH 16 ports USB 3.0 hub to which my ASMT adapter piece is hooked up, so I am now very confident that, amazingly, it works...

    Another thing I noticed was that afterSleep.bat is executed before the volume is mounted again by revoSleep, so the command to set the HDD's Idle Timer to disabled fails as a result from this (the command pops up an error in a dialog window). To fix this, I edited afterSleep.bat like this:
    Code:
    @ECHO OFF
    SET c=15
    :FindDrive
    IF EXIST "%~1\" GOTO Mounted
    TIMEOUT /T 2
    SET /A c-=1
    IF %c%==0 EXIT
    GOTO FindDrive
    :Mounted
    "C:\tools\HDDScan\HDDScan.exe" %3 -PM 0
    Please note, the above batch code assumes that a drive letter has been assigned to the volume on the HDD. (If the root path to the volume cannot be found, the batch script just exits after 15 attempts are made to find it.)
      My Computers


  6. Posts : 8
    10
    Thread Starter
       #26

    hdmi said:
    Yes. On line 6 in beforeSleep.bat, it clearly states:
    :: %3 contains the device path (e.g. "\\?\ide#diskwdc_wd800jb-00...")
    Lol yes, but it kind of confusing. It basically states that disk X is configured with -PM 1, when the script is executed for disk X...

    So how is this different than me manually setting power mgmt in HDDScan? Or configuring idle sleep in power options? It doesn't in my opinion, the drives spin up anyway after a while. Regardsless if I choose to put them offline and/or detached (invisible in Windows)

    hdmi said:
    I have been testing it for several more days now. It works, and, it works also in spite of the fact that the documentation on the website of revoSleep explains that USB is not supported, so, basically what I have found is an easy workaround that makes it work on USB drives─at least for me. I haven't touched the mechanical pushbutton switch for the port on my RSHTECH 16 ports USB 3.0 hub to which my ASMT adapter piece is hooked up, so I am now very confident that, amazingly, it works...
    Good to hear. It's doesn't work for HDD:s sitting on the internal SATA bus however.
      My Computer


  7. Posts : 1,203
    11 Home
       #27

    Shade850 said:
    Lol yes, but it kind of confusing. It basically states that disk X is configured with -PM 1, when the script is executed for disk X...
    So how is this different than me manually setting power mgmt in HDDScan? Or configuring idle sleep in power options? It doesn't in my opinion, the drives spin up anyway after a while. Regardsless if I choose to put them offline and/or detached (invisible in Windows)
    The 'trick' is that the command that sets the HDD's Idle Timer to 5 seconds is executed before revoSleep deactivates the device driver of the HDD so the timer runs out only a few moments after that, and, when it does it causes the HDD to sleep. To elaborate, the device driver needs to be still active for it to be able to process a command. So, if the Sleep checkbox is ticked in revoSleep settings, it causes the HDD to sleep before the deactivation occurs. However, on Windows 10 it can happen that the deactivation immediately wakes the HDD, as has been explained on the revoSleep webpage. According to this same webpage, unticking the Deactivate checkbox can help to avoid this problem on Windows 10. But... if you do that, then it can happen that Windows 10 will wake the HDD after some period, as the deactivation may be what's needed to prevent that. So, by letting the HDD fall asleep after the deactivation, I am effectively bypassing this whole problem.
    Good to hear. It's doesn't work for HDD:s sitting on the internal SATA bus however.
    revoSleep used to work for me out-of-the-box on Windows 7 with 1.5TB Seagate Barracuda 7200.11 HDDs via external eSATA connection (which was programatically identical to an internal SATA III connection, the Intel RST driver was the same for both connection types so there was no separate driver for eSATA or anything like that). I suppose that for a lot of people at least, Windows 10 was what ruined the ability to keep SATA drives asleep. And so the problem still exists on Windows 10, even today.
      My Computers


  8. Posts : 8
    10
    Thread Starter
       #28

    hdmi said:
    The 'trick' is that the command that sets the HDD's Idle Timer to 5 seconds is executed before revoSleep deactivates the device driver of the HDD so the timer runs out only a few moments after that, and, when it does it causes the HDD to sleep. To elaborate, the device driver needs to be still active for it to be able to process a command. So, if the Sleep checkbox is ticked in revoSleep settings, it causes the HDD to sleep before the deactivation occurs. However, on Windows 10 it can happen that the deactivation immediately wakes the HDD, as has been explained on the revoSleep webpage. According to this same webpage, unticking the Deactivate checkbox can help to avoid this problem on Windows 10. But... if you do that, then it can happen that Windows 10 will wake the HDD after some period, as the deactivation may be what's needed to prevent that. So, by letting the HDD fall asleep after the deactivation, I am effectively bypassing this whole problem.
    Ok, I've used the configuration specified, and tried both with "Deactivate" ticked and unticked. All drives spin down initially, however, it doesn't appear to be a 100% fix for my setup. After 3-4min atleast one drive spins up again. And if I wait longer, another one spins up. It's is more quite than before is I'm just going to leave this as it is now. Thanks for your help.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 23:37.
Find Us




Windows 10 Forums