My ubuntu 20.04 has a slow boot up time. Here is what I did:
- Using
systemd-analyze blame
identified 31s fornetworkd-dispatcher.service
. - Upon doing
journalctl -b -u networkd.dispatcher.service
this is the log:
15:39:11 systemd[1]: Starting Dispatcher daemon for systemd-networkd...
15:39:42 networkd-dispatcher[1144]: DEBUG:Performed interface scan; state: <Dispatcher({'script_dir': '/etc/networkd-dispatcher:/usr/lib/networkd-dispatcher'})>
15:39:42 networkd-dispatcher[1144]: INFO:Triggering scripts for last-known state for allinterfaces
15:39:42 networkd-dispatcher[1144]: DEBUG:Running immediate triggers for NetworkctlListState(idx=1, name='lo', type='loopback', operational='carrier', administrative='unmanaged')
15:39:43 networkd-dispatcher[1144]: DEBUG:Path '/etc/networkd-dispatcher/unmanaged.d' does not exist; skipping
15:39:43 networkd-dispatcher[1144]: DEBUG:Path '/usr/lib/networkd-dispatcher/unmanaged.d' does not exist; skipping
15:39:43 networkd-dispatcher[1144]: DEBUG:Ignoring notification for interface NetworkctlListState(idx=1, name='lo', type='loopback', operational='carrier', administrative='unmanaged') entering state 'unmanaged': no triggers
15:39:43 networkd-dispatcher[1144]: DEBUG:Ignoring notification for interface NetworkctlListState(idx=1, name='lo', type='loopback', operational='carrier', administrative='unmanaged') entering state 'carrier': no triggers
15:39:43 networkd-dispatcher[1144]: DEBUG:Running immediate triggers for NetworkctlListState(idx=2, name='enp2s0', type='ether', operational='no-carrier', administrative='unmanaged')
15:39:43 networkd-dispatcher[1144]: DEBUG:Path '/etc/networkd-dispatcher/unmanaged.d' does not exist; skipping
15:39:43 networkd-dispatcher[1144]: DEBUG:Path '/usr/lib/networkd-dispatcher/unmanaged.d' does not exist; skipping
15:39:43 networkd-dispatcher[1144]: DEBUG:Ignoring notification for interface NetworkctlListState(idx=2, name='enp2s0', type='ether', operational='no-carrier', administrative='unmanaged') entering state 'unmanaged': no triggers
15:39:44 networkd-dispatcher[1144]: DEBUG:Ignoring notification for interface NetworkctlListState(idx=2, name='enp2s0', type='ether', operational='no-carrier', administrative='unmanaged') entering state 'no-carrier': no triggers
15:39:44 networkd-dispatcher[1144]: DEBUG:Running immediate triggers for NetworkctlListState(idx=3, name='wlp3s0', type='wlan', operational='off', administrative='unmanaged')
15:39:44 networkd-dispatcher[1144]: DEBUG:Path '/etc/networkd-dispatcher/unmanaged.d' does not exist; skipping
15:39:44 networkd-dispatcher[1144]: DEBUG:Path '/usr/lib/networkd-dispatcher/unmanaged.d' does not exist; skipping
15:39:44 networkd-dispatcher[1144]: DEBUG:Ignoring notification for interface NetworkctlListState(idx=3, name='wlp3s0', type='wlan', operational='off', administrative='unmanaged') entering state 'unmanaged': no triggers
15:39:44 networkd-dispatcher[1144]: DEBUG:Ignoring notification for interface NetworkctlListState(idx=3, name='wlp3s0', type='wlan', operational='off', administrative='unmanaged') entering state 'off': no triggers
15:39:44 systemd[1]: Started Dispatcher daemon for systemd-networkd.
15:39:44 networkd-dispatcher[1144]: INFO:Startup complete
15:39:45 networkd-dispatcher[1144]: DEBUG:Signal: typ=dbus.String('org.freedesktop.network1.Link'), data=dbus.Dictionary({dbus.String('CarrierState'): dbus.String('carrier', variant_level=1), dbus.String('OperationalState'): dbus.String('carrier', variant_level=1)}, signature=dbus.Signature('sv')), path=dbus.ObjectPath('/org/freedesktop/network1/link/_32')
15:39:45 networkd-dispatcher[1144]: DEBUG:Ignoring notification for interface NetworkctlListState(idx=2, name='enp2s0', type='ether', operational='carrier', administrative='unmanaged') entering state 'carrier': no triggers
15:39:45 networkd-dispatcher[1144]: DEBUG:Signal: typ=dbus.String('org.freedesktop.network1.Manager'), data=dbus.Dictionary({dbus.String('OperationalState'): dbus.String('carrier', variant_level=1), dbus.String('CarrierState'): dbus.String('carrier', variant_level=1)}, signature=dbus.Signature('sv')), path=dbus.ObjectPath('/org/freedesktop/network1')
15:39:45 networkd-dispatcher[1144]: DEBUG:Ignoring signal received with unexpected typ dbus.String('org.freedesktop.network1.Manager')
15:39:46 networkd-dispatcher[1144]: DEBUG:Signal: typ=dbus.String('org.freedesktop.network1.Link'), data=dbus.Dictionary({dbus.String('AddressState'): dbus.String('routable', variant_level=1), dbus.String('OperationalState'): dbus.String('routable', variant_level=1)}, signature=dbus.Signature('sv')), path=dbus.ObjectPath('/org/freedesktop/network1/link/_32')
15:39:46 networkd-dispatcher[1144]: DEBUG:Ignoring notification for interface NetworkctlListState(idx=2, name='enp2s0', type='ether', operational='routable', administrative='unmanaged') entering state 'routable': no triggers
15:39:46 networkd-dispatcher[1144]: DEBUG:Signal: typ=dbus.String('org.freedesktop.network1.Manager'), data=dbus.Dictionary({dbus.String('OperationalState'): dbus.String('routable', variant_level=1), dbus.String('AddressState'): dbus.String('routable', variant_level=1)}, signature=dbus.Signature('sv')), path=dbus.ObjectPath('/org/freedesktop/network1')
15:39:46 networkd-dispatcher[1144]: DEBUG:Ignoring signal received with unexpected typ dbus.String('org.freedesktop.network1.Manager')
15:40:21 networkd-dispatcher[1144]: DEBUG:Signal: typ=dbus.String('org.freedesktop.network1.Link'), data=dbus.Dictionary({dbus.String('CarrierState'): dbus.String('off', variant_level=1), dbus.String('OperationalState'): dbus.String('off', variant_level=1)}, signature=dbus.Signature('sv')), path=dbus.ObjectPath('/org/freedesktop/network1/link/_34')
15:40:21 networkd-dispatcher[1144]: WARNING:Unknown index 4 seen, reloading interface list
15:40:21 networkd-dispatcher[1144]: DEBUG:Performed interface scan; state: <Dispatcher({'script_dir': '/etc/networkd-dispatcher:/usr/lib/networkd-dispatcher'})>
15:40:21 networkd-dispatcher[1144]: DEBUG:No change represented by operational state 'off' for interface 'docker0'
15:40:21 networkd-dispatcher[1144]: DEBUG:Signal: typ=dbus.String('org.freedesktop.network1.Link'), data=dbus.Dictionary({dbus.String('AddressState'): dbus.String('routable', variant_level=1)}, signature=dbus.Signature('sv')), path=dbus.ObjectPath('/org/freedesktop/network1/link/_34')
15:40:21 networkd-dispatcher[1144]: DEBUG:Signal: typ=dbus.String('org.freedesktop.network1.Link'), data=dbus.Dictionary({dbus.String('AdministrativeState'): dbus.String('unmanaged', variant_level=1)}, signature=dbus.Signature('sv')), path=dbus.ObjectPath('/org/freedesktop/network1/link/_34')
15:40:21 networkd-dispatcher[1144]: DEBUG:Path '/etc/networkd-dispatcher/unmanaged.d' does not exist; skipping
15:40:21 networkd-dispatcher[1144]: DEBUG:Path '/usr/lib/networkd-dispatcher/unmanaged.d' does not exist; skipping
15:40:21 networkd-dispatcher[1144]: DEBUG:Ignoring notification for interface NetworkctlListState(idx=4, name='docker0', type='bridge', operational='off', administrative='unmanaged') entering state 'unmanaged': no triggers
15:40:21 networkd-dispatcher[1144]: DEBUG:Signal: typ=dbus.String('org.freedesktop.network1.Link'), data=dbus.Dictionary({dbus.String('CarrierState'): dbus.String('no-carrier', variant_level=1), dbus.String('OperationalState'): dbus.String('no-carrier', variant_level=1)}, signature=dbus.Signature('sv')), path=dbus.ObjectPath('/org/freedesktop/network1/link/_34')
15:40:21 networkd-dispatcher[1144]: DEBUG:Ignoring notification for interface NetworkctlListState(idx=4, name='docker0', type='bridge', operational='no-carrier', administrative='unmanaged') entering state 'no-carrier': no triggers
As you can see it started on 15:39:11 and startup complete was at 15:39:44, even between 1st and the 2nd log line there is a time lag of 31s.
I do not know how to go deeper than this and Identify the problem for the time lag.
Any pointers and resources to solutions will be appreciated.