如何调试 Gnome 3 的慢会话启动?

use*_*521 7 gnome 12.04

从11.10升级到12.04后,Gnome 3的登录过程极慢(升级前的几秒级(硬盘是SSD!)需要60秒级)。

在 VT 中运行“top”显示 gnome-shell 产生大约 90% 的 CPU 负载,而 dbus-daemon 大约占用 10%。gnome-shell 的 CPU 负载下降到正常水平(大约 2-3%)的时刻对应于登录过程终止并显示桌面的时间。

停用我安装的四个 gnome-shell 扩展(替代状态菜单、退出按钮、删除辅助功能、系统监视器)对会话启动时间没有任何影响。

登录 Gnome classic 不显示会话启动缓慢。

系统日志没有显示任何可疑内容。因此,确定潜在问题的最佳方法是什么?

小智 2

我遇到了类似的问题,并将其固定在联系人系统上——我通过strace -p在 gnome-shell 进程上运行并查找系统调用的内容来做到这一点。

在我的博客文章中给出了最终的解决方案。希望有帮助!

--- /usr/share/gnome-shell/js/ui/overview-dist.js   2012-07-20 13:12:23.564769756 -0700
+++ /usr/share/gnome-shell/js/ui/overview.js    2012-07-20 16:40:14.076527986 -0700
@@ -210,7 +210,7 @@
         this.addSearchProvider(new AppDisplay.AppSearchProvider());
         this.addSearchProvider(new AppDisplay.SettingsSearchProvider());
         this.addSearchProvider(new PlaceDisplay.PlaceSearchProvider());
-        this.addSearchProvider(new ContactDisplay.ContactSearchProvider());
+        // this.addSearchProvider(new ContactDisplay.ContactSearchProvider());

         // Load remote search providers provided by applications
         RemoteSearch.loadRemoteSearchProviders(Lang.bind(this, this.addSearchProvider));
Run Code Online (Sandbox Code Playgroud)