The 2009 champion screamed at himself after one bad shot during his 6-2, 7-6 (1), 6-3 victory against Marcel Granollers. After another, Federer retrieved his black French Open towel, covered his face to muffle the sound, and yelled at himself again.
Federer, who improved to 3-0 against Granollers over his career, focused on the positives after the match.
"I got a good groove early on," said Federer, who won 82 percent of his first-serve points. "I was able to dominate with my forehand, so overall it was a very good match for me."
And he wasn't bothered any selfie-seeking fans this time, either. On Sunday, security guards allowed a teenager to stroll onto the court to grab Federer for a cellphone photo.
"Everybody is a little bit more alert. That was the only wish I had," Federer said. "They don't need to change anything, [like] we need to have fences and all that stuff. Not at all. Tennis is one of the most accessible sports out there, and we are unbelievably close with our fans. That's what I love about it."
"It was just more important that everybody was doing their job, taking it very seriously. ... I felt that today," he added. "Now we have just got to all keep it up for years to come. I know it's a lot of work, but it was a good exercise, I think, for everybody."
Eighth-seededStan Wawrinka, meanwhile, struggled with his serve but still advanced after a tough6-3, 6-4, 5-7, 6-3 victory over 67th-ranked Dusan Lajovic.
Sweating heavily, Wawrinka puffed out his cheeks in relief as he went to the net for the postmatch handshake and celebrated by tossing a towel into the crowd.
The 2014 Australian Open champion landed just 44 percent of his first serves. He squandered three match points in the eighth game of the fourth set, the last with a forehand sprayed wide. He then volleyed the next point into the net and served the last of nine double faults to give the Serb that game.
Wawrinka next will face AmericanSteve Johnson, whobeat Sergiy Stakhovsky 2-6, 6-3, 7-6 (5), 7-6 (6).
Fifth-seededKei Nishikori, last year's US Open runner-up and the last remaining of five Japanese men who started the French Open, took advantage of 10 double faults by Thomaz Belluccien route to a 7-5, 6-4, 6-4 victory in a match that lasted just 2 hours, 22 minutes.
Nishikori next plays Benjamin Becker in the third round. The German lost his last two matches against the Japanese, in 2014. Becker advanced from the second round by putting out the 32nd seed, Fernando Verdasco, 6-4, 0-6, 1-6, 7-5, 10-8.
Gael Monfils was given a hard time on center court by Diego Schwartzman before rallying past the 62nd-ranked Argentine 4-6, 6-4, 4-6, 6-2, 6-3.
Also, No. 12 seed Gilles Simonand 14th-seeded Jo-Wilfried Tsonga advanced in straight sets..
The Associated Press contributed to this report.
Federer advances in straight sets
Roger Federer dispatches Marcel Granollers 6-2, 7-6 (1), 6-3 to advance to the third round of the French Open.
Federer talks second-round win
Roger Federer discusses his win over Marcel Granollers to reach the third round at the French Open.
Nishikori downs Bellucci
Kei Nishikori topped Thomaz Bellucci 7-5, 6-4, 6-4 to advance to the third round at the FrenchOpen.
Fed hits rare two-handed backhand
Darren Cahill and Chris Fowler discuss Roger Federer's two-handed backhand, a shot he used during his second-round win over Marcel Granollers.