启动缓慢且启动时冻结

启动缓慢且启动时冻结

我使用的是 Ubuntu 18.04,内核是 4.15.0.29-generic。启动过程需要很长时间,而且我注意到启动时字体样式会发生变化。我已经在谷歌上尝试了很多方法,但都没有效果,所以我恢复到安装后的快照(这个),因为其他方法都无法解决我的问题。(我使用的是 Timeshift)

PS 我尝试自己做一些调试和研究,但 3 个小时后我什么也没找到。

PSS 这在内核 4.18 上仍然存在。(为此进行了尝试)

启动日志(/var/log/boot.log):

[FAILED] Failed to start Set console font and keymap.
See 'systemctl status console-setup.service' for details.
[  OK  ] Started AppArmor initialization.
         Starting Raise network interfaces...
[  OK  ] Started Raise network interfaces.
[  OK  ] Started Network Name Resolution.
[  OK  ] Reached target Host and Network Name Lookups.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Message of the Day.
         Starting Socket activation for snappy daemon.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Started CUPS Scheduler.
[  OK  ] Listening on ACPID Listen Socket.
[  OK  ] Started Daily apt download activities.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Started Discard unused blocks once a week.
[  OK  ] Started Trigger anacron every hour.
[  OK  ] Reached target Timers.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Listening on UUID daemon activation socket.
[  OK  ] Listening on CUPS Scheduler.
[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Started ACPI Events Check.
[  OK  ] Reached target Paths.
[  OK  ] Listening on Socket activation for snappy daemon.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started Set the CPU Frequency Scaling governor.
         Starting Accounts Service...
[  OK  ] Started Run anacron jobs.
         Starting Dispatcher daemon for systemd-networkd...
[  OK  ] Started Regular background program processing daemon.
         Starting NVIDIA Persistence Daemon...
         Starting Detect the available GPUs and deal with any system changes...
         Starting Network Manager...
         Starting LSB: Speech Dispatcher...
[  OK  ] Reached target Login Prompts.
         Starting Snappy daemon...
         Starting Modem Manager...
         Starting Thermal Daemon Service...
[  OK  ] Started ACPI event daemon.
         Starting Restore /etc/resolv.conf if the system crashed before the ppp link was shut down...
[  OK  ] Started irqbalance daemon.
[  OK  ] Started CUPS Scheduler.
[  OK  ] Reached target Printer.
         Starting Login Service...
         Starting LSB: automatic crash report generation...
         Starting Avahi mDNS/DNS-SD Stack...
         Starting Disk Manager...
         Starting LSB: Record successful boot for GRUB...
         Starting System Logging Service...
         Starting WPA supplicant...
         Starting Save/Restore Sound Card State...
[  OK  ] Started NVIDIA Persistence Daemon.
[  OK  ] Started Restore /etc/resolv.conf if the system crashed before the ppp link was shut down.
[  OK  ] Started LSB: Speech Dispatcher.
[  OK  ] Started LSB: automatic crash report generation.
[  OK  ] Started Save/Restore Sound Card State.
[  OK  ] Started LSB: Record successful boot for GRUB.
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
[  OK  ] Started Make remote CUPS printers available locally.
[  OK  ] Started WPA supplicant.
         Starting Authorization Manager...
[  OK  ] Started System Logging Service.
[  OK  ] Started Detect the available GPUs and deal with any system changes.
[  OK  ] Started Authorization Manager.
[  OK  ] Started Accounts Service.
[  OK  ] Started Thermal Daemon Service.
[  OK  ] Started Modem Manager.
         Starting Hostname Service...
[  OK  ] Started Hostname Service.
[  OK  ] Started Dispatcher daemon for systemd-networkd.
[  OK  ] Started Disk Manager.
[  OK  ] Started Network Manager.
         Starting Network Manager Wait Online...
[  OK  ] Reached target Network.
         Starting Permit User Sessions...
         Starting Network Manager Script Dispatcher Service...
[  OK  ] Started Permit User Sessions.
         Starting Hold until boot process finishes up...
         Starting GNOME Display Manager...
[  OK  ] Started Network Manager Script Dispatcher Service.
[  OK  ] Started GNOME Display Manager.
[**    ] (3 of 6) A start job is running for Network Time Synchronization (31s /[  OK  ] Mounted Mount unit for gnome-calculator, revision 180.
[  OK  ] Mounted Mount unit for gnome-3-26-1604, revision 70.
[  OK  ] Mounted Mount unit for gnome-logs, revision 37.
[  OK  ] Started Set console font and keymap.
[  OK  ] Started Network Name Resolution.
[  OK  ] Reached target Host and Network Name Lookups.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on ACPID Listen Socket.
         Starting Socket activation for snappy daemon.
[  OK  ] Started Trigger anacron every hour.
[  OK  ] Started CUPS Scheduler.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Listening on CUPS Scheduler.
[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Started Daily apt download activities.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Listening on UUID daemon activation socket.
[  OK  ] Started Discard unused blocks once a week.
[  OK  ] Started Message of the Day.
[  OK  ] Started ACPI Events Check.
[  OK  ] Reached target Paths.
[  OK  ] Reached target Timers.
[  OK  ] Listening on Socket activation for snappy daemon.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting Login Service...
         Starting Thermal Daemon Service...
         Starting Disk Manager...
         Starting Dispatcher daemon for systemd-networkd...
[  OK  ] Started Run anacron jobs.
[  OK  ] Started CUPS Scheduler.
[  OK  ] Reached target Printer.
[  OK  ] Started D-Bus System Message Bus.
         Starting WPA supplicant...
         Starting System Logging Service...
         Starting LSB: Speech Dispatcher...
         Starting Modem Manager...
         Starting Restore /etc/resolv.conf if the system crashed before the ppp link was shut down...
[  OK  ] Started Set the CPU Frequency Scaling governor.
[  OK  ] Started irqbalance daemon.
         Starting Save/Restore Sound Card State...
         Starting Detect the available GPUs and deal with any system changes...
         Starting Avahi mDNS/DNS-SD Stack...
         Starting Snappy daemon...
         Starting LSB: automatic crash report generation...
[  OK  ] Started Regular background program processing daemon.
         Starting LSB: Record successful boot for GRUB...
[  OK  ] Reached target Login Prompts.
[  OK  ] Started ACPI event daemon.
         Starting Accounts Service...
         Starting Network Manager...
[  OK  ] Started Restore /etc/resolv.conf if the system crashed before the ppp link was shut down.
[  OK  ] Started Save/Restore Sound Card State.
[  OK  ] Started LSB: Speech Dispatcher.
[  OK  ] Started Thermal Daemon Service.
[  OK  ] Started WPA supplicant.
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
[  OK  ] Started Make remote CUPS printers available locally.
[  OK  ] Started System Logging Service.
         Starting Authorization Manager...
[  OK  ] Started LSB: automatic crash report generation.
[  OK  ] Started LSB: Record successful boot for GRUB.
[  OK  ] Started Detect the available GPUs and deal with any system changes.
[  OK  ] Started Authorization Manager.
[  OK  ] Started Accounts Service.
[  OK  ] Started Modem Manager.
[  OK  ] Started Dispatcher daemon for systemd-networkd.
         Starting Hostname Service...
[  OK  ] Started Disk Manager.
[  OK  ] Started Login Service.
[  OK  ] Started Snappy daemon.
         Starting Wait until snapd is fully seeded...
[  OK  ] Started Wait until snapd is fully seeded.
[  OK  ] Started Hostname Service.
[  OK  ] Started Network Manager.
[  OK  ] Reached target Network.
         Starting Permit User Sessions...
[  OK  ] Started Unattended Upgrades Shutdown.
         Starting Network Manager Wait Online...
[  OK  ] Started Permit User Sessions.
         Starting GNOME Display Manager...
         Starting Hold until boot process finishes up...
         Starting Network Manager Script Dispatcher Service...
[  OK  ] Started Network Manager Script Dispatcher Service.
[  OK  ] Started GNOME Display Manager.

更新:

systemctl status console-setup.service 显示:

● console-setup.service - Set console font and keymap
   Loaded: loaded (/lib/systemd/system/console-setup.service; enabled; vendor pr
   Active: active (exited) since Sat 2019-02-16 10:58:11 EET; 1min 22s ago
  Process: 697 ExecStart=/lib/console-setup/console-setup.sh (code=exited, statu
 Main PID: 697 (code=exited, status=0/SUCCESS)

feb 16 10:58:11 Motan systemd[1]: Starting Set console font and keymap...
feb 16 10:58:11 Motan systemd[1]: Started Set console font and keymap.

free -h 显示:

              total        used        free      shared  buff/cache   available
Mem:            15G        1,5G         11G         61M        2,0G         13G
Swap:          1,7G          0B        1,7G

swapon 显示:

NAME      TYPE SIZE USED PRIO
/swapfile file 1,7G   0B   -2

sudo blkid 显示:

/dev/sdb1: UUID="bbfdf8d9-be18-4d3d-b6fa-d0caec4db4ed" TYPE="ext4" PARTUUID="51599328-01"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/sda1: LABEL="Recovery" UUID="3A9496D094968DCF" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="693b5e90-b593-407e-a5f7-b03d3cdd5b81"
/dev/sda2: UUID="3A96-E631" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="5412b97f-6607-4c6d-8239-6343b5ca7be9"
/dev/sda3: PARTLABEL="Microsoft reserved partition" PARTUUID="3f5148bb-b8d2-4578-bb7b-d90ef29c5851"
/dev/sda4: UUID="AC4AA1C54AA18D20" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="c3405128-e084-4cd6-87f8-0337205d9568"
/dev/sdb5: UUID="bb8f025a-c48e-4ab0-a0e7-ae935adeade1" TYPE="ext4" PARTUUID="51599328-05"
/dev/sdb6: UUID="fdef4d1c-39e4-4a3c-ac71-ff0b6791cae1" TYPE="ext4" PARTUUID="51599328-06"
/dev/sdc1: LABEL="Data" UUID="6846CE9F46CE6D7E" TYPE="ntfs" PARTUUID="9726fa2c-01"

cat /etc/fstab 显示:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb1 during installation
UUID=bbfdf8d9-be18-4d3d-b6fa-d0caec4db4ed /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda2 during installation
UUID=3A96-E631  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/sdb6 during installation
UUID=fdef4d1c-39e4-4a3c-ac71-ff0b6791cae1 /home           ext4    defaults        0       2
# /var was on /dev/sdb5 during installation
UUID=bb8f025a-c48e-4ab0-a0e7-ae935adeade1 /var            ext4    defaults        0       2
/swapfile                                 none            swap    sw              0       0

答案1

虽然我之前已经更新过系统,但系统更新后问题已经消失。无需进一步研究。

相关内容