Trains between the two cities were cancelled because of the technical problem, Swiss Federal Railways (SBB) said.
But passengers were caught on one train that was stuck between stations without electricity or air conditioning as a heat wave in Western Switzerland moved into its third day with temperatures topping 35 degrees.
“It’s been more than 30 minutes since we were blocked between Rolle and Allaman,” one passenger told 20 Minutes newspaper.
“There’s no electricity and it’s starting to get really hot.”
Conductors passed around bottles of water to passengers, he said.
SBB used shuttle buses to replace regular train service as engineers made repairs to the overhead line.
A similar situation occurred on the route between Olten and Zurich, where an overhead wire fell onto the tracks, impacting region train service.
Trains on major routes were rerouted via Brugg in the canton of Aargau.
SBB used buses to replace regional trains during the morning rush hour.
The disruptions occurred as Swiss residents prepare for several more days of sweltering conditions, with temperatures set to rise to 37C in Basel on Friday afternoon and 36C in Geneva.
MeteoSwiss, the national weather office, predicted that the country’s major cities will see temperatures in the mdi-30s until at least Tuesday, with a high of 39 expected in Basel on Sunday when thunderstorms are expected in some regions.
The hot weather, coinciding with the start of school holidays in many cantons, has brought throngs to lakeside beaches and rivers.
A 19-year-old boy died while cooling off in the Aar River in the canton of Solothurn on Thursday afternoon, police said.
The bather got into difficulties in a section of the river in Schönenwerd, cantonal police said.
He was rescued by a helicopter crew and transported in critical condition to hospital, where he died on Friday, police said.
An investigation has been launched into the cause of the accident.