I figured I would throw together this guide based on my experience with N52 engine and process I went though to make this engine idle like it should.
FYI writing and pics may be taken from other members link/credit given.
Tools any bmw owner should have:
-INPA, DIS/GT1, SSS, TIS, NavCoder, NcsExpert, WinKfp (Found here: Link
-OBD II Reader
-Dedicated Laptop - IBM Thinkpad T42 with 2gb ram and windows xp pro (BMW's programs work best on winxp)
-Basic set of tools - Screw drivers long/short, Good socket and ratchet set like lowe's kobalt and Torx bits for your ratchet set as needed, Compressor with blowing attachment
Brake cleaner, NM torque wrench. Each DIY should outline tools required.
The idle can be affected by alot of problems from fuel quality to spark plugs, Coils, Vanos solenoids. This is my experience and your problems will vary but from what ive seen on forum if these problems are taken care of most N52's will idle like a kitten.
IM NOT RESPONSIBLE FOR ANYTHING WRITTEN OR THAT HAPPENS, HAVE COMMON SENSE AND KNOWLEDGE OF WHAT YOUR DOING.
-- Step 1
Note: Scroll to bottom of first post and it shows you what pertains to you on N52 model, The engine shown is N54 but concept and procedure is pretty much identical. Also from what I noticed vanos solenoids dont always throw code, cleaning them is good measure. In my experience when oil changes are kept in accordance with mike millers maintenance guide to 4-6.5k oil change intervals vanos solenoids will stay clean as new...Something to keep in mind.
-- Step 2
-Coils and plugs:
Note: This DIY is more involved and requires some basic knowledge for you to figure this out, the cabin air filter cowl and covers on top right and left of engine compartment have to be removed and wire harness at top of engine compartment running right to left across engine compartment have to be removed also to give access to remove engine cover and to give access to coils and plugs. Follow DIY and remove and replace all plugs and coils. Part numbers may differ look up the numbers for your model via Real OEM: Link
-- Step 3
Dont be cheap after all you bought bmw, after doing step 1-2 drive your car until you have 10miles left in range in your tank and find Shell station and buy FULL tank of Nitrogen enriched PREMIUM fuel, Shell V-Power PREMIUM will work also. You better have been using premium in general before reading this...all bmw's require it sheesh lol.
Owners manual says to use top grade premium fuel, no that does not mean crappy wawa or hess fuel. I stick to shell if at all possible after all you have 450 mile range on this car you cant tell me there isnt shell station available 99% of time. Use only Top grade brands like shell.
Now head back to house, Im assuming you installed the software I told you to buy its easiest way for newbie to get started with INPA it takes no knowledge to install if not contact guy on ebay he is very helpful if you cant figure it out.
-- Step 4
Turn on ignition on your car to do this manual guys dont push in clutch and push start button twice with key inserted, Auto guys dont push on break and push start button twice. Hook up the OBD II cable to port on car and laptop.
Once installed just launch the INPA software via the launcher and push F4 for E90, then select engine on left and MSV 70.0 for N52 on right. You should now see page with title being MSV70 Hautmenu (main menu, yes its in German). Select F8 for adaptations (this is what the car learns over its life time, how you drive and how engine runs and many other things)
Next you need to clear all adaptations, Car will relearn everything.Push SHIFT+ F9 will clear all adaptions (Make sure engine is not running...It shouldn't be I told you not to, only ignition on.) After that is completed F10 to back all the way out of program and close it. Disconnect cable and your done for now.
Next start the car it will run little rough as its relearning everything let it idle for 5min in driveway.
Should it be extremely rough in idle spiking up and down in rpms like surging (ABS, Traction lights). Turn off engine take key out let it sit for sec and put key in and back to ignition on, Connect INPA - F4, F5 and Shift+F5 this sequence this gets rid of any dealer specific codes that are stored. Back out of program (F10) again and disconnect INPA/Laptop from car. Take out key, put it back in and turn on engine on car. That should take care of that issue, Ive only seen it happen once on my car but I figured id mention it.
Assuming you did everything correctly and installed coils, plugs and vanos right your idle should be way way better if not perfect like on my car, It took me long time to figure all this out what affects idle on N52 hopefully this rough guide helped you out so your not spending several months looking around finding all the information you need.