Turn Off Hard Drive Sleep via Registry

UaVaj

Golden Member
Nov 16, 2012
1,546
0
76
if hard drive has not been access for a while it would go to sleep. and would cause a delay when re-access.

NOT interested in "power options" method. also hard drive is not a green drive.

with that said. anyone know which registry key controls/prevents the hard drive from spinning down. os is win7 x64.

it is in here. just not sure exactly which key is it.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\]

thanks.
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
Why aren't you interested in the power options method, to control a local drive?

If nothing else, that method, and a screenshot or two, would give you the answer to you question: change it, and see which key changes.
 

zir_blazer

Golden Member
Jun 6, 2013
1,239
537
136
At least on Western Digital Green drives, what caused the delay was the head parking, and that was a Firmware based feature, not OS related. There was a tool that was able to modify that value. Not sure on other HDs, but I suppose that you're looking for a similar solution.
 

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
It isn't a single registry key. There are keys for power profiles that then select the proper registry key groups. There is also keys to define the power profile keys to computer operation modes. (IE plugged in, docked, on battery, tablet mode, etc etc.)

It is by far easier to use powercfg from the command line if you want a nongui method. Or use AD power policy.

IE:

For the current power profile:
powercfg -CHANGE -disk-timeout-ac 0
powercfg -CHANGE -disk-timeout-dc 0
 
Last edited:

UaVaj

Golden Member
Nov 16, 2012
1,546
0
76
that is correct. there is one key for each power profile. once the key is pointed out. will revise it for the desire profile (high performance).

problem is the key is not spell out nicely. the power profiles keys are bunch of random numbers. for example. the key for cpu core parking is "0cc5b647-c1df-4637-891a-dec35c318583"

so question is - which random numbers key is for the hard drive spin down?
 

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
No one is going to be able to tell you as the GUID you printed out is unique to your computer. The value is also unique to your computer. That is the whole reason powercfg exists. If you go and read the help on it (powercfg /?) it will tell you how to list out the GUID for your computer and the friendly names.

What you want to so is not supported and is not advisable. Use the utility that is provided.
 

UaVaj

Golden Member
Nov 16, 2012
1,546
0
76
the GUID should be the same. have 4 different machine with different hardware. they all share the same GUID for cpu core parking (which is part of powercfg). no reason why hard drive spin down would not share the same GUID.

perhaps this thread should be move to the "highly technical" forum.



as for how one chooses to tweaks. will leave that for another thread.
 

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
Have at it then. It isn't highly technical. It is a large lookup system that varies from system to system. If you were to spend a moment using the tool I listed, it would tell you everything you want to know. There is no answer here that someone is going to help you since you obviously don't want to do any work and simply want it handed to you.
 

UaVaj

Golden Member
Nov 16, 2012
1,546
0
76
appreciate your input in utilizing powercfg as an alternative.
however that is NOT what the original post ask.
not interest in neither the gui nor command line.

looking for a registry key patch instead.
 

KingFatty

Diamond Member
Dec 29, 2010
3,034
1
81
I'm not fully understanding, but isn't the point that there can't be a registry solution because the registry information you'll need to access will change from system to system. So you can use the tool to discover what that information is, and then create your own registry key that is custom tailored to only work on that specific machine? If so, this would sound like a whole lot of work to come up with the registry key information, but once you have it, you might be able to recoup that extra work if you apply this to the same machine over and over again. But that's unlikely, and since you can't use the solution on any other machine, there is no way to recoup the work spent, so ultimately it's a waste?
 

Carson Dyle

Diamond Member
Jul 2, 2012
8,173
524
126
I have a similar situation, where I have a file server with 13 data drives, but only one of them that I want spinning 24/7. So I can't use the power settings to keep that one drive alive.

So I just schedule a little batch file to write a small file to the root folder of the drive and then delete it. It runs every five minutes, so even if the power options are set to spin down drives after 10 minutes that drives always spins. If you have multiple drives to keep up, you can easily have the batch file keep all of them spinning.
 

UaVaj

Golden Member
Nov 16, 2012
1,546
0
76
scripting is also another method for preventing hard disk power down.

-----

for someone who understand the registry well - this should be a walk in the park.

in the hard drive power down key. there is valuemin and valuemax.
inside of that key. default scheme are: power save, balanced, high performance.
inside of that scheme. ac power down value and dc power down value.

need to so some more testing and will share the results. learning in process.
 

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
The settings you change are in power -> User.

You are looking at the read only section of the power control. They get wiped and replaced during boot up (normally.) Those are the values you read to know how to set the values in the user side. After you make changes to the user side you have to make a DLL call to powrprof.dll or a WMI invoke to make it actually read and use the values you set. It has basically nothing to do with "knowing the registry" and more to do with knowing the API.

What is the reason for doing this again?
 
Last edited: