I had this thread on this issue before
http://www.bimmer.info/forum/showthr...ght=idle+rough
Well I changed the O2 sensor to a new original BMW one (sensor is a siemens one, my car has an MS40 siemens ECU, that wasn't exported to USA). Unfortunately I still have this issue.
When I first start the engine it runs normal. After a while it starts running rough with black smoke coming out of the exhaust. Taking for a drive and keeping revs at about 2500-3000 level makes engine run normal again. If I stop and idle for say a minute or so, then roughness and black smoke are back. Holding the revs at 2500-3000 for a minute is enough to bring the engine back to normal. I can also say that this behavior seems pretty much irrespective of engine temp, be it cold or warmed up. All this made me think the heating element in O2 sensor is gone bad, so I replaced it. But the problem is still there, exactly as before.
I thought maybe the heater voltage wasn't coming to the O2 sensor. checked at the connector and a 5V signal and 12V heater voltage are there, so an O2 sensor is now ruled out.
What else could be causing this problem? Injectors? Coils? TPS?