The retractable roof stayed open Monday at Wimbledon, and Federer fell behind early in the opening match on Centre Court before charging past Yen-hsun Lu of Taiwan, 7-5, 6-3, 6-2.
In his first match since winning the French Open, Federer failed to convert his first four break-point chances, then lost serve to trail 3-2. But he immediately broke back, broke again in the final game of the opening set and dominated from there.
"I'm very happy with my first round," Federer said. "I thought it was a very solid performance."
Seeking his sixth Wimbledon title, Federer won for the 41st time in his past 42 matches at the All England Club. The lone loss came in last year's final to Rafael Nadal, a match hailed by some as the sport's best ever.
The tournament began in cloudy but dry weather. When it rains, the translucent roof on the 87-year-old stadium will be closed so play can continue.
"I guess the moment will come that I'll play indoors here," Federer said. "But you don't really hope for it during the match."
The No. 2-seeded Federer is a strong favourite to win his 15th major title, which would break the record he shares with Pete Sampras.
Advancing on the women's side were 2002-03 champion Serena Williams and 2004 winner Maria Sharapova. No. 17 James Blake was the first seeded player eliminated, but fellow Americans Mardy Fish and Vince Spadea advanced. No. 4-seeded Novak Djokovic also won.
Federer made his entrance sporting a sleek new white warmup outfit with gold trim that included a jacket with a turned-up collar, a vest, slacks and two-toned shoes. The crowd roared when he appeared, and he responded with a wave and smile.
There were more cheers - and a few whistles of approval - when he removed his jacket to reveal the vest.
"Kind of a little bit more modern look - a bit more military jacket this time, but obviously staying true to Wimbledon with the white colours," Federer said. "I hope people like it."
By the time the match started, Federer had stripped down to shorts and a short-sleeve shirt. He was assigned to play the first match on Centre Court after defending champion Nadal withdrew Friday because of sore knees.
"Rafa deserves it obviously more than I do this year," Federer said. "But somebody had to do it, so I'm very happy that they chose me. It gets your heart beating, that's for sure."
After being broken early, Federer held every service game. He finished with 10 unforced errors and hit 42 winners from all over the court.
One winner was a running backhand from several steps beyond the sideline, which he ripped up the line into the corner to win the point. It was a spectacular shot even by Federer's standards, and the stoic Swiss celebrated with a raised fist as the crowd roared.
Playing second on Centre Court was Serena Williams, who lost only nine points on her serve and beat qualifier Neuza Silva 6-1, 7-5. The No. 2-seeded Williams, runner-up to her sister Venus a year ago, improved to 5-5 since starting the year 21-2.
"I could have played a ton better, especially on key points," Williams said. "That's a usual feeling for me from first round to the finals. I'm really insatiable. I always want more."
Sharapova won the final four games of the first set and beat qualifier Viktoriya Kutuzova 7-5, 6-4.
"She's a very aggressive player," Sharapova said. "She went for many shots very freely and loosely, and I was just trying to hold on."
Sharapova, making a comeback from shoulder surgery last October, saved a set point in the opening set with a forehand winner and later shook off two awkward spills behind the baseline.
Blake failed to convert a set point in the third set, squandered a 5-love lead in the ensuing tiebreaker and lost to Andreas Seppi 7-5, 6-4, 7-6 (5). Blake also was eliminated in the first round at the French Open last month.
"I still feel like I can play with anyone in the world, but it's just for some reason lately it has been very inconsistent," Blake said. "I know I still have the ability. It's just frustrating, because it's happening at big tournaments where I'm having my not-so-good performances."
No. 28-seeded Fish never lost serve and led 6-3, 6-2, 4-1 when Sergio Roitman retired with a right shoulder injury. Roitman, ranked 124th, fell to 0-12 in Grand Slam matches.
"There's nothing that I can do about it," Roitman said. "It's not that I'm not going to sleep at night because of that."
The 34-year-old Spadea, who has been eliminated in the first round at Wimbledon nine times, defeated Paul Capdeville 6-0, 6-4, 7-5.
Surprise French Open runner-up Robin Soderling, seeded 13th, hit 31 aces and beat Gilles Muller 6-7 (4), 7-5, 6-1, 6-2. Djokovic needed more than 3½ hours to beat Julien Benneteau 6-7 (8), 7-6 (1), 6-2, 6-4.