Every time I use some external device (pen-drive or external HDD) on my desktop, after some idle time my Windows 7 puts it into sleep state, turning it off. Sometimes it sleeps and doesn't come back. Is there a way to configure Windows to avoid the sleeping of my external device?
Go into the Power Options in Control Panel, then click on "Change Plan Settings" for your plan, then there should be an option "Change advanced power settings", then look under the "Hard Disk" and "USB Settings" areas.
This one may not be the actual answer, but set your "Turn off Hard Disk after" to never (set 0), but I think the real one is to set "USB selective suspend settings" to "disabled" at least when plugged in...but maybe also when on battery if you are using it that way when it happens.
Windows USB are set to be disabled if idle to save power, you can disable this function by going to
- Control Panel
- Device Manager
- Universal Serial Bus controllers (expend this)
You should see a list of Generic USB Hub
Right click on each one of them and select Properties | Power Management and uncheck the Allow the computer to turn off this device to save power
Try this piece of software: NosleepHD: http://nosleephd.codeplex.com/ It writes an empty file every minute.
I'm encountering the same issue (Windows 8.1) and none of the "power setting" solutions worked for me.
I ended up playing a movie file, an audio file... anything that cause regular accesses to the disk.
For less overhead, it should be feasible to write some script that just regularly access the disk, before it goes to sleep.
edit: here is a quick script that does the job.
A blank file "mzt7dbs5ffxamzsj.txt" (just some random name) will be created (then regularly written to) at the same location as the batch file:
@ECHO OFF SET FILE=%~dp0mzt7dbs5ffxamzsj.txt SET TIMEOUT=30 ECHO. ECHO File: %FILE% ECHO Timeout: %TIMEOUT% seconds ECHO. ECHO Script is running... :LOOP TYPE NUL > "%FILE%" TIMEOUT /T %TIMEOUT% /NOBREAK > NUL GOTO LOOP
- I tried
DIRbut it didn't work as the results are cached. There should be some way that doesn't require to use a file.
- Resource of interest: How to create empty text file from a batch file?
- Debugging was easy as my drive spins down every 40 seconds >_<
The power options or device manager options never worked for me with Windows 8, 8.1 or 10. Below is a simply batch script to do the job. Open a text editor, copy-paste the commands, change the drive letter to match your HDD's, to add another drive replicate the copy, del commands once more, save it as a .bat or .cmd file and double click to run.
@echo off :start REM --- Change the drive letter D below to match your HDDs. To add another drive replicate the copy and del lines --- copy NUL D:\HDDActive.txt del D:\HDDActive.txt TIMEOUT /T 30 /NOBREAK goto start
Additionally, you may want to see this to run the batch file on startup.