OSX Lion freeze after sleep

I've experienced this as well. The error is actually related to the settings of diplay sleep and computer sleep:

In System Preferences > Energy Saver the timers for display sleep and computer sleep must be greater than the time of auto logout after inactivity in System Preferences > Security & Privacy.


Before I saw this answer, I turned off automatic logout and haven't seen the problem since.