My Mac freezes a few times a week. Just the window manager, because I can still ssh in. I know it isn't the lid, because it is an iMac, but it may be going to sleep that kills it.
i posted a real fix below. sadly this fix the one you mentioned doesn't always work for me. also, usually i wouldn't notice that the bug happened until my battery was half drained
- First. stop playing music (in your browser, itunes or whatever).
- Next wait 5 minutes
- Last, close lid (go to sleep) and open again again.
Works for me.
My biggest problem is that my mac freezes once a day.