Abstract We prove the Lipman–Zariski conjecture for complex surface singularities of genus 1 and also for those of genus 2 whose link is not a rational homology sphere. As an application, we characterize complex $2$-tori as the only normal compact complex surfaces whose smooth locus has trivial tangent bundle. We also deduce that all complex-projective surfaces with locally free and generically nef tangent sheaf are smooth, and we classify them.