My e39 540i TU engine does that when either the throttle body hasn't been cleaned for over 5k miles. (Clean it with throttle body cleaner and a MICROFIBER CLOTHE) Or it does the surging if the wiring harness gets worn out.( Had two go bad and soldered a new one on last time, been good since) And lastly, bad cam position sensors.( You can swap the two and see if it makes a difference in surge, to verify this) Change both if one goes bad, cuz most likely the other one is on its way. Had my 540i e39 for 8 years @ 250K +😎 Hope this helps 👍
You may need a tune to accommodate for the bigger throttle body and airflow. Its probably idling like that because of extra air flow from the bigger throttle body and car trying to correct it thinking something’s wrong.
I have the same problem with my E38 730i 1995 (mechanical throttle position) I checked if there's any vacuum leaking and it was fine , I changed the IAC and still same problem ! By the way I noticed that when I open the oil cap the RPM goes up and there will be a high vacuum noise coming from the PCV so I changed the PCV ( cheep one ) and still the same problem RPM vibrating Is there and solution ? 😔
Won't the AC being turned on account for the higher RPM at idle? I have something similar, like a dead point when pressing on the throttle (6 speed manual). Car also stalls after it's warmed up, and if I drive it hard, and then come to a stop. Even revving it at a stop, the RPM will fluctuate for a bit after that, before kinda settling down.