Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I had a Western Digital External 1TB drive, which I was accessing via USB. I decided one day, that I would prefer to mount the HDD in my case, and access it via SATA interface. So I took it apart, and the actual mounting was a breeze.

The only thing is, I think the device has some default power saving features, which means the device tends to stop spinning when idle for (x) amount of time.

This creates delays when I am accessing the HDD. Is there anyway I can turn off these power saving features for this HDD?

share|improve this question

11 Answers 11

up vote 10 down vote accepted

If it's (for example) a green Western Digital drive, it's going to spin down regardless, because the drive decides to turn off after a certain time.

share|improve this answer
2  
I can confirm its the green Western Digital, nothing to prevent this? –  JL. Jan 23 '11 at 17:51
3  
Unfortunately not. –  user3463 Jan 23 '11 at 17:58
3  
@JL. You can of course make sure the drive doesn't get to idle. I put the swap file on my HDD to prevent all the extra writing to my SSD, but also to make sure the HDD wouldn't spin down. –  Jasper Jan 22 '13 at 22:16
3  
SATA drives can spin down either byt request from the host (your windows installation) or by idle timeout (on their own). You can configure the last. E.g. use hdparm -s Number /dev/sdaX where number is usually in multiples of 5 seconds. See man hdparm or its windows equivalent. –  Hennes Nov 8 '13 at 23:11

This is not always caused by power management in Windows; sometimes it is caused by the hard drive firmware. Spinning down at a period of 5 minutes or 10 is annoying if you work in Photoshop, Word or other programs and must save your work periodically. It is irritating to wait for the HDD to spinning up. It may also damage the HDD.

Solution is very simple:

  • Create a batch file (with filename spinning.bat) in Notepad and put this script in it:

    echo a > d:\stop_spinning_down.txt
    

    (d: represents your HDD). The batch file can be put on the problematic HDD or another partition.

  • Run task scheduler from Windows and create a new task to run that batch file (.bat) and restart that task at 5 minutes or 10 minutes. This operation writes a text file at 5 or 10 minutes and then rewrites that file over and over. The problem is that when every task is executed the cmd window opens, again annoying :))

We must run the batch file in hidden mode:

  • Create a .vbs file with Notepad and put this script in it:

    Set WshShell = CreateObject("WScript.Shell") 
    
    WshShell.Run chr(34) & "d:\spinning.bat" & Chr(34), 0
    
    Set WshShell = Nothing
    
  • Now save this file (e.g.: spinning_hide.vbs; note that spinning.bat is your batch file) at the location of the batch file and then run only the .vbs file with Windows task scheduler. This method writes a text file of 1k at a 5 or 10 minute interval and prevents the HDD from entering idle mode.

share|improve this answer
    
Change the properties of the batch file, set it to minimize at start. –  Erwinus Dec 23 '13 at 19:35

It is possible to disable the spin down on ANY Western Digital hard drive on the firmware level, including the "green" drives.

A program called idle3.exe is run in DOS mode, and a simple idle3.exe /d will go through and disable the spin down time period on any connected WD drive.

More information can be found here.

share|improve this answer
    
how does "ANY" relate to this text from WD's download page: "following hard drives: WD1000FYPS-01ZKB0, WD7500AYPS-01ZKB0, WD7501AYPS-01ZKB0. CAUTION: Do not attempt to run this software on any hard drives other than what is listed above." any real-world experiment? –  naxa Jul 2 at 15:47
    
I have tried it on my WD Caviar Blue without success (HD wasn't damaged or similar, but it has no effect for my HD). –  CSchulz Sep 25 at 9:22

I've been using the batch file approach to prevent my Western Digital external HDs from sleeping, but I wasn't a fan of the number of steps necessary to implement it—made worse since I had to do it with multiple drives.

I also wanted to fine-tune the behavior of the scripts, but I wasn't excited about spending the time to figure out how to go about it. Thankfully I ran across something that I find more convenient to implement and tweak to my individual needs.

An Alternative to Batch Scripting

My preferred solution – that I've switched to at home and at work – is a free & open source app (Windows only) called KeepAliveHD : http://keepalivehd.codeplex.com/

Like many batch file solutions it periodically writes a file to the external HD (seriously... is there no other way of programattically interacting with a drive to keep it awake than by writing a file?), but it offers the convenience of a graphical interface and adds a number of options—several of which I find very useful.

Advantages / Benefits

  • It's easy to add additional drives
    (the author claims there's no limit)
  • You can customize settings per drive—including write intervals & enabling/disabling writes
  • It's possible to disable the keep-alive writing based on inactivity
    (I leave my work computer on all the time, so my drive never slept even when I was)

You can see the source code on the project's page, which I like because it helps keep the program's behavior transparent (e.g. no hidden 'features') and I suppose it also might give non-Windows folks a starting place for creating something for their platform.


Anyway, I know this is an answer to an old question, but it's where I found my first (and now supplanted) solution for keeping my external HD awake just a couple of months ago, so hopefully this solution will be of use to others—whether its a first solution for them or an improved one.

share|improve this answer
    
Version 1.5 beta allows to disable the keep alive if the user is for X time inactive. –  CSchulz Sep 25 at 9:23

You will need to change your power plan:

  1. Go to control panel -> Power options
  2. In the current power plan, click Change plan settings -> Change advanced power settings
  3. Under Hard disk, set Turn off hard disk after to: Never
  4. Under USB settings set USB selective suspend setting to: Disabled
share|improve this answer
    
Maybe not the correct answer for the OP's exact question, but this solved my spin-down problem. –  Fred Hamilton Jun 1 at 22:55

You should be able to turn this off unless the drive has some crazy firmware that completely ignores commands. In the Power Options dialogue in Win 7, take your given plan and 'Change plan settings', then 'Change advanced power settings'. There's an option for 'Hard disk' and 'Turn off hard disk after...'. Set it to 0 for 'Never'.

share|improve this answer
1  
I'd just add that I'm not 100% on the WD Green in question since they very well MIGHT have said crazy firmware, I know how hard they push the low power consumption on those. ;) –  Shinrai Jan 25 '11 at 23:26

If you're familiar with Linux, check out the hdparm command: http://linux.die.net/man/8/hdparm (particularly the -S switch).

I've successfully turned off the spin down setting on a bunch of drives with it before. It sets the setting on the drive itself so it will persist no matter what computer you're using it with or how you format it :)

share|improve this answer

This is an improved script of @Alexandru's for Windows.

Save as Keep awake 1.00.wsf:

<?xml version="1.0" encoding="utf-8"?>
<package>
    <job id="keepAwake">
        <?job error="false" debug="false"?>
        <script>
            //<![CDATA[
            /*
             * Copyright 2012 XP1
             *
             * Licensed under the Apache License, Version 2.0 (the "License");
             * you may not use this file except in compliance with the License.
             * You may obtain a copy of the License at
             *
             *     http://www.apache.org/licenses/LICENSE-2.0
             *
             * Unless required by applicable law or agreed to in writing, software
             * distributed under the License is distributed on an "AS IS" BASIS,
             * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
             * See the License for the specific language governing permissions and
             * limitations under the License.
             */

            /*jslint browser: true, vars: true, white: true, maxerr: 50, indent: 4 */
            (function (script, shell, fileSystem)
            {
                "use strict";

                var currentDirectory = fileSystem.getFolder(shell.currentDirectory);
                currentDirectory.createTextFile("empty.txt", true, false).close();

                script.quit();
            }(this.WScript, new this.ActiveXObject("WScript.Shell"), new this.ActiveXObject("Scripting.FileSystemObject")));
            //]]>
        </script>
    </job>
</package>

This script creates an empty file at the root of the current directory.

Next, save this XML file as Keep awake 1.00.xml:

<?xml version="1.0" encoding="utf-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
    <RegistrationInfo>
        <Date>2012-01-01T00:00:01</Date>
        <Author>Administrator</Author>
    </RegistrationInfo>
    <Triggers>
        <BootTrigger>
            <Repetition>
                <Interval>PT20M</Interval>
                <StopAtDurationEnd>false</StopAtDurationEnd>
            </Repetition>
            <ExecutionTimeLimit>PT30S</ExecutionTimeLimit>
            <Enabled>true</Enabled>
        </BootTrigger>
    </Triggers>
    <Principals>
        <Principal id="Author">
            <GroupId>Users</GroupId>
            <RunLevel>LeastPrivilege</RunLevel>
        </Principal>
    </Principals>
    <Settings>
        <IdleSettings>
            <Duration>PT10M</Duration>
            <WaitTimeout>PT1H</WaitTimeout>
            <StopOnIdleEnd>true</StopOnIdleEnd>
            <RestartOnIdle>false</RestartOnIdle>
        </IdleSettings>
        <MultipleInstancesPolicy>StopExisting</MultipleInstancesPolicy>
        <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
        <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
        <AllowHardTerminate>true</AllowHardTerminate>
        <StartWhenAvailable>false</StartWhenAvailable>
        <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
        <AllowStartOnDemand>true</AllowStartOnDemand>
        <Enabled>true</Enabled>
        <Hidden>false</Hidden>
        <RunOnlyIfIdle>false</RunOnlyIfIdle>
        <WakeToRun>false</WakeToRun>
        <ExecutionTimeLimit>PT30S</ExecutionTimeLimit>
        <Priority>7</Priority>
    </Settings>
    <Actions Context="Author">
        <Exec>
            <Command>"\Keep awake 1.00.wsf"</Command>
            <WorkingDirectory>L:\</WorkingDirectory>
        </Exec>
    </Actions>
</Task>

When you save the XML file, make sure that you save the file encoding as UTF-16 (labeled "Unicode" in Notepad).

On <Command>"\Keep awake 1.00.wsf"</Command>, make sure that you modify this line by adding the location of the script.

On <WorkingDirectory>L:\</WorkingDirectory>, you can change this line to the location of your drive.

Start > All Programs > Accessories > Right click on "Command Prompt" > Run as administrator.

Change to the directory where the XML file is located.

Import the XML as a task:

schtasks /create /tn "Keep awake 1.00" /xml "Keep awake 1.00.xml"

If you want to delete the task, type:

schtasks /delete /tn "Keep awake 1.00" /f

This task is set up to run every 20 minutes. My Western Digital Elements 2 TB (WDBAAU0020HBK) external hard drive sleeps every 30 minutes.

After you have imported the task, you can configure the interval and schedule by using the task scheduler. To open the task scheduler, in the command prompt or in a Start > Run dialog, type:

taskschd.msc

Warning:

Western Digital Green drives may have an aggressive IntelliPark feature that parks the head after 8 seconds of inactivity. This will cause the load/unload cycle count (LCC) to increase substantially. You can check the LCC by using software, such as Defraggler or Hard Disk Sentinel on Windows, that can read S.M.A.R.T. data.

Keeping the drive awake every 20 minutes may eventually increase the LCC over the limit. Instead of running this script, you may consider only using the drive occasionally and leaving it unplugged.

You can read more here:

http://www.sagaforce.com/~sound/wdantiparkd/

Although you could change the interval of the script to 7 seconds to prevent head parking, it doesn't sound very good.

It would be a good idea to use wdidle3.exe to disable the IntelliPark feature or adjust the timeout.

If you don't want to do any of that, it would be a great idea to buy a different hard drive, and use the Western Digital Green hard drive as a backup drive that you only need to turn on occasionally. Everyone loves backups.

share|improve this answer

I run this free program which at a specified timer access the disc: My Disk is Spinning

share|improve this answer

For the purpose of "pinging" hard drives to prevent them from spinning down, I wrote a small Windows uitility some time ago, https://github.com/MrShoenel/HDD-Ping, maybe it'll help you. This is especially helpful if you cannot use SMART to alter the timer (as in my case where I prevented a Raid-Array from spinning down).

share|improve this answer

To prevent HDD from spinning down on my laptop I use CrystalDiskInfo. Windows Power Management will not help, it's HDD APM settings. You have to download Standard Edition, then go to Function -> Advanced Feature -> AAM/APM Control. Select HDD and change settings for APM under APM section between Min Power and Performance. Or you can disable APM feature at all.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.