Got this from Apple about a bug report I filed for this problem. You should reply to this bug if you are having this issue also with the logs they ask for.
Mike
This is a courtesy email regarding Bug ID# 9844717.
Engineering has requested the following information in order to further investigate this issue:
Please provide a windowserver.log, system.log and if possible a sample of the "stuck" process (will have to be taken from an ssh session)
You can find the system log here:
/private/var/log/
To copy the log files to a folder on the desktop:
1. Launch the Terminal application (/Applications/Utilities/Terminal.app)
2. Type: mkdir /Users/<yourusername>/Desktop/Logs; cp /var/log/system.log* /Users/<yourusername>/Desktop/Logs
Note: replace <yourusername> above in the Terminal command line statement with your actual user name that you logged in with
3. Please compress the Logs folder into an archive by Control clicking on the Logs folder icon on the desktop and choosing Compress "Logs"
Attach the compressed archive of the Logs folder that appears on your desktop to the bug report.
Bug reports requiring your attention will appear under ‘My Originated Problems’. Please review this bug report and provide the requested information via the Apple Bug Reporter. Once your report has been updated, Engineering will be alerted of the new information.
<http://bugreport.apple.com>
Thank you for your assistance in helping us discover and isolate bugs within our products.
Best Regards,
Developer Bug Reporting Team
Apple Worldwide Developer Relations
**************************************************************************
THE INFORMATION CONTAINED IN THIS MESSAGE IS UNDER NON-DISCLOSURE
**************************************************************************
-------------------------------------------------------
Bug ID #: 9844717
Bug Title: OSX 10.7 lock at login screen and sometime during sleep
-------------------------------------------------------
<GMT26-Jul-2011 22:17:36GMT>
'MacBook Pro.txt' was successfully uploaded
<GMT26-Jul-2011 22:17:36GMT>
Summary:
A clean install of OSX has problem of lock up at login and at sleep.
Steps to Reproduce:
Login OSX 10.7 or let machine to sleep. 1 out of 3 time machine will either have a spinning ball of death or completely lock up.
Notes:
Turning off automatic graphic switching helps.