Weird idle problems..
Comments??
Vacuum leaks are not only due to leaky hoses, but also due to leaky gaskets, for example the plenum-to-throttle body gasket, or due to cracked valve cover breather hoses. Sometimes a vacuum hose pops off and goes unnoticed (plenum to TB!).
Sometimes you can hear a bad vacuum leak. Spraying carb cleaner around a leaky gasket (with the engine running) will result in a change in idle and thus identify a leak. Really bad vacuum leaks can trigger a "lean condition" code.
I'd start with replacing all vacuum lines (people seem to like BMW vac hose best as replacement) and a thorough visual inspection.
A loping idle can also be due to compound issues. Vacuum leaks, a dirty or defective ICV, bad spark plugs wires or spark plugs, and even a less then pristine MAF sensor can contribute to poor idle.



