Just want to share some info if anyone is getting similar issues with TSI engines..
The whole saga with check engine light and fault code P0171 (system lean) started during the summer with hot engine at idle (at 210.000 km). Throughout this time the car was driving normally and I was getting CEL only with hot engine at idle.. No misfires, nothing. After CEL reset it was ok between 50 km and 700 km.. So no real pattern there.. Then we started monitoring STFT, maf, fuel pressure, lambda, coolant temperature to get the pic of what was happening and in the beginning only STFT was going crazy with engine hot at idle (went to +25% corr; usually it sits between +/-10). Once it threw even P0441 code (EVAP system not functioning properly). We were checking the car for vacum leaks but everything was ok. After a month or so I found a correlation between CEL and maf readings with engine at idle. When STFT was ok maf readings were aroung 2,3 g/s, when i got CEL maf readings were between 1,6 and 1,9 g/s. After investigating the PCV system (oil cap, dipstick, N80 valve, charcoal cannister, fuel filler cap etc) and everything that's even remotely related to that it was clear that PCV did work as it should (at least when driving). Crucially then was to check the pipe that goes from PCV to the manifold at idle. When removing the hose from PVC nothing changed (which was the first real sign that PCV doesn't work correctly at idle), when you block that tube (it creates vacum) and STFT starts correcting from +25% to -20% and maf readings were back to normal. It seems that the valves which regulates the flow from PCV to the inlet manifold at idle was worn and through that valve engine was getting too much air (which was recognised as unmetered air/vacum leak = system too lean = too much air or not enough fuel). After installing new genuine VW PCV (115 €) problem was solved.
Video.mov