Finding out what caused the computer to wake up from sleep (Ubuntu)

Is there any way to find out which device/event caused Ubuntu (10.10) to wake up from the most recent sleep/hibernation?

I am trying to troubleshoot some sleep issues on a new box, and knowing what's causing it to wake up would help.

I did check /var/log/pm-suspend.log but all it seems to say is

Sat Dec 11 22:18:27 GMT 2010: Awake.

which isn't terribly helpful.


After much head-scratching, my problem turned out to do with USB 3.0. Here are the findings. The box wasn't waking up prematurely, it wasn't going into sleep at all, which makes the original question somewhat irrelevant in my case.

Suspend now seems to work in Ubuntu (not been using it long enough to know if some subtle problems remain).

I've been having exactly the same problem in Windows 7 and, curiously, disabling USB 3.0 didn't help that at all. Suggestions are welcome.