Ubuntu 16.04 启动时间过长(超过 2 分钟)

Ubuntu 16.04 启动时间过长(超过 2 分钟)

我最近安装了一个全新的 Ubuntu 16.04。但是,它需要两分钟以上的时间才能启动。以下是消息耗费大量时间的输出:

[   22.760329] input: SYNA7DB5:00 06CB:7DB7 Touchpad as /devices

/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-5/i2c-SYNA7DB5:00/0018:06CB:7DB7.0001/input/input14
[   22.760392] hid-multitouch 0018:06CB:7DB7.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA7DB5:00 06CB:7DB7] on i2c-SYNA7DB5:00
[   23.781467] Adding 15625212k swap on /dev/sda5.  Priority:-1 extents:1 across:15625212k FS
[   24.020866] ath10k_pci 0000:02:00.0: htt-ver 3.1 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1
[   24.027472] ath: EEPROM regdomain: 0x69
[   24.027473] ath: EEPROM indicates we should expect a direct regpair map
[   24.027475] ath: Country alpha2 being used: 00
[   24.027475] ath: Regpair used: 0x69
[   24.030970] ath10k_pci 0000:02:00.0 wlp2s0: renamed from wlan0
[   25.273139] audit: type=1400 audit(1502693550.947:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/sbin/dhclient" pid=750 comm="apparmor_parser"
[   25.273140] audit: type=1400 audit(1502693550.947:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=750 comm="apparmor_parser"
[   25.273141] audit: type=1400 audit(1502693550.947:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-helper" pid=750 comm="apparmor_parser"
[   25.273142] audit: type=1400 audit(1502693550.947:5): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-script" pid=750 comm="apparmor_parser"
[   25.274451] audit: type=1400 audit(1502693550.947:6): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/snapd/snap-confine" pid=754 comm="apparmor_parser"
[   25.274452] audit: type=1400 audit(1502693550.947:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=754 comm="apparmor_parser"
[   25.274859] audit: type=1400 audit(1502693550.947:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/lightdm/lightdm-guest-session" pid=749 comm="apparmor_parser"
[   25.274860] audit: type=1400 audit(1502693550.947:9): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/lightdm/lightdm-guest-session//chromium" pid=749 comm="apparmor_parser"
[   25.275668] audit: type=1400 audit(1502693550.947:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/cups-browsed" pid=755 comm="apparmor_parser"
[   25.276508] audit: type=1400 audit(1502693550.951:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/ippusbxd" pid=757 comm="apparmor_parser"
[   25.477461] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   25.477462] Bluetooth: BNEP filters: protocol multicast
[   25.477465] Bluetooth: BNEP socket layer initialized
[   28.566799] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[   30.495602] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[   30.498399] IPv6: ADDRCONF(NETDEV_UP): enp3s0f1: link is not ready
[   30.641973] r8169 0000:03:00.1 enp3s0f1: link down
[   30.642025] IPv6: ADDRCONF(NETDEV_UP): enp3s0f1: link is not ready
[   30.866804] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[   31.381888] ath10k_pci 0000:02:00.0: no channel configured; ignoring frame(s)!
[   31.484702] ath10k_pci 0000:02:00.0: no channel configured; ignoring frame(s)!
[   66.392150] ath10k_pci 0000:02:00.0: no channel configured; ignoring frame(s)!
[   81.887745] ath10k_pci 0000:02:00.0: no channel configured; ignoring frame(s)!
[   83.664061] ath10k_pci 0000:02:00.0: no channel configured; ignoring frame(s)!
[  123.917843] ath10k_pci 0000:02:00.0: no channel configured; ignoring frame(s)!
[  125.643327] Bluetooth: RFCOMM TTY layer initialized
[  125.643335] Bluetooth: RFCOMM socket layer initialized
[  125.643338] Bluetooth: RFCOMM ver 1.11
[  135.512366] wlp2s0: authenticate with 18:64:72:6b:03:59
[  135.542578] wlp2s0: send auth to 18:64:72:6b:03:59 (try 1/3)
[  135.552043] wlp2s0: authenticated
[  135.555877] wlp2s0: associate with 18:64:72:6b:03:59 (try 1/3)
[  135.560003] wlp2s0: RX AssocResp from 18:64:72:6b:03:59 (capab=0x411 status=0 aid=1)
[  135.562483] wlp2s0: associated
[  135.562609] IPv6: ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready

这是另一个存在较大时间差距的地方:

[    1.971208] random: fast init done
[    2.816036] [drm] RC6 on
[    4.060574] random: crng init done
[    6.496360] EXT4-fs (sda7): mounted filesystem with ordered data mode. Opts: (null)
[    8.707423] systemd[1]: systemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)
[    8.707516] systemd[1]: Detected architecture x86-64.
[    8.718777] systemd[1]: Set hostname to <nived-Aspire-E5-575>.
[    9.303501] systemd[1]: Listening on fsck to fsckd communication Socket.
[    9.303573] systemd[1]: Listening on Journal Audit Socket.
[    9.303599] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    9.303631] systemd[1]: Listening on Journal Socket.
[    9.303689] systemd[1]: Created slice User and Session Slice.
[    9.303819] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    9.303828] systemd[1]: Reached target User and Group Name Lookups.
[    9.861183] lp: driver loaded but no devices found
[   10.056055] ppdev: user-space parallel port driver
[   14.072667] EXT4-fs (sda7): re-mounted. Opts: errors=remount-ro
[   21.511271] systemd-journald[251]: Received request to flush runtime journal from PID 1
[   21.565796] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[   21.566659] Bluetooth: Core ver 2.22

我感觉这与显卡有关。

启动时,它也不会显示 plymouth 闪屏。它只是长时间显示紫色屏幕

以下是系统规格:

  • 显卡:GrIntel® HD Graphics 620 (Kabylake GT2)
  • 内存:7.5 GiB
  • 处理器:Intel® Core™ i5-7200U CPU @ 2.50GHz × 4

顺便说一下,这是一台 Acer Aspire E-5。

提前致谢!

[编辑]

运行后systemd-analyze blame我发现 openvpn 占用了将近一分钟的时间。卸载 openvpn 后,仍然需要大约一分钟的时间。

这是我运行的结果systemd-analyze blame

         18.051s NetworkManager-wait-online.service
         16.364s dev-sda7.device
         10.750s systemd-journal-flush.service
         10.399s plymouth-start.service
          4.662s systemd-random-seed.service
          2.047s accounts-daemon.service
          1.968s ModemManager.service
          1.772s NetworkManager.service
          1.541s keyboard-setup.service
          1.315s systemd-modules-load.service
          1.273s systemd-journald.service
          1.141s udisks2.service
          1.042s thermald.service
          1.009s lightdm.service
           943ms kmod-static-nodes.service
           807ms dev-mqueue.mount
           807ms dev-hugepages.mount
           806ms sys-kernel-debug.mount
           805ms apparmor.service
           767ms systemd-udevd.service
           738ms systemd-udev-trigger.service
           699ms plymouth-read-write.service
           681ms systemd-sysctl.service
           628ms ufw.service
           595ms gpu-manager.service
           509ms irqbalance.service
           436ms networking.service
           429ms colord.service
           355ms systemd-remount-fs.service
           341ms systemd-tmpfiles-setup-dev.service
           329ms systemd-rfkill.service
           315ms systemd-fsck@dev-disk-by\x2duuid-8274\x2dD1C5.service
           300ms console-setup.service
           299ms upower.service
           285ms rsyslog.service
           232ms avahi-daemon.service
           231ms grub-common.service
           230ms polkitd.service
           200ms dev-sda5.swap
           180ms systemd-update-utmp.service
           174ms systemd-tmpfiles-setup.service
           101ms boot-efi.mount

我仍然没有看到普利茅斯创业公司

答案1

嗯,依赖关系可能存在一些问题。由于 SystemD 单元相互依赖,因此可能会出现问题需要SystemD 配置文件中的选项。

要以图形方式分析 systemD 启动过程,您可以使用:

$ systemd-analyze plot  > /tmp/analyze.svg

然后在浏览器中打开它,查看哪个单元有问题并需要一段时间才能启动。为了解决这个问题,我建议你首先启用多用户目标因为目标应该启动(默认情况下它启动于图形目标)使用以下命令:

$ systemctl set-default multi-user.target

然后系统在文本控制台上启动。这样您就可以验证问题是否出在您的图形适配器上。

您也可以按德尔启动时(在那个紫色屏幕中)单击按钮查看日志文件。启动后,您应该使用它journalctl -xe来检查日志。

相关内容