Blog · 2026-11-10
PO171 trouble code at idle
Stefan Bogdanescu
Founder & Senior Architect
Diagnosing PO171: When High Long-Term Fuel Trim Isn't a Vacuum Leak
A persistent P0171 trouble code indicates the engine control unit (ECU) has detected a system too lean condition, meaning the air-fuel mixture contains more oxygen than the stoichiometric ratio requires. In your specific case, the diagnostic data reveals a distinct asymmetry: Short Term Fuel Trim (STFT) sits near zero (-0.01%), while Long Term Fuel Trim (LTFT) has drifted significantly positive at 31.24% during idle. This discrepancy tells a specific story about how the ECU is compensating for perceived conditions versus what it actually sees in real-time.
The core issue lies in understanding the difference between STFT and LTFT. The ECU calculates fuel trims based on feedback from the oxygen sensor (O2). If the O2 sensor detects too much oxygen, indicating a lean mixture, the ECU commands the fuel injectors to open longer. This immediate correction is the STFT. However, if this condition persists over timeâsay, for 400 engine cyclesâthe ECU begins to permanently bias the baseline fuel map upward. This permanent adjustment is the LTFT.
When you observe a massive positive LTFT (31%) at idle but a near-zero STFT (-0.01%), it implies that the ECU has already learned to compensate for a lean condition, but the current instantaneous mixture appears acceptable. The fact that both trims normalize around 10% when RPM increases suggests the leak or restriction is flow-dependent. As air velocity rises through the intake manifold, the effective size of any leaks changes relative to the total airflow, or the ECU's base fuel map adjusts sufficiently at higher loads to mask a small discrepancy without needing aggressive compensation.
Your mechanic correctly identified that a propane spray test yielded no results, but dismissed the possibility of an undetected vacuum leak because they skipped a smoke test. This is a critical diagnostic gap. Propane testing relies on the operator hearing a change in engine idle quality as fuel-rich gas enters the intake. Small leaks, particularly those located behind the throttle body or within the PCV system, may not generate an audible "chuff" or RPM fluctuation because the engine's volumetric efficiency at low load masks the extra air. A smoke test forces visible particulate matter through the entire intake tract, including tiny cracks in hoses that propane cannot detect due to lack of flow or auditory feedback.
Regarding your observation of Mass Air Flow (MAF) readings fluctuating between 40 and 60 kPa: while a dirty MAF sensor can cause erratic readings, a significant vacuum leak usually causes the MAP to drop further than normal idle vacuum (which corresponds to lower pressure values in kPa depending on the gauge reference). If your MAP is reading close to atmospheric or slightly below, and fluctuating wildly, it could indeed suggest a failing MAF heater circuit or a sensor element that isn't linear. However, given the high LTFT, the most probable cause remains an unmetered air source that hasn't been found yet.
Before concluding that the MAF is at fault, consider these specific areas often missed during standard diagnostics:
- Intake Manifold Gaskets: On 2007 Toyota Vitz models, plastic intake manifolds can develop hairline cracks or gasket failures specifically at the plenum bolts. These leaks only manifest strongly under low vacuum conditions (idle) and close up as engine vacuum drops (higher RPM).
- PCV Valve and Hoses: The Positive Crankcase Ventilation system introduces fresh air into the intake. A stuck-open PCV valve or a cracked hose connecting the crankcase to the intake can act as a massive vacuum leak at idle. These are frequently overlooked because they don't sound like external leaks.
- Throttle Body Gasket: The seal between the throttle body and the intake manifold is a common failure point. If this gasket is compromised, unmetered air bypasses the MAF sensor entirely, confusing the ECU into thinking the engine is running lean even if the injectors are firing correctly.
Since your STFT is currently stable, the ECU has likely reached its compensation limit for that specific condition or the leak is intermittent enough that the average over a drive cycle hasn't triggered a new code yet. A smoke test under load (if possible) combined with inspecting every rubber hose and plastic gasket on the intake side is the definitive next step. If no external air source is found, thenâand only thenâshould you consider bench-testing the MAF sensor to rule out internal sensor drift or heater failure.