But the public geniality apparently did not translate into a private detente. The U.S. and Russian presidents talked to each other about only one issue at the summit, the one that absorbed most everyone's attention at the two-day meeting of world leaders: what to do about an alleged chemical weapons attack in Syria. Obama and Putin, like the group of leaders overall, remained divided on the issue.
"We hear each other and understand the arguments," Putin said at a news conference at the end of the summit. "But we simply don't agree. I don't agree with his arguments, and he doesn't agree with mine, but we hear and try to analyze."
No breakthrough in U.S.-Russia ties was expected at the Group of 20 meeting, and none occurred, leaving the future unclear for a relationship that has become gripped by tension.
The two leaders met for about 20 minutes on the sidelines of the summit, speaking only about Syria, they said, ignoring an array of issues — including Russia's granting of asylum last month to U.S. intelligence leaker Edward Snowden and U.S. criticism of Russian laws relating to LGBT people — that have contributed to the strain in ties.
After Russia announced it would give Snowden safe haven last month, Washington canceled a planned meeting between Obama and Putin originally scheduled to take place in Moscow before the G20 summit. The White House cited a failure to produce a constructive agenda as the reason for calling off the meeting.
But Obama said he would still attend the G20 due to its importance for the U.S. economy. In fact, the summit was dominated by the debate over a possible international response to the alleged chemical attack in Syria, with reporters from around the world carefully watching the chemistry between the U.S. and Russian leaders for signs of any change in their opposing positions.
Obama and Putin do not appear to bear animosity toward one another, but they have never had a warm personal relationship, in contrast to the chumminess between Obama and Putin's predecessor, Dmitry Medvedev, now the Russian prime minister. Even the connection between Putin and former U.S. President George W. Bush, despite their significant differences on major issues, seemed stronger as evidenced in 2001 by Bush's statement that he was "able to get a sense of [Putin's] soul" after looking him in the eye.
In St. Petersburg, Obama seemed to find it difficult to make himself the center of attention at a summit hosted by Putin in the Russian president's hometown, and he failed to garner universal support for his plan to make a "limited and proportional" strike against the government forces in Syria in retaliation for the alleged chemical attack, which the U.S. believes was undertaken by Syrian President Bashar Assad against the civilian population.
Simply being the president of the U.S. meant that Obama stood out to some extent. He was the only leader to use his own Cadillac limousine for transportation, instead of a car provided by the host country, and the only one to drink out of his own paper coffee cup, adorned with the U.S. presidential seal.
For Putin, who is Obama's most vocal opponent over the issue of how to seek a solution to the conflict in Syria, it seemed to be easier to maneuver and throw his political weight around on his home turf.
While Obama tried to build a moral normative case for the military strike, arguing that the urgency of the situation in Syria justified the U.S. taking extraordinary measures and bypassing authorization by the United Nations Security Council, Putin resorted to his usual legalistic stance, shielding his support of the incumbent Syrian government with the letter of international law.
Unable to achieve much progress on the issue, Obama left the summit Friday for a meeting with nine Russian human rights activists at an airport hotel just before getting on a plane to leave the country.
"This is an incredible and very diverse group of civil society leaders," Obama told the activists, according to a White House statement. "All of [you] contribute in one way or another to continuing to strengthen the Russian society and helping to make progress on behalf of all people."
According to the activists present, Obama did not do much talking and refrained from making any statements critical of Russia, but the participants praised the meeting as "an important signal."
"He said he had heard us and gave only general, abstract advice," Igor Kochetkov, one of Russia's most prominent LGBT campaigners, said at a news conference afterwards. "We, on our part, asked him to repeal the U.S. Foreign Agents Registration Act that is being used by Russian authorities to justify the foreign agent law designed to harass NGOs. He said he would think about it."
Obama has criticized the anti-gay law signed by Putin in June that bans "propaganda" of "nontraditional" relationships, telling a U.S. talk show host that he has "no patience for countries that try to treat gays and lesbians and transgendered persons in ways that intimidate them or are harmful to them."
U.S. Ambassador to Russia Michael McFaul said Obama "thoroughly enjoyed" the meeting with the human rights activists.
"On the ride to Air Force One afterward, he said he thoroughly enjoyed the meeting and was deeply impressed by the work of the Russian activists he had just met," McFaul wrote on Facebook.
No such glowing words were said about Obama's conversation with Putin on the sidelines of the G20.
According to Dmitry Trenin, director of the Carnegie Moscow Center think tank, the U.S.-Russia split on Syria is a demonstration of the two leaders' contrasting worldviews.
"Syria is not about U.S.-Russian power competition in the Middle East, but about disagreement about world order," Trenin said in a Twitter conference Friday.
At the G20, Putin appeared to wield more influence and have more philosophical allies than he has had in the past,
"In February 2007, when [Putin] vented his frustration with George W. Bush's policies at the Munich Security Conference, Putin had been a lonely voice at somebody else's party. This time, hosting the world's top-league players in his native St. Petersburg, he evidently felt himself on a surer footing," Trenin said in a New York Times op-ed.