Update: I managed to get retroarch and fba-libretro to run on my PC, using the same monitor and USB keyboard as on my PI. Using hard GPU sync on, input lag went down to 2 frames! With hard GPU sync off, I got the same input lag of 4 frames or more as on my PI.
So, at the moment I think that the problem is that hard GPU sync does not work in retroarch on retropie, as I already conjectured above.
Hence, it would be interesting how I could get hard GPU sync to work in retroarch on retropie, e.g., by compiling retroarch with certain options. However, I remember that certain dependencies would have to be included, and I am not a Linux expert, so any suggestions on how to successfully activate hard GPU sync would be very welcome.
Of course, the problem might be then that the processing power of the PI 2 does not suffice for Neo Geo games with hard GPU sync switched on…