Little over three weeks since Djokovic was defaulted in the U.S. Open fourth round for hitting a line judge with a ball, he was a model of self-control as he outclassed the young Swede.
Had Court Philippe Chatrier been packed with fans rather than just a smattering because of the COVID-19 restrictions, Djokovic might have expected some heckling from the sometimes fickle post-lunch French audience.
Instead, it was as gentle a return to the Grand Slam spotlight as the 33-year-old top seed could have wished for as he charmed the tiny audience with his silky repertoire.
The first set took only 20 minutes as Ymer struggled to even lay a glove on the 2016 champion.
Djokovic did drop serve early in the second set when an attempted drop shot fell short but there was no tetchy response this time, just an ironic chuckle.
The Serb then led the applause for Ymer when the 22-year-old ran back to retrieve a lob-volley and played a showreel between-the-legs winner Nick Kyrgios would have been proud of in the sixth game.
But it was one-way traffic as Djokovic polished off the second set with his trademark clean hitting.
The 80th-ranked Ymer, facing a world number one for the first time, stuck manfully to his task in the third set and Djokovic became a little sloppy as he handed back a service break with a double-fault after which he flexed his hand.
Djokovic glared at someone in the crowd in the following game but refocused to reel off the last three games for victory and set up a clash with Lithuania's Ricardas Berankis.
Djokovic was odds-on to win the U.S. Open, with Rafa Nadal and Roger Federer absent, and move within one Grand Slam title of the Spaniard and two behind the Swiss who is not in Paris.
The script was ripped from his grasp though when a frustrated swipe at a ball resulted in it accidentally hitting a female line judge in the throat.
Since that humiliation, however, Djokovic has rebounded to win the Rome title and with the damp Parisian clay playing more like a slow hardcourt, it looks tailor-made for the Serb to end 12-time champion Nadal's Roland Garros domination.
Meanwhile New Zealander Artim Sitak and his partner were beaten in the first round of men's doubles.
Fellow New Zealanders Marcus Daniel and Michael Venus are also playing doubles at Roland Garros.