This may help those desperately searching for an answer.
Set-Up: Sorry folks, as sleek & beautiful as the apple keyboard and mouse are, they have never been for me. At present I run a Kinesis Advantage USB keyboard with a wide ergonomic split and a cordless logitech trackball. Two USB slots down. I run a second monitor out of the thunderbolt port using a mini display in, a Lacie Stark 1TB for Time Machine, a 500GB lacie mini hard drive for work bibs & bobs and a 2 TB Western Digital for my Itunes, Torrent & Picture libraries which are extensive. I also need to have my FitBit dongle plugged in to a USB port somewhere as well as a 30 pin connector for my Ipad 2 and a lightning for Ipad air & iphone 5. My powered USB2 7-port hub is my godsend.
My late 2013 27" Imac ( arrived Xmas Eve) kept hanging on the grey screen of death (anyone remember the PC blue screen of death from the 80s and 90s?) and I tried everything and finally worked out that my keyboard seemed to be the problem so had to unplug it from my USB hub until the login screen and then plug it in again. A clumsy work-around but better than giving up my beloved ergonomic typing experience!
And then after the 10.9.1 update I could not wake Imac from sleep using keyboard or trackball. And the power button was unresponsive. The only way to fire it up was taking the AC plug out of the back. Not even unplugging at wall worked!
Days of swearing and scouring the internet for a solution and close to taking it back to Apple!! Tried all sorts of settings changes, been all up in Terminal and Console looking for error messages or something out of place ...
Long story short ... I was on my 34th combination of plugging and unplugging peripherals and putting Imac to sleep when, on a whim and too desperate for words, I cut the AC power to the USB hub and tried the sleep cycle again.
Yep ... it worked! And it's been working for two days now. I can now wake the machine from sleep using keyboard. The powered hub was the culprit. As soon as the hub was relying solely on the Imac for juice, everything was okay and the conflict removed. AND I don't have to unplug my keyboard for restart anymore!
Worth a try for all of you having a similar problem, can't hurt to try!