[ubuntu] Ubuntu freezes when i close the laptop?

view story

http://ubuntuforums.org – If i'm working on windows 7 and close the laptop, it logs me out, and when i open it, i can log in again, however, if i close the laptop on ubuntu, the screen becomes black and it freezes, why? I have the latest ubuntu version. (Hardware)