System reboot on wake from sleep when without AC

Hi.
I'm running into an issue where after my NB goes to sleep, the system restarts on powering it up again. It's been reported before for other devices and kernel versions but I got it too now.
Other reports:

My situation is exactly as described in the last kernel bug linked above.

  1. unplug AC
  2. put to sleep
  3. when asleep, power button to wake -> cold boot

This happens when putting the system to sleep via lid close, power button (mapped to sleep for me) or i3exit suspend.

Hardware: Dell XPS 9560, no issues as of yet

Here is the output of journactl of a successful (AC plugged) and broken suspend cycle respectively

May 23 08:35:50 pascalwhoop-xps root[25481]: PowerButton pressed
May 23 08:35:52 pascalwhoop-xps NetworkManager[1133]: <info>  [1590215752.4123] manager: sleep: sleep requested (sleeping: no  enabled: yes)
May 23 08:35:52 pascalwhoop-xps NetworkManager[1133]: <info>  [1590215752.4124] device (p2p-dev-wlp2s0): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
May 23 08:35:52 pascalwhoop-xps NetworkManager[1133]: <info>  [1590215752.4127] manager: NetworkManager state is now ASLEEP
May 23 08:35:52 pascalwhoop-xps systemd[1]: Reached target Sleep.
May 23 08:35:52 pascalwhoop-xps systemd[1]: Starting Suspend...
May 23 08:35:52 pascalwhoop-xps root[25532]: ACPI action undefined: LNXPWRBN:00
May 23 08:35:52 pascalwhoop-xps systemd-sleep[25531]: Suspending system...
May 23 08:35:52 pascalwhoop-xps kernel: PM: suspend entry (deep)
May 23 08:35:52 pascalwhoop-xps kernel: Filesystems sync: 0.011 seconds
May 23 08:35:52 pascalwhoop-xps kernel: bbswitch: enabling discrete graphics
May 23 08:36:01 pascalwhoop-xps kernel: Freezing user space processes ... (elapsed 0.002 seconds) done.
May 23 08:36:01 pascalwhoop-xps kernel: OOM killer disabled.
May 23 08:36:01 pascalwhoop-xps kernel: Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
May 23 08:36:01 pascalwhoop-xps kernel: printk: Suspending console(s) (use no_console_suspend to debug)
May 23 08:36:01 pascalwhoop-xps kernel: wlp2s0: deauthenticating from 82:2a:a8:c2:a6:74 by local choice (Reason: 3=DEAUTH_LEAVING)
May 23 08:36:01 pascalwhoop-xps kernel: sd 5:0:0:0: [sdd] Synchronizing SCSI cache
May 23 08:36:01 pascalwhoop-xps kernel: sd 3:0:0:0: [sdb] Synchronizing SCSI cache
May 23 08:36:01 pascalwhoop-xps kernel: sd 2:0:0:0: [sda] Synchronizing SCSI cache
May 23 08:36:01 pascalwhoop-xps kernel: sd 4:0:0:0: [sdc] Synchronizing SCSI cache
May 23 08:36:01 pascalwhoop-xps kernel: ACPI: EC: interrupt blocked
May 23 08:36:01 pascalwhoop-xps kernel: ACPI: Preparing to enter system sleep state S3
May 23 08:36:01 pascalwhoop-xps kernel: ACPI: EC: event blocked
May 23 08:36:01 pascalwhoop-xps kernel: ACPI: EC: EC stopped
May 23 08:36:01 pascalwhoop-xps kernel: PM: Saving platform NVS memory
May 23 08:36:01 pascalwhoop-xps kernel: Disabling non-boot CPUs ...
May 23 08:36:01 pascalwhoop-xps kernel: IRQ 148: no longer affine to CPU1
May 23 08:36:01 pascalwhoop-xps kernel: smpboot: CPU 1 is now offline
May 23 08:36:01 pascalwhoop-xps kernel: IRQ 149: no longer affine to CPU2
May 23 08:36:01 pascalwhoop-xps kernel: smpboot: CPU 2 is now offline
May 23 08:36:01 pascalwhoop-xps kernel: IRQ 150: no longer affine to CPU3
May 23 08:36:01 pascalwhoop-xps kernel: smpboot: CPU 3 is now offline
May 23 08:36:01 pascalwhoop-xps kernel: IRQ 151: no longer affine to CPU4
May 23 08:36:01 pascalwhoop-xps kernel: smpboot: CPU 4 is now offline
May 23 08:36:01 pascalwhoop-xps kernel: IRQ 152: no longer affine to CPU5
May 23 08:36:01 pascalwhoop-xps kernel: smpboot: CPU 5 is now offline
May 23 08:36:01 pascalwhoop-xps kernel: IRQ 153: no longer affine to CPU6
May 23 08:36:01 pascalwhoop-xps kernel: smpboot: CPU 6 is now offline
May 23 08:36:01 pascalwhoop-xps kernel: IRQ 154: no longer affine to CPU7
May 23 08:36:01 pascalwhoop-xps kernel: smpboot: CPU 7 is now offline
May 23 08:36:01 pascalwhoop-xps kernel: ACPI: Low-level resume complete
May 23 08:36:01 pascalwhoop-xps kernel: ACPI: EC: EC started
May 23 08:36:01 pascalwhoop-xps kernel: PM: Restoring platform NVS memory
May 23 08:36:01 pascalwhoop-xps kernel: Enabling non-boot CPUs ...
May 23 08:36:01 pascalwhoop-xps kernel: x86: Booting SMP configuration:
May 23 08:36:01 pascalwhoop-xps kernel: smpboot: Booting Node 0 Processor 1 APIC 0x2
May 23 08:36:01 pascalwhoop-xps kernel: microcode: sig=0x906e9, pf=0x20, revision=0xc6
May 23 08:36:01 pascalwhoop-xps kernel: microcode: updated to revision 0xca, date = 2019-10-03
May 23 08:36:01 pascalwhoop-xps kernel: intel_pstate: Disabling energy efficiency optimization
May 23 08:36:01 pascalwhoop-xps kernel: CPU1 is up
May 23 08:36:01 pascalwhoop-xps kernel: smpboot: Booting Node 0 Processor 2 APIC 0x4
May 23 08:36:01 pascalwhoop-xps kernel: CPU2 is up
May 23 08:36:01 pascalwhoop-xps kernel: smpboot: Booting Node 0 Processor 3 APIC 0x6
May 23 08:36:01 pascalwhoop-xps kernel: CPU3 is up
May 23 08:36:01 pascalwhoop-xps kernel: smpboot: Booting Node 0 Processor 4 APIC 0x1
May 23 08:36:01 pascalwhoop-xps kernel: microcode: sig=0x906e9, pf=0x20, revision=0xca
May 23 08:36:01 pascalwhoop-xps kernel: CPU4 is up
May 23 08:36:01 pascalwhoop-xps kernel: smpboot: Booting Node 0 Processor 5 APIC 0x3

and the reboot variant

May 23 08:39:17 pascalwhoop-xps root[29912]: PowerButton pressed
May 23 08:39:19 pascalwhoop-xps NetworkManager[1133]: <info>  [1590215959.3188] manager: sleep: sleep requested (sleeping: no  enabled: yes)
May 23 08:39:19 pascalwhoop-xps NetworkManager[1133]: <info>  [1590215959.3189] device (p2p-dev-wlp2s0): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
May 23 08:39:19 pascalwhoop-xps NetworkManager[1133]: <info>  [1590215959.3192] manager: NetworkManager state is now ASLEEP
May 23 08:39:19 pascalwhoop-xps systemd[1]: Reached target Sleep.
May 23 08:39:19 pascalwhoop-xps systemd[1]: Starting Suspend...
May 23 08:39:19 pascalwhoop-xps root[29963]: ACPI action undefined: LNXPWRBN:00
May 23 08:39:19 pascalwhoop-xps systemd-sleep[29962]: Suspending system...
May 23 08:39:19 pascalwhoop-xps kernel: PM: suspend entry (deep)
-- Reboot --

Further detail: This even happens if I

  1. enter suspend, while being under AC
  2. when suspended, unplug AC for 2-3 seconds, then plug back in
  3. attempt to resume while being on AC

So it seems the system looses its memory state whenever the system is in a suspended state AND not connected to AC.

One further note: I recently played around with GNOME as a secondary DE. I had it installed for a while, I just selected the DE in the login screen once. I hardly think this can be an issue.
Other things I tried to remedy the issue:

  • Downgrade intel-ucode to 20191115 (was upgraded 2d ago)
  • kernel 4.19 LTS and 5.4.40 LTS

Edit 2:
I just tried this on my Windows 10 USB bootable and I am seeing the same behavior. I am unsure if this means I am suffering a hardware issue or if a firmware upgrade originating from Linux may also have caused this. I'd still appreciate some knowledgeable advise or pointers to what I could try to diagnose this further even though it may be the fault of the XPS hardware, not the OS. Battery and Memory tests in the BIOS went well, nothing to report from that side.

I managed to resolve my issue by opening up the back of the machine and disconnecting the main battery, then perform a boot on AC, hold the power button for 5 seconds and then reconnect the battery and boot up reguarly. I got the idea from this thread: https://bbs.archlinux.org/viewtopic.php?id=223056

Forum kindly sponsored by