I have a fresh install of Ubuntu 12.04 and it seems to be fine except after 5 minutes a dialog box warning of shutdown in 60 seconds appears. If I don't dismiss this, the computer does indeed shut down. If I do dismiss it it reappears after 5 minutes.
There is nothing in the power manager settings or screensaver settings to account for this. Where else can I look to find what is triggering this?
Problem solved, it was a hardware issue. The power button is faulty and was sending shutdown signals. I worked it out when I finally walked away from the computer and it started turning itself on as well. I'm using 2 loose ends of wire as my power switch in the meantime until I can source a new power switch for my case.