My 05 Corolla got hit by code P0171. Intake manifold gasket seal was corroded leading to rough idle on cold starts. I didnt repair this right away... waited a few months as summer was setting in...
Looks like this was a mistake as I have learned that the current code I have P0420 (catylitic converter below efficiency threshold) may have been caused by P0171.
Please take a look at the following youtube video and watch upto 1min15 sec.
Apparently there is a link between corroded intake manifold gaskets and failing Cats.
Please repair PO171 ASAP so your CAT doest not fail.