NoSleep Released

So, I finally got around to writing a suitable replacement for the little Python script I was using to kill power management on my Thermaltake external USB/eSATA drive. But first, some history.

I didn’t mention it in the assembly guide I wrote for the Thermaltake enclosure, but as it turns out, the SATA chipset Thermaltake opted to use suffers from a rather annoying problem: If you leave it idle for more than about 15-20 minutes, it will turn the disk off. Since I like to have control over when the disk turns off, I had to write a script to periodically write a (blank) file to the disk. The idea being, of course, that if you can force some sort of activity, the drive will never go to sleep. (Edit: This isn’t entirely correct; based on information I received from Mike Fisher, it appears the source of the power down is actually the choice of hard disk–a Seagate ST3500410AS–that enters standby mode. I’ll update this accordingly once I find out if there is a means of stopping this.) As it turns out, this information isn’t completely correct either. If you’ve purchased one of these cases, it appears that the chipset will power the disk off only if it’s plugged in via USB. If you plug the bay in via eSATA, the disk will never shut off unless the OS commands it to.

The thing is, I had forgotten at least once or twice to browse to the root of my external enclosure where I kept the little Python script that did the trick. What’s more, it also required (under Windows anyway) a DOS prompt to exist as long as the application was running. Neither of these seemed to be suitable options.

Enter NoSleep

I decided to write NoSleep as a replacement for the little Python script that could. In fact, the replacement is even better–you don’t know it’s running. That’s the idea, anyway. Here are some highlights:

NoSleep…

  • Installs as a service. You don’t know it’s running in the background.
  • Isn’t invasive.
  • Scans for all removable media when you first turn the service on or install.
  • Monitors for new connected media.

This means that no matter what you do, be it unplugging an external disk and plugging it back in, NoSleep will keep an eye out. Whenever it spots something that could potentially go to sleep, it’ll start polling the disk. I use the same technique borrowed from the little Python script, too. Every once in a while, NoSleep will write to the contents of a file fittingly called .nosleep (the leading dot is intentional) and force the chipset on the drive to take note of activity, halting its sleep timer.

Why NoSleep?

Why? That’s a good question. Frankly, there are other applications out there that do the exact same thing. The thing is, all of the ones I found ran in the system tray and you had to add them to the startup folder (or the registry–though, at least one such application added itself automatically). I wanted something that would run without any indication it was running. I didn’t want a tray icon. I didn’t want to have to double-click an application every time I connect my poorly behaved enclosure. I just wanted it to work.

That’s reason enough.

So What’s the Catch?

There is none. NoSleep is free. In fact, I released it under the GPLv3. You can even browse the sources if you like. NoSleep does depend on my WMIDiskUtils library. I have released the latter under the LGPLv3, so you can use it in your own projects even if they’re closed source.

System Requirements

NoSleep does have some system requirements. First, it requires the .NET Framework version 3.5 or higher. While it should work on Windows 2000, I have only tested it in Windows XP SP3 and Windows 7. So long as you have .NET installed, I don’t imagine there would be much of a problem.

Take a look at the NoSleep Trac page if you need to file a bug report.

2 comments.
***

Read More Patch

Update May 31st

I have completed an early version of this plugin. Feel free to download it! The administrative page is fairly bare but it does the job. Read more…

No comments.
***

OpenOffice.org 3

After having downloaded OOo v3.0 sometime Monday evening (I honestly don’t remember when), I finally decided to give it a go today. Surprise, surprise, it actually handles OOXML now! Read more…

3 comments.
***