Tuesday, July 20

Windows 7, Sleep mode, and the Blue Screen Of Death

For quite a while now, I've been having an occasional problem with my desktop computer. It's a big, fast, powerful rig from iBuyPower, the Gamer 930-I.

  • Core i7-860 processor
  • 8GB of RAM
  • ATI Radeon HD 5850 video card
  • Dual SATA hard drives running in AHCI mode. The boot drive is a 500GB Seagate and the second drive is a 1TB Western Digital
  • Windows 7 Home Premium 64-bit

Like most old-time Windows geeks, I know that when you have a second PHYSICAL hard drive in your computer, you should put your paging file (aka the "swap file") on that second drive. Run your operating system off the boot drive, and page memory to a file on the second drive. That's been the rule for as long as I can recall, and it's a good one.

(Quick break for the non-geeks reading this.) No matter how much memory your computer has, it will want a paging file. This is a file on the hard disk to which Windows writes "pages" of memory that are not being used. A memory page is just a fixed-length block of memory. Rather than move things around in memory one byte at a time, Windows does it in pages. The paging file is where Windows will move pages of memory that have not been accessed for a while, if it finds that it needs that space for a program that's currently running. If you have two physical drives, you should always put this paging file on the drive where Windows is NOT. This lets your computer load the various bits of Windows at the same time it's paging memory without causing the hard drive to "thrash" by moving its drive heads around furiously. (Okay, enough of that.)

I was experiencing two symptoms. Both symptoms would occur when the computer was attempting to wake up from sleep mode.

Symptom #1: The computer would start to wake up, then crash with a Blue Screen Of Death (BSOD). The error message would be something like "KERNEL_INPAGE_ERROR" or something equally incomprehensible.

Symptom #2: The computer would wake all the way up, but suddenly be unable to access any file or folder on the second hard drive. Opening the Computer folder would show that the second hard drive was missing.

In both cases, a reboot fixed the problem. So what was it?

It turns out that when a computer is returning from sleep mode, it would expect that all hard drives would be ready in 10 seconds or less. It also turns out that sometimes, big hard drives like my 1TB second drive take longer than 10 seconds to be ready. Hence the BSODs and the disappearing act.

The fix is simple. You need an updated MSACHI.SYS file, which you can download as part of this hotfix: http://support.microsoft.com/kb/977178/en-us.

Please note there are three versions of the hotfix, one for x86 (that's the 32-bit Windows), x64 (64-bit Windows, duh!), and IA-64 (for the both of you running Itanium processors in your computer). Also note that there appears to be a "Version 2" of the hotfix. So when you go to download the file, take the one for your operating system with the most recent date on it. I noticed when I did that, there was a "V2" as part of the file name in the hotfix file after extracting it from the compressed file that you download.

After installing this, you should not see any more problems with your computer waking up from sleep mode. If this helps you, leave me a comment and let me know that it was worthwhile posting it.


Ryan said...

This has been driving me crazy for a long time. Looks like they are going to ship the hotfix with sp1.

Unknown said...

Yes, the same thing happened in my case. I thought about that I should reinstall the os system from the begining. But before I could find right solution, I managed to fix the initial boot errors for Windows with msvcr100.dll missing https://fix4dll.com/msvcr100_dll and only after that I could run my apps in usual mode. This way, I did avoid the reinstalation of operation system, and actually saved my time on fixing that.