• NAXJA is having its 19th annual March Membership Drive!!!
    Everyone who joins or renews during March will be entered into a drawing!
    More Information - Join/Renew
  • Welcome to the new NAXJA Forum! If your password does not work, please use "Forgot your password?" link on the log-in page. Please feel free to reach out to [email protected] if we can provide any assistance.

1998 XJ 4.0 rough idle and dreaded P0171 code

sailorjim86

NAXJA Forum User
Location
NoVa
My 98 with a 4.0 was running smooth as silk. Suddenly it started mis-firing and threw the dreaded P0171 code (fuel bank 1 lean). I hooked it up to my scan tool. Also searched the forums before posting this. When I start it, it runs smooth for about the first 30 seconds, then starts misfiring. I can tell it is actuall running rich just by the smell.
Here's what I've done so far:
-Checked for vacuum leaks
-Inlet air temperature on the scan tool reads 116F when the outside temperature is about 30F
-Upstream O2 sensor reads less than one volt, sometimes zero
-Tested the IAT (aka "Air Charge Sensor) with an ohmmeter and it seems to be in the band of resistance I can find online but not sure, and why is the scan tool reading such a high temperature above the actual temperature before the engine is even warm? Verified the scan tool is working correctly on another vehicle (it gave the right IAT on my 4Runner).
- Could it be the upstream O2 sensor? My understanding is that wouldn't matter until it is up to operating temp and goes into closed loop mode. In open loop mode while cold, does the O2 sensors even matter?
I don't have a cracked manifold. Tried spraying starter fluid around the vaccum line areas and the manifold with no difference.

I know that's a lot of questions, but this thing has been very dependable and I'm a bit stumped!
 
Edit:
My fuel trim also goes all over the place. It goes to near 14% at idle, drops when I rev it up, then goes back up at idle.
 
Edit:
My fuel trim also goes all over the place. It goes to near 14% at idle, drops when I rev it up, then goes back up at idle.
Actually, just re-checked the fuel trim. It goes up to near 30% and has a rich rough idle, then I can rev it a bit and it drops to -4, that back at idle it goes way back up.
 
What confuses me is that the computer thinks you're running lean, while you think it's rich (and I trust your nose). Upstream O2 would have been my first thought, as if bad the computer might have thought it needed more fuel. Without that I'd expect a stuck injector or something that was allowing too much fuel but the computer would have felt it was rich and tried to trim and your trim values would have been negative.

Your reving it is just giving the engine a chance to consume the extra fuel that's being delivered if I had to guess, which masks the over-fueling that's happening for some reason.
 
You are NOT using Bosch or auto parts store generic O2 sensors, right? You should only be using NTK O2 sensors.

Use the OBD-II self-diagnostics to focus your troubleshooting

P0171 indicates a lean fuel condition in Bank 1, meaning the engine is not receiving enough fuel or is getting too much air.

Possible Causes:
Faulty O2 sensor.
Cracked exhaust manifold
Vacuum leak or Air leak in the intake system.
Faulty mass air flow (MAF) sensor.
Faulty Coolant Temperature Sensor
Defective or dirty fuel injectors.

Diagnostic Steps: Test O2 sensor and fuse. Inspect O2 sensor and wire plug for corrosion and damage. Inspect for vacuum leaks in hoses and intake manifold air leaks. Inspect for exhaust manifold leaks. Test the MAF sensor and CTS sensor for proper operation. Examine fuel injectors for proper flow.

Repair Steps: Repair or replace any damaged vacuum hoses. Clean or replace the MAF sensor as needed. Replace the CTS. Replace or clean leaking fuel injectors.
 
Last edited:
It was the upstream 02 sensor. Swapped it out and runs like new again. Scantool readings kinda made it obvious. One thing I learned was that I thought 02 sensor input was only important in closed loop mode based on the water temp sensor. Not true, apparently. The PCM ignores the 02 sensor for only about 20 seconds after start-up. That's why it seemed good for the first 20 seconds then ran and idled like $hit and the gas mileage went way down, tripped the P0171 code (lean) but was running very rich. Getting the old 02 sensor out was a little tough, and the "02 socket" is crap and only fits a 3/8" socket wrench. I ended up dosing it with some PBlaster a few times, hit it with a MAPP torch for a few moments (fire extinguisher at hand) then took a 7/8" end wrench and it came right off.
 
Great to hear it was a simple fix. Thanks for the follow up.
 
Back
Top