MacBook Pro randomly restarting

I'm new to daily Mac use, but I think I have my settings correct. My laptop is kept plugged in at work - never runs on battery. In my Energy Saver system prefs, I have Computer Sleep and Display Sleep set to Never on both Power Adapter and Battery, all options (hard disk sleep, wake for network access, reduce brightness, start up after power failure) are unchecked. There is nothing set up in the Schedule area to turn on or off at specific times.

At least twice a week, though, when I go to lunch (which is never at the same time) if I'm gone for more than an hour or so, when I come back the computer has restarted itself. Not gone to sleep, or shut down, but completely restarted.

Is there a system log somewhere I could look at that would show me what was happening at the times the computer restarted? Or is there some other setting I'm missing that's making this happen? Although I try to remember to save all my work before I leave just in case, every so often I forget, and I'm getting sick of losing work (or even just losing system state and having to restart all my programs, reopen all my files, etc.)

UPDATE

I don't know if anyone is still following this; I'll post as a new question if I don't hear back in a few days. It's been restarting fairly regularly the past few weeks; I just haven't had time to check the console and figure things out. Today I know to within a 20-minute period when the restart happened, so I'm posting the console messages from that period.

6/3/11 1:11:33 PM   Xmarks for Safari[217]  *** __NSAutoreleaseNoPool(): Object 0x33864e0 of class OC_PythonString autoreleased with no pool in place - just leaking
6/3/11 1:11:33 PM   Xmarks for Safari[217]  *** __NSAutoreleaseNoPool(): Object 0x2740d20 of class __NSCFDate autoreleased with no pool in place - just leaking
6/3/11 1:11:33 PM   Xmarks for Safari[217]  *** __NSAutoreleaseNoPool(): Object 0x27f3180 of class NSCFString autoreleased with no pool in place - just leaking
6/3/11 1:11:33 PM   Xmarks for Safari[217]  *** __NSAutoreleaseNoPool(): Object 0x27fabd0 of class NSCFString autoreleased with no pool in place - just leaking
6/3/11 1:11:33 PM   Xmarks for Safari[217]  *** __NSAutoreleaseNoPool(): Object 0x27f35e0 of class NSCFData autoreleased with no pool in place - just leaking
6/3/11 1:26:33 PM   Xmarks for Safari[217]  *** __NSAutoreleaseNoPool(): Object 0x33864e0 of class OC_PythonString autoreleased with no pool in place - just leaking
6/3/11 1:26:33 PM   Xmarks for Safari[217]  *** __NSAutoreleaseNoPool(): Object 0x3fd1b00 of class __NSCFDate autoreleased with no pool in place - just leaking
6/3/11 1:26:33 PM   Xmarks for Safari[217]  *** __NSAutoreleaseNoPool(): Object 0x27f7d40 of class NSCFString autoreleased with no pool in place - just leaking
6/3/11 1:26:33 PM   Xmarks for Safari[217]  *** __NSAutoreleaseNoPool(): Object 0x27f86f0 of class NSCFString autoreleased with no pool in place - just leaking
6/3/11 1:26:33 PM   Xmarks for Safari[217]  *** __NSAutoreleaseNoPool(): Object 0x27e2d00 of class NSCFData autoreleased with no pool in place - just leaking
6/3/11 1:41:30 PM   [0x0-0x36036].com.google.Chrome[370]    Handling SIGTERM in renderer.
6/3/11 1:41:30 PM   [0x0-0x36036].com.google.Chrome[370]    Wrote signal to shutdown pipe.
6/3/11 1:41:30 PM   [0x0-0x36036].com.google.Chrome[370]    Handling SIGTERM in renderer.
6/3/11 1:41:31 PM   [0x0-0x36036].com.google.Chrome[370]    Handling SIGTERM in renderer.
6/3/11 1:41:31 PM   [0x0-0x36036].com.google.Chrome[370]    Wrote signal to shutdown pipe.
6/3/11 1:41:31 PM   [0x0-0x36036].com.google.Chrome[370]    Handling SIGTERM in renderer.
6/3/11 1:41:31 PM   [0x0-0x36036].com.google.Chrome[370]    Wrote signal to shutdown pipe.
6/3/11 1:41:31 PM   [0x0-0x36036].com.google.Chrome[370]    Handling SIGTERM in renderer.
6/3/11 1:41:31 PM   [0x0-0x36036].com.google.Chrome[370]    Handling SIGTERM in renderer.
6/3/11 1:41:33 PM   com.apple.launchd.peruser.501[180]  ([0x0-0xd00d].com.apple.Stickies[211]) Exited: Killed
6/3/11 1:41:33 PM   com.apple.launchd.peruser.501[180]  ([0x0-0x98098].com.panic.TransmitMenu[1654]) Exited: Killed
6/3/11 1:41:34 PM   com.apple.launchd.peruser.501[180]  (com.apple.AirPortBaseStationAgent[198]) Exited: Killed
6/3/11 1:41:34 PM   loginwindow[38] DEAD_PROCESS: 38 console
6/3/11 1:41:34 PM   com.apple.launchd.peruser.501[180]  ([0x0-0xde0de].com.apple.ScreenSaver.Engine[3503]) Exited: Terminated
6/3/11 1:41:34 PM   KernelEventAgent[39]    tid 00000000 received event(s) VQ_DEAD (32)
6/3/11 1:41:34 PM   loginwindow[38] kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
6/3/11 1:41:34 PM   com.apple.loginwindow[38]   Fri Jun  3 13:41:34 Web-Devs-MacBook-Pro.local loginwindow[38] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
6/3/11 1:41:34 PM   loginwindow[38] PScurrentwindowbounds: CGSGetWindowBounds returned error (1002)
6/3/11 1:41:34 PM   loginwindow[38] _NXSetCursorRect: error getting window bounds (1002)
6/3/11 1:41:34 PM   com.apple.loginwindow[38]   2011-06-03 13:41:34.577 loginwindow[38:107] PScurrentwindowbounds: CGSGetWindowBounds returned error (1002)
6/3/11 1:41:34 PM   loginwindow[38] _NXSetCursorRect: error getting window bounds (1002)
6/3/11 1:41:34 PM   loginwindow[38] _NXSetCursorRect: error getting window bounds (1002)
6/3/11 1:41:34 PM   loginwindow[38] PScurrentwindowbounds: CGSGetWindowBounds returned error (1002)
6/3/11 1:41:34 PM   loginwindow[38] PScurrentwindowbounds: CGSGetWindowBounds returned error (1002)
6/3/11 1:41:34 PM   com.apple.loginwindow[38]   2011-06-03 13:41:34.578 loginwindow[38:107] _NXSetCursorRect: error getting window bounds (1002)
6/3/11 1:41:34 PM   com.apple.loginwindow[38]   2011-06-03 13:41:34.578 loginwindow[38:107] _NXSetCursorRect: error getting window bounds (1002)
6/3/11 1:41:34 PM   com.apple.loginwindow[38]   2011-06-03 13:41:34.578 loginwindow[38:107] _NXSetCursorRect: error getting window bounds (1002)
6/3/11 1:41:34 PM   com.apple.loginwindow[38]   2011-06-03 13:41:34.578 loginwindow[38:107] PScurrentwindowbounds: CGSGetWindowBounds returned error (1002)
6/3/11 1:41:34 PM   com.apple.loginwindow[38]   2011-06-03 13:41:34.578 loginwindow[38:107] PScurrentwindowbounds: CGSGetWindowBounds returned error (1002)
6/3/11 1:41:34 PM   com.apple.launchd.peruser.501[180]  Background: Bug: launchd_core_logic.c:2489 (24498):0
6/3/11 1:41:34 PM   com.apple.launchd.peruser.501[180]  Background: job_mig_intran() was confused by PID 0 UID 0 EUID 0 Mach Port 0x7703: kernel_task
6/3/11 1:41:34 PM   com.apple.launchd.peruser.501[180]  Bug: launchd_runtime.c:935 (24003):0: j != NULL
6/3/11 1:41:34 PM   KernelEventAgent[39]    tid 00000000 received event(s) VQ_DEAD (32)
6/3/11 1:41:34 PM   com.apple.SecurityServer[24]    Session 0x340f25 dead
6/3/11 1:41:34 PM   com.apple.SecurityServer[24]    Killing auth hosts
6/3/11 1:41:34 PM   com.apple.SecurityServer[24]    Session 0x340f25 destroyed
6/3/11 1:41:34 PM   /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow[3883]   Login Window Application Started
6/3/11 1:41:35 PM   kernel  AFP_VFS afpfs_unmount: /Volumes/estherstrom_bak, flags 0, pid 3878
6/3/11 1:41:36 PM   com.apple.SecurityServer[24]    Session 0x316606 created
6/3/11 1:41:36 PM   com.apple.SecurityServer[24]    Session 0x316606 attributes 0x30
6/3/11 1:41:37 PM   loginwindow[3883]   Login Window Started Security Agent
6/3/11 1:41:38 PM   WindowServer[3885]  kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
6/3/11 1:41:38 PM   com.apple.WindowServer[3885]    Fri Jun  3 13:41:38 Web-Devs-MacBook-Pro.local WindowServer[3885] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
6/3/11 1:41:38 PM   SecurityAgent[3891] Showing Login Window
6/3/11 1:42:04 PM   com.apple.usbmuxd[31]   stopping.
6/3/11 1:42:04 PM   com.apple.usbmuxd[3904] usbmuxd-211 built on Jan 13 2011 at 04:20:21 on Jan 13 2011 at 04:20:21, running 64 bit
6/3/11 1:52:13 PM   SecurityAgent[3891] User info context values set for webdev

I got an answer from someone at the Apple forums... it was the Log Out After... setting in the System Prefs -> Security -> General.


You can try to find a clue in the system log.

sudo less /var/log/system.log

There is an EFI Firmware update that supposedly resolves this issue on some Macbook models. Click the Apple logo on the top left of your screen and scroll down to Software Update. If there is a firmware update for your Macbook, it will appear here. Download the update and follow the instructions - this should resolve the problem.