Due to many Desire HD’s being incorrectly factory calibrated with regards to the proximity sensor, XDA forum member leppie has written an app to help change the calibration on the fly and persist over re-boots.
Reported symptoms of the proximity sensor include the screen failing to turn off when holding the mobile device to your face during a call, and the screen turning off when on a call but failing to turn back on – requiring the battery to be removed.
If you suffer specifically from the above issues, this app should be able to help. The problems apparently are common in custom kernels/ROMs, and although HTC has addressed this in kernels from 1.32 onwards, any pre-1.32 kernels still suffer these issues.
For more information including detailed install instructions, head on over to the application thread.___________________