1

My laptop has an undesirable 30s delay upon every suspend. This has been happening for at least a couple of months now, and I'd finally like to get rid of it, but I do not know what causes it.

Here's the relevant section of /var/log/syslog:

Nov 15 12:47:01 exobrain NetworkManager[21274]: <info [1605440821.3196] manager: sleep: sleep requested (sleeping: no  enabled: yes)
Nov 15 12:47:01 exobrain NetworkManager[21274]: <info [1605440821.3198] device (wlp2s0): state change: disconnected -unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Nov 15 12:47:01 exobrain wpa_supplicant[555]: nl80211: deinit ifname=p2p-dev-wlp2s0 disabled_11b_rates=0
Nov 15 12:47:01 exobrain NetworkManager[21274]: <info [1605440821.3321] device (p2p-dev-wlp2s0): state change: disconnected -unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Nov 15 12:47:01 exobrain NetworkManager[21274]: <info [1605440821.3324] device (72:1F:BB:15:3C:B3): state change: disconnected -unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Nov 15 12:47:01 exobrain NetworkManager[21274]: <info [1605440821.3328] manager: NetworkManager state is now ASLEEP
Nov 15 12:47:01 exobrain wpa_supplicant[555]: nl80211: deinit ifname=wlp2s0 disabled_11b_rates=0
Nov 15 12:47:31 exobrain systemd[1]: Reached target Sleep.
Nov 15 12:47:31 exobrain systemd[1]: Starting Suspend...
Nov 15 12:47:34 exobrain systemd-sleep[72905]: Suspending system...
Nov 15 12:47:34 exobrain kernel: [41584.276223] PM: suspend entry (deep)

As you can see, the 30s delay occurs between NetworkManager being asleep and systemd actually going into suspend.

What causes this delay and how can I eliminate it?

Here's some system info:

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:        Ubuntu 20.04.1 LTS
Release:        20.04
Codename:       focal
# uname -r
5.4.0-52-generic

Some additional info:

  • The delay does not occur with pm-suspend.
  • The configuration files /etc/systemd/sleep.conf and /etc/systemd/logind.conf are both empty, containing only the default values in commented out form.
  • systemd-analyze blame shows only one item taking substantially longer than a second, namely NetworkManager-wait-online.service with 7.4s.
5
  • 1
    I have the same issue for some times now. It seems there is a process ongoing and systemd wait 30s before killing it. – ppr Nov 22 '20 at 16:52
  • @ppr: are you referring to an actual process in the operating system? Which process is that? BTW I've implemented a workaround by creating a hotkey that runs pm-suspend, which does not depend on systemd. That works well so far, although of course it doesn't address the underlying issue. – Saibot Nov 23 '20 at 10:56
  • No I was not referring to an actual process ongoing. But it seems to me systemd fails to stop a service, and then wait 30s before killing it to put the computer to sleep. I also read that this 30s delay could be a intended feature (even if I have some trouble to believe that). – ppr Nov 27 '20 at 10:57
  • Do you use a docking station? – ppr Nov 27 '20 at 10:58
  • @ppr: No, I don't use a docking station. Do you? If you happen to know which service systemd fails to stop, that could be some useful input. – Saibot Nov 27 '20 at 11:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.