One of the things I still need to sort out is fixing suspend/hibernation.
I am on BTRFS with LUKS encryption so I know suspend to disk is going to be interesting, but first things first, which is fixing suspend to ram which currently only works when the machine is not connected to a power supply.
The machine will happily suspend with e.g. systemctrl suspend or via the DE sleep menu but whenever the power cable is connected it will wake up again immediately.
This is getting increasingly annoying as I started to use a docking station where I have to undock, suspend and wait for it to complete before docking in again.
Long story short, I have read up and down the internet, and there are many with similar issues, but all the answers are based on finding out which devices is blocking the suspension and then fix this part.
Usual suspects seem to be USB ports, but for me it doesn’t matter if I got some devices attached or not, and I can’t find anything meaningful to me in the logs.
Hence I thought I’d check here if someone has got additional thoughts.
Here’s what I have done so far:
-
pm-utils installed
-
ran systemctl suspend or from Plasma UI as root or user: works reliably w/o power, fails reliably with power connected.
-
Disabled all wakeup sources except the power button in /proc/acpi/wakeup via echo LID0 > /proc/acpi/wakeup
Assuming that “PBTN” is the power button?
No effect. -
Ran PM_DEBUG=true pm-suspend with power cable plugged in and w/o and compared the logs
The logs are identical up to the last line (#2939) of the failing log, no obvious error in the last lines.
I added the dashlines for readability.
Last entries of the failing log:
+ remove_suspend_lock
+ release_lock pm-suspend.lock
+ local lock=/var/run/pm-utils/locks/pm-suspend.lock
+ rm -f /var/run/pm-utils/locks/pm-suspend.lock
+ return 0
Working log (w/o power):
+ remove_suspend_lock
+ release_lock pm-suspend.lock
+ local lock=/var/run/pm-utils/locks/pm-suspend.lock
+ rm -f /var/run/pm-utils/locks/pm-suspend.lock
+ return 0
--------------------------------------
+ log 'Initial commandline parameters: '
+ is_set true
+ case ${1-UNSET} in
+ return 0
+ local 'fmt=%s\n'
+ '[' 'Initial commandline parameters: ' = -n ']'
+ printf '%s\n' 'Initial commandline parameters: '
Initial commandline parameters:
+ load_hook_blacklist
+ '[' '' ']'
+ return
....lots of additional entries...
DMESG -T shows a succesful suspenion and then wakes up right away again
Failing:
[Fri Aug 9 11:43:38 2019] PM: suspend entry (deep)
[Fri Aug 9 11:43:38 2019] Filesystems sync: 0.008 seconds
[Fri Aug 9 11:43:38 2019] Freezing user space processes ... (elapsed 0.002 seconds) done.
[Fri Aug 9 11:43:38 2019] OOM killer disabled.
[Fri Aug 9 11:43:38 2019] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[Fri Aug 9 11:43:38 2019] printk: Suspending console(s) (use no_console_suspend to debug)
[Fri Aug 9 11:43:38 2019] wlp2s0: deauthenticating from 2e:30:33:d9:6c:51 by local choice (Reason: 3=DEAUTH_LEAVING)
[Fri Aug 9 11:43:38 2019] sd 3:0:0:0: [sda] Synchronizing SCSI cache
[Fri Aug 9 11:43:38 2019] sd 3:0:0:0: [sda] Stopping disk
[Fri Aug 9 11:43:38 2019] e1000e: EEE TX LPI TIMER: 00000011
[Fri Aug 9 11:43:38 2019] ACPI: EC: interrupt blocked
[Fri Aug 9 11:43:38 2019] ACPI: Preparing to enter system sleep state S3
[Fri Aug 9 11:43:38 2019] ACPI: EC: event blocked
[Fri Aug 9 11:43:38 2019] ACPI: EC: EC stopped
[Fri Aug 9 11:43:38 2019] PM: Saving platform NVS memory
[Fri Aug 9 11:43:38 2019] Disabling non-boot CPUs ...
[Fri Aug 9 11:43:38 2019] smpboot: CPU 1 is now offline
[Fri Aug 9 11:43:38 2019] smpboot: CPU 2 is now offline
[Fri Aug 9 11:43:38 2019] smpboot: CPU 3 is now offline
[Fri Aug 9 11:43:38 2019] smpboot: CPU 4 is now offline
[Fri Aug 9 11:43:38 2019] smpboot: CPU 5 is now offline
[Fri Aug 9 11:43:38 2019] smpboot: CPU 6 is now offline
[Fri Aug 9 11:43:38 2019] smpboot: CPU 7 is now offline
--------------------------------
[Fri Aug 9 11:43:38 2019] ACPI: Low-level resume complete
[Fri Aug 9 11:43:38 2019] ACPI: EC: EC started
[Fri Aug 9 11:43:38 2019] PM: Restoring platform NVS memory
[Fri Aug 9 11:43:38 2019] Enabling non-boot CPUs ...
[Fri Aug 9 11:43:38 2019] x86: Booting SMP configuration:
[Fri Aug 9 11:43:38 2019] smpboot: Booting Node 0 Processor 1 APIC 0x2
[Fri Aug 9 11:43:38 2019] CPU1 is up
[Fri Aug 9 11:43:38 2019] smpboot: Booting Node 0 Processor 2 APIC 0x4
[Fri Aug 9 11:43:38 2019] CPU2 is up
[Fri Aug 9 11:43:38 2019] smpboot: Booting Node 0 Processor 3 APIC 0x6
[Fri Aug 9 11:43:38 2019] CPU3 is up
[Fri Aug 9 11:43:38 2019] smpboot: Booting Node 0 Processor 4 APIC 0x1
[Fri Aug 9 11:43:38 2019] CPU4 is up
[Fri Aug 9 11:43:38 2019] smpboot: Booting Node 0 Processor 5 APIC 0x3
[Fri Aug 9 11:43:38 2019] CPU5 is up
[Fri Aug 9 11:43:38 2019] smpboot: Booting Node 0 Processor 6 APIC 0x5
[Fri Aug 9 11:43:38 2019] CPU6 is up
[Fri Aug 9 11:43:38 2019] smpboot: Booting Node 0 Processor 7 APIC 0x7
[Fri Aug 9 11:43:38 2019] CPU7 is up
[Fri Aug 9 11:43:38 2019] ACPI: Waking up from system sleep state S3
[Fri Aug 9 11:43:39 2019] ACPI: EC: interrupt unblocked
[Fri Aug 9 11:43:40 2019] ACPI: EC: event unblocked
[Fri Aug 9 11:43:40 2019] usb usb1: root hub lost power or was reset
[Fri Aug 9 11:43:40 2019] usb usb2: root hub lost power or was reset
[Fri Aug 9 11:43:40 2019] sd 3:0:0:0: [sda] Starting disk
[Fri Aug 9 11:43:40 2019] tpm tpm0: tpm_try_transmit: send(): error -5
[Fri Aug 9 11:43:40 2019] nvme nvme0: 8/0/0 default/read/poll queues
[Fri Aug 9 11:43:40 2019] usb 1-11: reset high-speed USB device number 5 using xhci_hcd
[Fri Aug 9 11:43:40 2019] ata2: SATA link down (SStatus 0 SControl 300)
[Fri Aug 9 11:43:40 2019] ata5: SATA link down (SStatus 4 SControl 300)
[Fri Aug 9 11:43:40 2019] ata4: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[Fri Aug 9 11:43:41 2019] ata4.00: configured for UDMA/133
[Fri Aug 9 11:43:41 2019] usb 1-10: reset full-speed USB device number 4 using xhci_hcd
[Fri Aug 9 11:43:41 2019] OOM killer enabled.
[Fri Aug 9 11:43:41 2019] Restarting tasks ... done.
[Fri Aug 9 11:43:41 2019] acpi PNP0401:00: Already enumerated
[Fri Aug 9 11:43:41 2019] acpi PNP0501:00: Still not present
[Fri Aug 9 11:43:41 2019] PM: suspend exit
The timestamps below are a bit missleading but I guess that’s due to the fact that right after the wakeup the system is still operating with the time when the machine went to sleep?
Working (w/o power):
[Fri Aug 9 12:30:34 2019] PM: suspend entry (deep)
[Fri Aug 9 12:30:34 2019] Filesystems sync: 0.064 seconds
[Fri Aug 9 12:30:36 2019] Freezing user space processes ... (elapsed 0.004 seconds) done.
[Fri Aug 9 12:30:36 2019] OOM killer disabled.
[Fri Aug 9 12:30:36 2019] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[Fri Aug 9 12:30:36 2019] printk: Suspending console(s) (use no_console_suspend to debug)
[Fri Aug 9 12:30:36 2019] wlp2s0: deauthenticating from 2e:30:33:d9:6c:51 by local choice (Reason: 3=DEAUTH_LEAVING)
[Fri Aug 9 12:30:36 2019] sd 3:0:0:0: [sda] Synchronizing SCSI cache
[Fri Aug 9 12:30:36 2019] sd 3:0:0:0: [sda] Stopping disk
[Fri Aug 9 12:30:36 2019] e1000e: EEE TX LPI TIMER: 00000011
[Fri Aug 9 12:30:36 2019] ACPI: EC: interrupt blocked
[Fri Aug 9 12:30:36 2019] ACPI: Preparing to enter system sleep state S3
[Fri Aug 9 12:30:36 2019] ACPI: EC: event blocked
[Fri Aug 9 12:30:36 2019] ACPI: EC: EC stopped
[Fri Aug 9 12:30:36 2019] PM: Saving platform NVS memory
[Fri Aug 9 12:30:36 2019] Disabling non-boot CPUs ...
[Fri Aug 9 12:30:36 2019] smpboot: CPU 1 is now offline
[Fri Aug 9 12:30:36 2019] smpboot: CPU 2 is now offline
[Fri Aug 9 12:30:36 2019] smpboot: CPU 3 is now offline
[Fri Aug 9 12:30:36 2019] smpboot: CPU 4 is now offline
[Fri Aug 9 12:30:36 2019] smpboot: CPU 5 is now offline
[Fri Aug 9 12:30:36 2019] smpboot: CPU 6 is now offline
[Fri Aug 9 12:30:36 2019] smpboot: CPU 7 is now offline
---------------------------------------------------------------- ?
[Fri Aug 9 12:30:36 2019] ACPI: Low-level resume complete
[Fri Aug 9 12:30:36 2019] ACPI: EC: EC started
[Fri Aug 9 12:30:36 2019] PM: Restoring platform NVS memory
[Fri Aug 9 12:30:36 2019] Enabling non-boot CPUs ...
[Fri Aug 9 12:30:36 2019] x86: Booting SMP configuration:
[Fri Aug 9 12:30:36 2019] smpboot: Booting Node 0 Processor 1 APIC 0x2
[Fri Aug 9 12:30:36 2019] CPU1 is up
[Fri Aug 9 12:30:36 2019] smpboot: Booting Node 0 Processor 2 APIC 0x4
[Fri Aug 9 12:30:36 2019] CPU2 is up
[Fri Aug 9 12:30:36 2019] smpboot: Booting Node 0 Processor 3 APIC 0x6
[Fri Aug 9 12:30:36 2019] CPU3 is up
[Fri Aug 9 12:30:36 2019] smpboot: Booting Node 0 Processor 4 APIC 0x1
[Fri Aug 9 12:30:36 2019] CPU4 is up
[Fri Aug 9 12:30:36 2019] smpboot: Booting Node 0 Processor 5 APIC 0x3
[Fri Aug 9 12:30:36 2019] CPU5 is up
[Fri Aug 9 12:30:36 2019] smpboot: Booting Node 0 Processor 6 APIC 0x5
[Fri Aug 9 12:30:36 2019] CPU6 is up
[Fri Aug 9 12:30:36 2019] smpboot: Booting Node 0 Processor 7 APIC 0x7
[Fri Aug 9 12:30:36 2019] CPU7 is up
[Fri Aug 9 12:30:36 2019] ACPI: Waking up from system sleep state S3
[Fri Aug 9 12:30:36 2019] ACPI: EC: interrupt unblocked
[Fri Aug 9 12:30:38 2019] usb usb1: root hub lost power or was reset
[Fri Aug 9 12:30:38 2019] usb usb2: root hub lost power or was reset
[Fri Aug 9 12:30:38 2019] ACPI: EC: event unblocked
[Fri Aug 9 12:30:38 2019] sd 3:0:0:0: [sda] Starting disk
[Fri Aug 9 12:30:38 2019] tpm tpm0: tpm_try_transmit: send(): error -5
[Fri Aug 9 12:30:38 2019] nvme nvme0: 8/0/0 default/read/poll queues
[Fri Aug 9 12:30:38 2019] usb 1-11: reset high-speed USB device number 5 using xhci_hcd
[Fri Aug 9 12:30:38 2019] ata4: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[Fri Aug 9 12:30:38 2019] ata2: SATA link down (SStatus 0 SControl 300)
[Fri Aug 9 12:30:38 2019] ata5: SATA link down (SStatus 4 SControl 300)
[Fri Aug 9 12:30:38 2019] ata4.00: configured for UDMA/133
[Fri Aug 9 12:30:38 2019] usb 1-10: reset full-speed USB device number 4 using xhci_hcd
[Fri Aug 9 12:30:39 2019] OOM killer enabled.
[Fri Aug 9 12:30:39 2019] Restarting tasks ...
[Fri Aug 9 12:30:39 2019] acpi PNP0401:00: Already enumerated
[Fri Aug 9 12:30:39 2019] done.
[Fri Aug 9 12:30:39 2019] acpi PNP0501:00: Still not present
[Fri Aug 9 12:30:39 2019] PM: suspend exit
Also tried a few non Arch specific ones, just in case
/etc/pm/config.d/usb_suspend_workaround as per https://bugs.launchpad.net/ubuntu/+source/linux/+bug/291300, didn’t work
Any ideas on where to look next?