如何诊断登录速度慢?


10

登录(键入密码)后,我的MacBook Air在出现桌​​面之前将显示白屏约10秒钟。

我如何找出正在发生的事情并加以解决?

到目前为止,我已经尝试过:

  • 删除〜/ Library / Caches和/ Library / Caches文件夹
  • 检查没有登录项
  • 登录时没有“重新打开窗口”
  • 禁用网络(以防它正在等待超时)
  • 修复了磁盘权限
  • 验证了钥匙串
  • 查看了Console的输出(有很大的差距,显然什么也没发生)

但这些都没有任何区别。

我还创建了一个新的用户帐户,我可以在大约2秒钟内登录到该帐户-因此我认为问题出在我的帐户上。

系统是Lion(具有最新更新)。我已经安装了Vbox,KeyRemap4MacBook和Xcode。

编辑:按照建议,这是该帐户的控制台输出,大约需要15秒才能登录:

2011-09-22 11:54:33.748 PM SecurityAgent: User info context values set for chris
2011-09-22 11:54:33.748 PM SecurityAgent: User info context values set for chris
2011-09-22 11:54:33.830 PM SecurityAgent: Login Window login proceeding
2011-09-22 11:54:33.830 PM SecurityAgent: Login Window login proceeding
2011-09-22 11:54:34.074 PM loginwindow: Login Window - Returned from Security Agent
2011-09-22 11:54:34.113 PM airportd: _doAutoJoin: Already associated to “wifi1”. Bailing on auto-join.
2011-09-22 11:54:34.158 PM loginwindow: USER_PROCESS: 2849 console
2011-09-22 11:54:34.203 PM com.apple.launchd.peruser.503: (com.apple.quicklook.32bit) Unknown key for boolean: DisallowDataExecute
2011-09-22 11:54:34.203 PM com.apple.launchd.peruser.503: (com.apple.ReportCrash) Falling back to default Mach exception handler. Could not find: com.apple.ReportCrash.Self
2011-09-22 11:54:34.821 PM UserEventAgent: CaptiveNetworkSupport:CNSServerRegisterUserAgent:187 new user agent port: 32703
2011-09-22 11:54:35.501 PM KeyRemap4MacBook: observer_IONotification
2011-09-22 11:54:36.907 PM KeyRemap4MacBook: skip checkForUpdates
2011-09-22 11:54:37.000 PM kernel: KeyRemap4MacBook --Info-- RemapClass::allocation_count_ 167849/2097152 (capacity 8%)
2011-09-22 11:54:37.564 PM com.apple.dock.extra: Could not connect the action buttonPressed: to target of class NSApplication
2011-09-22 11:54:37.565 PM com.apple.dock.extra: 2011-09-22 23:54:37.563 com.apple.dock.extra[2902:1707] Could not connect the action buttonPressed: to target of class NSApplication
2011-09-22 11:54:37.565 PM com.apple.dock.extra: Could not connect the action buttonPressed: to target of class NSApplication
2011-09-22 11:54:37.565 PM com.apple.dock.extra: 2011-09-22 23:54:37.564 com.apple.dock.extra[2902:1707] Could not connect the action buttonPressed: to target of class NSApplication
2011-09-22 11:54:37.566 PM com.apple.dock.extra: Could not connect the action buttonPressed: to target of class NSApplication
2011-09-22 11:54:37.566 PM com.apple.dock.extra: 2011-09-22 23:54:37.565 com.apple.dock.extra[2902:1707] Could not connect the action buttonPressed: to target of class NSApplication
2011-09-22 11:54:37.566 PM com.apple.dock.extra: Could not connect the action buttonPressed: to target of class NSApplication
2011-09-22 11:54:37.566 PM com.apple.dock.extra: 2011-09-22 23:54:37.565 com.apple.dock.extra[2902:1707] Could not connect the action buttonPressed: to target of class NSApplication
2011-09-22 11:54:45.344 PM com.apple.loginwindow: chris-pc

谁能发现问题?

这是一个新帐户的输出,只需1-2秒即可登录:

9/22/11 11:33:39.404 PM loginwindow: Login Window - Returned from Security Agent
9/22/11 11:33:39.452 PM airportd: _doAutoJoin: Already associated to “wifi1”. Bailing on auto-join.
9/22/11 11:33:39.501 PM loginwindow: USER_PROCESS: 2278 console
9/22/11 11:33:39.597 PM com.apple.launchd.peruser.501: (com.apple.quicklook.32bit) Unknown key for boolean: DisallowDataExecute
9/22/11 11:33:39.597 PM com.apple.launchd.peruser.501: (com.apple.ReportCrash) Falling back to default Mach exception handler. Could not find: com.apple.ReportCrash.Self
9/22/11 11:33:40.096 PM UserEventAgent: CaptiveNetworkSupport:CNSServerRegisterUserAgent:187 new user agent port: 27435
9/22/11 11:33:40.472 PM KeyRemap4MacBook: observer_IONotification
9/22/11 11:33:40.772 PM com.apple.dock.extra: Could not connect the action buttonPressed: to target of class NSApplication
9/22/11 11:33:40.772 PM com.apple.dock.extra: 2011-09-22 23:33:40.770 com.apple.dock.extra[2332:1707] Could not connect the action buttonPressed: to target of class NSApplication
9/22/11 11:33:40.773 PM com.apple.dock.extra: Could not connect the action buttonPressed: to target of class NSApplication
9/22/11 11:33:40.774 PM com.apple.dock.extra: 2011-09-22 23:33:40.772 com.apple.dock.extra[2332:1707] Could not connect the action buttonPressed: to target of class NSApplication
9/22/11 11:33:40.774 PM com.apple.dock.extra: Could not connect the action buttonPressed: to target of class NSApplication
9/22/11 11:33:40.775 PM com.apple.dock.extra: 2011-09-22 23:33:40.773 com.apple.dock.extra[2332:1707] Could not connect the action buttonPressed: to target of class NSApplication
9/22/11 11:33:40.775 PM com.apple.dock.extra: Could not connect the action buttonPressed: to target of class NSApplication
9/22/11 11:33:40.776 PM com.apple.dock.extra: 2011-09-22 23:33:40.774 com.apple.dock.extra[2332:1707] Could not connect the action buttonPressed: to target of class NSApplication
9/22/11 11:33:42.094 PM KeyRemap4MacBook: checkForUpdates http://pqrs.org/macosx/keyremap4macbook/files/appcast.xml
9/22/11 11:33:42.000 PM kernel: KeyRemap4MacBook --Info-- RemapClass::allocation_count_ 166656/2097152 (capacity 7%)

不久前,我遇到了有关Vbox放慢速度的问题。如果您具有自动启动功能,则可以对其进行解释。另外,尝试在“系统偏好设置”>“帐户”>“登录项目”中查找,看看是否还有不必要的项目。
欧莱雅L'升

谢谢,但是不幸的是,不是-我没有登录项目,vbox无法自动启动。
laktak 2011年

为了诊断它,可能有人必须查看您的控制台日志。
l'l'l

我添加了输出。还有其他日志可能有帮助吗?
laktak 2011年

尝试禁用KeyRemap4MacBook,然后重新安装或尝试对其进行更新,看看是否有任何区别。这是我可能看到的唯一一件事,它可能会减慢速度。最终,两个帐户之间大约相差9到10秒。
l'l'l

Answers:


4

显然您遇到了USER文件权限问题。你需要做的是在其上您的用户文件夹中运行修复权限有什么不能用磁盘工具的“修复权限”选项做。使用磁盘工具只能修复系统文件。

要修复用户文件权限,您需要引导至Lion的内置修复实用程序。

  1. 关闭计算机电源
  2. 打开计算机电源,然后按住Command + R直到看到Apple徽标。加载时间可能比平时稍长。
  3. 修复实用程序加载后,单击菜单栏上的实用程序,然后选择终端。
  4. 在终端中,键入resetpassword并单击Return。这将打开一个密码重置实用程序
  5. 在此窗口中,选择硬盘驱动器(Macintosh HD),然后从硬盘驱动器图标下方的下拉菜单中选择用户帐户
  6. 选择用户名后,单击窗口右下角的重置按钮。此过程可能需要几分钟才能完成。这将修复用户文件夹中所有文件和文件夹的所有文件和文件夹权限。
  7. 完成后,退出“重置密码”应用程序,然后退出“终端”应用程序,最后退出“实用程序”应用程序,它将重新启动计算机。

来源:Mac OS X Lion中的修复用户权限

如果您的磁盘已加密,则必须先将其解锁:

  • diskutil coreStorage list 会给你UUID。
  • diskutil coreStorage unlockVolume YOUR_UUID 将解锁磁盘(密码是您的用户帐户的密码)

非常感谢,这解决了!我只需要先解锁磁盘(我已将步骤添加到您的答案中)。
laktak

很高兴听到它的帮助,并感谢您添加加密脚注。
Nicholas Arvelo 2012年

1
@NickArvelo为什么很明显此用户遇到USER文件权限问题?他的日志中是否有特定行触发此操作?
Pro Backup

@ProBackup确认这是一个USER文件问题而不是SYSTEM文件问题的原因是,创建新用户后,登录问题不再存在。对OSX的任何问题进行故障排除时,第一步应始终是确定它是基于用户还是基于系统的问题。创建新用户并尝试在该新用户下复制问题始终是最好的方法。
Nicholas Arvelo 2012年

0

一些解决此问题的后续步骤:

  1. 新帐户是否需要花费相同的10秒来加载。由于系统必须填充许多首选项并在第一次登录时缓存文件,因此请确保不要首次登录。通过注销并重新登录到测试帐户,您可以查看当前Mac在瘦用户上的速度。当文件未缓存在RAM中时,请关闭自动登录并重新启动Mac以重新测试登录到测试帐户。
  2. 将您的主文件夹移到另一台Mac上,然后确认是否可以正常工作,然后删除并迁移回去。这通常可以解决问题帐户,使我无法对其进行核对,然后让用户再次进行设置。
  3. 确保正确更新Time Machine(或其他)备份后,擦除Mac。

新帐户立即登录-重新登录我的主帐户仍然会有延迟。感谢2和3,但我宁愿找出问题的原因,也不愿做冗长的解决方法,可能无济于事(我目前的解决方法是从不注销或重新启动)。
laktak 2012年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.