Q: Rough idle with DTC P0171, engine stalls unless MAF sensor is unplugged - 2007 Volvo S40 2.4i

asked by on August 19, 2016

I am having a problem with the air or fuel system in my car. Check engine light is on with error code 0171. Car seems to run okay when started from cold. After engine is warm, if I turn the car off then start it again, it idles very rough and often stalls.

I removed the MAF sensor and cleaned it with CRC MAF Cleaner, but the same behavior continues. If I unplug the MAF sensor completely, the car seems to start fine. With the MAF plugged in, though, the car will not start or will start, idle rough, and stall.

Is it safe to assume the MAF sensor needs to be replaced or is there something else that could be causing this issue?

My car has 162000 miles.
My car has an automatic transmission.

Mass Airflow Sensor Replacement $188.36 - $786.53 Get a Quote

Your mass air sensor has most likely gone bad and/or is not giving correct data to the computer. Replace the sensor, clear the codes, and retest this.

The statements expressed above are only for informational purposes and should be independently verified. Please see our terms of service for more details

Get an instant quote for your car

Our certified mechanics come to you ・Backed by 12-month, 12,000-mile guarantee・Fair and transparent pricing


Experienced Mechanic?

Earn up to $70/hr

What others are asking

How do I extend the sun visor?
Extending the sun visor allows you to block sunlight and brightness that is coming in through the center of the windshield. To extend one of the sun visors, first unfold it. Then, detach the end of the visor that is...
Intake/throttle body
This problem will be very difficult to diagnose as the vehicle is not present. It seems the noise does change as the load on the engine changes. Worn wheel bearings (https://www.yourmechanic.com/services/wheel-bearings-replacement) or pulleys along the belt drive system can make...
Secondary air pump.
The air pump supplies the catalytic converter with extra oxygen so that it can efficiently catalyze any unburned fuel. On start up, the catalytic converter is cold and requires some help to quickly get up to temperature allowing it to...
My brakes have been squeaking on my 2012 Altima since I bought it in 2012. I've had it checked out several times and was told noth
With the mileage you listed and the brakes having been replaced last month, I can guess that the brakes were replaced due to wear. They were probably worn enough to recommend replacement. As for the squeaking, a number of factors...
A whoooo noise on the rear driver side underneath 03 for explorer.
Humming noises underneath a vehicle could be a metal to metal contact of two objects rubbing fast. This could be a heat shield, an exhaust pipe rubbing on the frame, or a tire that is rubbing the fender. Go under...
How to install oil pan gasket to a 2006 Dodge Charger
Hi there. You might want to read this article (https://www.yourmechanic.com/article/how-to-replace-an-oil-pan-gasket-by-ronny-brown) to give you a frame of reference. However, to receive specific steps for your vehicle, you'll want to purchase a service and repair manual for your Dodge Charger or have...
My car will be in neutral but still stays at 1500 or 2000 rpms while driving
There are a number of things that can make a car jerk while you are cruising. Many of them would bring up a check engine light, but there are a few, like fuel pressure problems, that might not. With a...
Does my 2009 volkswagen jetta Wolfsburg edition 2.0t have a digital speedometer ?
The best way to determine if your vehicle has a digital speedometer is to check in the owner's manual. The owner's manual will tell you how to operate all functions of the vehicle as long as they are equipped with...
2001 focus crank no start, engine light is on, cannot hear fuel pump, scanned car and no codes found, is the fuel pump still bad?
Hey Dion. Thanks for the question tonight. In most cases a when a fuel pump is not working, but not indicating an OBD-II trouble code, it's mechanical. Most trouble codes related to the fuel pump indicate electrical faults. It's possible...

Related articles

What Sensors Make the ABS Work?
When When we are discussing ABS systems it is good to note the year and make of your vehicle because ABS systems have evolved quite a bit over the years, but you also have to know how the ABS system...
Symptoms of a Bad or Failing Crankshaft Position Sensor
Common signs of a faulty crankshaft position sensor include issues starting the vehicle, intermittent stalling, and the Check Engine Light coming on.
How Long Does an Air Charge Temperature Sensor Last?
The The air charge temperature sensor, also referred to as the intake air temperature sensor, works to monitor the temperature of the air as it enters your car engine. The engine’s computer has to have this information so it can...