(Thanks to C3C0 and everyone who helped!)
Ok so in short it seems there are 2 proximity sensor revisions, you can download "mysensor" from the market wich one of these 2 you have.
Name: Taos Proximity sensor
Vendor: Taos inc.
Name: TSL2771 Proximity sensor
If you have the second one the "TSL2771 Proximity sensor" you can download C3C0's flashable update. It will flash a new text file to "/data/misc/prox" with different value's inside and make it read only so nothing can overwrite it.
DOWNLOAD LINK: HERE (Flash trough clockworkmod)
On my phone the value "H601L1G32" works perfectly, if i change any of the green numbers the sensor keeps working, but if i change the red number my screen turns black instantly.
Different value's might work better on different phones, so if you want to change the value just open the zip you downloaded and browse to "\data\misc\prox" open the file "prox_threshold.txt" and change the value's to something else.
Note: on some devices changing the L1 to something else works to.
I have the second one (TSL2771), i never had any troubles with my sensor except on the latest releases of Atomic. For people who have the same proximity sensor as me can you try this to confirm this is the problem:
If atomic is installed: First uninstall "ProximitySensorClib 1.0" using titanium backup.
Or before you flash Atomic: Open "AtOmIcMod-R10.zip" brows to \system\app" and delete "SensorClib.apk" before you flash Atomic.)
Download root explorer from the market and browse to "/data/misc/prox" and do a long press on the file "prox_threshold.txt" then scroll down the list till you see "Open in text editor" change the number to "H601L1G32" press the back button, it will ask you to save press "Yes"
"REBOOT" your phone and the proximity sensor should work.
I reposted this from the atomic topic, since tillaz left the scene and i am the only one expiriencing the problem i tough i might ask it here maybe someone else knows a solution.
The sensor is working on all versions of atomic below version 5. it is allso working on cyanogenmod 7 so i asume its not hardware related.
ATOMIC V4 Proximity sensor working
ATOMIC R9 Proximity sensor NOT working
Edited by Wacky.ddw, 18 March 2012 - 06:40 PM.