I haven't seen this problem discussed here. Hopefully, this post may assist someone.
P0 170 (fuel trim, bank one) code was occasionally appearing my wife's 2.0L FD (2010 with 70,000km on the clock). She said the car had run sort of, like, you know, run roughly once or twice.
I checked the usual culprits: Intake air leaks, O2 sensor, dodgy ignition and injectors and fuel pressure etc.
All seemed ok and after I cleared the code it would not reappear for a few weeks.
When P0 170 appeared for the third time. Wife was interrogated at length.
Wife subsequently revealed that after filling the fuel tank , the car was hard to start.
Gotcha!!!
I checked the purge valve and it was crook.
I have couple of spare motors in the workshop so grabbed a purge valve off a 2011 motor that has only done 23,000km.
It was faulty too. The forth one I tried was ok.
I am now in the good books because wife is now "getting an extra 100km out of a tank of fuel" and car starts perfectly after filling.
Given this experience,
I'm treating all i30 purge valves with suspicion.