Patrick Crusius was a loner by all accounts.

He was also a self-described slacker and a former bagger. His LinkedIn page says, “I’m not really motivated to do more than what’s necessary to get by.”

Now investigators are trying to unravel what would lead this 21-year-old Collin County man to drive hundreds of miles, walk into a Walmart with a gun and allegedly kill 20 people and wound dozens of others.

RELATED: Prosecutors seek death penalty for El Paso shooting suspect

Crusius faces capital murder charges and prosecutors are seeking the death penalty in connections with Saturday’s massacre.

FBI officials in El Paso confirmed that three locations connected to Crusius had been searched Sunday. One of those is the Allen home of his grandparents, where he had been living until six weeks ago.

FBI officials also went to a local Walmart and pulled security footage. It appears Crusius had been there recently.

RELATED: El Paso shooting suspect booked on capital murder charges

El Paso police officials have said the gun used in the attack was purchased legally, although they did not reveal where or when it was purchased.

On Sunday, Crusius' grandparents issued a statement saying that they were “devastated” and that they were praying “for the victims of this tragedy.”

“He lived with us in our house in Allen, Texas while he attended junior college,” the statement said.

They said he had moved out six weeks ago. His grandparents also asked for privacy and said they would only be speaking with law enforcement.

In the hour before the attack, a four-page manifesto allegedly written by Crusius appeared online. Titled “The Inconvenient Truth,” it offers some clues into a dark mind.

"This attack is a response to the Hispanic invasion of Texas," the author writes. "They are the instigators, not me. I am simply defending my country from cultural and ethnic replacement brought on by an invasion."

In the document, the writer expresses concern that an influx of Hispanics into the United States will replace aging white voters, potentially turning Texas blue in upcoming elections and swinging the White House to the Democrats.

The document criticizes Republicans for what was described as close ties to corporations and degradation of the environment.

The writer rails against “automation” and says the job of the writer’s dreams “will likely be automated.” The author writes that he expects to be killed, vows not to surrender and justifies choosing a low-security target.

"Remember: it is not cowardly to pick low hanging fruit,” the manifesto says.

Megan Squire, who tracks far-right online extremism and is a professor of computer science at Elon University, told WFAA that the writer “was trying to convey to his peers that he had thought this through.”

She also said that in writing manifestos like these, white supremacist terrorists are “inspiring each other.”

"They're creating this narrative where they're actually sort of, like, valorizing one another,” she said.

Though a Twitter account that appears to belong to Crusius included pro-Trump posts praising the plan to build more border wall, the writer of the online manifesto says his views on race predated Trump's campaign and that any attempt to blame the president for his actions was "fake news."

Before he was accused in Saturday’s massacre, Crusius had no known criminal history. Allen police said he was listed as a runaway in 2014.

Court records reveal that his parents divorced in 2011. His father is a mental health therapist and previously worked at a local psychiatric hospital.

In his junior year high school photo, Crusius wears on a smirk on his face. By the next year, his senior year, the smirk is gone and replaced with a scowl.

A picture from his yearbook shows him in a criminal justice class. It quotes him saying, “It’s interesting to learn about how the world of law enforcement works.”

Crusius graduated from Plano Senior High School in 2017. He then attended Collin College from the fall of 2017 to the spring of 2019, according to college officials.

On his LinkedIn page, he writes that “working in general sucks but I guess a career in Software Development suits me well.”

Daniel Heo knew Crusius in elementary and high school. They often played in recess in elementary school.

When he encountered him years later at a Frisco high school, Crusius had changed. He’d become a loner and anti-social, Heo said.

“He was always walking alone,” Heo said. “It didn't seem like he had too many friends.”

Crusius later transferred to high school in Plano and they lost touch.

The next time Heo heard his name was when Crusius was arrested and accused of mass murder.