If you right click Desktop, go to Properties, then to Screen Saver there will be a Power button on the bottom. Click that then there should be a tab that says APC or APM. If you put a tick next to the option given it will enable Automatic Power Management a.k.a automatic shutdown. Most newer motherboards have this enabled so you will not have this option. I used to have this option in my XP but when I updated the BIOS to my board it went away and was enabled automatically.
I know the problem. I had the samething happen. I do know if you mess with the performance settings in the control panel under system that sometimes it will quit working. And will not start working until you put it back to default. This happens when you select it to give the background services more cpu time. Or if your doing it through the x-setup tweak program, selecting short time quotas will have the same effect. so put it back if you changed it and see what happens.