15

Pen with Surface Pro 7/7+ -> black screen/DWM.exe crash? A workaround and inf...

 3 years ago
source link: https://dancharblog.wordpress.com/2021/03/29/surface-pro-7-7-black-screen-dwm-exe-crashes-when-using-pen-i-have-a-workaround/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

When using the pen with your Surface Pro 7 or Pro 7+, does your system momentarily black-screen or seem to crash for a split second? Read on for a deeper dive into a workaround, I shared on reddit a couple weeks ago.

Workaround

One known root cause for frequent glitches, momentary pauses, or black screens when using the pen is dwm.exe crashing. This symptom appears to be caused by a stack overflow (0xc0000409) in Microsoft’s internal “HEAT” Framework implemented in heatcore.dll. This API integrates with the n-trig digitizer HID driver and appears to compute pen position and tilt angle among other things. To disable this API, open regedit to the following key and look for device entries. To eliminate the crashing symptoms you can just change the name of the device.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Heat

Another approach is to rename the heatcore.dll file as follows:

  • Boot into safe mode
  • As administrator, take ownership of %windir%\system32\heatcore.dll
  • Rename heatcore.dll to heatcore.dll.bak
  • Reboot

Either approach will disable several pen functions such as tilt detection, palm detection, and right vs left-handedness detection. Per the official Microsoft support threads below, many customers have been waiting for an official fix from Microsoft since November 2020. Hopefully the real fix won’t take too much longer…

Firmware updates for Pro 7

Hopefully a fix to the issue will be included here soon: https://www.microsoft.com/en-us/download/details.aspx?id=100419

Related Microsoft support threads

More info on the HEAT Framework

The HEAT framework exists in no Microsoft documentation. So being curious, I delved into the heatcore.dll with dumpbin. Some interesting functions are listed below. Curiously, one of the functions refers to “twist”. Perhaps an upcoming Microsoft pen will have twist recognition like the concept presented in the patent from the Perceptive Pixel/Microsoft Portland folks. Twist would be a great feature for added expression in calligraphy and also opens up some interesting UI scenarios.

  • HeatDevice::QueryInterface
  • HeatGripDetector::QueryInterface
  • HeatProcessorCapabilities::QueryInterface
    • Interesting capability related strings:
      • “Invert, Eraser, Barrel, Pressure, Twist, Tilt, and PenId are not supported for Touch.”
      • “If ZHeight is supported, InRange must be supported as well.
      • “InRange is required for Pen.”
      • “Geometry is not supported for Pen.”
  • HeatDeviceProperties::GetSensorToHimetricTransform
  • HeatFrameBuffer::ExpandBuffer
  • HeatFrame::GetDecodedHeatmapData
  • HeatHidInjectionProvider::QueryInterface
  • HingeAngleContextProvider::SetAngleSensitivity

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK