Ubuntu 18.04 在联想 ideapad 320 上启动太慢

Ubuntu 18.04 在联想 ideapad 320 上启动太慢

我有联想 Ideapad 320,配备 i5 第 7 代、NVIDIA 920mx 2 GB、8 GB 内存。

Ubuntu 启动大约需要 1 分 00 秒到 1 分 30 秒,而我十年前的戴尔 Inspiron 1440 启动 Windows 10 的速度比它还快!

一些说明:

  • 无法快速启动
  • SATA 模式转为 ACHI
  • 单次启动
  • 在 ubuntu 加载徽标之前显示空白的紫色屏幕。

消息(仅限需要很长时间的)

[    7.700100] systemd-journald[245]: Received request to flush runtime journal from PID 1
[    7.733583] Adding 2097148k swap on /swapfile.  Priority:-2 extents:6 across:2260988k FS
[    7.939799] ppdev: user-space parallel port driver
[   25.470553] wmi_bus wmi_bus-PNP0C14:00: WQ data block query control method not found
[   25.470555] wmi_bus wmi_bus-PNP0C14:00: WQ data block query control method not found
[   25.470556] wmi_bus wmi_bus-PNP0C14:00: WQ data block query control method not found
[   25.470558] wmi_bus wmi_bus-PNP0C14:00: WQ data block query control method not found


[   37.592140] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
[   40.718766] wlp3s0: authenticate with 32:07:4d:10:1e:d5
[   40.719207] wlp3s0: send auth to 32:07:4d:10:1e:d5 (try 1/3)

[   40.761674] wlp3s0: Limiting TX power to 23 (23 - 0) dBm as advertised by 32:07:4d:10:1e:d5
[   40.854572] IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready
[   65.119742] Bluetooth: RFCOMM TTY layer initialized

[  395.759338] wlp3s0: deauthenticating from 32:07:4d:10:1e:d5 by local choice (Reason: 3=DEAUTH_LEAVING)
[  397.941735] PM: suspend entry (deep)
[  397.941736] PM: Syncing filesystems ... done.
[  399.018517] rfkill: input handler enabled
[  399.059635] Freezing user space processes ... (elapsed 0.002 seconds) done.
[  399.061727] OOM killer disabled.
[  399.061728] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[  399.062989] Suspending console(s) (use no_console_suspend to debug)
[  399.220749] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[  399.249021] sd 0:0:0:0: [sda] Stopping disk
[  400.190865] ACPI: EC: interrupt blocked
[  400.290845] ACPI: Preparing to enter system sleep state S3
[  400.291415] ACPI: EC: event blocked
[  400.291416] ACPI: EC: EC stopped
[  400.291416] PM: Saving platform NVS memory
[  400.291489] Disabling non-boot CPUs ...
[  400.306547] IRQ 129: no longer affine to CPU1
[  400.307557] smpboot: CPU 1 is now offline
[  400.330526] IRQ 130: no longer affine to CPU2
[  400.331928] smpboot: CPU 2 is now offline
[  400.354437] IRQ 122: no longer affine to CPU3
[  400.354441] IRQ 123: no longer affine to CPU3
[  400.354444] IRQ 125: no longer affine to CPU3
[  400.354447] IRQ 127: no longer affine to CPU3
[  400.355457] smpboot: CPU 3 is now offline
[18446744059.118911] [Firmware Bug]: TSC ADJUST differs: CPU0 0 --> -372692035. Restoring
[  400.358296] ACPI: Low-level resume complete
[  400.358425] ACPI: EC: EC started
[  400.358426] PM: Restoring platform NVS memory
[  400.365100] Enabling non-boot CPUs ...
[  400.365144] x86: Booting SMP configuration:
[  400.365145] smpboot: Booting Node 0 Processor 1 APIC 0x2
[  400.367969]  cache: parent cpu1 should not be sleeping
[  400.368151] CPU1 is up
[  400.368173] smpboot: Booting Node 0 Processor 2 APIC 0x1
[  400.368645]  cache: parent cpu2 should not be sleeping
[  400.368799] CPU2 is up
[  400.368827] smpboot: Booting Node 0 Processor 3 APIC 0x3
[  400.369193]  cache: parent cpu3 should not be sleeping
[  400.369350] CPU3 is up
[  400.372292] ACPI: Waking up from system sleep state S3
[  400.376767] ACPI: EC: interrupt unblocked
[  400.683681] ACPI: EC: event unblocked
[  400.683952] rtlwifi: rtlwifi: wireless switch is on
[  400.688057] sd 0:0:0:0: [sda] Starting disk
[  400.727973] r8169 0000:02:00.0 enp2s0: link down
[  400.917617] usb 1-8: reset high-speed USB device number 3 using xhci_hcd
[  401.000180] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[  401.004740] ata2.00: configured for UDMA/133
[  401.194127] usb 1-7: reset full-speed USB device number 2 using xhci_hcd
[  401.344099] acpi LNXPOWER:14: Turning OFF
[  401.344217] acpi LNXPOWER:13: Turning OFF
[  401.344331] acpi LNXPOWER:12: Turning OFF
[  401.344444] acpi LNXPOWER:11: Turning OFF
[  401.344556] acpi LNXPOWER:10: Turning OFF
[  401.344670] acpi LNXPOWER:0f: Turning OFF
[  401.344782] acpi LNXPOWER:0e: Turning OFF
[  401.344896] acpi LNXPOWER:0d: Turning OFF
[  401.345009] acpi LNXPOWER:0c: Turning OFF
[  401.345141] acpi LNXPOWER:0b: Turning OFF
[  401.345257] acpi LNXPOWER:0a: Turning OFF
[  401.345374] acpi LNXPOWER:09: Turning OFF
[  401.345490] acpi LNXPOWER:08: Turning OFF
[  401.345603] acpi LNXPOWER:07: Turning OFF
[  401.345715] acpi LNXPOWER:06: Turning OFF
[  401.345828] acpi LNXPOWER:05: Turning OFF
[  401.345942] acpi LNXPOWER:04: Turning OFF
[  401.346055] acpi LNXPOWER:03: Turning OFF
[  401.346168] acpi LNXPOWER:02: Turning OFF
[  401.346283] acpi LNXPOWER:01: Turning OFF
[  401.346372] OOM killer enabled.
[  401.346373] Restarting tasks ... done.
[  401.351976] Bluetooth: hci0: rtl: examining hci_ver=06 hci_rev=000a lmp_ver=06 lmp_subver=8821
[  401.351978] Bluetooth: hci0: rtl: loading rtl_bt/rtl8821a_config.bin
[  401.351992] bluetooth hci0: Direct firmware load for rtl_bt/rtl8821a_config.bin failed with error -2
[  401.351994] Bluetooth: hci0: rtl: loading rtl_bt/rtl8821a_fw.bin
[  401.352614] Bluetooth: hci0: rom_version status=0 version=1
[  401.352619] Bluetooth: hci0: cfg_sz 0, total size 17428
[  401.354619] [drm] RC6 on
[  401.445209] PM: suspend exit
[  401.577367] rfkill: input handler disabled
[  401.904840] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[  401.991070] ata1.00: configured for UDMA/100
[  402.377782] IPv6: ADDRCONF(NETDEV_UP): enp2s0: link is not ready
[  402.422938] r8169 0000:02:00.0 enp2s0: link down
[  402.423036] IPv6: ADDRCONF(NETDEV_UP): enp2s0: link is not ready
[  402.426424] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
[  402.746924] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
[  402.786740] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
[  405.908971] wlp3s0: authenticate with 32:07:4d:10:1e:d5
[  405.909414] wlp3s0: send auth to 32:07:4d:10:1e:d5 (try 1/3)
[  405.911301] wlp3s0: authenticated
[  405.918890] wlp3s0: associate with 32:07:4d:10:1e:d5 (try 1/3)
[  405.922642] wlp3s0: RX AssocResp from 32:07:4d:10:1e:d5 (capab=0x431 status=0 aid=1)
[  405.922976] wlp3s0: associated
[  405.972876] wlp3s0: Limiting TX power to 23 (23 - 0) dBm as advertised by 32:07:4d:10:1e:d5
[  405.979914] IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready

systemd-analyze 责备

 24.471s dev-sda2.device
 22.539s systemd-journal-flush.service
 16.281s systemd-tmpfiles-setup-dev.service
 16.129s keyboard-setup.service
 15.032s systemd-sysctl.service
 12.042s plymouth-quit-wait.service
  6.979s NetworkManager-wait-online.service
  5.891s dev-loop20.device
  5.755s snapd.service
  5.172s bolt.service
  4.855s dev-loop8.device
  4.461s dev-loop9.device
  4.454s dev-loop13.device
  4.453s dev-loop11.device
  4.443s dev-loop14.device
  4.427s dev-loop17.device
  4.427s dev-loop15.device
  4.412s dev-loop18.device
  4.386s dev-loop22.device
  4.363s dev-loop24.device
  4.347s dev-loop25.device
  4.253s dev-loop23.device
  4.202s dev-loop1.device

几个问题:

  • 什么是 dev-loops 以及如何摆脱它们?
  • 为什么键盘设置需要 16 秒?
  • 硬盘的性能?

我是 Linux 新手,但我曾研究过以下问题,但发现它们没有用。

答案1

Ubuntu 和其他操作系统一样,会随着时间的推移而变慢,因为您的 PC 上存储着数据、日志和软件。不时清理一下系统是个好办法,即删除您不再需要或使用的旧日志、缓存和软件。

然而本质上您的硬盘是这里的瓶颈。

但是 systemd 在旧硬盘上执行的操作也很慢。这也是一些人(包括我)抱怨 systemd 的原因之一,因为它试图做所有事情,但并不总是做得很好。

幸运的是,您可以通过禁用或延迟来处理 systemd 服务。

你可以在这里读到它:

什么是 dev-loops 以及如何摆脱它们?

dev-loops 用于 snap 安装点,安装的 snap 越多,启动时产生的 loop 设备就越多。

但是您应该知道,并非 systemd-analyze 中显示的所有服务都会阻止您使用电脑,因为其中一些服务会延迟到桌面环境准备好后才能完成。

为什么键盘设置需要 16 秒?

检查这个答案:

硬盘的性能?

这是主要问题。如今 Ubuntu 变得更重,需要更多资源才能有效运行。

而且我的十年历史的 Dell Inspiron 1440 启动 Windows 10 的速度比它还快!

请记住,在笔记本电脑上,Windows 10 大多数时候都不会完全关闭。即使您认为已经关闭了电源,它也会使用休眠等功能将其状态保存到硬盘驱动器并加快下次启动速度。当然,知道这一点不会改变任何事情。与 Ubuntu 相比,它的启动时间仍然更好,但这并不总是如此,尤其是在更新之后。

相关内容