How to Troubleshoot a P0171 Engine Code

by Lee Sallings

Diagnostic trouble code "P0171" indicates that bank one of the system is running lean. A lean condition occurs when the ratio of fuel to air in the combustion chamber of the engine has too much air. The most cause of this code is a vacuum leak, a dirty mass airflow sensor (MAF) and a faulty O2 Sensor. Pinpointing the exact cause takes the skillful use of an automotive scan tool that has the capability to read data from the on-board computer.


Attach the scan tool and start the engine. Allow the engine to run to operating temperature. With the engine running, visually inspect the engine for obvious vacuum leaks. Listen for hissing, which indicates a vacuum leak especially on bank 1. Bank 1 is the side of the engine that has the No. 1 spark plug. Refer to your service manual for this information.


Attach your scan tool and enter the data stream diagnostic mode. Observe O2 sensor data, and MAF sensor data. Remove a vacuum line from the engine while observing the O2 sensor for a change. It should momentarily read lean—more than 1/2 volt—and then settle into its normal switching mode. If the sensor stays lean, replace the sensor. This is called a lazy O2 sensor and is a common cause for code P0171.


Observe the MAF sensor data. Remove the MAF sensor from the sensor housing in the intake duct or air filter housing, using a T-15 Torx driver. Clean the MAF sensor, using MAF sensor cleaner spray. Reinstall the MAF sensor and start the engine. Observe the MAF sensor data for a change in sensor reading. A dirty MAF sensor is also a common cause of a code P0171 and is usually fixed by cleaning it. If vacuum leaks and O2 sensors have been eliminated as the actual cause and cleaning the MAF doesn't fix the problem, replace the MAF sensor.


  • close Wear safety glasses and work gloves when working around a running engine to prevent serious injuries.

Items you will need

About the Author

Lee Sallings is a freelance writer from Fort Worth, Texas. Specializing in website content and design for the automobile enthusiast, he also has many years of experience in the auto repair industry. He has written Web content for eHow, and designed the website. He began his writing career developing and teaching automotive technical training programs.

Photo Credits

  • photo_camera Images