我最近从 Kali/Windows 10 切换到 Ubuntu 18.04。
眼镜:
- 处理器:英特尔 i5 7200U
- 内存:8GB
- GPU:Nvidia 940mx 和专用的 Intel GPU
- 硬盘:1TB
使用上述规格,我的启动时间为 1 分 15 秒,使用密码登录后又需要 15 秒。对于 HDD 来说,这正常吗?我应该购买 SSD 还是出了什么问题?
4:06:03 PM gnome-logs: gtk_style_context_remove_class: assertion 'GTK_IS_STYLE_CONTEXT (context)' failed
4:04:11 PM systemd: Started GNOME Terminal Server.
4:04:11 PM dbus-daemon: [session uid=1000 pid=1348] Successfully activated service 'org.gnome.Terminal'
4:04:10 PM systemd: Starting GNOME Terminal Server...
4:04:10 PM dbus-daemon: [session uid=1000 pid=1348] Activating via systemd: service name='org.gnome.Terminal' unit='gnome-terminal-server.service' requested by ':1.25' (uid=1000 pid=1492 comm="/usr/bin/gnome-shell " label="unconfined")
4:03:36 PM packagekitd: resolve transaction /186_dcebceda from uid 1000 finished with success after 581ms
4:03:24 PM systemd: Started GNOME Terminal Server.
4:03:24 PM dbus-daemon: [session uid=1000 pid=1348] Successfully activated service 'org.gnome.Terminal'
4:03:24 PM gnome-shell: Object Clutter.Clone (0x55a5642d7bf0), has been already deallocated - impossible to access to it. This might be caused by the fact that the object has been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs
4:03:24 PM systemd: Starting GNOME Terminal Server...
4:03:24 PM dbus-daemon: [session uid=1000 pid=1348] Activating via systemd: service name='org.gnome.Terminal' unit='gnome-terminal-server.service' requested by ':1.25' (uid=1000 pid=1492 comm="/usr/bin/gnome-shell " label="unconfined")
4:03:09 PM systemd: Started Hostname Service.
4:03:09 PM dbus-daemon: [system] Successfully activated service 'org.freedesktop.hostname1'
4:03:08 PM systemd: Starting Hostname Service...
4:03:08 PM dbus-daemon: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.118' (uid=1000 pid=2891 comm="gnome-control-center -s system " label="unconfined")
4:03:01 PM packagekitd: resolve transaction /185_eaebeaba from uid 1000 finished with success after 530ms
4:02:58 PM gdm-x-session: (II) modeset(0): Modeline "1920x1080"x0.0 141.40 1920 1968 2000 2142 1080 1083 1089 1100 +hsync -vsync (66.0 kHz eP)
4:02:51 PM systemd: Started GNOME Terminal Server.
4:02:51 PM dbus-daemon: [session uid=1000 pid=1348] Successfully activated service 'org.gnome.Terminal'
4:02:51 PM systemd: Starting GNOME Terminal Server...
4:02:51 PM dbus-daemon: [session uid=1000 pid=1348] Activating via systemd: service name='org.gnome.Terminal' unit='gnome-terminal-server.service' requested by ':1.25' (uid=1000 pid=1492 comm="/usr/bin/gnome-shell " label="unconfined")
4:02:17 PM gnome-logs: gtk_style_context_add_class: assertion 'GTK_IS_STYLE_CONTEXT (context)' failed
4:01:49 PM wpa_supplicant: wlp2s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-53 noise=9999 txrate=58500
4:01:48 PM gnome-logs: Fontconfig warning: "/etc/fonts/conf.avail/53-monospace-lcd-filter.conf", line 10: Having multiple values in <test> isn't supported and may not work as expected
4:01:47 PM packagekitd: resolve transaction /184_babaddec from uid 1000 finished with success after 416ms
4:01:45 PM snap-confine: main.go:192: cannot change mount namespace of snap "gnome-logs" according to change mount (/snap/gtk-common-themes/818/share/icons/Suru /snap/gnome-logs/45/data-dir/icons/Suru none bind,ro 0 0): cannot use "/snap/gtk-common-themes/818/share/icons/Suru" as bind-mount source: not a directory
4:01:43 PM dbus-daemon: [session uid=1000 pid=1348] Successfully activated service 'org.gnome.Calendar'
4:01:43 PM systemd: Started GNOME Terminal Server.
4:01:43 PM dbus-daemon: [session uid=1000 pid=1348] Successfully activated service 'org.gnome.Terminal'
4:01:43 PM systemd: Starting GNOME Terminal Server...
4:01:43 PM dbus-daemon: [session uid=1000 pid=1348] Activating service name='org.gnome.Nautilus' requested by ':1.25' (uid=1000 pid=1492 comm="/usr/bin/gnome-shell " label="unconfined")
3:57:52 PM systemd: Started Message of the Day.
3:55:31 PM gnome-shell: [AppIndicatorSupport-DEBUG] Registering StatusNotifierItem :1.86/org/ayatana/NotificationItem/software_update_available
3:55:25 PM packagekitd: get-details transaction /183_dedabdab from uid 1000 finished with success after 837ms
3:55:14 PM gnome-software: Unable to acquire bus name 'org.gnome.Software'
3:55:03 PM rsyslogd: main Q:Reg: worker thread 55a97da74de0 terminated, now 1 active worker threads [v8.32.0 try http://www.rsyslog.com/e/2439 ]
3:55:02 PM systemd: Started BAMF Application Matcher Framework.
3:55:02 PM dbus-daemon: [session uid=1000 pid=1348] Successfully activated service 'org.ayatana.bamf'
3:55:01 PM systemd: Starting BAMF Application Matcher Framework...
3:55:00 PM dbus-daemon: [session uid=1000 pid=1348] Activating via systemd: service name='org.ayatana.bamf' unit='bamfdaemon.service' requested by ':1.82' (uid=1000 pid=2035 comm="plank " label="unconfined")
3:54:59 PM systemd: Started GNOME Terminal Server.
3:54:59 PM dbus-daemon: [session uid=1000 pid=1348] Successfully activated service 'org.gnome.Terminal'
3:54:59 PM systemd: Starting GNOME Terminal Server...
3:54:59 PM dbus-daemon: [session uid=1000 pid=1348] Activating via systemd: service name='org.gnome.Terminal' unit='gnome-terminal-server.service' requested by ':1.25' (uid=1000 pid=1492 comm="/usr/bin/gnome-shell " label="unconfined")
3:54:59 PM gnome-shell: Object Clutter.Clone (0x55a5642d71d0), has been already deallocated - impossible to access to it. This might be caused by the fact that the object has been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs
3:54:44 PM packagekitd: resolve transaction /170_eaaeaeaa from uid 1000 finished with success after 700ms
3:54:43 PM gnome-software: Only 0 apps for recent list, hiding
3:54:43 PM packagekitd: get-updates transaction /169_bbbcadad from uid 1000 finished with success after 557ms
3:54:41 PM systemd: Started Firmware update daemon.
3:54:41 PM dbus-daemon: [system] Successfully activated service 'org.freedesktop.fwupd'
3:54:40 PM fwupd: Daemon ready for requests
systemd-analyze 责备 26.084s systemd-journal-flush.服务 21.290s dev-sda2.设备 18.962s plymouth-退出-等待.服务 11.013s NetworkManager-等待-在线.服务 10.526s plymouth-start.service 9.068s systemd-udevd.service 8.571s networkd-dispatcher.service 7.261s dev-loop9.device 7.045s dev-loop8.device 6.686s udisks2.服务 6.508s dev-loop4.device 6.466s dev-loop5.device 6.437s dev-loop6.device 6.409s dev-loop7.device 6.246s grub-common.service 6.145s dev-loop0.device 6.040s dev-loop3.device 5.616s dev-loop1.device 5.609s dev-loop2.device 5.597s snapd.service 5.241s ModemManager.服务 5.206s snap-gnome\x2dlogs-45.mount 5.078s 螺栓服务
答案1
你可以这个命令
systemd-analyze blame
此命令打印所有正在运行的单元的列表,按初始化所用时间排序。此信息用于优化启动时间。
找出哪些服务耗时较长且没有必要,你可以使用
systemctl disable <service-name>
从启动中删除服务。