P0171 – Fuel trim (FT) system too lean, bank 1 (BMW)
| Code | Fault Location | Probable Cause |
|---|---|---|
| P0171 | System too lean, bank 1 (Buy Part On Amazon) | Intake/exhaust leak, AIR system, MAFNAF sensor, fuel pressure/pump, injector(s), HO2S |
Where is the Mass Air Flow Sensor? See our guide to the Mass Air Flow Sensor – what it does, where it sits on the engine and how it fails.
We recommend Torque Pro
Table of Contents
- What Does Code P0171 Mean?
- Where is the P0171 sensor located?
- What are the common causes of code P0171?
- What are the symptoms of code P0171?
- Get Help with P0171
What Does Code P0171 Mean?
SPECIAL NOTES: Although generic OBD II trouble codes such as P0171 – “System Too Lean – Bank 1” can, and do affect all OBD II compliant vehicles, some vehicle makes and models are sometimes more susceptible to some generic trouble codes than most other vehicle makes and models. Under real-world driving and operating conditions, there are several reasons for some generic trouble codes to be more common on some vehicles than on others, but typical reasons include-
- poor part/sensor/component design
- poor routing of electrical wiring
- poor placement of electrical components under seats, carpets, and center consoles
- the exposed location of some parts/sensors/components on some vehicles
- prolonged exposure to contaminants like road salt in some locations that cause damage to some parts and components on some vehicles, but not on others
- difficulty in accessing some parts/sensors/components, thereby preventing or inhibiting the regular inspection, servicing, and/or replacement of affected parts/sensors/components during routine and/or scheduled servicing
- Poor fuel quality in some locations
However, note that not all models of a particular vehicle make will necessarily be equally susceptible to one or more generic trouble codes, because car manufacturers often correct issues like poorly designed parts and/or poor routing of wiring at various points during a model’s production run. Nonetheless, this article will discuss generic trouble code P0171 – “System Too Lean – Bank 1” as it applies to the BMW models that are most commonly affected by it. END OF SPECIAL NOTES.
OBD II fault trouble code P0171 is a generic code that is defined as P0171 – “System Too Lean – Bank 1” and is set when the PCM (Powertrain Control Module) detects an overly lean air/fuel mixture on Bank 1, which is the bank of cylinders on V-type engines that contains cylinder #1. Note that on BMW vehicles, the PCM is known as the DME (Digital Motor Electronics).
NOTE: Although code P0171 – “System too lean – Bank 1” refers to an air/fuel metering issue on Bank 1 of V-type engines, this code also applies to in-line engines that have only one “bank” of cylinders. Therefore, the “Bank 1” part of the definition can be ignored if code P0171 is present on a vehicle with an in-line engine.
All modern vehicles are required to adhere to stringent exhaust emission regulations, and as a result, all modern vehicles employ a range of systems and technologies that are specifically designed to reduce harmful exhaust emissions to acceptable levels. However, in practice, and under real-world operating conditions, some systems are more effective than others, but one system that is present on all modern vehicles, regardless of brand, controls the ratio of air relative to fuel to achieve optimal combustion as a means to reduce harmful exhaust emissions.
In technical terms, this system is known as the air/fuel metering system, and its purpose is to maintain the air/fuel ratio at stoichiometric* levels under all, or at least, under most operating conditions.
* For gasoline engines, a stoichiometric air/fuel mixture consists of one part of fuel for every 14.7 parts of air. In this ratio, all the available air is used to combust all of the fuel in the mixture.
As a practical matter, however, due to the relative inefficiency of even the most advanced gasoline engines, it is not possible to maintain an air/fuel at stoichiometric levels under all operating conditions, simply because increasing the engine speed to accelerate the vehicle requires more fuel than is required to keep the vehicle moving at a steady speed. This is true for all vehicles, regardless of their make, model, size, and weight.
Nonetheless, to ensure that the air/fuel ratio is kept as close to a stoichiometric ratio for as long possible at any engine speed and/load, all emission control systems use either oxygen sensors or air/fuel ratio sensors in conjunction with a catalytic converter to monitor the concentration of oxygen in the exhaust stream. We need not delve into either the function or construction of catalytic converters here, but suffice to say that the concentration of oxygen in the exhaust stream is a very good indicator of the efficiency of the combustion process.
In terms of operating principles, most emission control systems receive input data from two oxygen sensors- one before the catalytic converter (aka upstream sensor), and one after the catalytic converter, (aka the downstream sensor). In simple terms, the upstream sensor samples the exhaust stream almost directly after it exits the engine, while the downstream sensor monitors the quality of the exhaust gas as it exits the catalytic converter as a means of monitoring the operation and efficiency of the catalytic converter.
During operation of the vehicle, the ratio of air relative to fuel changes all the time as a result of throttle inputs. The changes produce chemical reactions* in the sensors’ sensing element, which produces corresponding changes in the electrical current that passes through the sensor. The changes in the electric current are passed back to the DME, which interprets the changes as changes in the air/fuel mixture.
* Note that an oxygen sensor can only register these changes after it enters closed-loop operation, which happens after the sensing element reaches a certain temperature. Thus, in closed-loop operation, the DME manages the fuel delivery and ignition timing systems based purely on input data it receives from the upstream oxygen sensor(s).
Thus, if the upstream sensor detects a rich condition, such as when there is more than one part of fuel to every 14.7 parts of air, the corresponding change in the electrical signal will prompt the DME to reduce the volume of fuel being injected into the cylinders to correct the rich mixture. Conversely, when the upstream sensor detects a lean condition, such as when there is more than 14.7 parts of air to every part of fuel, the corresponding change in the electrical signal will prompt the DME to increase the volume of fuel being injected into the cylinders to correct the lean mixture.
Collectively, these changes are known as “Short Term Fuel Trims”, and in a fully functional engine management system, these changes typically occur up to about 20 (or more) times per second. Moreover, the DME and other control modules record all short-term fuel trims to calculate average values that are displayed as a percentage when live data on the operation of the fuel delivery system is extracted with a suitable scan tool. These average values are also stored and form part of freeze frame data that is stored along with an appropriate trouble code in the fault memory when the DME detects an abnormal air/fuel mixture.
NOTE #1: Short-term fuel trims are recorded with either a positive or a negative value. When the trim value is positive, the DME is adding fuel to the mixture. Conversely, when the trim value is negative, the DME is subtracting fuel from the mixture.
NOTE #2: Short-term fuel trims can also be expressed as a percentage of “Lambda”, where a Lambda value of “1” represents a stoichiometric air/fuel mixture. Thus, a Lambda value greater than 1.0 represents a lean mixture, while a Lambda value smaller than 1.0 represents a rich mixture.
However, depending on the vehicle model, and as a means to prevent false positives, the DME will typically not record short-term fuel trims as abnormal when they fall within a pre-defined range. Therefore, the DME will only set code P0171 when it detects a lean mixture that a) exceeds the maximum allowable threshold and b) when the lean condition persists for longer than a predefined length of time, which is usually measured in consecutive seconds.
When such a condition arises, the DME will recognize that it cannot control the fuel delivery system effectively, and it will set code P0171 and possibly illuminate a warning light. Note that on some vehicles, the DME will only set this code if it detects the fault condition in two consecutive trips.
What causes code P0171 on BMW vehicles?
The most common cause (by far) on BMW applications involves engine vacuum system leaks, with the most common leaks sites being defective oil filler cap seals, oil dipstick seals, and/or leaking valve cover gaskets. See the section on “Causes” for details on other possible causes of code P0171.
Where is the P0171 sensor located?
This image shows an example of a leaking valve cover gasket on a BMW X5 engine, with the arrow indicating the actual site of the leak. Note that while this leak may not appear to be significant, a valve cover leak of this magnitude on almost any BMW application will almost certainly be serious enough to cause a vacuum leak, as well.
Note, though, that on some BMW applications the valve cover gasket is incorporated into the actual valve cover, meaning that the entire valve cover must be replaced when the gasket leaks.
What are the common causes of code P0171?
Common causes of code P0171 on BMW applications are largely similar across all applications, and could include one or more of the following-
- Engine vacuum leaks
- Faulty or malfunctioning MAF (Mass Airflow) sensor, with the most common fault being that the MAF sensor over reports the volume of air flowing through it
- Insufficient fuel pressure
- Defective PCV (Positive Crankcase Ventilation) valve or PCV hoses/lines
- Defective or malfunctioning upstream oxygen sensor, but be aware that when an oxygen sensor is suspected to be the cause, it can sometimes be difficult to distinguish between cause and effect. Therefore, all oxygen sensor related trouble codes that are present along with P0171 must be investigated and resolved before any attempt is made to diagnose P0171
Diagnostic tip: Note that many aftermarket MAF sensors, oxygen sensors, and/or PCV valves do not work well (or sometimes, not at all) on many BMW models. Therefore, if this code persists, replace all aftermarket parts with OEM or OEM-equivalent parts sourced from reputable dealers/vendors only.
What are the symptoms of code P0171?
The most common symptoms of code P0171 on BMW applications are largely similar across all applications and could include one or more of the following-
- Stored trouble code and an illuminated warning light
- In some cases, multiple additional codes may be present along with P0171, but note that codes that were set and stored before P0171 must be resolved in the order in which they were set because in many cases, P0171 is an effect of other codes as opposed to being the cause of additional codes
- Fuel consumption may increase noticeably
- Freeze frame data may show abnormally high short-term fuel trim values
- The idle quality may be poor, the idling speed may fluctuate, or the idling speed may be above or below the specified value
- Varying degrees of power loss may be present at some engine speeds and/or loads
- In rare cases, a hard-starting or no-start condition may be present
- Note that volumetric efficiency tests on naturally aspirated engines may yield abnormally low values
Help Us Help You
Please comment below describing your issue as well as the specifics of your vehicle (make, model, year, miles, and engine). A mechanic reads these, and other owners often recognise the symptoms straight away.
Reading P0171 on your car
A basic adapter will show you P0171, but not the ABS, airbag or transmission modules, and not the bidirectional tests that confirm which part has actually failed rather than which circuit reported it.

Appear code p0171 any symptoms