I have been running Windows on my MacBook Pro 17″ Mid2010 for as long as I own this machine. It has been running trouble free for most of the time.
In June 2019 Windows 10 Feature Pack 1903 was available for installation on my MacBook. It installed painlessly, the MacBook booted, I entered my credentials and then after 15 seconds or so, just as the Windows Defender icon appeared in the notification area, …. it crashed with a blue screen of death telling me that a WDF violation had occurred!
I must mention that this is the second time an update caused this same problem. The first time happened after I joined the Windows Insider Program to get preview builds on my machine. That is something I would advise against to anyone using a MacBook with Windows on it. Apple is very specific about it’s drivers and (conspiracy theory warning!) I can imagine there is some hidden rebellion going on. In some circles it is considered unacceptable behavior to run Windows on a MacBook.
I needed this WDF violation fixed. A quick Google search brought me to mrbell1984 (kudos & all credits go to him for finding the source of the problem).
Here is the solution to the crashes:
- Let Windows crash three times. Windows now starts in recovery mode.
- Choose Troubleshoot | Advanced options | Startup Settings | press the Restart button.
- Windows now restarts and now choose Enable Safe Mode with Networking by pressing the F5 function key.
- Windows boots in safe mode. Provide your credentials when asked.
- Open an Administrative Command Prompt and rename C:\Windows\System32\drivers\MacHALDriver.sys (this driver has been installed by Boot Camp).
- Type: shutdown /r / f /t 3 to reboot the system in normal mode.
- After the reboot and subsequent logon there are is no more BSOD. How cool is that?
However, inactivating the driver causes the back light of keyboard and the corresponding function key to no longer be operational. This can be fixed by placing a newer version of MacHALDriver.sys in folder C:\Windows\System32\drivers. This file is provided by the Boot Camp installation so try to pick one as new as possible if you have newer Boot Camp installation sources available.
The MacHALDriver.sys file that originally was installed on my system and caused the WDF violation crash is included in Boot Camp 5.1.5621. The timestamp is displayed in the screenshot below.
A new MacHALDriver.sys is provided by mrbell1984 so you could use that one. As far as I can tell it is virus free but double check and use it at your own discretion. You could also use the tool Brigadier to download any version of Boot Camp you want.
After placing the newer MacHALDriver.sys I rebooted the system. I noticed that the keyboard light function key still did not operate correctly. I started Boot Camp Control Panel from the notification area, checked the settings and pressed Apply & OK. After that the function key worked correctly.
All is well now.