18.04安装后启动很慢

分享于 

3分钟阅读

ubuntu

  繁體

问题

这适用于X11和Wayland会话。

我运行了systemd分析工具,看到snap和systemd服务在引导时很慢,





koen@beite-m1:~$ systemd-analyze blame


1min 31.794s dev-loop8.device


1min 31.790s dev-loop9.device


1min 31.675s systemd-backlight@backlight:intel_backlight.service


1min 31.144s systemd-rfkill.service


1.408s dev-sda1.device


822ms fwupd.service


789ms dev-loop7.device


689ms dev-loop6.device


658ms dev-loop3.device


634ms dev-loop1.device


629ms dev-loop5.device


626ms dev-loop0.device


601ms dev-loop4.device


562ms dev-loop2.device


529ms networkd-dispatcher.service


522ms systemd-udev-trigger.service


491ms ModemManager.service


490ms accounts-daemon.service


437ms udisks2.service


409ms NetworkManager.service







koen@beite-m1:~$ systemd-analyze critical-chain


The time after the unit is active or started is printed after the"@" character.


The time the unit takes to start is printed after the"+" character.



graphical.target @1min 33.705s


└─multi-user.target @1min 33.703s


└─systemd-user-sessions.service @1min 33.620s +8ms


└─network.target @1min 33.617s


└─NetworkManager.service @1min 33.206s +409ms


└─dbus.service @1min 33.119s


└─basic.target @1min 32.981s


└─sockets.target @1min 32.979s


└─snapd.socket @1min 32.961s +15ms


└─sysinit.target @1min 32.935s


└─apparmor.service @1min 32.710s +222ms


└─local-fs.target @1min 32.686s


└─home.mount @1.695s +22ms


└─systemd-fsck@dev-disk-byx2duuid-79ea6e09x2dcdf7x2d4447x2d9041x2d6abffceb9e50.s ervice @1.641s +47ms


└─dev-disk-byx2duuid-79ea6e09x2dcdf7x2d4447x2d9041x2d6abffceb9e50.d evice @1.635s




答案1

我找到了一个解决方法;通过执行以下操作,启动时间从4分钟缩短到50秒:

  • sudo vi /etc/default/grub
  • 我将GRUB_CMDLINE_LINUX_DEFAULT引导参数更改为:GRUB_CMDLINE_LINUX_DEFAULT="video=SVIDEO-1:d"
  • 保存并退出v i
  • sudo update-grub
  • sudo reboot

BOO  引导  时间  slow  
相关文章