In my case, Apple sent three replacements, all had the exact same issue.
I ended up diagnosing the problem (at least the one which was affecting my situation, as it seems that there might be several causes for this issue) to a USB hub which somehow managed to change the power saving and/or sleep settings...
once I plugged in a different USB hub, the issue went away, and I canceled the fourth replacement :-)
this is from a post I posted about five months ago:
I used the system pref -> energy saver and clicked restore defaults which restored the hibernatemode to 0.
HOWVER, upon plugging in a powered USB hub, the hibernate mode was automagically reset to 5.
once at hibernate mode 5, putting the machine to sleep manually exhibited the same symptoms, i.e. not wake from sleep and disabled power button.
this was done with an apple care tech on the phone, and he recommended replacing the iMac once again, and sending me a fourth replacement!
overnight I played some more with this
I reset the hibernate mode but this time to 3 and I tried a different USB hub.
hibernate mode stayed at 3 after plugging in the USB hub.
I then created a small shell script to monitor and display the hibernate mode:
function showhibernate() {
while true
do echo -n `date` " ";pmset -g|grep hibernatemode;sleep 10
done
}
and executed it overnight
this evening after I came home from work, I noticed that the hibernate mode somehow was switched from 3 to 7!?
unfortunately, I did not have the echo `date` on the first version, so I do not know when it was switched from 3 to 7.
however, the machine did wake up from sleep... (so it seems that 7 is not as bad as 5?)
I am guessing that some powered USB hubs cause unexpected changes to the hibernatemode, which in turn cause the SMC to crash, disabling the power button.
-avi