Using snap packages spotifyd, it takes too long to boot the system


#1

It takes too long to boot system and my systemd-analyze critical-chain is the following:

graphical.target @1min 25.369s
└─multi-user.target @1min 25.369s
  └─snap.spotifyd.spotifyd.service @1min 5.305s +8.372s
    └─network.target @1min 5.301s
      └─NetworkManager.service @49.063s +16.237s
        └─dbus.service @44.485s
          └─basic.target @44.313s
            └─sockets.target @44.313s
              └─snapd.socket @44.312s +1ms
                └─sysinit.target @44.275s
                  └─systemd-timesyncd.service @42.031s +2.244s
                    └─systemd-tmpfiles-setup.service @37.023s +4.389s
                      └─local-fs.target @36.794s
                        └─run-snapd-ns-spotifyd.mnt.mount @1min 10.993s
                          └─run-snapd-ns.mount @1min 9.116s
                            └─local-fs-pre.target @8.940s
                              └─keyboard-setup.service @6.341s +2.598s
                                └─systemd-journald.socket @6.334s
                                  └─system.slice @6.333s
                                    └─-.slice @6.309s

I have seen other such behavior from other snaps too.
I use ubuntu 18.04.
How can I solve it


#2

snap.spotifyd.spotifyd.service will have After: network.target, so unless I’m misunderstanding something what it’s saying is that it took .004s to start spotifyd once you had networking (the difference between 1min 5.301s of network.target and the 1min 5.305s of spotifyd).

To test whether this is the case, why not try disabling spotifyd? snap stop --disable spotifyd should disable the service without disabling the snap. Give it a try!