redocking suspended laptop causes reboot

0

This procedure has worked for me for years flawlessly:

  1. Close lid to cause sleep/suspend.
  2. Undock laptop
  3. Leave lid closed
  4. Redock laptop
  5. Open lid to wakeup/unsuspend/resume/thaw

However, after a recent update (I'm on Debian buster, going from stretch), step #5 above causes the laptop to reboot instead of wakeup.

I'm at a loss to diagnose the problem. The end of /var/log/syslog is always:

Aug 28 18:20:40 robert-linlap NetworkManager[771]: <info>  [1567041640.6606] manager: NetworkManager state is now ASLEEP
Aug 28 18:20:40 robert-linlap systemd[1]: Reached target Sleep.
Aug 28 18:20:40 robert-linlap systemd[1]: Starting Suspend...
Aug 28 18:20:40 robert-linlap systemd-sleep[19425]: Suspending system...

I.e., no indication of why there was a restart instead of a waking up.

I'm at a loss how to diagnose what is happening or how to fix it: that is my main motivation behind asking this question.

There is a workaround:

  1. Leave lid open.
  2. Undock laptop
  3. Close lid to cause sleep/suspend
  4. Open lid to trigger a wakeup/unsuspend
  5. Dock laptop
  6. Never close lid :-)

The downside of this workaround is that I have to re-set-up my external monitor configuration; not a big deal, but annoying.

Anyway, again, my goal would be to figure out how to diagnose the problem so that I can fix it, hopefully through looking at a magic log file or turning on some diagnostics.

roberttheprogrammer

Posted 2019-08-30T18:32:50.837

Reputation: 31

Answers

0

Actually, it looks like suspend only works randomly. The above workaround sequence doesn't always work.

I discovered that s2ram and s2both work, surprisingly. For some odd reason, pm-suspend and pm-suspend-hybrid were failing, but s2ram and s2both worked.

I looked at the files in /usr/lib/pm-utils/sleep.d/ and did dpkg -S to figure out what Debian package they were in and upgraded any packages which needed upgrading. This ended up upgrading:

dbus
systemd
libc-bin
libdbus-1-3
anacron
man-db
hdparm
powermgmt-base
initramfs-tools
uswsusp
acpi-support
pm-utils

Don't know which one of them did it, but it's working better.

However, I'm still a bit paranoid, so I set up systemd's suspend to always suspend_hybrid via Hybrid-sleep on suspend or hibernation request and How do I use pm-suspend-hybrid by default instead of pm-suspend?.

Looks like things are working so far.

UPDATE

With the latest update to intel-microcode, it causes suspend/standby/sleep to fail when the power source (AC adapter) is removed at any point. This seems to be another issue.

roberttheprogrammer

Posted 2019-08-30T18:32:50.837

Reputation: 31