Jesse Eisenberg and Jason Segel in "The End of the Tour"

Throughout the years, Donald Margulies had worked on a number of film scripts, many biopics, including one about the Who drummer Keith Moon for Mike Myers, another about Robert Capa for Oliver Stone. But none of them ever went beyond the writing stage. There’s no wonder why he was hired for them – ever since winning the Pulitzer Prize in 1997 for “Dinner With Friends,” a play about how a couple’s announcement of divorce unsettles those around them, his gift for conveying dynamic characters in rich, relatable terms, but it is his skill in creating dynamic situations that has made his work stick to the ribs so thoroughly. So perhaps that’s why when producer David Kanter passed along a galley of David Lipsky’s “Although Of Course You End Up Becoming Yourself,” a document of a four-day road trip with David Foster Wallace on the final leg of the publicity push for his career-defining 1996 novel “Infinite Jest,” Margulies had finally found a way to the big screen – the irony, of course, being the smaller he saw it, the more cinematic it became.

“I started reading it and I just saw it as a film, sort of a classic American genre road picture,” says Margulies. “Two guys in a car, in the American landscape – it just seemed to require the participation of a camera. It would have to go places that I couldn’t reasonably go on stage. Sometimes I’ll get an idea for something that’s not a movie, it’s a play, but here, this was unmistakably a movie.”

Directed by “The Spectacular Now” helmer James Ponsoldt, “The End of the Tour” may be scrutinized by those who see it as a film about Wallace (played by Jason Segel), a once-in-a-generation literary talent whose legend has only grown after his death in 2008. However, it is actually that unquantifiable success, or at least the idea of measuring it in the first place, that is the film’s driving force, watching as Lipsky (Jesse Eisenberg), then a journalist for Rolling Stone while nursing literary ambitions of his own, heads to the Midwest to profile Wallace on the eve of a book signing at The Hungry Mind in the Twin Cities.

The two don’t fall into conversation easily, as much for Lipsky’s naked avarice as Wallace’s disinterest in being in the spotlight. Yet as their time together wears on, the negotiation between the reporter and his subject moves past being an awkward slow dance into a waltz once Lipsky allows himself to observe Wallace as he actually is, seeing the same anxieties as a writer as he does in himself to go along with that blazing intellect that can effortlessly connect pop culture with the profound.

The dialogue, drawn almost exclusively from Lipsky and Wallace’s actual conversation, has the satisfying, searching sensation of strangers feeling each other out to find something in common, the familiarity coming not from what you may have known about either of the two men beforehand, but simply an acute understanding of human behavior. There’s a respect, which is paid not only to the real-life figures involved, but to the audience for whom it never condescends by stopping to add context or polishing off the rough edges, that likely comes from the teaming of Margulies, who only had a passing knowledge of Wallace’s work, with his former playwriting student at Yale in Ponsoldt, who had a portion of the author’s famed “This is Water” commencement speech read at his wedding. This, and other beautiful little juxtapositions, were among the things Margulies and I were able to talk about on the eve of “The End of the Tour”’s release.

Jason Segel and Jesse Eisenberg in "The End of the Tour"Stripping away the real-life context of it, was the dynamic something new for you? Often age or gender’s effect on characters’ worldviews are part of the conflict in your work, but here it’s two men of a similar age.

You know my work a little bit, it sounds like, so you know that I wrote a play called ‘Collected Stories,’ which is about two writers, a woman and her young, female protégé. It’s not completely alien to me to explore these themes, but you’re right, I haven’t put these two kinds of guys together in this kind of situation. It spoke to me, on many levels. I did not come at it as a Wallace fanboy. I was aware of him and curious about his work. But I didn’t succeed in reading ‘Infinite Jest’ in the ’90s. It was when I read the Lipsky book that I appreciated the magnitude of our culture’s loss when Wallace killed himself. He was such a remarkable observer and chronicler of our time.

At the same time, I was not at all interested in a biopic. ‎One of the things that I felt I could accomplish with this source material was to confine it to those days that were spent with David Lipsky as our conduit into it, basically a window into this man’s life and mind. It’s not about David Foster Wallace, if you know what I mean. It’s about Lipsky’s encounter with Wallace. That was very important, from the very beginning, for this story work for those who know nothing about David Foster Wallace, that it’s a character study of these two guys who are in similar pursuits, [similar] in age, and take on so many subjects that I think so many people who have any thought and feeling take on, but not nearly, I hope, as entertainingly or brilliantly, in some cases, as these guys do.

Jason Segel in "The End of the Tour"The conversation can veer from the silly to the profound at the drop of a dime, which are some of my favorite scenes in the film, whether it’s when‎ they’re sharing deep, philosophical thoughts about the meaning of success in the middle of the Mall of America food court or how a convenience store stop can lead the two to bond as if they finally have a common currency. Did you actually find those things in the text or did you have to work at them?

Finding those juxtapositions is part of the pleasure of the writing. Those are moments that I like, too, and the art of adaptation, for me, is very much like collage. My background is in visual art and I still make collages and in collage, you take raw, found material, and in this case, it’s a book with a lot of words in it, and you create new juxtapositions. You deconstruct it and you create a new composition out of it, a new structure. That process is part of why I like to get up in the morning when I’m working on something I’m excited about. It’s like moving these pieces around.

Just the very idea of having David Foster Wallace at Mall of America … I could not have made that up. It’s just too iconic and priceless. So the things they talk about there may not be what they talked about in the book at Mall of America, but I may have extracted moments that seemed to me more thematically ironic or pertinent to the location. That’s what I mean by finding those juxtapositions.

Jason Segel and Jesse Eisenberg in "The End of the Tour"You also seem pretty casual in the way you’re able to demystify Wallace, though you touch on all the things that heightened his iconography, such as his middle name in his author credit or his wearing a bandanna. For lack of a better term, did you have to go out of your way to bring him down to a human level?

Not so much to bring him down. Demystifying, yes. This piece is not hagiography. It’s not like we’re holding him up to this ideal. The intention was to create a very human portrait. With things like the bandanna and his name, I had those questions, as a casual observer of his work. I was curious about how he chose to use his middle name, which has become so emblematic of him, and the bandanna, as well. When Lipsky says, “I’ve got to ask you, what’s with the bandanna?” I think it’s a question a lot of people ask, so it was a matter of using my own curiosity about the man that I thought would touch on a more general audience.

You’ve said you were slavish to the text of Lipsky’s book, but never actually listened to the tapes. Why did you come to that decision?

David Lipsky was very scrupulous about the convolutions of speech, which I, as a playwright, am very, very attuned to. I tried to preserve that as much as I could. In some cases, it was by cobbling together multiple speeches and creating a new one, but again, that’s part of the collage aspect of it‎. I didn’t want to be overly influenced by the tonality and the inflection of speech [on the tapes]. I wanted to make my own drama out of it – putting emphasis in certain places, for certain reasons. Jason [Segel] and Jesse [Eisenberg] listened to the tapes, but that was more picking up vocal quality and the cadences. I didn’t want to overly research that. I didn’t want that imprint. It was enough to play with the words.

Jesse Eisenberg in "The End of the Tour"One of the things that’s so beautifully done here is how effortlessly it expresses the anxieties of being a writer, even a successful one. Did you find you were able to bring any of yourself to the material?

Yeah, in my own small universe of the theater, I can tell you that things change with success. In my career, it’s pre-“Dinner with Friends” and post-“Dinner with Friends.” They are two very distinct chapters in my life. Not that one was better than the other, but both had their struggles and pleasures.

To achieve a certain kind of career validation – a Pulitzer Prize will do that for you – the burdens grow tremendously because the expectations grow. People compare your work and choose their favorites, which somehow denigrates the work you’ve just done, no matter how you get around it. A critic will say, “I liked ‘The Country House,’ but it’s not as good as ‘The Model Apartment.'” Well, that’s not very useful to the viewer. This [current work] is the one they’ve got to contend with right now. So you have to contend with the vicissitudes of success. It’s not all great.

That’s precisely the moment at which we’re seeing David Wallace, these last days of the tour that catapulted him into the stratosphere that happened to have been spent with this young writer, David Lipsky, at the end of which Wallace says, “You’re going to get on a plane and I’m going to get back to knowing about 20 people.” That moment is, for me, the event of the story. It’s ‘The End of the Tour.’ It’s the eponymous event.

James Ponsoldt, who was a student of yours at Yale, has said that you had tipped him off when “The End of the Tour” screenplay was going to start making the rounds to potential directors. ‎Other than your personal connection, why did you think he’d be right for this?

It was a combination of things that really were mostly instinctual. I had not yet seen “The Spectacular Now,” but I was very impressed by “Smashed.” James was 19 when I met him as a student in my classroom and he was always an intensely bright, sweet polymath of a guy and a memorable student. And not to denigrate James, but I have a lot of memorable students. The population that I have had the privilege of teaching for 25 years are a bunch of extraordinary people in the making. You know it when you see it and James was one of them.

As with many of my former students, we maintained a correspondence. E-mail makes that easy. Even though I saw him on a weekly basis for 15 weeks, 15 years ago, we maintained a relationship. When I saw “Smashed,” I really admired the restraint and the humanity of it – it could’ve become maudlin and pathetic and it was not. It was funny, it was very disturbing, and it didn’t rely on the various tropes of the alcoholic genre, so I wrote him a fan e-mail after I saw it. We reconnected and after I finished this screenplay,‎ it was one of those Eureka moments. I thought, “James Ponsoldt should direct this.”

I talked to my producers. I said, “There’s this young director on the rise …” and it was right before “Spectacular Now” hit. There was already buzz, and I said [to the producers], “I know him. He’s a really smart, really kind, good guy. His career’s going great guns. Can I send it to him? I think he’d respond to it,” and they said, “Sure.” I sent it to James, [saying] “You may be hearing from your agent about this project that I’ve written for Anonymous Content about David Foster Wallace. I don’t know what you know or think about David Foster Wallace, but take a look when you can.” I woke up the next morning to an ecstatic email from him, thanking me for sending it. He made it his next project at a time at which he was being wooed by everybody in town, so it was really just this fortunate trust of one’s instincts and building on history with people; mine with David Kanter, mine with James Ponsoldt, and we made this happen, which makes me so proud.

Jesse Eisenberg and Jason Segel in "The End of the Tour"It sounds pretty charmed, and though I know “Dinner with Friends” got the movie treatment on HBO, was it interesting to go through the process of making a movie from start to finish that wasn’t an adaptation of your plays?

Strangely, or maybe not strangely enough, the ‘Dinner with Friends’ experience was not a happy experience. Nobody messed with the words, but it doesn’t look like what I wrote. “The End of the Tour” looks like what I wrote. I can’t tell you what a thrilling experience that is. Adaptation or not, just having an image in your head of the tonality of something and the sound of it and the look of it, to see it achieved so lovingly, it’s thrilling. Everyone should have scripts directed by their former students.

“The End of the Tour” opens on July 31st.