Мой ПК, на котором работает Ubuntu, долго загружается.
Вот результаты systemd-analysis критической цепочки
и вина systemd-analysis
:
$ systemd-analyze critical-chain
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.
graphical.target @1min 48.620s
└─multi-user.target @1min 48.620s
└─snapd.seeded.service @1min 31.009s +589ms
└─snapd.service @1min 2.833s +28.172s
└─basic.target @1min 1.943s
└─sockets.target @1min 1.943s
└─snapd.socket @1min 1.883s +59ms
└─sysinit.target @1min 1.857s
└─snapd.apparmor.service @52.628s +879ms
└─apparmor.service @13.266s +39.359s
└─local-fs.target @13.167s
└─run-user-1000-doc.mount @1min 44.431s
└─run-user-1000.mount @1min 25.766s
└─local-fs-pre.target @8.072s
└─systemd-tmpfiles-setup-dev.service @7.695s +375ms
└─systemd-sysusers.service @6.889s +805ms
└─systemd-remount-fs.service @6.412s +282ms
└─systemd-journald.socket @6.288s
└─system.slice @6.225s
└─-.slice @6.225s
$ systemd-analyze blame
51.958s dev-sda1.device
39.426s dev-loop37.device
39.398s dev-loop31.device
39.359s apparmor.service
39.320s dev-loop32.device
39.176s dev-loop40.device
38.205s dev-loop30.device
38.139s dev-loop35.device
38.127s dev-loop8.device
37.854s dev-loop21.device
37.673s dev-loop36.device
37.661s dev-loop13.device
37.315s dev-loop27.device
37.280s dev-loop29.device
36.984s dev-loop9.device
36.664s dev-loop17.device
36.301s dev-loop15.device
36.279s dev-loop28.device
35.967s dev-loop34.device
35.500s dev-loop3.device
34.508s dev-loop38.device
34.502s dev-loop42.device
34.486s dev-loop43.device
lines 1-23
Looking at how long it's taking to reach your "graphical.target", Do this, even though it was written at the time of Ubuntu 18.04. It works, even Ubuntu 20.04 (There are two methods; use one or both):
Method One
Type (in the terminal):
$ sudo sed -e 's/^RESUME=/#RESUME=/g' \
-i /etc/initramfs-tools/conf.d/resume
After that is finished, type:
$ echo "RESUME=/dev/mapper/ubuntu--YOUR FLAVOR OF UBUNTU (eg. mate)--vg-swap_1" | \
sudo tee -a /etc/initramfs-tools/conf.d/resume
Recreate initrd and reboot system.
$ sudo update-initramfs -u
After that is finished, type:
$ sudo reboot
The kernel boot time should be faster. Verify by typing:
$ systemd-analyze
You will also be able to use hibernation after this.
Method Two
Navigate to /etc/initramfs-tools/conf.d/
Right click on "resume" and choose "Edit as Administrator". Измените строку:
RESUME = UUID = В зависимости от того, что вы номер (ex - RESUME = UUID = 67b3fe6f-1ec4-413f-8c5a-1136bc7f3270)
Кому:
RESUME = нет
Теперь откройте терминал и введите:
$ sudo update-initramfs -u
После этого введите:
$ sudo reboot
Время загрузки должно быть быстрее.