A major problem with the Bmw E34 especially the M30 3.5l
out of the 535i: erratic idle.
Don't expect your M30 to idle like a new car, but here is some tips
to improve it:
Check list from the less expensive to the more. Start by pouring
some injector cleaner in at least two tanks of fuel.
Air intake leak:
A leak in the intake or vacuum leaks (check the dipsick o-ring seal
and oil filter seal) will make your car idle roughly.
If you didn't adjust your valve lately, check your valve
plugs will make your car idle and run rough. Change them, good
time to try those expensive Bosch platinum +4. Some owner use a
slightly greater clearance: set them slightly larger to 0.86-0.91mm
(0.034-0.036in) to help improve the idle with the stock plugs.
Distributor cap and rotor:
After a lot of miles (or km) your rotor and cap will be sad looking
or cracked, check for yourself.
Check the ignition wire resistance with a multi-meter, it should
be around 0 Ohm.
Idle Control Valve (ICV):
This expensive part gets dirty. You should clean it (along with
the throttle body) each time you adjust your valves with carburator
cleaner. If there is no improvement and your ICV had never been
changed (there is sometimes a year stamped onto the casting), change
Other considerations are: leaking injector, faulty temperature
sensor, faulty oxygen sensor, check all electrical connections.