have you tried using a UPS and see if it doesn't shuts off? if it still shuts off most probably it has something to do with your CPU, mobo or Video card. It shuts off when it actually does some work and stays on when its on bios. I would first try removing the video card and see if it stays on...