At some point in the last few months I started having a strange problem. I am currently on ubuntu 11.10 with nvidia GT520 video card. About once every hour or so as I'm working on my computer and I press the enter key (usually while typing something into firefox) my screen goes black and then I get forced logout from X-org. This is very annoying as it means anything I was working on that wasn't saved I just lost.

Any suggestions on what log file I should be looking in for clues to solve this?