并希望最终进行真正的编辑:升级到Mountain Lion之后,该问题似乎已解决,希望永久存在。
最终编辑:问题不会一直发生,有时我必须等待几天才能发生。因此,很难在不同的条件下(即安全模式或禁用某些软件)进行测试,我认为花数天时间在不同的条件下进行修复是不值得的。Graham Perrin的建议对于查找有关重新启动/重新启动问题的特定信息(在通用日志中找不到)最有帮助。
一些日志条目位于底部的“编辑”中:
2010年中15英寸MacBook Pro,运行OS X 10.7.4。有时,当尝试重新启动或关闭机器时,它将无法工作-屏幕变灰,显示纺车轮,但是机器无法关闭电源,因此几分钟后,我必须通过按电源关闭机器按钮。
这并非每次都发生,并且我无法将会话期间使用的任何软件与该问题相关联。实际上,在测试时,有时在启动计算机后立即尝试关闭计算机时会发生这种情况。
如何检查阻止正常关机/重启的原因?我假设我必须查看一些日志文件,但是我不确定要查找哪些文件和查找什么。
编辑:按照Graham Perrin的建议,在nvram中添加了详细的启动/关闭设置,最终计算机在重启时卡住了。我在屏幕上看到了一些详细的条目,重新启动后在/var/log/launchd-shutdown.log中找到了它们。似乎WindowServer可能与此有关。以下是该日志文件的末尾,其中前三列已删除(第一列具有递增的整数,第二列具有条目“ 1”,第三列-“ com.apple.launchd”):
234 com.apple.WindowServer Dispatching kevent callback.
234 com.apple.WindowServer Job has not died after being killed 2 seconds ago. Simulating exit.
234 com.apple.WindowServer Dispatching kevent callback.
234 com.apple.WindowServer EVFILT_PROC event for job.
1 com.apple.launchd KEVENT[0]: udata = 0x107827a90 data = 0x0 ident = 234 filter = EVFILT_PROC flags= 0x0 fflags = NOTE_EXIT
234 com.apple.WindowServer Reaping
234 com.apple.WindowServer Simulated exit: <rdar://problem/9359725>
234 com.apple.WindowServer Exited 22.016701 seconds after the first signal was sent
0 com.apple.WindowServer Exited while shutdown in progress. Processes remaining: 0/0
0 com.apple.WindowServer Job was last to exit during shutdown of: System.
0 com.apple.WindowServer Total rusage: utime 0.000000 stime 0.000000 maxrss 0 ixrss 0 idrss 0 isrss 0 minflt 0 majflt 0 nswap 0 inblock 0 oublock 0 msgsnd 0 msgrcv 0 nsignals 0 nvcsw 0 nivcsw 0
0 com.apple.WindowServer Closing receive right for com.apple.windowserver.active
0 com.apple.WindowServer Mach service deleted: com.apple.windowserver.active
0 com.apple.WindowServer Closing receive right for com.apple.windowserver
0 com.apple.WindowServer Mach service deleted: com.apple.windowserver
0 com.apple.WindowServer Removed
1 com.apple.launchd System: No submanagers left.
1 com.apple.launchd System: Removing.
1 com.apple.launchd System: Removing job manager.
1 com.apple.launchd System: Userspace shutdown finished at: Wed Aug 1 08:53:12 2012
1 com.apple.launchd System: Userspace shutdown took approximately 22 seconds.
1 com.apple.launchd VM statistics (now - orig): Free: 28472 Active: -21833 Inactive: -1038 Reactivations: 0 PageIns: 25 PageOuts: 0 Faults: 1654 COW-Faults: 335 Purgeable: -849 Purges: 0
1 com.apple.launchd System: Stray process at shutdown: PID 234 PPID 1 PGID 234 WindowServer
1 com.apple.launchd System: About to call: reboot(RB_HALT).
mount
命令。将结果包括在您的问题中可能有助于缩小范围。