Anyone who knows the poem will spend most of Christopher Nolan's film ticking off familiar beats. The ending is not one of them. It departs from Homer in a way that changes what the preceding three hours were about.
Spoilers from here.
The film is about guilt, not obstacles
In the poem, Odysseus is kept from Ithaca by calamity. In Nolan's telling he is kept from it by what he did. Across the film he assembles his memories of the Trojan War, the war he ignited by smuggling his men inside the horse, and becomes consumed by the scale of what he caused.
The land of the dead sequence makes the point explicit. There he encounters Sinon, the soldier who volunteered to talk Troy into taking the horse inside its walls. The journey home is a reckoning rather than a series of detours.
What happens at Ithaca
He arrives disguised as a beggar to see what his home has become. Telemachus recognises him despite the years. Penelope does not, until he strings a bow the way only her husband could.
Then the film turns. Rather than take back the throne, Odysseus and Penelope board a ship and leave, choosing exile and handing Ithaca to their son. The reunion is real and the restoration never happens.
The sun was the clue
The setting sun recurs throughout, and it points back to a scene early on. Having just had Telemachus, Penelope urges her husband not to go to war and to sail away with her and chase the sun instead. Her argument is that war collapses civilisations, and that they are rebuilt afterwards, over and over.
The last line belongs to Odysseus: a new dawn will break over the darkened world, when our mistakes will once again be forgotten. It is not consolation. It is the same warning she gave him at the start, that the sun rising again brings both another chance at goodness and another opportunity to repeat everything.

