When you take the right path and come across the two valves, you must only turn the one on the left to on position. Leave the switch on the right to the off position.
This too had me puzzled and it should have been designed so that you have to flick both on as every other switch has to be turned on.

One other thing, when you enter the last room and flick on a switch after destroying big boss, it will tell you that the quest has been completed when this is a load of crap. You still have to flick on all the switches to truly complete the quest.
This had me stumped for hours thinking that I missed something. Luckily this is the only infuriating part of the game but it would have been nice to see a new version of the game fixing the false quest completion notice and only giving it to you after flicking on all the switches. I was almost ready to call it quits....