VirtualBox Trigger Windows 7 Bug Causing it to Believe the File System is Broken

Booting for 4 hours and another hour to go

IMG_20100913_173926

VirtualBox 3.2.8 (and possibly other versions) running on Windows 7 or Windows Server 2008 R2 as the host operating sytsem triggers a bug that causes Windows 7 or Windows Server 2008 R2 to believe that NTFS is corrupt. Chkdsk then runs on every boot. In fact chkdsk is chasing a ghost. There is no corruption but on my system chkdsk takes over 5 hours to run to completion.

I don’t believe that VirtualBox is doing anything hinky. It is just unlucky to trigger a regression in NTFS.

This is a known regression in Windows 7 in the NTFS file system.  It occurs when doing a superceding [sic] rename over a file that has an atomic oplock on it (atomic oplocks are a new feature in Windows 7).  The indexer uses atomic oplocks which is why it helped when you disabled the indexer.  Explorer also uses atomic oplocks which is why you are still seeing the issue.  When this occurs STATUS_FILE_CORRUPT is incorrectly returned and the volume is marked "dirty" which is a signal to the system that chkdsk needs to be run.  No actual corruption has occured [sic].

Neal Christiansen
NTFS Development Lead

Fortunately, a hotfix already exists. Applying KB982927 appears to fix the issue for me.

Advertisements

Achieve Radically Better Firewire 800 Performance on Windows 7/2008/Vista x64

Microsoft is clearly ambivalent about Firewire (IEEE 1394). Windows 7 introduced a new IEEE 1394 stack but the performance remains abysmal compared to a Mac.

I have a Drobo 2nd generation device. My choice is to use slow USB 2 or a fast Firewire 800 interface. Unfortunately, large file copies over Firewire on Windows 7 or Windows Server 2008 R2 are slower than USB2. Worse, they can lock up the target device so that nothing else can access it until the file copy succeeds. I don’t have an explanation for why native Firewire support remains so lame but fortunately there is a free-of-charge solution to turbo-charge Windows Firewire performance to Mac OS X levels.

If you have a Firewire interface on your Windows 7 computer, do not hack around with legacy drivers and do not turn off the Windows write-cache buffer. Instead, download the latest ubiCore Firewire drivers for your version of Windows and install them. (Requires disconnecting all your Firewire devices and a reboot.)

Enjoy the painless 800 Mbps file copies.

Highly recommended.

FIXED: Boot Camp Audio Pops and Crackles with Windows 7 x64

Speaker_IconI have passed the 96 hour mark with a working fix for my audio problems with Boot Camp 3.1 running Windows 7 x64. To recap, I recently did a fresh installation of Windows 7 on my Mac Book Pro unibody (late 2009). Afterward, I started getting audio anomalies in the form of loud pops and permanent crackle distortions. These went away if I restarted audiosrv or reset the drivers in any way. For example, unplugging and plugging the speakers back into the minijack would fix it for a while as would turning audio enhancements on and off in the control panel for one of the devices.

I tried getting the latest Crystal Audio driver from Apple and  a solution from the interwebs that suggested disabling 802.11a. I also dug up a much newer version of the Broadcom wireless network card driver than Apple is distributing. I tried fiddling with Skype, which seemed to be part of the problem. I also disabled the USB audio device in my Apple Cinematic Display. None of these interventions totally solved the problem.

Then I came across a KB article that describes a similar but different issue with USB audio:

  • You attach a USB audio device to a computer that is running Windows 7 or Windows Server 2008 R2.
  • You configure this device as the default audio device.
  • You put the computer into the S3 sleep mode while an application plays audio.
  • You disconnect the USB audio device while the computer is in the S3 sleep mode.
  • You resume the computer from the S3 sleep mode.

In this scenario, the application that was playing audio stops responding. Additionally, all the other audio-related applications stop responding. For example, Volume Mixer also stops responding.

This is similar. My problems with mangled audio seemed to be related to power management, sleep yes but also not exclusively. My symptoms were much less extreme than the ones described: corruption instead of outright failure. The hotfix replaces the usbaudio.sys driver that shipped with Windows 7/2008R2 gold with a new version from July 14, 2010. What the heck, usbaudio.sys, is being used by one of the audio devices so I decided to give it a try.

Viola. It fixed my issue. I have had no audio squirreliness in 4 days where I previously could not have gone 4 hours.

What has me really scratching my head is how did I not have this problem before? I was running Windows 7 for a year on this computer and I didn’t really notice much of an audio problem until two weeks ago. Maybe it is the sort of thing that you don’t notice until you do and then you really notice.

Microsoft KB article 2122063: “The audio applications stop responding in Windows 7 or in Windows Server 2008 R2 after you resume the computer from the S3 sleep mode”

Why is Skype Using the Wrong Audio Device?

I’ve been trying to figure out what is causing my audio to whack out and go crackly intermittently. Now I’m hyper-sensitized to anything making pops and crackles on my late 2009 MacBook Pro 15” running Windows 7 x64 with Boot Camp 3.1.

One thing I noticed is that the pops seem to always start with the incoming IM noise emitted by Skype. Another thing I noticed was that the pop seemed to be first coming from my 24” Cinematic Display. To simplify the number of things going on, I disabled the Cinematic Display (aka "Apple USB audio device”) and “Digital Audio (S/PDIF)” playback audio devices in mmsys.cpl because I’m not using them. (I’ve gone many hours without any pops and crackles after disabling these two devices but I’m not ready to say the problem is solved.)

What I just noticed is that the incoming IM ping sound was coming very much from my right speaker and it was really loud. Then I realized it wasn’t coming from the right desktop speaker at all. It was coming from my laptop. All of my other sound is coming out of my Klipsch speakers via the “headphones” minijack. Nothing should be coming out of the laptop speakers which aren’t the current default playback device. It shouldn’t be doing that.

The Volume Mixer shows that Skype is the only thing using the built-in speakers. These screenshots were taken nearly simultaneously without making any system changes. I just changed the selected device in the Volume Mixer.

skype-using-interanleverything-else-using-default

All of the Skype incidental notifications are coming out of my laptop but voice calls are playing out of the configured default playback device, which is my desktop speakers. Very weird. This reminds me that when we first got the MacBooks it was just as Snow Leopard was released and we had the drivers in Boot Camp 3.0. Skype could not hear anything with the built-in microphone even though the built-in microphone was working as demonstrated by Sound Recorder.

I have a suspicion that Skype is doing something low-level and inadvisable with the audio devices.

For the record, according to Skype’s own settings dialogs, it should not be using the laptop built-in speakers.

skype-audio-config

Mystery Solved!

The notifications show up on whatever speaker is defined in Options | Audio Settings | Ringing. By default that is set to “Ring on all devices”. Changing it to Use selected speaker removes the weirdness of ringing coming out of the laptop speakers while using headphones.

Command Prompt and PowerShell Here with Console.exe

command-hereIn antediluvian turn of the century days, there was an Open Command Window Here PowerToy. When Vista was released, this functionality was baked in to the default Explorer shell. Hold {SHIFT} and right-click on a drive, directory or the background of a directory and you will have an “Open command window here” option in the resulting context menu. Although PowerShell is installed by default on Windows 7, there is no parallel “Open PowerShell window here” option, but it can be easily added.

“Open PowerShell window here”

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\powershell]
@="Open PowerShell window here"
"Extended"=""
[HKEY_CLASSES_ROOT\Directory\shell\powershell\command]
@="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%V'"

[HKEY_CLASSES_ROOT\Directory\Background\shell\powershell]
@="Open PowerShell window here"
"Extended"=""
[HKEY_CLASSES_ROOT\Directory\Background\shell\powershell\command]
@="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%V'"

[HKEY_CLASSES_ROOT\Drive\shell\powershell]
@="Open PowerShell window here"
"Extended"=""
[HKEY_CLASSES_ROOT\Drive\shell\powershell\command]
@="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%V'"

Use Console.exe Windows

If you use command-line a lot in Windows, you will appreciate the advantages of using console.sf.net as the terminal window. The “Open … window here” context menus can be tweaked to open the new command prompts in Console rather than vanilla Windows CSRSS console windows.

"Open command window here” with Console

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\cmd]
@="@shell32.dll,-8506"
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\shell\cmd\command]
@="\"C:\\Program Files\\Console2\\Console.exe\" -r cmd.exe -d \"%V\" -w \"Command Prompt\""

[HKEY_CLASSES_ROOT\Directory\Background\shell\cmd]
@="@shell32.dll,-8506"
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmd\command]
@="\"C:\\Program Files\\Console2\\Console.exe\" -r cmd.exe -d \"%V\" -w \"Command Prompt\""

[HKEY_CLASSES_ROOT\Drive\shell\cmd]
@="@shell32.dll,-8506"
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Drive\shell\cmd\command]
@="\"C:\\Program Files\\Console2\\Console.exe\" -r cmd.exe -d \"%V\" -w \"Command Prompt\""

“Open PowerShell window here” with Console

 

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\powershell]
@="Open PowerShell window here"
"Extended"=""
[HKEY_CLASSES_ROOT\Directory\shell\powershell\command]
@="\"C:\\Program Files\\Console2\\Console.exe\" -r C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -d \"%V\""

[HKEY_CLASSES_ROOT\Directory\Background\shell\powershell]
@="Open PowerShell window here"
"Extended"=""
[HKEY_CLASSES_ROOT\Directory\Background\shell\powershell\command]
@="\"C:\\Program Files\\Console2\\Console.exe\" -r C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -d \"%V\""

[HKEY_CLASSES_ROOT\Drive\shell\powershell]
@="Open PowerShell window here"
"Extended"=""
[HKEY_CLASSES_ROOT\Drive\shell\powershell\command]
@="\"C:\\Program Files\\Console2\\Console.exe\" -r C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -d \"%V\""

 

 

Restore Defaults

For PowerShell, remove the powershell keys from beneath HKCR\Directory\shell, HKCR\Directory\Background\shell and HKCR\Drive\shell.

“Open command window here” restore default

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\cmd]
@="@shell32.dll,-8506"
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\shell\cmd\command]
@="cmd.exe /s /k pushd \"%V\""

[HKEY_CLASSES_ROOT\Directory\Background\shell\cmd]
@="@shell32.dll,-8506"
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmd\command]
@="cmd.exe /s /k pushd \"%V\""

[HKEY_CLASSES_ROOT\Drive\shell\cmd]
@="@shell32.dll,-8506"
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Drive\shell\cmd\command]
@="cmd.exe /s /k pushd \"%V\""

Boot Camp: Dated Broadcom Driver Causes Audio Pops and Crackles

broadcom-disable-802-11aI have had a problem with my MacBook Pro having intermittent crackles and pops in the audio in my late 2009 Macbook Pro Unibody. I previously suspected the Cirrus Audio driver.  Restarting “Windows Audio” (aka audiosrv) fixes the problem. The pattern is that everything is fine on boot. The crackles and pops start after resuming from sleep.

I just came across this post which indicates the problem is actually caused somehow by the the 802.11a feature of the Broadcom wireless network adapter. Somewhat incredulously, I gave this a try and it works so far.

It also seems that although, Apple has not seen fit to send out an update, Broadcom has published several newer versions of their 943XX driver. These are available from other OEMs using Broadcom chips (Acer, Dell and HP) that actually provide updates for Windows drivers on a regular basis. HP helpfully offers a version of the Broadcom Wireless driver that is almost a year newer than the one in Boot Camp 3.1. The revision history of here shows notes a series of performance enhancements over the Apple-distributed version 5.60.18.8.

Update

Some good folks have taken it upon themselves to scrape together Broadcom wireless driver downloads posted by various OEMs. Note that sometimes the stuff in the forums is newer than what is listed in the pinned initial post. At the time of this writing, the latest available is 5.100.249.2 from Acer.

Update 2

I’m still getting the intermittent pops and crackles. Perhaps I have unfairly maligned the Broadcom driver based on random info from the interwebs. I just realized that the speakers on my Cinematic Display are running at the same time as my nice speakers on the mini-jack. Maybe that has something to do with it. Still futzing.

Boot Camp 3.1.3: Cirrus Audio Update

The Boot Camp update for MacBook Pro (13-inch, Mid 2010) (BootCamp_3.1.3_64-bit.exe) contains Cirrus Audio driver 6.6001.1.25 from 4/28/2010 which is newer than the 6.6001.1.21 version from Boot Camp 3.1. This driver works fine in a 2009 MacBook Pro 15-inch except that the package is set up to refuse to install on anything except the aforementioned new MacBook.

I’ve been having a problem with intermittent pops and crackles on my external speakers that seems to be a software/driver issue, so I wanted to give this update a whirl. So far, it seems like 6.6001.1.25 has fixed my pops and crackles problem.

7-Zip can extract the driver from the packaging. It’s just a matter of digging it out. Inside of Boot Camp_3.1.3_64-bit.exe is BootCampUpdate64.msp (a windows installer patch file). 7-Zip can unpack that into some cryptically named directories. Buried in there is a file called Binary.Cirrus_Audio_Bin which is actually some form of archive. Inside of that thing are the driver files.

Once you have Binary.Cirrus_Audio_Bin unpacked, you can point Device Manager at the unpacked location to update your Cirrus Audio driver.

I’m scratching my head a bit, wondering why Apple didn’t generally release this driver to all compatible hardware.

beforeafter

%d bloggers like this: