Battery drain during sleep. System suspended before kernel suspends all tasks

Bug #1825636 reported by sknzl on 2019-04-20

This bug report will be marked for expiration in 55 days if no further activity occurs. (find out why)

372
This bug affects 23 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Unassigned

Bug Description

Description: Ubuntu 18.04.2 LTS
Release: 18.04

Expected behaviour:
No battery drain during suspend.

Ubuntu 18.04 running on a Thinkpad L390 has battery drain during suspend (~10% in 5 hours) in. I excluded wake ups during sleep and checking the logs I have realized that the kernel suspends too fast, before the full system is put to sleep.

Here are the syslogs after initiating the suspend mode:

Apr 19 11:59:53 ThinkPad-L390 systemd[1]: Starting TLP suspend/resume...
Apr 19 11:59:53 ThinkPad-L390 systemd[1]: Started TLP suspend/resume.
Apr 19 11:59:53 ThinkPad-L390 systemd[1]: Reached target Sleep.
Apr 19 11:59:53 ThinkPad-L390 systemd[1]: Starting Suspend...
Apr 19 11:59:53 ThinkPad-L390 kernel: [15459.897941] PM: suspend entry (deep)
Apr 19 11:59:53 ThinkPad-L390 systemd-sleep[28261]: Suspending system...
Apr 19 11:59:53 ThinkPad-L390 kernel: [15459.897944] PM: Syncing filesystems ... done.

And here the syslogs directly after waking up:

Apr 19 12:37:50 ThinkPad-L390 kernel: [15459.906928] Freezing user space processes ... (elapsed 0.004 seconds) done.
Apr 19 12:37:50 ThinkPad-L390 kernel: [15459.910995] OOM killer disabled.
Apr 19 12:37:50 ThinkPad-L390 kernel: [15459.910996] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Apr 19 12:37:50 ThinkPad-L390 kernel: [15459.912868] Suspending console(s) (use no_console_suspend to debug)
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.032873] e1000e: EEE TX LPI TIMER: 00000011
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.204567] ACPI: EC: interrupt blocked
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.243401] ACPI: Preparing to enter system sleep state S3
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.249397] ACPI: EC: event blocked
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.249398] ACPI: EC: EC stopped
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.249399] PM: Saving platform NVS memory
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.249432] Disabling non-boot CPUs ...
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.263401] irq_migrate_all_off_this_cpu: 5 callbacks suppressed
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.263403] IRQ 141: no longer affine to CPU1
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.264445] smpboot: CPU 1 is now offline
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.296469] smpboot: CPU 2 is now offline
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.320478] smpboot: CPU 3 is now offline
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.343319] IRQ 149: no longer affine to CPU4
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.345025] smpboot: CPU 4 is now offline
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.375279] IRQ 17: no longer affine to CPU5
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.375285] IRQ 18: no longer affine to CPU5
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.375298] IRQ 148: no longer affine to CPU5
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.376311] smpboot: CPU 5 is now offline
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.399234] IRQ 124: no longer affine to CPU6
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.400265] smpboot: CPU 6 is now offline
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.423211] IRQ 123: no longer affine to CPU7
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.423222] IRQ 139: no longer affine to CPU7
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.423228] IRQ 140: no longer affine to CPU7
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.423235] IRQ 142: no longer affine to CPU7
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.424278] smpboot: CPU 7 is now offline
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.428456] ACPI: Low-level resume complete
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.428541] ACPI: EC: EC started
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.428541] PM: Restoring platform NVS memory
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.429356] Enabling non-boot CPUs ...
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.429403] x86: Booting SMP configuration:
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.429404] smpboot: Booting Node 0 Processor 1 APIC 0x2
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.429761] cache: parent cpu1 should not be sleeping
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.429898] CPU1 is up
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.429929] smpboot: Booting Node 0 Processor 2 APIC 0x4
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.430294] cache: parent cpu2 should not be sleeping
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.430439] CPU2 is up
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.430461] smpboot: Booting Node 0 Processor 3 APIC 0x6
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.430822] cache: parent cpu3 should not be sleeping
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.430978] CPU3 is up
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.430999] smpboot: Booting Node 0 Processor 4 APIC 0x1
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.431434] cache: parent cpu4 should not be sleeping
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.431601] CPU4 is up
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.431624] smpboot: Booting Node 0 Processor 5 APIC 0x3
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.431995] cache: parent cpu5 should not be sleeping
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.432165] CPU5 is up
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.432187] smpboot: Booting Node 0 Processor 6 APIC 0x5
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.432563] cache: parent cpu6 should not be sleeping
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.432743] CPU6 is up
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.432764] smpboot: Booting Node 0 Processor 7 APIC 0x7
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.433143] cache: parent cpu7 should not be sleeping
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.433337] CPU7 is up
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.438599] ACPI: Waking up from system sleep state S3
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.456686] ACPI: EC: interrupt unblocked
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.501513] ACPI: EC: event unblocked
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.502094] iwlwifi 0000:00:14.3: RF_KILL bit toggled to enable radio.
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.716012] nvme nvme0: Shutdown timeout set to 8 seconds
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.735618] usb 1-5: reset high-speed USB device number 3 using xhci_hcd
Apr 19 12:37:50 ThinkPad-L390 kernel: [15461.011609] usb 1-7: reset full-speed USB device number 5 using xhci_hcd
Apr 19 12:37:50 ThinkPad-L390 kernel: [15461.287637] usb 1-10: reset full-speed USB device number 7 using xhci_hcd
Apr 19 12:37:50 ThinkPad-L390 kernel: [15461.440864] acpi LNXPOWER:05: Turning OFF
Apr 19 12:37:50 ThinkPad-L390 kernel: [15461.441846] OOM killer enabled.
Apr 19 12:37:50 ThinkPad-L390 kernel: [15461.441847] Restarting tasks ...
Apr 19 12:37:50 ThinkPad-L390 kernel: [15461.443317] Bluetooth: hci0: Bootloader revision 0.1 build 42 week 52 2015
Apr 19 12:37:50 ThinkPad-L390 kernel: [15461.444825] Bluetooth: hci0: Device revision is 2
Apr 19 12:37:50 ThinkPad-L390 kernel: [15461.444830] Bluetooth: hci0: Secure boot is enabled
Apr 19 12:37:50 ThinkPad-L390 kernel: [15461.444832] Bluetooth: hci0: OTP lock is enabled
Apr 19 12:37:50 ThinkPad-L390 kernel: [15461.444833] Bluetooth: hci0: API lock is enabled
Apr 19 12:37:50 ThinkPad-L390 kernel: [15461.444835] Bluetooth: hci0: Debug lock is disabled
Apr 19 12:37:50 ThinkPad-L390 kernel: [15461.444838] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
Apr 19 12:37:50 ThinkPad-L390 kernel: [15461.444845] Bluetooth: hci0: Found device firmware: intel/ibt-17-16-1.sfi
Apr 19 12:37:50 ThinkPad-L390 bluetoothd[951]: Endpoint unregistered: sender=:1.82 path=/MediaEndpoint/A2DPSource
Apr 19 12:37:50 ThinkPad-L390 bluetoothd[951]: Endpoint unregistered: sender=:1.82 path=/MediaEndpoint/A2DPSink
Apr 19 12:37:50 ThinkPad-L390 NetworkManager[1008]: <info> [1555673870.0221] bluez5: NAP: removed interface 48:F1:7F:83:35:C8
Apr 19 12:37:50 ThinkPad-L390 systemd-sleep[28261]: System resumed.
Apr 19 12:37:50 ThinkPad-L390 kernel: [15461.451251] done.
Apr 19 12:37:50 ThinkPad-L390 kernel: [15461.451504] thermal thermal_zone7: failed to read out thermal zone (-61)
Apr 19 12:37:50 ThinkPad-L390 kernel: [15461.452657] PM: suspend exit
Apr 19 12:37:50 ThinkPad-L390 systemd[1]: Started Suspend.
Apr 19 12:37:50 ThinkPad-L390 systemd[1]: sleep.target: Unit not needed anymore. Stopping.
Apr 19 12:37:50 ThinkPad-L390 systemd[1]: Stopped target Sleep.
Apr 19 12:37:50 ThinkPad-L390 systemd[1]: tlp-sleep.service: Unit not needed anymore. Stopping.
Apr 19 12:37:50 ThinkPad-L390 systemd[1]: Stopping TLP suspend/resume...
Apr 19 12:37:50 ThinkPad-L390 systemd[1]: Reached target Suspend.
Apr 19 12:37:50 ThinkPad-L390 systemd[1]: suspend.target: Unit not needed anymore. Stopping.
Apr 19 12:37:50 ThinkPad-L390 systemd[1]: Stopped target Suspend.

Note: Between the two syslog extracts are no further events.
As it can be seen in the logs, the CPU cores are only put the sleep after the suspend is finished, which leads to the messages like:

Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.429761] cache: parent cpu1 should not be sleeping
Apr 19 12:37:50 ThinkPad-L390 kernel: [15460.429898] CPU1 is up

I reported this problem also here:
https://askubuntu.com/questions/1135240/battery-drain-when-sleeping-suspend-too-fast

Also it was already reported before here:
https://askubuntu.com/questions/828486/kernel-suspends-too-quickly-upon-resume-continues-suspend-tasks

https://askubuntu.com/questions/1072066/sleep-mode-drains-battery-very-fast

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: linux-image-4.18.0-17-generic 4.18.0-17.18~18.04.1
ProcVersionSignature: Ubuntu 4.18.0-17.18~18.04.1-generic 4.18.20
Uname: Linux 4.18.0-17-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.6
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sat Apr 20 12:34:18 2019
InstallationDate: Installed on 2019-03-30 (20 days ago)
InstallationMedia: Ubuntu 18.04.2 LTS "Bionic Beaver" - Release amd64 (20190210)
SourcePackage: linux-signed-hwe
UpgradeStatus: No upgrade log present (probably fresh install)

sknzl (sknzl) wrote :
sknzl (sknzl) on 2019-04-20
summary: - Battery drain during sleep. System suspended before kernel suspended all
+ Battery drain during sleep. System suspended before kernel suspends all
tasks
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux-signed-hwe (Ubuntu):
status: New → Confirmed
WinEunuchs2Unix (ricklee518) wrote :
Download full text (3.3 KiB)

Same problem has existed for years on Ubuntu 16.04 with systemd and TLP in use. pm-utils is installed by default but for the most part inactive (last log entry Oct 28 2018).

OP already reported this Ask Ubuntu Q&A link posted 2 1/2 years ago:
- https://askubuntu.com/questions/828486/kernel-suspends-too-quickly-upon-resume-continues-suspend-tasks

(The answer receiving bounty award does not work and has not been accepted!)

======================================================================

An ACPI linked question of the same "suspend to RAM too quickly" issue can be found here:
- https://unix.stackexchange.com/questions/502235/system-fails-to-suspend-acpi-ec-interrupt-blocked

There is an old ACPI bug report which I understand is because Manufacturers hacked the specs to please Microsoft and Linux doesn't work well during boot up. I don't think ACPI is related but just in case here is a refresher on the error messages during boot:

ACPI Error: [\_SB_.PCI0.XHC_.RHUB.HS11] Namespace lookup failure, AE_NOT_FOUND (20170728/dswload-210)
Apr 04 21:05:29 alien kernel: ACPI Exception: AE_NOT_FOUND, During name lookup/catalog (20170728/psobject-252)
Apr 04 21:05:29 alien kernel: ACPI Exception: AE_NOT_FOUND, (SSDT:xh_rvp10) while loading table (20170728/tbxfload-228)
Apr 04 21:05:29 alien kernel: ACPI Error: 1 table load failures, 9 successful (20170728/tbxfload-246)

========================================================================

My log is similar to OP except that systemd shows it's fingerprints in the suspend/freeze process:

Apr 20 01:42:39 alien systemd-sleep[32388]: /lib/systemd/system-sleep/r8169-reset failed wit
Apr 20 01:42:39 alien systemd-sleep[32387]: Suspending system...
-- Subject: System sleep state suspend entered
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The system has now entered the suspend sleep state.
Apr 20 01:42:39 alien kernel: PM: suspend entry (deep)
Apr 20 01:42:39 alien kernel: PM: Syncing filesystems ... done.
Apr 20 08:57:10 alien kernel: Freezing user space processes ... (elapsed 0.016 seconds) done
Apr 20 08:57:10 alien kernel: OOM killer disabled.
Apr 20 08:57:10 alien kernel: Freezing remaining freezable tasks ... (elapsed 0.001 seconds)
Apr 20 08:57:10 alien kernel: Suspending console(s) (use no_console_suspend to debug)
Apr 20 08:57:10 alien kernel: sd 1:0:0:0: [sda] Synchronizing SCSI cache
Apr 20 08:57:10 alien kernel: sd 1:0:0:0: [sda] Stopping disk
Apr 20 08:57:10 alien kernel: ACPI: EC: interrupt blocked
Apr 20 08:57:10 alien kernel: ACPI: Preparing to enter system sleep state S3
Apr 20 08:57:10 alien kernel: ACPI: EC: event blocked
Apr 20 08:57:10 alien kernel: ACPI: EC: EC stopped
Apr 20 08:57:10 alien kernel: PM: Saving platform NVS memory
Apr 20 08:57:10 alien kernel: Disabling non-boot CPUs ...
Apr 20 08:57:10 alien kernel: smpboot: CPU 1 is now offline
Apr 20 08:57:10 alien kernel: smpboot: CPU 2 is now offline
Apr 20 08:57:10 alien kernel: smpboot: CPU 3 is now offline
Apr 20 08:57:10 alien kernel: smpboot: CPU 4 is now offline
Apr 20 08:57:10 alien kernel: smpboot: CPU 5 is now offline
Apr 20 08:57:10 alien kernel: smpboot: CPU ...

Read more...

Melanie Bacou (mbacou) wrote :
Download full text (23.7 KiB)

Also affecting Thinkpad X201 with Ubuntu 18.10 and TLP.

May 13 03:07:06 drus kernel: [49224.602185] PM: suspend entry (deep)
May 13 03:07:26 drus kernel: [49224.602189] PM: Syncing filesystems ... done.
May 13 03:07:26 drus kernel: [49224.616324] Freezing user space processes ... (elapsed 0.064 seconds) done.
May 13 03:07:26 drus kernel: [49224.680481] OOM killer disabled.
May 13 03:07:26 drus kernel: [49224.680482] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
May 13 03:07:26 drus kernel: [49224.682257] Suspending console(s) (use no_console_suspend to debug)
May 13 03:07:26 drus kernel: [49224.696263] sd 0:0:0:0: [sda] Synchronizing SCSI cache
May 13 03:07:26 drus kernel: [49224.696948] e1000e: EEE TX LPI TIMER: 00000000
May 13 03:07:26 drus kernel: [49224.698248] sd 0:0:0:0: [sda] Stopping disk
May 13 03:07:26 drus kernel: [49224.808448] ACPI: EC: interrupt blocked
May 13 03:07:26 drus kernel: [49224.828883] ACPI: Preparing to enter system sleep state S3
May 13 03:07:26 drus kernel: [49224.841137] ACPI: EC: event blocked
May 13 03:07:26 drus kernel: [49224.841139] ACPI: EC: EC stopped
May 13 03:07:26 drus kernel: [49224.841140] PM: Saving platform NVS memory
May 13 03:07:26 drus kernel: [49224.842744] Disabling non-boot CPUs ...
May 13 03:07:26 drus kernel: [49224.857652] smpboot: CPU 1 is now offline
May 13 03:07:26 drus kernel: [49224.880441] IRQ 28: no longer affine to CPU2
May 13 03:07:26 drus kernel: [49224.881475] smpboot: CPU 2 is now offline
May 13 03:07:26 drus kernel: [49224.908229] IRQ 19: no longer affine to CPU3
May 13 03:07:26 drus kernel: [49224.909244] smpboot: CPU 3 is now offline
May 13 03:07:26 drus kernel: [49224.913129] ACPI: Low-level resume complete
May 13 03:07:26 drus kernel: [49224.913187] ACPI: EC: EC started
May 13 03:07:26 drus kernel: [49224.913188] PM: Restoring platform NVS memory
May 13 03:07:26 drus kernel: [49224.914427] Enabling non-boot CPUs ...
May 13 03:07:26 drus kernel: [49224.914548] x86: Booting SMP configuration:
May 13 03:07:26 drus kernel: [49224.914549] smpboot: Booting Node 0 Processor 1 APIC 0x1
May 13 03:07:26 drus kernel: [49224.916952] cache: parent cpu1 should not be sleeping
May 13 03:07:26 drus kernel: [49224.921154] CPU1 is up
May 13 03:07:26 drus kernel: [49224.921202] smpboot: Booting Node 0 Processor 2 APIC 0x4
May 13 03:07:26 drus kernel: [49224.923903] cache: parent cpu2 should not be sleeping
May 13 03:07:26 drus kernel: [49224.927941] CPU2 is up
May 13 03:07:26 drus kernel: [49224.927989] smpboot: Booting Node 0 Processor 3 APIC 0x5
May 13 03:07:26 drus kernel: [49224.930404] cache: parent cpu3 should not be sleeping
May 13 03:07:26 drus kernel: [49224.934753] CPU3 is up
May 13 03:07:26 drus kernel: [49224.937580] ACPI: Waking up from system sleep state S3
May 13 03:07:26 drus kernel: [49224.957732] ACPI: EC: interrupt unblocked
May 13 03:07:26 drus kernel: [49225.012193] iwlwifi 0000:02:00.0: RF_KILL bit toggled to disable radio.
May 13 03:07:26 drus kernel: [49225.012216] ACPI: EC: event unblocked
May 13 03:07:26 drus kernel: [49225.013748] sd 0:0:0:0: [sda] Starting disk
May 13 03:07:26 drus kernel: [49225.178231] OOM killer enabled.
May 13 03:07:26...

Same issue here. Suspend happens before user space is suspended.

On resume, system first continues to suspend, then resumes.

Jun 01 02:18:40 avis systemd[1]: Reached target Sleep.
Jun 01 02:18:40 avis systemd[1]: Starting Suspend...
Jun 01 02:18:40 avis systemd-sleep[27915]: Suspending system...
Jun 01 02:18:40 avis kernel: PM: suspend entry (s2idle)
Jun 01 02:18:40 avis kernel: PM: Syncing filesystems ... done.
Jun 01 12:03:59 avis kernel: Freezing user space processes ... (elapsed 0.215 seconds) done.
Jun 01 12:03:59 avis kernel: OOM killer disabled.
Jun 01 12:03:59 avis kernel: Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done.
Jun 01 12:03:59 avis kernel: printk: Suspending console(s) (use no_console_suspend to debug)
Jun 01 12:03:59 avis kernel: wlp3s0: deauthenticating from cc:ce:1e:89:51:4b by local choice (Reason: 3=DEAUTH_LEAVING)
Jun 01 12:03:59 avis kernel: sd 2:0:0:0: [sda] Synchronizing SCSI cache
Jun 01 12:03:59 avis kernel: sd 2:0:0:0: [sda] Stopping disk
Jun 01 12:03:59 avis kernel: sd 2:0:0:0: [sda] Starting disk
Jun 01 12:03:59 avis kernel: OOM killer enabled.
Jun 01 12:03:59 avis wpa_supplicant[990]: wlp3s0: CTRL-EVENT-SIGNAL-CHANGE above=0 signal=0 noise=9999 txrate=0
Jun 01 12:03:59 avis systemd-logind[982]: Lid opened.
Jun 01 12:03:59 avis wpa_supplicant[990]: wlp3s0: CTRL-EVENT-DISCONNECTED bssid=cc:ce:1e:89:51:4b reason=3 locally_generated=1
Jun 01 12:03:59 avis kernel: Restarting tasks ... done.
Jun 01 12:03:59 avis NetworkManager[979]: <warn> [1559383439.4503] sup-iface[0x56503c5924b0,wlp3s0]: connection disconnected (reason -3)
Jun 01 12:03:59 avis systemd[1]: Started Run anacron jobs.
Jun 01 12:03:59 avis NetworkManager[979]: <info> [1559383439.4557] device (wlp3s0): supplicant interface s

Since I was affected on Ubuntu 19.04 using the generic Kernel (5.0.0-15-generic), I am not sure if "linux-signed-hwe" is the right thing to file this bug against...

I decided to test Mainline 5.1.6 under Ubuntu 19.04, and it's also affected.

I have been looking into kernel/power/suspend.c, and if you trace down (as in: follow the code step by step) that suspend.c, it becomes obvious that it's not suspend.c by itself, as it's impossible to be a timing problem purely in there, as suspend.c *does* do things in order.

I am beginning to think that systemd might be doing things wrong.

Since I could also reproduce this issue with fedora, I will be testing on gentoo without systemd (using openrc) and tell you how this worked out.

OK, so it appears to be within the kernel itself, this is also happening when using openRC.

sknzl (sknzl) wrote :

Thanks for your research and input!

I initially reported the bug running 'ubuntu-bug linux'. That's why it ended up in 'linux-signed-hwe'.

Fun fact: sometimes "syncing filesystems" is done before the system actually suspends, sometimes it is done after waking the system up:

[...]
Jun 3 21:01:35 avis systemd[1]: Reached target Sleep.
Jun 3 21:01:35 avis systemd[1]: Starting Suspend...
Jun 3 21:01:35 avis systemd-sleep[2281]: Suspending system...
Jun 3 21:01:35 avis kernel: [ 86.149552] PM: suspend entry (s2idle)
------- laptop sleeps here -------
Jun 3 21:01:54 avis kernel: [ 86.149553] PM: Syncing filesystems ... done.
Jun 3 21:01:54 avis kernel: [ 86.163111] Freezing user space processes ... (elapsed 0.002 seconds) done.
Jun 3 21:01:54 avis kernel: [ 86.165328] OOM killer disabled.
Jun 3 21:01:54 avis kernel: [ 86.165329] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[...]

Aseem Arora (aseemarora1995) wrote :

Facing the same issue elementary OS Juno which is based on Ubuntu 18.04. System suspends before kernel suspends all processes. Significant battery drain occurs.

Sascha R. (saschar) wrote :

Same issue with Ubuntu 19.04 on Lenovo X1 Extreme (i7 6 core, Nvidia GPU with NVIDIA drivers).
Notebook gets warm/drains battery when in standby.
Log looks like some suspend tasks continue after waking up from standby.

Jonathan Polak (jpolak) wrote :

Same issue with Ubuntu Mate 19.04 on Lenovo Thinkpad T460s.
Notebook gets warm and drains about 20% of the battery when in standby.

Sarowar Alam (sarowar-cse) wrote :

Similar issue here with Ubuntu 19.10(5.3.0-10-generic) on Lenovo X1 Extreme Gen2 - i7-9750H, GTX 1650(nvidia-driver-435)

Yanko Malinov (malinov) on 2019-09-28
no longer affects: debian
Yanko Malinov (malinov) wrote :

Recently bought an L390 Thinkpad and noticed the battery drain when suspended. Checked the syslog and observed the same issue you've reported. Just tried it out on several other laptops, as well as a desktop lying around in the office. Can confirm that this issue affects all of them. Here's a list:

Lenovo Thinkpad L390 (non-Yoga) running Debian 10.1 (buster) with MATE on kernel 4.19.0-6-amd64
Lenovo Ideapad 500-15ISK running Debian 10.0 (buster) with MATE on kernel 4.19.0-5-amd64
Asus UX310U running Ubuntu 18.04.3 LTS with GNOME on kernel 4.15.0-58-amd64
Desktop with an i7-4790K running Debian 10.1 (buster) with MATE on kernel 4.19.0-6-amd64

I've measured the battery drain rate on the L390 to be around 1-2% every hour of suspend. There is a large thread on the Linux Lenovo forum, where they're discussing a similar issue (battery drain when sleeping) with the X1 Carbon, though they came to the conclusion that the laptop itself doesn't support deep sleep (ACPI S3 sleep), with Lenovo instead opting for s2idle (ACPI S0 sleep). The L390, however, does report it supports S3 sleep, so it's possible the issue is unrelated.

Same issue
ThinkPad T460P with Nvidia GTX 940MX and Intel i7-6820HQ
Linux Mint 19.2 Cinnamon (Ubuntu 18.04) with kernel HWE 5.0.0-37-generic
Put in Sleep on Friday evening.
On Sunday in the middle of the day it did go into emergency wakeup because the battery did go empty.
On Monday morning I did boot it with my connected power supply and wondered why I have only 0% battery left.

Ahmad Amr (aamr) wrote :

Any update on this? I am using Ubuntu 19.10 on my XPS 15 9560 and I am facing this behavior, however, I am not using the signed kernel package, I believe it applies to the mainline as well.

MrBidon (joebidon) wrote :

I've got a similar issue too. Any workaround available ?

information type: Public → Public Security
Ulan Yisaev (titan4) wrote :

I have similar issue on Ubuntu 19.10 + Toshiba R850.

jnns (jnns) wrote :

Same issue here: S3 enabled only after wake up.

Thinkapd X1 Carbon 2018 with i7-8550U running Ubuntu 19.10 on 5.3.0-42-generic. TLP enabled with default settings.

[...]
Mar 25 22:15:30 x1cbn systemd[1]: Starting TLP suspend/resume...
Mar 25 22:15:30 x1cbn systemd[1]: Started TLP suspend/resume.
Mar 25 22:15:30 x1cbn systemd[1]: Reached target Sleep.
Mar 25 22:15:30 x1cbn systemd[1]: Starting Suspend...
Mar 25 22:15:30 x1cbn systemd-sleep[26401]: Suspending system...
Mar 25 22:15:30 x1cbn kernel: [30261.531474] PM: suspend entry (deep)
Mar 25 22:15:30 x1cbn kernel: [30261.541908] Filesystems sync: 0.010 seconds
Mar 26 09:37:18 x1cbn kernel: [30261.543157] Freezing user space processes ... (elapsed 0.002 seconds) done.
Mar 26 09:37:18 x1cbn kernel: [30261.546086] OOM killer disabled.
Mar 26 09:37:18 x1cbn kernel: [30261.546086] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Mar 26 09:37:18 x1cbn kernel: [30261.547489] printk: Suspending console(s) (use no_console_suspend to debug)
Mar 26 09:37:18 x1cbn kernel: [30261.567980] psmouse serio1: Failed to disable mouse on isa0060/serio1
Mar 26 09:37:18 x1cbn kernel: [30261.846404] ACPI: EC: interrupt blocked
Mar 26 09:37:18 x1cbn kernel: [30261.904539] ACPI: Preparing to enter system sleep state S3
[...]

DENNIS OTIENO (dennohxy) wrote :

simillar problem on HP EliteBook running Ubuntu 19.04

Changed in linux (Ubuntu):
status: New → Confirmed
Timo Jyrinki (timo-jyrinki) wrote :

I'm no kernel triager but I have a few observations that can help focusing the bug report:

1. Are people manually installing tlp and that causing problems, or do people experience this too with vanilla installation of Ubuntu? (tlp is not part of the default install, and not in the 'main' supported packages, but definitely power management is optimized as is, ie many of the settings tlp would set are the default anyway in Ubuntu)

2. It may be useful to rule out it's not case of bug 1808957, some people here might be here because of it, ie check cat /sys/power/mem_sleep and if it says s2idle, then you've an unfortunate configuration problem, you can add mem_sleep_default=deep to grub config.

WinEunuchs2Unix (ricklee518) wrote :

Reply to #22 (Timo Jyrinki):

I don't see why `tlp` is being singled out (although I do have it installed since reporting the bug in Ask Ubuntu). I would think the fault is more with `systemd` or perhaps Linux Kernel not understanding how ACPI works properly. (Wild hunch). That said the results of my test you requested:

$ cat /sys/power/mem_sleep
s2idle [deep]

I'm just hoping someone at Canonical or Linux Kernel Team has a laptop and can confirm if their logs match the rest of ours. If they do then dig deeper. If their logs are fine then question the users here on how their platforms are different.

At least that's what I would do if I worked for Canonical or Linux Kernel Team and had access to a laptop. I've read before laptops are extremely rare in the Linux world.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
no longer affects: linux-signed-hwe (Ubuntu)

Hey has the Status been changed from confirmed to incomplete? Ubuntu -devel is still affected.

no longer affects: linux-signed-hwe (Ubuntu)
Kai-Heng Feng (kaihengfeng) wrote :

Because there's no response from the original bug reporter.

This kind of bug is device dependent, please file separate bug if the hardware model is not " Thinkpad L390".

Although this kind of bug /may/ seem device dependent, in this instance it's not.

In this very bug report, the issue hass been confirmed by users of the following devices:
- Thinkpad L390 (twice)
- Thinkpad X201
- Asus Zenbook UX331UN
- Lenovo X1 Extreme
- Lenovo X1 Extreme Gen2
- Thinkapd X1 Carbon 2018
- Lenovo Thinkpad T460s
- Lenovo ThinkPad T460P
- Dell XPS 15 9560
- Toshiba R850
- HP EliteBook

This bug is clearly not device dependent.

Kai-Heng Feng (kaihengfeng) wrote :

The same behavior usually has different root cause.

So please file separate bug for each model.

I bet 500 dollhairs they're being marked as duplicate in two seconds.

To post a comment you must log in.
This report contains Public Security information  Edit
Everyone can see this security related information.

Other bug subscribers