Authorities said Thursday the suspect also was a known drug addict, unemployed and a ward of the court, the BBC reported.
The man opened fire in the village east of Geneva Wednesday, killing three women and wounding two men before police shot and wounded him. Police said the 33-year-old man threatened to turn a gun on them.
General prosecutor Catherine Sappey said during a news conference Thursday a motive remained unclear, adding that the suspect was thought to be related to some of his victims.
Police couldn't intervene easily, police spokesman Jean-Marie Bornet said, because "the gunman turned his weapon on the officers, who had to shoot him in order not to be injured themselves."
Sappey said the suspect fired at least 20 shots at his victims.
In 2005, police confiscated weapons from the suspect when he was placed under psychiatric care, Sappey said.
At the time, "he was not known for having issued threats," she said.