Disabling EA Recovery

In Microsoft Windows XP SP1 and later operating systems, GDI uses a watchdog timer to monitor the time that threads spend executing in the display driver. The watchdog defines a time threshold. If a thread spends more time in a display driver than the threshold specifies, the watchdog tries to recover by switching to VGA graphics mode. If the attempt fails, the watchdog generates bug check 0xEA, THREAD_STUCK_IN_DEVICE_DRIVER.

Before attempting to recover, the watchdog will break into any debugger that is attached to the computer. You can then debug the code--as long as you have first disabled EA recovery.

In Windows XP SP1, disable EA recovery by setting the global variable WdDisableRecovery, which is located in watchdog.sys, to 1. To do so, you can enter the following WinDbg command:

ed watchdog!WdDisableRecovery 1

In Microsoft Windows Server 2003, disable EA recovery by setting the global variable VpDisableRecovery, which is located in videoprt.sys, to 1. To do so, you can enter the following WinDbg command:

ed videoprt!VpDisableRecovery 1

After you have disabled EA recovery, put breakpoints in your display driver where you suspect the code is looping, and resume execution.