1. Start up in Single-User Mode. For instructions, Mac OS X: How to start up in single-user or verbose mode
2. At the prompt, type: mount -uw /
3. Press Return.
4. Type: rm /Library/Preferences/com.apple.windowserver.plist
5. Press Return.
6. Type: cd /Users/username/Library/Preferences/ByHost
(Replace the text username above with your username, which is also the name of your Home folder.)
7. Press Return.
8. Type: ls
(This command lists all the visible files and folders in the ByHost folder.)
9. Locate the file named "com.apple.windowserver.xxxx.plist" (where "xxxx" is a series of letters and numbers).
10. Type: rm com.apple.windowserver.xxxx.plist
(Be sure to replace the xxxx characters with the exact letters and numbers that appear in your file.)
11. Press Return.
12. Type: reboot
13. Press Return.
14. While the computer starts up, you should reset PRAM to fully clear any stored preferences.