Appreciate any help. Very slow boot on Ubuntu 16.04.3 with SSD still. when I run
systemd-analyze blame
I get
40.044s snapd.refresh.service
29.529s apt-daily.service
6.510s NetworkManager-wait-online.service
2.469s apt-daily-upgrade.service
1.814s snapd.service
1.649s tor@default.service
936ms dev-sda2.device
168ms ufw.service
131ms ModemManager.service
126ms lightdm.service
86ms swapfile.swap
83ms apport.service
81ms systemd-fsck@dev-disk-by\x2duuid-BE45\x2d57DB.service
78ms dev-loop0.device
77ms speech-dispatcher.service
71ms snap-core-2844.mount
69ms alsa-restore.service
69ms lm-sensors.service
65ms pppd-dns.service
64ms apparmor.service
64ms rsyslog.service
63ms accounts-daemon.service
63ms systemd-user-sessions.service
when I run
snap list
I get
Name Version Rev Developer Notes
core 16-2.27.6 2898 canonical core
keepassxc 2.2.0 23 keepassxreboot -
ufw 0.36pre-16.10 14 canonical -
ultimate-media-downloader2 1 1 keshavnrj -
I am not familiar with snap or what to do. Can I disable or edit
40.044s snapd.refresh.service
29.529s apt-daily.service
6.510s NetworkManager-wait-online.service
to make my boot faster? Appreciate any help beacuse my boot feels very slow. {But after the slow boot is completed the ssd does feel snappier inside Ubuntu,and I already am on AHCI boot mode in BIOS}. Please help. Appreciate any guidance.
Update 1:
Boot still takes over 1.5 minutes. I tried all this and still no change and boot very slow. I did
sudo systemctl disable snapd.refresh.service
sudo systemctl disable NetworkManager-wait-online.service
Run sudoedit /etc/rc.local
and added this before line with exit 0 :
rfkill block bluetooth
and I have tried this also
sudo systemctl edit apt-daily.timer
and pasted the following text into the editor window:
# apt-daily timer configuration override
[Timer]
OnBootSec=15min
OnUnitActiveSec=1d
AccuracySec=1h
RandomizedDelaySec=30min
But my boot is still very slow takes over 1.5 minutes. Now when I run systemd-analyze blame
I get
1.503s snapd.service
1.246s tor@default.service
989ms virtualbox.service
872ms dev-sda2.device
674ms systemd-rfkill.service
455ms dev-loop3.device
149ms snap-core-2844.mount
126ms lightdm.service
119ms snap-core-2898.mount
107ms accounts-daemon.service
102ms apparmor.service
100ms snap-core-2774.mount
98ms ufw.service
97ms ModemManager.service
92ms snap-ufw-14.mount
86ms systemd-fsck@dev-disk-by\x2duuid-BE45\x2d57DB.service
86ms grub-common.service
85ms swapfile.swap
68ms plymouth-quit-wait.service
59ms console-setup.service
56ms preload.service
54ms irqbalance.service
52ms apport.service
But when I run systemd-analyze
I get
Startup finished in 5.179s (firmware) + 2.884s (loader) + 8.072s (kernel) + 3min 504ms (userspace) = 3min 16.641s
Boot is still very slow. Says my (userspace)
takes 3mins? 3min 504ms (userspace) = 3min 16.641s
Any advice please? (I am on SSD with noatime,trim and AHCI all already set).
Update 2:
When I run cat /var/log/syslog
it goes crazy too fast I can't copy it but it is repeating same thing. So I run less /var/log/syslog
I get
Sep 25 07:30:04 jon kernel: [ 473.457872] pcieport 0000:00:1c.2: device [8086:a112] error status/mask=00000001/00002000
Sep 25 07:30:04 jon kernel: [ 473.457873] pcieport 0000:00:1c.2: [ 0] Receiver Error (First)
Sep 25 07:30:04 jon kernel: [ 473.457876] pcieport 0000:00:1c.2: AER: Corrected error received: id=00e2
Sep 25 07:30:04 jon kernel: [ 473.458511] pcieport 0000:00:1c.2: can't find device of ID00e2
Sep 25 07:30:04 jon kernel: [ 473.458574] pcieport 0000:00:1c.2: AER: Corrected error received: id=00e2
Sep 25 07:30:04 jon kernel: [ 473.458577] pcieport 0000:00:1c.2: PCIe Bus Error: severity=Corrected, type=Physical Layer, id=00e2(Receiver ID)
Sep 25 07:30:04 jon kernel: [ 473.458579] pcieport 0000:00:1c.2: device [8086:a112] error status/mask=00000001/00002000Sep 25 07:30:04 jon kernel: [ 473.458580] pcieport 0000:00:1c.2: [ 0] Receiver Error (First)
Sep 25 07:30:04 jon kernel: [ 473.460512] pcieport 0000:00:1c.2: AER: Corrected error received: id=00e2
Sep 25 07:30:04 jon kernel: [ 473.460515] pcieport 0000:00:1c.2: PCIe Bus Error: severity=Corrected, type=Physical Layer, id=00e2(Receiver ID)
Sep 25 07:30:04 jon kernel: [ 473.460518] pcieport 0000:00:1c.2: device [8086:a112] error status/mask=00000001/00002000
(Additional information: Before I realized my logs (with thousands of pcie Bus error
logs) were taking over 100Gb (!) space of my 250Gb SSD. Now I used logrotate
and limited logs to 100M
and set logrotate to run daily
and my disk usage has gone from 180Gb to 80Gb.)
I know the pcie Bus error
is a know bug. So is that what is delaying my boot? Appreciate advice.
Update 3
When I run lspci
I get
00:00.0 Host bridge: Intel Corporation Device 5910 (rev 05)
00:01.0 PCI bridge: Intel Corporation Sky Lake PCIe Controller (x16) (rev 05)
00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
00:04.0 Signal processing controller: Intel Corporation Skylake Processor Thermal Subsystem (rev 05)
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-H Thermal subsystem (rev 31)
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-H LPSS I2C Controller #0 (rev 31)
00:15.1 Signal processing controller: Intel Corporation Sunrise Point-H LPSS I2C Controller #1 (rev 31)
00:16.0 Communication controller: Intel Corporation Sunrise Point-H CSME HECI #1 (rev 31)
00:17.0 SATA controller: Intel Corporation Sunrise Point-H SATA Controller [AHCI mode] (rev 31)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #1 (rev f1)
00:1c.2 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #3 (rev f1)
00:1c.3 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #4 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-H LPC Controller (rev 31)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-H PMC (rev 31)
00:1f.3 Audio device: Intel Corporation Device a171 (rev 31)
00:1f.4 SMBus: Intel Corporation Sunrise Point-H SMBus (rev 31)
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 950M] (rev a2)
03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter
04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5287 (rev 01)
04:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 12)
Update 4
I happened to try the workaround from AER: Corrected error received PCIe Bus Error
"Current workaround is to add pci=noaer to your kernel command line:
- edit
/etc/default/grub
and and addpci=noaer
to the line starting with GRUB_CMDLINE_LINUX_DEFAULT. It will look like this:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=noaer"
- run
sudo update-grub
- reboot"
That worked in stopping the syslog
from being flooded and spammed with the pcieport 0000:00:1c.2: AER: Corrected error received: id=00e2
messages.
Thats great. I don't see those error messages on boot anymore either.
But my boot start-up time is still 90 seconds.
When I now run systemd-analyze
I get
Startup finished in 6.232s (firmware) + 3.306s (loader) + 8.247s (kernel) + 3min 551ms (userspace) = 3min 18.337s
still.
I am on Asus laptop model X550V i7-7700HQ Skylake cpu (with Geforce GTX Nividia 950M on Samsung 850 Evo 250Gb SSD) on Kernel 4.13.3-041303-generic. I had the same problem on 4.10.0-35 kernel so thats why I switched to 4.13 kernel to see if there was any improvement, but it is same issue still slow boot.
Do I still need to add pci=nomsi
to Grub also as suggested in comments below, if I don't have the pcie buss error messages anymore?
Will that help my still slow boot time?
`
sudo apt install
via the terminal or behind the scenes using that command via the software center GUI. See this bug report: https://askubuntu.com/questions/801077/disable-snapd-refresh-service-on-16-04-to-speed-up-boot-no-snap-packages-in-use – WinEunuuchs2Unix Sep 24 '17 at 06:52/var/log/syslog
that contains the time each program starts up to see which one is taking up the 90 seconds or so. – WinEunuuchs2Unix Sep 25 '17 at 10:28kernel: [ 473.256784] pcieport 0000:00:1c.2: PCIe Bus Error: severity=Corrected, type=Physical Layer, id=00e2(Receiver ID)
andkernel: [ 1071.824530] pcieport 0000:00:1c.2: [ 0] Receiver Error (First) Sep 25 07:40:03 jon kernel: [ 1071.838974] pcieport 0000:00:1c.2: AER: Multiple Corrected error received: id=00e2
it is repeated thousands of times non-stop. even in boot-up process and shutdown I see it briefly.I have conky showing my syslog and it is non-stop every second same pcie bus error. (I am using i7 -7700HQ Skylake CPU on Asus x550V). – jon anotter88998889 Sep 25 '17 at 13:53I tried
pci=noaerbefore I saw your comments and that workaround happened to stop the
PCIe Bus Errorand
AER: Corrected error receivedmessages...
syslog` not flooded anymore....but boot still at least 90 seconds. – jon anotter88998889 Sep 26 '17 at 03:26