Since, it powers-up when you remove the AC cord and then reurn it it, that suggest some power logic ckt. action. In other words its on the mtrbd. itself. Basically, when removing AC power you also remove the "warm-up ckt. for logic which is why you can turn it ON, when it fact all you're doing is telling to become ON. In other words this isn't a direct AC ON/OFF switcha s you suspect. Once the logic ckt. is drained it allows itself to be reset to default state, OFF. For whatever reason, the mtrbd. is hosed. While you can swap or replace the PSU or AC adapter brick, usually it would provide a quick status if everything working. Since, it's not, then your have an int. repair. Robert, provided a work-around to hope it does this always to ON/OFF the AIO type PC. Repair and downtime maybe too much for this PC, so consider the fix. Next, you may want to fiddle with power setting and see if anything is related, though I think not, just an area to check. If the CMOS battery is somehow at fault, you would think it would reset bios setting over time, check &bverify is anything has come-up as such, otherwise disgard advise. Below is what HP provide on "start-up problems":
I always check HP/Compaq customer posted problems as they may zero-in on common issues. Also, you can query there to see if they help, it's a free service, but you have to wait for any reply.
I have an HP Pavilion ms213 that's having an odd problem.
The computer is having some sort or Power issue.
If I click Restart the computer will shut off (a click sound is heard) and will not restart.
If I shut down the computer will shut off (a click sound is heard).
With Either situation I cannot power the system back on by use of the power button, the only way to turn it back on is to unplug the power cord and plug it back in. Doing this starts the computer without having to push power.
After the machine is on I can use the power button to shutdown the computer so I don't believe the button to be the problem.
Other than this issue the machine works fine. Will surf the internet no problems.
I'm running Windows 7 64 Bit but don't think my system info is needed here.