The 17-times grand slam champion teamed up with Australian Open winner Stanislas Wawrinka on Saturday but the Swiss duo were stunned by Aleksandr Nedovyesov and Andrey Golubev, losing 6-4 7-6(5) 4-6 7-6(6) in Geneva.
In Nancy another home side, France, are in trouble against Germany although they kept their last eight clash alive on Saturday when Michael Llodra and Julien Benneteau beat rookie pair Tobias Kamke and Andre Begemann.
An injury-hit Germany side had moved 2-0 ahead on Friday with surprise wins for Peter Gojowczyk over Jo-Wilfried Tsonga and Kamke over Benneteau.
Holders Czech Republic guaranteed a semi-final against either France or Germany as they moved 3-0 ahead against a Japan side missing their top player Kei Nishikori.
Radek Stepanek and Lukas Rosol dispatched Tatsuma Ito and Yasutaka Uchiyama in straight sets in Tokyo to extend the Czechs' winning streak in the competition to 11 ties.
Federer's decision to play in this year's competition has made the Swiss top tips for the title but things have gone badly wrong against the Kazakhs and Switzerland have no margin for error in Sunday's reverse singles.
"I'm not overly worried about what happened the last couple of days," Federer, who is down to play the final rubber of the tie on Sunday against Golubev, said on the Davis Cup website.
"We knew Kazakhstan have been playing well in Davis Cup the last few years now. So it's for us now to shine and prove ourselves. We have no more margin for error."
World number four Federer, who won his singles rubber on Friday against Kukushkin, will hope that Wawrinka finds some form against the 56th-ranked Kazakh or the tie will be over.
"The atmosphere was great today," Wawrinka said. "It's been two difficult days but I'm gonna be ready."
France will go into Sunday's singles against Germany hoping to emulate the feat of the 1996 side that came back from 0-2 to win 3-2 against Italy - Cedric Pioline clinching the semi-final win in Nantes.
- Sports & Recreation
- Andrey Golubev
- Aleksandr Nedovyesov
- Tobias Kamke
- Michael Llodra