The top-seeded Swiss had a match point in the second-set tiebreak despite trailing 5-1. For the match, he did not face a break point.
"It was more like a serving contest," Federer said. "He served in all corners pretty well. I was never really under pressure the entire match on my serve and that was the key. I could stay calm even if I lost the second set."
Earlier, Simone Bolelli of Italy downed seventh-seeded Tomas Berdych of the Czech Republic 6-4, 7-5; lucky loser Andreas Beck of Germany defeated Nicolas Devilder of France 6-4, 6-4; and Philipp Kohlschreiber of Germany beat compatriot Denis Gremelmayr 6-4, 7-6 (5).