There are a few options and it's trial and error to see which works for you depending on ROM. Not sure which worked for me now, sorry can't remember:
1. new app which uses g-sensor and only works when in call (I haven't tried yet):
http://forum.xda-dev...ad.php?t=488991
2. Schaps Advanced Config:
http://forum.xda-dev...amp;postcount=2 or
http://www.touchxperience.com/
3. Regedit (backup settings before changing just in case):
* HKLM\Drivers\BuiltIn\RIL\BatteryTimeoutInCall 0
* HKLM\Drivers\BuiltIn\RIL\BatterySuspendTimeoutInCall 0
* HKLM\Drivers\BuiltIn\RIL\EnableFastDormantDisplayDuringCall 0
* HKCU\ControlPanel\Phone\Sleep 0
* HKCU\ControlPanel\Backlight\LightSensorPollingEnable 0
4. No Sleep.cab :
http://forum.xda-dev...ad.php?t=413798
There may be other options.
Edited by Kevlarski, 04 March 2009 - 09:55 PM.