Windows tray application that spins down a specific hard drive after a configurable idle period. The drive wakes automatically when next accessed — Windows handles that transparently.
Useful for drives that ignore Windows' own power management, or where Windows erroneously keeps them spinning despite no user activity.
While researched and prototyped manually, this software is entirely vibecoded. It works, but use at your own risk.
smartctl must be available in PATH or placed next to sleepydisk.exe. It is freely redistributable under the GPL.
| Tool | Source | Required | Purpose |
|---|---|---|---|
smartctl |
smartmontools | Yes | Detect standby state; send spin-down command |
handle.exe |
Sysinternals Handle | No | Identify which processes are holding files open on the drive |
handle.exe is optional. If it is not found in PATH or next to sleepydisk.exe, open file checking is automatically disabled and the tray menu will say so. The drive will still be spun down when idle — it just won't tell you what was holding it open. This is equivalent to passing --no-handle-check.
sleepydisk requires administrator privileges (smartctl needs them). It will self-elevate via UAC on launch if not already elevated.
sleepydisk.exe --drive <identifier> --timeout <duration> [--poll <seconds>] [--no-handle-check]
| Argument | Required | Description |
|---|---|---|
--drive <identifier> |
Yes | Model name substring or serial number of the target drive. Case-insensitive. |
--timeout <duration> |
Yes | Idle period before spin-down. Accepts 10m, 1h, or a plain number (interpreted as minutes). |
--poll <duration> |
No | How often to sample disk activity. Default: 10s. |
--no-handle-check |
No | Skip the handle.exe check entirely. When the timeout elapses and I/O is zero, spin down immediately without checking for open files. |
sleepydisk.exe --drive "WD Red" --timeout 10m
sleepydisk.exe --drive "WD-RD3W354G" --timeout 30m --poll 30s
sleepydisk.exe --drive "WD80EFPX" --timeout 1h --no-handle-checkThe identifier is matched against both the drive model and serial number as reported by smartctl -i. A substring match is sufficient — you don't need the full string.
To find the right identifier, run:
smartctl --scan
smartctl -i /dev/sdaThe application lives in the system tray. Right-clicking shows:
- Current drive state and idle time, or the list of processes blocking sleep
- Force Sleep Now — sends the standby command immediately
- Exit
Hovering the tray icon shows a short status summary.
Every poll cycle (default 10 seconds):
- Read Windows I/O performance counter — zero cost, no device communication, will not wake a sleeping drive. If transfers are nonzero, the drive is active; reset the idle timer and wait.
- If no transfers and standby already confirmed — stay in standby without invoking smartctl. A waking drive would register I/O for its spinup, so zero transfers is sufficient proof it hasn't woken.
- If no transfers and standby not yet confirmed — call
smartctl -n standbyto check without waking the drive. If in standby, record the time and switch to a slower poll interval. - If awake and idle longer than
--timeout— ifhandle.exeis available and--no-handle-checkis not set, list open file handles on the drive's volumes. Common background OS processes are filtered out. If anything remains, report it in the tray and wait. - If nothing is holding the drive open — call
smartctl -s standby,nowto spin it down.
While the drive is in standby, the poll interval automatically extends to max(timeout, 60s) to avoid unnecessary subprocess overhead.
Run one instance of sleepydisk per drive:
sleepydisk.exe --drive "WD Red" --timeout 10m
sleepydisk.exe --drive "Seagate" --timeout 20mTask Scheduler is required to auto-start an elevated process without a UAC prompt on every boot. Registry Run keys and the Startup folder do not support elevation.
Via command line (run once from an elevated prompt):
schtasks /create ^
/tn "sleepydisk-WDRed" ^
/tr "\"C:\Tools\sleepydisk.exe\" --drive \"WD Red\" --timeout 10m" ^
/sc onlogon ^
/rl highest ^
/fVia Task Scheduler GUI:
- Open Task Scheduler → Create Task
- General tab → check Run with highest privileges
- Triggers tab → New → At log on → your user account
- Actions tab → New → program: path to
sleepydisk.exe, arguments: your flags - Conditions tab → uncheck Start only if on AC power if needed
The .NET 8 Desktop Runtime must be installed on the target machine. It is included in most Windows 11 installations; if absent, the executable will prompt with a download link on first launch.
Requires the .NET 8 SDK.
dotnet buildTo produce a single-file release executable (~500 KB):
dotnet publish -r win-x64 --no-self-contained -p:PublishSingleFile=trueOutput: bin\Release\net8.0-windows\win-x64\publish\sleepydisk.exe