3

I have Ubuntu 20.04 (triple boot w Windows 10/kali 2020.4) on a Lenovo machine. Here is my Hardware Information:

  • RAM - 8GB
  • Disk Type - SSD
  • Disk Space - 50 GB
  • Architecture - amd64
  • Processor - Intel(core i7) 10th generation

My windows boots up in 4-5 seconds while ubuntu has been taking 8-10 mins for a month or so, I don't know how to debug.

I ran dmesg and got the following log

  1. snippet 1:
[    2.556631] audit: type=1400 audit(1616666280.585:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libreoffice-xpdfimport" pid=651 comm="apparmor_parser"
[   92.015617] kauditd_printk_skb: 37 callbacks suppressed
  1. snippet 2:
[  127.766206] audit: type=1400 audit(1616646605.387:69): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.snap-store.snap-store" pid=3756 comm="apparmor_parser"
[  473.393428] kauditd_printk_skb: 19 callbacks suppressed

What is the meaning of

kauditd_printk_skb: 37 callbacks suppressed

systemd-analyse output:

Startup finished in 2.426s (firmware) + 7.991s (loader) + 1.468s (kernel) + 1min 51.594s (userspace) = 2min 3.480s 
graphical.target reached after 1min 51.577s in userspace

systemd-analyze blame output :

21.031s plymouth-quit-wait.service                                                               
 4.388s NetworkManager-wait-online.service                                                       
 3.804s fwupd.service                                                                            
 1.730s snapd.service                                                                            
 1.488s fstrim.service                                                                           
  693ms snap-snapd-11107.mount                                                                   
  683ms snap-code-58.mount                                                                       
  619ms snap-core18-1944.mount                                                                   
  586ms snap-gtk\x2dcommon\x2dthemes-1514.mount                                                  
  423ms snap-core18-1988.mount                                                                   
  403ms snap-code-59.mount                                                                       
  363ms dev-nvme0n1p7.device                                                                     
  347ms systemd-logind.service                                                                   
  334ms snap-core-10859.mount                                                                    
  283ms dev-loop0.device                                                                         
  239ms snap-gtk\x2dcommon\x2dthemes-1506.mount                                                  
  237ms snap-snap\x2dstore-498.mount                                                             
  213ms snap-canonical\x2dlivepatch-95.mount                                                     
  213ms dev-loop2.device                                                                         
  204ms snap-gnome\x2d3\x2d34\x2d1804-60.mount                                                   
  203ms snap-gnome\x2d3\x2d34\x2d1804-66.mount                                                   
  200ms snap-snap\x2dstore-518.mount                                                             
  193ms tuned.service                                                                            
  192ms dev-loop3.device                                                                         
  181ms dev-loop8.device                                                                         
  175ms systemd-resolved.service                                                                 
  165ms dev-loop4.device                                                                         
  165ms networkd-dispatcher.service                                                              
  151ms systemd-timesyncd.service                                                                
  148ms udisks2.service                                                                          
  138ms dev-loop11.device                                                                        
  127ms dev-loop5.device                                                                         
  120ms systemd-rfkill.service                                                                   
  117ms accounts-daemon.service                                                                  
  111ms systemd-fsck@dev-disk-by\x2duuid-05cdca1f\x2d6222\x2d4ec0\x2d8675\x2d862db39f842a.service
  104ms upower.service                                                                           
  101ms apparmor.service                                                                         
   96ms user@1000.service                                                                        
   88ms dev-loop9.device                                                                         
   88ms dev-loop7.device                                                                         
   87ms dev-loop12.device                                                                        
   79ms systemd-journal-flush.service                                                            
   77ms dev-loop13.device                                                                        
   72ms dev-loop6.device                                                                         
   69ms systemd-journald.service                                                                 
   66ms polkit.service                                                                           
   66ms bluetooth.service                                                                        
   65ms systemd-udev-trigger.service                                                             
   65ms avahi-daemon.service                                                                     
   61ms NetworkManager.service                                                                   
   60ms switcheroo-control.service                                                               
   58ms systemd-udevd.service                                                                    
   52ms snap-core-10908.mount                                                                    
   51ms keyboard-setup.service 

systemd-analyze critical-chain output :

graphical.target @1min 51.577s
└─multi-user.target @1min 51.577s
  └─snapd.seeded.service @1min 35.340s +21ms
    └─basic.target @1min 30.453s
      └─sockets.target @1min 30.452s
        └─snapd.socket @1min 30.451s +651us
          └─sysinit.target @1min 30.439s
            └─systemd-timesyncd.service @1.091s +151ms
              └─systemd-tmpfiles-setup.service @1.067s +21ms
                └─local-fs.target @1.063s
                  └─run-snapd-ns-snap\x2dstore.mnt.mount @1min 35.053s
                    └─run-snapd-ns.mount @1min 34.150s
                      └─local-fs-pre.target @351ms
                        └─keyboard-setup.service @300ms +51ms
                          └─systemd-journald.socket @296ms
                            └─system.slice @294ms
                              └─-.slice @294ms

cat /etc/fstab output:

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p7 during installation
UUID=e1e7a401-980c-44c4-9567-cf04951b42a2 /               ext4    errors=remount-ro 0       1
# /boot was on /dev/nvme0n1p8 during installation
UUID=05cdca1f-6222-4ec0-8675-862db39f842a /boot           ext4    defaults        0       2
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=C0A5-904E  /boot/efi       vfat    umask=0077      0       1
# swap was on /dev/nvme0n1p9 during installation
UUID=56534486-e9b5-4a7b-b03d-71f87ad9d8df none            swap    sw              0       0

I'm quite new, how can I fix this boot delay?

  • I don’t think the callbacks suppressed messages are anything to worry about. See here https://stackoverflow.com/questions/54955662/role-of-kauditd-printk-skb-in-linux-kernel#58162487 You say your machine is taking 8 to 10 minutes to boot but systemd is saying just over 2. Can you clarify what happens. Assuming you have an SSD this is slow. Does journalctl -p 3 -xb show anything interesting? It will show any errors since current boot process started. – PonJar Mar 25 '21 at 10:02
  • 1
    Some things to check: https://askubuntu.com/questions/1284302/is-it-possible-to-make-ubuntu-20-04-boot-faster Most desktops do not need /boot partition, but that should not be part of issue. Also change NVMe partitions to noatime in fstab, like noatime,errors=remount-ro. – oldfred Mar 25 '21 at 12:12
  • @PonJar journalctl -p 3 -xb showed multiple lines of errors like
    Mar 25 22:56:47 db kernel: ACPI Error: AE_ALREADY_EXISTS, During name lookup/ca>```
    and
    ```  Mar 25 22:56:47 db kernel: ACPI BIOS Error (bug): Failure creating named object [\_SB.PCI0.XHC.RHUB.GPLD], AE_ALREADY_EXISTS (20200528/dswload2-326)
    Mar 25 22:56:47 db kernel: ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20200528/psobject-220)  ```
    
    – prakhar dubey Mar 25 '21 at 12:13
  • @oldfred where exaclty should i make the changes? – prakhar dubey Mar 25 '21 at 12:23
  • Most ACPI errrors can be ignored. Some may need boot parameters, but if it worked before, that would not be an issue. See: man fstab. Full example in link above on an fstab entry with noatime. Did you review all the settings in the link & also all the added links which may have more detail? – oldfred Mar 25 '21 at 19:05
  • When @oldfred refers to fstab, he means the file at /etc/fstab. That file contains the information about what partitions to mount , where to mount them and what parameters to use – PonJar Mar 25 '21 at 21:18
  • 1
    Looking at this again you may have something waiting to timeout just before the system reaches sysinit.target. Timeouts are often 90 seconds which is roughly the gap you have. When you boot do you get a load of text scroll up the screen? If not you can enable it by following the procedure here https://askubuntu.com/questions/248/how-can-i-show-or-hide-boot-messages-when-ubuntu-starts With this visible you may be able to see a timeout incrementing which could lead to a solution. – PonJar Mar 26 '21 at 09:03
  • Update: Turns out somehow the UUID of my swap partition got changed. I installed gparted to check the UUID of my swap partition, changed it in the fstab and now it works fine. Sorry for the late update and thank you for your help – prakhar dubey Apr 12 '21 at 12:04

2 Answers2

1

Turns out somehow the UUID of my swap partition which is /dev/nvme0n1p9 here, got changed. I installed gparted to check the UUID of my swap partition (/dev/nvme0n1p9), changed it in the /etc/fstab and now the booting process works fine and takes about 5-6 seconds. Check this Slow boot - "a start job is running for dev-disk-by..." solution for more info in this.

0

Is this for a personal computer, or is it carrying critical systems?

Reason I ask this is that, unless you get a better answer, I would reinstall Ubuntu and start again. It seems like there are some serious conflicts going on. I hope you get a better answer than this, but my move would be to reinstall.

You asked about Kauditd ... check out ... https://stackoverflow.com/a/58162487

Your system is spamming back log events regarding broken packages or systems which are in conflict.

poised
  • 31
  • It is a personal computer but it has some of my important projects and a lot of locally saved work, reinstallation would cost a lot. – prakhar dubey Mar 25 '21 at 06:04
  • it is possible to use a /home partition so that reinstall can happen without disturbing data. Can you save data to an external device or cloud or something and then reinstall? – poised Mar 25 '21 at 06:09
  • what could've caused the problem that leads to my system spamming back log events regarding broken packages – prakhar dubey Mar 25 '21 at 06:13
  • I can't be sure, but may I ask if you install your software from the repos only or do you do a bit of direct installs with snap and the like? Something is not working and ubuntu keeps trying to get it started at boot. On an important system I am always careful to use the software from the repositories only and not add my own repositories .. I experiment with stuff on virtual machines to make sure it won't break something before I do something 'out of the box'. I hope I am helping you Prakhar. I am not the expert but I am just telling you what I do to try to keep working smooth. – poised Mar 25 '21 at 06:23
  • It depends. Sometimes its direct install, sometimes its from repos(I never added my own repo) and sometimes its package install. I've been on my system for 6-8 months, and I don't think I can trackback all installations. But if I ever reset, how can I know I won't run into the same problem or something even worse? – prakhar dubey Mar 25 '21 at 06:38
  • Prakhar, I have had problems which broke my system before and I get along with what knowledge I gather. What reduces hassle for me is housekeeping. I keep a /home partition. test external packages on a VM before installing on my host machine. I try to keep to the software on the official repos as much as I can. If I have a big problem - I reinstall. The problem you have, I think, came from direct install of a driver. Perhaps try a doing an install of your system on VM that you do everything the same to, so that you can test non-official driver installs on. – poised Mar 25 '21 at 06:43