Sleeping problem with OS X Lion?: Apple Support Communities

Sleeping problem with OS X Lion?: Apple Support Communities. Good solution to this problem, but a better solution is what hoongern suggested.
As has been noted by a few people here and there, running “pmset -g assertions” from the
terminal will let you know what is preventing your OS from sleeping
It ranges from file sharing to printer sharing to remote SSH users, etc.
Also, the conditions which prevent a computer from sleeping can vary depending on whether the computer is on AC, or running on battery, which is why some people have solved their issue by unplugging their computer first.
I also made a small app to help with diagnosing the problem, if anyone is interested. Source code is provided. If you don’t trust it, just use “pmset -g assertions”.
Hope Apple fixes it soon.
