Ubuntu 18.04 启动过程非常长。如何减少启动时间

Ubuntu 18.04 启动过程非常长。如何减少启动时间

我正在使用 Ubuntu 18.04(Asus_M4A88T-M-USB3 主板,配备 AMD Phenom(tm) II X4 945 处理器和 8GB ddr3 RAM),与 16.04 相比,启动过程耗时很长。如何减少启动时间。或者 18.04 可以吗?

精选信息

dmesg 

_

[    9.108094] lp0: using parport0 (interrupt-driven).
[   18.865467] audit: type=1400 audit(1540755431.877:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/man" pid=381 comm="apparmor_parser"
......
......
[   29.966625] IPv6: ADDRCONF(NETDEV_CHANGE): enp2s0: link becomes ready
[   35.808136] rfkill: input handler disabled
[   43.642588] nouveau 0000:01:00.0: Direct firmware load for nouveau/nva8_fuc084 failed with error -2
[   43.642595] nouveau 0000:01:00.0: Direct firmware load for nouveau/nva8_fuc084d failed with error -2
[   43.642597] nouveau 0000:01:00.0: msvld: unable to load firmware data
[   43.642601] nouveau 0000:01:00.0: msvld: init failed, -19

_

systemd-analyzed

_

Startup finished in 5.817s (kernel) + 50.562s (userspace) = 56.380s
graphical.target reached after 42.230s in userspace

_

systemd-analyze blame

26.244s apt-daily.service
20.879s plymouth-quit-wait.service
14.776s dev-sda4.device
13.684s systemd-journal-flush.service
10.644s systemd-modules-load.service
8.845s dev-loop0.device
8.836s dns-clean.service
8.702s apparmor.service
8.661s systemd-udevd.service
8.467s binfmt-support.service
7.784s proc-sys-fs-binfmt_misc.mount
7.714s snap-core-5662.mount
......
......

答案1

我尝试了很多方法,但只有在将 nouveau 更改为 nvidia-340 后,启动时间才减少了约一半。

消息

[    8.073745] systemd-journald        272]: Received request to flush runtime journal from PID 1
[   18.353802] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
........
........
[   29.241267] resource sanity check: requesting    [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00         mem 0x000d0000-0x000dffff window]
[   29.241405] caller os_map_kernel_space+0x86/0xb0     [nvidia] mapping multiple BARs
[   29.362723] r8169 0000:02:00.0 enp2s0: link up
[   29.362731] IPv6: ADDRCONF(NETDEV_CHANGE): enp2s0: link becomes ready
[   34.017794] rfkill: input handler disabled
:~$ 

systemd-分析

Startup finished in 5.138s (kernel) + 27.173s (userspace) = 32.311s
graphical.target reached after 27.164s in userspace

systemd-analyze 责备

15.847s systemd-journal-flush.service
11.869s dev-sda4.device
11.011s keyboard-setup.service
10.145s systemd-sysctl.service
8.805s systemd-udevd.service

相关内容