Ubuntu 20.04 takes too long to boot

I have recently installed Ubuntu 20.04 on my HP-notebook(intel core i-5, 8GB RAM, AMD Radeon 2GB). It takes more than 2 min to reach the login screen.

I used the command dmesg to analyze which process it taking too much time only too see the below output:

If you go to timestamp [ 67.555730] rfkill: input handler disabled] , the process just after that by the name of audit has been called so many times and took nearly 50 secs of the boot process.

[   67.460851] [drm] ib test on ring 1 succeeded in 0 usecs
[   67.460874] [drm] ib test on ring 2 succeeded in 0 usecs
[   67.460899] [drm] ib test on ring 3 succeeded in 0 usecs
[   67.460924] [drm] ib test on ring 4 succeeded in 0 usecs
**[   67.555730] rfkill: input handler disabled**
[  111.331719] audit: type=1400 audit(1591675362.633:47): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/snap/snapd/7777/usr/lib/snapd/snap-confine" pid=1687 comm="apparmor_parser"
[  111.332012] audit: type=1400 audit(1591675362.633:48): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/snap/snapd/7777/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=1687 comm="apparmor_parser"
[  112.182135] audit: type=1400 audit(1591675363.485:49): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap-update-ns.snap-store" pid=1689 comm="apparmor_parser"
[  112.188690] audit: type=1400 audit(1591675363.493:50): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap-update-ns.canonical-livepatch" pid=1691 comm="apparmor_parser"
[  112.190389] audit: type=1400 audit(1591675363.493:51): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.canonical-livepatch.hook.configure" pid=1694 comm="apparmor_parser"
[  112.192167] audit: type=1400 audit(1591675363.497:52): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.canonical-livepatch.canonical-livepatch" pid=1692 comm="apparmor_parser"
[  112.192408] audit: type=1400 audit(1591675363.497:53): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.canonical-livepatch.canonical-livepatchd" pid=1693 comm="apparmor_parser"
[  112.195750] audit: type=1400 audit(1591675363.497:54): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap-update-ns.vlc" pid=1698 comm="apparmor_parser"
[  112.196569] audit: type=1400 audit(1591675363.501:55): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.snap-store.snap-store" pid=1695 comm="apparmor_parser"
[  112.197056] audit: type=1400 audit(1591675363.501:56): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.snap-store.ubuntu-software" pid=1696 comm="apparmor_parser"
[  118.265070] kauditd_printk_skb: 2 callbacks suppressed
[  118.265076] audit: type=1400 audit(1591675369.569:59): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/snap/core/9289/usr/lib/snapd/snap-confine" pid=1796 comm="apparmor_parser"
[  118.265095] audit: type=1400 audit(1591675369.569:60): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/snap/core/9289/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=1796 comm="apparmor_parser"
[  118.797549] audit: type=1400 audit(1591675370.101:61): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/snap/snapd/7777/usr/lib/snapd/snap-confine" pid=1798 comm="apparmor_parser"
[  118.836034] audit: type=1400 audit(1591675370.141:62): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/snap/snapd/7777/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=1798 comm="apparmor_parser"
[  119.433628] audit: type=1400 audit(1591675370.737:63): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap-update-ns.core" pid=1800 comm="apparmor_parser"
[  119.529999] audit: type=1400 audit(1591675370.833:64): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.core.hook.configure" pid=1801 comm="apparmor_parser"
[  120.144506] audit: type=1400 audit(1591675371.449:65): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.snap-store.snap-store" pid=1803 comm="apparmor_parser"
[  120.175883] audit: type=1400 audit(1591675371.481:66): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap-update-ns.vlc" pid=1806 comm="apparmor_parser"
[  120.190680] audit: type=1400 audit(1591675371.493:67): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.snap-store.ubuntu-software" pid=1804 comm="apparmor_parser"
[  120.211819] audit: type=1400 audit(1591675371.517:68): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap-update-ns.canonical-livepatch" pid=1808 comm="apparmor_parser"
[  147.119565] kauditd_printk_skb: 6 callbacks suppressed
[  147.119569] audit: type=1400 audit(1591675398.426:75): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/snap/snapd/7777/usr/lib/snapd/snap-confine" pid=1934 comm="apparmor_parser"
[  147.119577] audit: type=1400 audit(1591675398.426:76): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/snap/snapd/7777/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=1934 comm="apparmor_parser"
[  147.918540] audit: type=1400 audit(1591675399.222:77): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.snap-store.ubuntu-software" pid=1938 comm="apparmor_parser"
[  147.948852] audit: type=1400 audit(1591675399.254:78): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.snap-store.ubuntu-software-local-file" pid=1939 comm="apparmor_parser"
[  148.020594] audit: type=1400 audit(1591675399.326:79): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.snap-store.snap-store" pid=1937 comm="apparmor_parser"
[  148.216393] audit: type=1400 audit(1591675399.522:80): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap-update-ns.snap-store" pid=1936 comm="apparmor_parser"
[  210.116607] [drm] PCIE gen 3 link speeds already enabled
[  210.133629] [drm] PCIE GART of 2048M enabled (table at 0x0000000000040000).
[  210.133736] radeon 0000:01:00.0: WB enabled
[  210.133739] radeon 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000080000c00 and cpu addr 0x0000000002c29bac
[  210.133740] radeon 0000:01:00.0: fence driver on ring 1 use gpu addr 0x0000000080000c04 and cpu addr 0x00000000f44304ae
[  210.133742] radeon 0000:01:00.0: fence driver on ring 2 use gpu addr 0x0000000080000c08 and cpu addr 0x0000000031bde5cd
[  210.133743] radeon 0000:01:00.0: fence driver on ring 3 use gpu addr 0x0000000080000c0c and cpu addr 0x00000000d7e92f5c
[  210.133744] radeon 0000:01:00.0: fence driver on ring 4 use gpu addr 0x0000000080000c10 and cpu addr 0x000000001f77e5bc
[  210.326579] [drm] ring test on 0 succeeded in 1 usecs
[  210.326584] [drm] ring test on 1 succeeded in 1 usecs
[  210.326588] [drm] ring test on 2 succeeded in 1 usecs
[  210.326596] [drm] ring test on 3 succeeded in 4 usecs
[  210.326603] [drm] ring test on 4 succeeded in 4 usecs
[  210.326671] [drm] ib test on ring 0 succeeded in 0 usecs
[  210.326732] [drm] ib test on ring 1 succeeded in 0 usecs
[  210.326820] [drm] ib test on ring 2 succeeded in 0 usecs
[  210.326833] [drm] ib test on ring 3 succeeded in 0 usecs
[  210.326844] [drm] ib test on ring 4 succeeded in 0 usecs
[  210.334790] rfkill: input handler enabled
[  210.715243] Bluetooth: RFCOMM TTY layer initialized
[  210.715258] Bluetooth: RFCOMM socket layer initialized
[  210.715273] Bluetooth: RFCOMM ver 1.11
[  224.498251] audit: type=1400 audit(1591675475.797:81): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.snap-store.ubuntu-software-local-file" pid=2256 comm="apparmor_parser"
[  224.529105] audit: type=1400 audit(1591675475.829:82): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.snap-store.snap-store" pid=2254 comm="apparmor_parser"
[  224.546528] audit: type=1400 audit(1591675475.845:83): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.snap-store.ubuntu-software" pid=2255 comm="apparmor_parser"
[  224.820589] audit: type=1400 audit(1591675476.121:84): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap-update-ns.snap-store" pid=2253 comm="apparmor_parser"
[  233.396341] rfkill: input handler disabled
[  236.218843] [drm] PCIE gen 3 link speeds already enabled
[  236.230351] [drm] PCIE GART of 2048M enabled (table at 0x0000000000040000).
[  236.230455] radeon 0000:01:00.0: WB enabled
[  236.230458] radeon 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000080000c00 and cpu addr 0x0000000002c29bac
[  236.230459] radeon 0000:01:00.0: fence driver on ring 1 use gpu addr 0x0000000080000c04 and cpu addr 0x00000000f44304ae
[  236.230460] radeon 0000:01:00.0: fence driver on ring 2 use gpu addr 0x0000000080000c08 and cpu addr 0x0000000031bde5cd
[  236.230461] radeon 0000:01:00.0: fence driver on ring 3 use gpu addr 0x0000000080000c0c and cpu addr 0x00000000d7e92f5c
[  236.230462] radeon 0000:01:00.0: fence driver on ring 4 use gpu addr 0x0000000080000c10 and cpu addr 0x000000001f77e5bc
[  236.422306] [drm] ring test on 0 succeeded in 1 usecs
[  236.422311] [drm] ring test on 1 succeeded in 1 usecs
[  236.422315] [drm] ring test on 2 succeeded in 1 usecs
[  236.422323] [drm] ring test on 3 succeeded in 4 usecs
[  236.422329] [drm] ring test on 4 succeeded in 4 usecs
[  236.422393] [drm] ib test on ring 0 succeeded in 0 usecs
[  236.422422] [drm] ib test on ring 1 succeeded in 0 usecs
[  236.422554] [drm] ib test on ring 2 succeeded in 0 usecs
[  236.422583] [drm] ib test on ring 3 succeeded in 0 usecs
[  236.422597] [drm] ib test on ring 4 succeeded in 0 usecs

Also, it takes about 10 secs to load the desktop and icons from login screen.

Below is the head of the output of $system-analyze blame.

41.797s plymouth-quit-wait.service                           
25.586s man-db.service                                       
21.755s NetworkManager-wait-online.service                   
19.547s networkd-dispatcher.service                          
12.294s apt-daily.service                                    
10.432s dev-sda2.device                                      
10.193s udisks2.service                                      
 9.942s accounts-daemon.service                              
 7.864s NetworkManager.service                               
 7.050s snapd.service                                        

Go to Source
Author: Hades