P0171 on a 2012 Hyundai Sonata
P0171 means the engine computer is adding more fuel than normal on bank 1 because it sees too much air or not enough fuel.
Not your vehicle? See general P0171 info.
Most common causes on the 2012 Hyundai Sonata
Ranked from 1,552 NHTSA owner complaints filed for this vehicle.
- 1
Vacuum Leak (Intake Manifold Gasket, Vacuum Hoses, PCV Valve)
Medium severityUnmetered air entering the engine leans out the air/fuel mixture, triggering P0171. Look for cracked hoses, a hissing sound, or high positive fuel trims at idle that improve at higher RPMs.
Common cause - 2
Faulty Mass Air Flow (MAF) or Manifold Absolute Pressure (MAP) Sensor
Medium severityAn inaccurate reading of incoming air volume or pressure causes the PCM to under-fuel the engine. Confirmed by checking sensor data on a scan tool against known good values.
Common cause - 3
Low Fuel Pressure (Failing Fuel Pump, Clogged Fuel Filter)
High severityInsufficient fuel delivery prevents the engine from maintaining the proper air/fuel ratio. Confirmed by testing fuel pressure with a mechanical gauge and observing it drop under load.
Common cause - 4
Clogged or Dirty Fuel Injectors
Medium severityRestricted injectors cannot spray enough fuel into the cylinders, causing a lean condition. Confirmed by performing an injector balance test or observing misfires on specific cylinders.
Common cause - 5
Faulty Upstream Oxygen (O2) Sensor or Air/Fuel Ratio Sensor
Low severityA degraded sensor may falsely report a lean condition or fail to read the mixture correctly. Confirmed by observing sluggish or biased sensor voltage/current data on a scan tool.
Common cause - 6
Exhaust Leak Before the Upstream O2 Sensor
Medium severityOutside air drawn into the exhaust stream is read by the O2 sensor as a lean mixture, causing the PCM to add fuel unnecessarily. Confirmed by inspecting the exhaust manifold and pipes for soot or listening for ticking noises.
Common cause
These causes are aggregated from NHTSA owner complaints and general repair knowledge — this is not a diagnosis. P0171 on your car still needs shop confirmation before any repair.
Common symptoms
- Check engine light
- Rough idle
- Hesitation
- Surging idle
- Poor fuel economy
What to check before replacing parts
Review short- and long-term fuel trims on bank 1
Look for: High positive trims (commonly worse at idle, improving with RPM) mean the computer is adding fuel to compensate for excess air or insufficient fuel — that pattern is this code's fingerprint.
Smoke-test the intake
Look for: Smoke escaping (or a hiss you can hear) at intake boots, gaskets, or vacuum hose connections confirms unmetered air is entering after the MAF sensor, which is the most common cause of a lean code.
Inspect the PCV hoses and valve
Look for: A cracked, split, or disconnected PCV hose, or a PCV valve stuck open, draws in extra unmetered air the same way a vacuum leak does.
Clean and test the MAF sensor
Look for: Visible dirt or oil film on the sensor element, or a grams/second reading that doesn't track expected airflow for RPM, means the MAF is under-reporting air and causing the computer to under-fuel.
Verify fuel pressure
Look for: Pressure below spec (weak pump, clogged filter, failing regulator) starves the engine of fuel and produces the same lean trim pattern as a vacuum leak — rule it out before chasing leaks.
Rather have a pro handle it? Find a vetted local mechanic.