Welcome to Bimmerfest -- The #1 Online Community for BMW related information! Please enjoy the discussion forums below and share your experiences with the 200,000 current, new and past BMW owners. The forums are broken out by car model and into other special interest sections such as BMW European Delivery and a special forum to voice your questions to the many BMW dealers on the site to assist our members!

E39 (1997 - 2003) The BMW 5-Series (E39 chassis) was introduced in the United States as a 1997 model year car and lasted until the 2004 when the E60 chassis was released. The United States saw several variations including the 525i, 528i, 530i and 540i. -- View the E39 Wiki

So I just scanned and reset my codes. I'm not sure if the software makes them appear is sequence or just by numerical order, but they were:

P0171
P0174
P0313

I'll check for the 1st code when the SES light comes back on. Luckily I have a can of MAF cleaner hanging around here, and I've never tried using this stuff before. Maybe I'll get lucky.

Otherwise the car runs pretty darn good when you give it some throttle. You can't sense a missfire when you mash the gas.

It could possibly be missfiring at low throttle, because I feel a little vibration/rumble which i suspected to be engine mounts. So more info to come. Until then, any ideas? Does anyone have a diagram of all vacuum hoses on the m54b30?

How's the fuel tank level? This seems like a recurring fault, so that's probably not the problem, but a low fuel level can cause a lean fault.
The first thing I'd check is the rubber boot which attaches to the throttle body. It tends to crack on the small portion that attaches to the idle control valve.
Do you have or can you get a fuel pressure gauge? I'd want to look at that next, but changing the fuel filter might be a good next step.

fuel filter is attached to the bottom of the car in a bracket behind a plastic shield. It's essentially under the driver's seat. The plastic shield is attached with a couple nuts, a couple screws, and a lot of the plastic expanding rivets. If you're careful, you can remove and reuse them.

So I let my tank level drop to below 1/4 and my SES light came back. I haven't read the codes yet, but assuming they are the same, do you think lower fuel levels can cause the engine to run lean? To me, that sounds like a weak fuel pump.

I'll get a fuel pressure gauge and test. Is there a specific type that is compatible with the m54?

I also like the idea of changing the fuel filter, inexpensive and a good starting point.

It could be a fuel pump problem. There's also a suction jet pump in the fuel tank that transfers fuel from one side of the tank to the other.

But I agree that the fuel filter would be the first thing to change. It's easier than changing the fuel pump.

I just did that last weekend on my 2001 530i. I didn't have any codes, but the mile to empty would drop very quickly when the fuel level low. I don't know it that problem is fixed, but it appears my fuel economy has improved.

So I just scanned and reset my codes. I'm not sure if the software makes them appear is sequence or just by numerical order, but they were:
P0171
P0174
P0313

I'd start here since I had the exact codes you have & it turned out to be simple after a year of on-and-off looking for the culprit:
- Does the order of the misfire OBDII DTCs diagnostic trouble codes actually matter (1)