An acutely observed, painfully detailed account of the deterioration of an initially passionate relationship, Ira Sachs’s semi-autobiographical “Keep the Lights On” follows the meeting, troubled long-term cohabitation and ultimate separation of two NYC gay men, Danish expatriate Erik (Thure Lindhardt), a documentary filmmaker, and Paul (Zachary Booth), a corporate lawyer.

The focus throughout is on Erik, Sachs’s surrogate, an attractively scruffy thirty-something guy who first encounters Paul after a round of phone-sex one night in 1998. After a satisfying bout in bed, they find themselves drawn to one another, and the initial half-hour of the picture is devoted to their halcyon “honeymoon” period.

But after thirty minutes a title card informs us that we’ve jumped ahead to 2000, and the honeymoon is definitely over. It becomes clear that Paul has developed a drug problem, which becomes a motif in the story, as he disappears for long stretches without telling the concerned Erik where he’s gone off to. There are attempts to intervene, but nothing works. And though toward the close—nearly a decade later—the two are back together again, they agree that their coupling can’t last, and move on.

But while that represents the overall arc of the plot, Sachs doesn’t structure “Keep the Lights On” rigidly, preferring a bumpy, meandering approach instead. There are scenes of birthday parties and family gatherings shuffled together with episodes involving Erik’s efforts to make a film about Avery Willard, a little-known gay photographer and filmmaker of the forties and fifties. So we see excerpts from footage showing snippets of interviews he’s shot with people who knew Willard, as well as scenes of Erik away at workshops and film festivals. There are also periodic appearances by Paprika Steen as Erik’s tart-tongued sister, who accuses him of sliding through life on their father’s money (a refrain echoed by Paul, who reminds Erik persistently that he has a real job).

But though Booth has a few incisive moments (and some quite explicit bedroom scenes, not always with Lindhardt), Paul remains an opaque character. This is Erik’s—or perhaps more properly Sachs’s—story, and it’s told pretty resolutely from his perspective. Lindhardt plays him with quietly, even gently, reining in the moments of exuberance and treating the more heavily dramatic ones with a degree of understatement—even one in which he’s on the phone with a clinic anxious to hear whether he’s tested HIV-positive.

He manages to win the viewer’s sympathy even when one might disagree with Erik’s choices or not fully understand his motivation. The supporting cast offers no real standouts, but they all come across as at least competent. On the technical side the film isn’t flamboyant, but Thimios Bakatakis’ cinematography shares Sachs’s laid-back tone, and the craft contributions are all above par for a modestly-budgeted indie project.

“Lights” won’t set the world ablaze, but it’s a gay relationship story told with subtlety and a sense of insight that comes from personal experience.