https://github.com/jabbalaci/dontsleep
Prevent HDD from going to sleep
https://github.com/jabbalaci/dontsleep
awake hdd
Last synced: 6 months ago
JSON representation
Prevent HDD from going to sleep
- Host: GitHub
- URL: https://github.com/jabbalaci/dontsleep
- Owner: jabbalaci
- License: mit
- Created: 2022-10-22T02:45:47.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-22T04:50:33.000Z (almost 3 years ago)
- Last Synced: 2024-06-21T17:02:12.636Z (over 1 year ago)
- Topics: awake, hdd
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dontsleep
"Don't sleep" prevents HDD from going to sleep.
## Problem
For watching movies, I have a laptop connected to my TV
and the movies are stored on an external HDD. However,
this HDD goes to sleep very quickly when not used. When
I want to use it again, it requires several seconds to
spin up. How to keep this HDD awake, i.e. how to prevent it
from falling asleep?## Solution
The idea is very simple. Read from or write to this HDD
every X seconds, thus it's used constantly and it cannot
go to sleep mode.This simple program does exactly this. It writes an empty
file to the HDD every 5 minutes.I measured my HDD and it shuts itself down in around
6 minutes and 20 seconds.## Usage
Modify the value of the constant `fname`. Specify the path
of the file that should be written to.Then build the EXE with `go build` and launch the
program. It will print some log on the screen.## Improvement ideas
* The program could keep alive not only one but
several HDDs.* The program could have a graphical user interface.
## Links
* [Prevent Hard Disk from going to Sleep in Windows 11/10](https://www.thewindowsclub.com/prevent-hard-drive-going-sleep-windows)