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:


  • 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.


Links: July 29th

I haven’t had a lot of time to dig up various links. Compounding that with the fact that the aggregators I visit have been pretty dry makes for a dry LotW!


Looks like the Associated Press has done something pretty stupid. Techdirt writes that Reuters should take this as an opportunity.


Paul Graham has an interesting piece on what he calls the maker’s schedule and the manager’s schedule.


For a number of years, scientists have been rather puzzled by the human tendency to swing our arms as we walk. Anthropologists were inclined to believe it was a trait inherited from our evolutionary development. However, a new study has a surprising (but not unexpected) finding.

Food allergies are fairly commonplace in our society now. But what’s more peculiar is that a recent study reveals that such allergies might have a more geographical component than we thought.


Paul Graham writes about what he feels is wrong with the Segway. It makes for an entertaining read.

Looks like the Boeing 787 is going to have a hard time getting off the ground, if you pardon the pun. As it turns out, wing loading tests have indicated that the wings (and wing box) aren’t quite up to par in the new aircraft.


In 1957, the BBC pulled off the biggest televised hoax ever conducted by a news agency. How? By showing a “bumper” spaghetti crop grown, of course, on spaghetti trees.


I’ve linked this elsewhere, but I feel it’s important to share here as well. Scott Fisher wrote a lengthy article detailing his trip into North Korea back (I’m guessing) in 2002. The Orwellian world of the NK regime is fascinating–frightening, in fact–and well worth reading about.


Quickie: How to Reinstall XP but keep Partitions as Is

I was asked by a friend of mine how to best go about reinstalling Windows while keeping his other partitions intact. It’s really easy, but there are some points where it’s necessary to exercise caution! This little quickie is a guide on how to do exactly that. Read more…

No comments.