P0171 Code almost instantly: tune or the usuals?

Macman45

Resident Geriatric
Joined
Sep 22, 2012
Posts
1,533
Reaction score
219
Location
Atlanta / Bay Area
Working on a higher mileage 2007 that has a single code: P0171 for lean bank 1. Unlike codes in the past it does not take multiple key cycles to throw. It tosses it within a few miles of sieving same key cycle after clearing. Loosely checked for vacuum leaks, none found. O2’s were replaced by PO (didn’t solve it). I’m leaned away from the ones that can cause both banks lean (MAF, TB, intake hose) as it’s JUST the one side.

Some googling said something about MAF metering in the tune could be off. I have no history of tune on that car but it’s stock intake and exhaust.

Odd to toss the lean code so quick?

Where else can I look? My SCT (from another car, married) does indeed show fuel trims way out so it is indeed lean on that side.
 

Macman45

Resident Geriatric
Joined
Sep 22, 2012
Posts
1,533
Reaction score
219
Location
Atlanta / Bay Area
Also on a cold start the rev’s do shoot hp rarely high, over 2k, then settle down after a few seconds. Compensating for something off.
 

Dino Dino Bambino

I have a red car
Joined
Aug 11, 2014
Posts
4,509
Reaction score
2,600
Location
Cyprus
Working on a higher mileage 2007 that has a single code: P0171 for lean bank 1. Unlike codes in the past it does not take multiple key cycles to throw. It tosses it within a few miles of sieving same key cycle after clearing. Loosely checked for vacuum leaks, none found. O2’s were replaced by PO (didn’t solve it). I’m leaned away from the ones that can cause both banks lean (MAF, TB, intake hose) as it’s JUST the one side.

Some googling said something about MAF metering in the tune could be off. I have no history of tune on that car but it’s stock intake and exhaust.

Odd to toss the lean code so quick?

Where else can I look? My SCT (from another car, married) does indeed show fuel trims way out so it is indeed lean on that side.
It's quite common for the O2 sensor wiring harness to get pinched between the engine block and the bellhousing when the transmission is reinstalled following the replacement of the clutch assembly. You might want to investigate since this will short out the O2 sensor leaving it reading a constant 0.0v with the ECU believing that it's stuck lean.
The high idle immediately after cold start up is unrelated to the O2 sensor and is probably normal, especially if it settles within a few seconds to around a steady 1000rpm.
 

Macman45

Resident Geriatric
Joined
Sep 22, 2012
Posts
1,533
Reaction score
219
Location
Atlanta / Bay Area
It's quite common for the O2 sensor wiring harness to get pinched between the engine block and the bellhousing when the transmission is reinstalled following the replacement of the clutch assembly. You might want to investigate since this will short out the O2 sensor leaving it reading a constant 0.0v with the ECU believing that it's stuck lean.
The high idle immediately after cold start up is unrelated to the O2 sensor and is probably normal, especially if it settles within a few seconds to around a steady 1000rpm.
Good call on checking for a pinch. Can I read input voltage to ground at the O2 sensors connector or need to do continuity checks up to the ECU?
 

StockishS197

Member
Joined
Dec 24, 2024
Posts
434
Reaction score
377
Location
Houston
What brand O2 sensors are you using?

The startup RPM spike is normal and is part of the tune logic to aid in catalyst heating.
 

StockishS197

Member
Joined
Dec 24, 2024
Posts
434
Reaction score
377
Location
Houston
Is the car otherwise running fine? Misfires can also cause false lean codes on that bank, so worth checking there too.

If its only on the single bank, I wouldn't expect the MAF to be the issue.

How did you validate no vacuum leaks? The factory intake manifold has intake gaskets that don't often leak, but they can. The CMCV actuators have also been known to cause vacuum leaks so if you haven't done a pressure + smoke test, I would also consider that. Some quick ways you could do this is remove the evap hose from the IM, use a rubber glove sealed on the TB inlet and apply GENTLE compressed air into the evap port to see if it holds minor pressure (inflates the rubber glove). If there aren't any leaks, it should hold pressure for quite some time.

If you validate the above, then I agree with Dino's suggestion to check for wiring issues that could be driving faulty O2 voltages. If you have a SCT device, a computer and LiveLink, you can datalog O2 voltages on the effected bank and ensure you see the O2s switching as expected.
 

Macman45

Resident Geriatric
Joined
Sep 22, 2012
Posts
1,533
Reaction score
219
Location
Atlanta / Bay Area
Is the car otherwise running fine? Misfires can also cause false lean codes on that bank, so worth checking there too.

If its only on the single bank, I wouldn't expect the MAF to be the issue.

How did you validate no vacuum leaks? The factory intake manifold has intake gaskets that don't often leak, but they can. The CMCV actuators have also been known to cause vacuum leaks so if you haven't done a pressure + smoke test, I would also consider that. Some quick ways you could do this is remove the evap hose from the IM, use a rubber glove sealed on the TB inlet and apply GENTLE compressed air into the evap port to see if it holds minor pressure (inflates the rubber glove). If there aren't any leaks, it should hold pressure for quite some time.

If you validate the above, then I agree with Dino's suggestion to check for wiring issues that could be driving faulty O2 voltages. If you have a SCT device, a computer and LiveLink, you can datalog O2 voltages on the effected bank and ensure you see the O2s switching as expected.
10-4. Car runs great, good power no misses and great MPG.

I agree with you my vacuum test wasn’t as good as I’d like (I’m in California with it, and don’t have all my test equipment. I have a smoke machine just not with me). My current vacuum leak tests were starter fluid on the manifold gaskets and anywhere around the driver side of the engine.

I do have my SCT and access to laptop with live link. I’ll data log both O2’s and watch em respond. If they both open as designed, I’ll assume sensor and wiring are Ok and problem is at engine
 

Macman45

Resident Geriatric
Joined
Sep 22, 2012
Posts
1,533
Reaction score
219
Location
Atlanta / Bay Area
I don’t think so but haven’t ruled it out.

The fact that it throws the code so quickly leans my to Dino’s suggestion, they pinched a wire and that O2 is shorted / way out of range instantly on start up and the computer know it.

Waiting for my SCT to get its way over here and I’ll datalog the O2’s and see.

Thanks for the help fellas
 

metrolink

Junior Member
Joined
Apr 28, 2025
Posts
15
Reaction score
10
Location
Tallahassee
I had the same issue with only Bank 1 running lean. In my case, it was a couple of pinhole leaks just below the flange gasket (right above the upper O2 sensor) between the cat and exhaust manifold. I also found that the flange bolts weren't fully tightened. After re-torquing them and patching the leaks as best as I could, the code cleared and my Bank 1 trims dropped from 25% down to about 7%.

I have my stock pipes as well, but in my case, they were starting to corrode/rust a bit.

My next step is to check the injectors, as @2008_ScarlettGT suggested. I asked about this before and also got the recommendation to inspect/replace the injector O-ring seals while I'm in there.

I know you mentioned that you already checked for intake and exhaust leaks, but I'd suggest double-checking that flange area in case there might be something (since the reporting sensor sits below it). I would have never found mine without hooking up a smoke machine to the exhaust pipe.
 

Macman45

Resident Geriatric
Joined
Sep 22, 2012
Posts
1,533
Reaction score
219
Location
Atlanta / Bay Area
I had the same issue with only Bank 1 running lean. In my case, it was a couple of pinhole leaks just below the flange gasket (right above the upper O2 sensor) between the cat and exhaust manifold. I also found that the flange bolts weren't fully tightened. After re-torquing them and patching the leaks as best as I could, the code cleared and my Bank 1 trims dropped from 25% down to about 7%.

I have my stock pipes as well, but in my case, they were starting to corrode/rust a bit.

My next step is to check the injectors, as @2008_ScarlettGT suggested. I asked about this before and also got the recommendation to inspect/replace the injector O-ring seals while I'm in there.

I know you mentioned that you already checked for intake and exhaust leaks, but I'd suggest double-checking that flange area in case there might be something (since the reporting sensor sits below it). I would have never found mine without hooking up a smoke machine to the exhaust pipe.
I checked for intake leaks and physically inspected exhaust. I’m gonna smoke the tailpipe. That flange sounds promising. Did you get the pinholes fixed or just tightened the nuts? I’m wondering how I can fix that if that’s it. It’s a built in donut gasket isn’t it?
 

metrolink

Junior Member
Joined
Apr 28, 2025
Posts
15
Reaction score
10
Location
Tallahassee
Did you get the pinholes fixed or just tightened the nuts?
I did both — the guy that reinstalled my transmission hadn't torqued the flange nuts properly, so I set them to 33 ft-lbs.

I’m wondering how I can fix that if that’s it. It’s a built in donut gasket isn’t it?
I used high-temp exhaust putty and tape since I was in a pinch, and it's still holding, but that should really be temporary. The best option is to have it welded — most independent muffler shops will do it for around likely $50–$100 (varies by location).

The flanges on these don't use donut gaskets; I found they're meant to seal directly once torqued correctly.
 
Last edited:

Macman45

Resident Geriatric
Joined
Sep 22, 2012
Posts
1,533
Reaction score
219
Location
Atlanta / Bay Area
Surprised I’m not seeing one bank affected. These are both very similar and wrong. Now I may look towards some of the common ones for both banks (MAF, TB, other vacuum leaks etc)
IMG_1101.jpeg
 

StockishS197

Member
Joined
Dec 24, 2024
Posts
434
Reaction score
377
Location
Houston
Surprised I’m not seeing one bank affected. These are both very similar and wrong. Now I may look towards some of the common ones for both banks (MAF, TB, other vacuum leaks etc)
View attachment 110852
Unless you had a really big, audible leak at the manifold flanges, I wouldn’t expect it to be that skewed.

I would pressure test the intake track starting from the air filter back. The way I did this was putting a rubber glove over the filter inlet (I have a Steeda CAI) then adding some light air pressure via the EVAP port on the manifold. When I did this, the entire intake track, including the CAI was air tight and didn’t lose any air. Worth a shot, cheap and easy.

I am going to ask another clarifying question…stock intake box or cold air intake? MAF scaling being incorrect in the tune would also throw trims very much out of wack.

Edit: re-read your post and saw you have a stock air-box. If the previous owner had a larger CAI that it was tuned for, I wouldn’t expect the see positive fuel trims.
 

Macman45

Resident Geriatric
Joined
Sep 22, 2012
Posts
1,533
Reaction score
219
Location
Atlanta / Bay Area
Edit: re-read your post and saw you have a stock air-box. If the previous owner had a larger CAI that it was tuned for, I wouldn’t expect the see positive fuel trims.
I think I’m seeing the opposite issue here. It’s a Shelby GT, so the “stock” box is the Steeda 90mm, but of course it came tuned for that. I *think* it’s been flashed to stock… so its acting like it’s got a CAI without a tune because it does.

Is this feasible given the skewed LTFT’s? Before I go buy an unlocked tuner (made a WTB post).

IF someone or a dealer flashed this to a “stock GT” then it def needs a tune for the correct Steeda CAI that’s in place.

Sounding feasible? Again I don’t know much on the history of this car, just speculating.

I can try and buy a tuner and flash a canned tune for the Steeda and see, or go buy a stock airbox for a GT and give that a go… just for testing.
 

StockishS197

Member
Joined
Dec 24, 2024
Posts
434
Reaction score
377
Location
Houston
I think I’m seeing the opposite issue here. It’s a Shelby GT, so the “stock” box is the Steeda 90mm, but of course it came tuned for that. I *think* it’s been flashed to stock… so its acting like it’s got a CAI without a tune because it does.

Is this feasible given the skewed LTFT’s? Before I go buy an unlocked tuner (made a WTB post).

IF someone or a dealer flashed this to a “stock GT” then it def needs a tune for the correct Steeda CAI that’s in place.

Sounding feasible? Again I don’t know much on the history of this car, just speculating.

I can try and buy a tuner and flash a canned tune for the Steeda and see, or go buy a stock airbox for a GT and give that a go… just for testing.
I am thinking that’s it.

The Shelby GT has the same 90MM MAF housing as the Steeda, so your MAF transfer function is too low if you are running the stock tune. The stock MAF housing is 80MM.

That would explain why LTFTs are showing 25% richer….the 90MM MAF has about 26.5% more area than the stock 80MM.

The canned options in an SCT device may have a preset option for the Steeda MAF.
 

Macman45

Resident Geriatric
Joined
Sep 22, 2012
Posts
1,533
Reaction score
219
Location
Atlanta / Bay Area
That’s my theory too. Again I have zero history on this car but if the EXU was flashed “to stock” the Steeda CAI would be wiped out and explain the massive lean. Unsure why only one bank throws the CEL but the LTFT’s clearly indicate it’s an issue on both sides.

I’m also looking for an old ass ProCal tuner which is what came with the Steeda
 
Back
Top