My 2001 BMW 325Ci has an occasional “surging” idle problem. When coming to a stop or at idle, the engine will rev between 500 and 1000 rpm’s. Sometimes it will correct the problem and idle normally, or keeps surging until it eventually stalls. When restarted it works fine. Tried fuel injector treatment, fuel stabilizer treatment, and replaced thermostat. Still surges about 50% of the time. Had it to a dealer, and computer says its running fine. Any ideas?
Surging at idle is almost always a vacuum leak of some kind or something like it.
Since its intermittent I’d first suspect things that feed the intake only intermittently - such as an evap system purge valve or an EGR valve. If these are beginning to stick open they could give this kind of intermittent vacuum leak-type of behavior. In fact, I have had this very kind of problem, though on a different kind of car. The problem went away if I disabled the EGR valve. And then went away for good when I replaced it (after testing the rest of the EGR system).
Another thing to check out is the idle air control valve. Giving it a good cleaning can never hurt.