Suspend immediately resumes on Ubuntu 18.04.2

Bug #1838993 reported by Tais P. Hansen
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Recently my Lenovo ThinkPad W540 laptop has been unable to suspend correctly. It immediately wakes up after going through all the usual steps of turning off the screens, USB devices etc.

I'm using the UI to suspend by left-clicking and holding the power off button until it turns into a pause button, and then I left-click that button. The laptop is docked with two monitors connected and the lid is open (although the laptop screen is not used) when I attempt to suspend it.

This used to work until recently. BIOS has not been touched or upgraded.

Log excerpt:

...
Aug 5 16:53:10 taisph-ThinkPad-W540 kernel: [24052.156787] PM: suspend entry (deep)
Aug 5 16:53:10 taisph-ThinkPad-W540 kernel: [24052.156789] PM: Syncing filesystems ... done.
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24053.015094] rfkill: input handler enabled
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24053.320163] Freezing user space processes ... (elapsed 0.003 seconds) done.
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24053.323453] OOM killer disabled.
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24053.323453] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24053.325130] Suspending console(s) (use no_console_suspend to debug)
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24053.469224] sd 0:0:0:0: [sda] Synchronizing SCSI cache
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24053.469297] sd 5:0:0:0: [sdb] Synchronizing SCSI cache
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24053.469449] sd 5:0:0:0: [sdb] Stopping disk
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24053.470686] sd 0:0:0:0: [sda] Stopping disk
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24053.669512] e1000e: EEE TX LPI TIMER: 00000011
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24054.969605] ACPI: EC: interrupt blocked
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.009441] ACPI: Preparing to enter system sleep state S3
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.013106] ACPI: EC: event blocked
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.013107] ACPI: EC: EC stopped
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.013107] PM: Saving platform NVS memory
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.013124] Disabling non-boot CPUs ...
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.029590] IRQ 30: no longer affine to CPU1
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.030620] smpboot: CPU 1 is now offline
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.054769] smpboot: CPU 2 is now offline
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.077811] IRQ 16: no longer affine to CPU3
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.077819] IRQ 29: no longer affine to CPU3
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.078828] smpboot: CPU 3 is now offline
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.102970] smpboot: CPU 4 is now offline
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.125889] IRQ 23: no longer affine to CPU5
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.125901] IRQ 32: no longer affine to CPU5
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.126914] smpboot: CPU 5 is now offline
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.154299] IRQ 27: no longer affine to CPU6
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.155323] smpboot: CPU 6 is now offline
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.181669] IRQ 26: no longer affine to CPU7
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.182697] smpboot: CPU 7 is now offline
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.186538] ACPI: Low-level resume complete
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.186589] ACPI: EC: EC started
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.186590] PM: Restoring platform NVS memory
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.189175] Enabling non-boot CPUs ...
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.189259] x86: Booting SMP configuration:
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.189260] smpboot: Booting Node 0 Processor 1 APIC 0x1
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.189761] cache: parent cpu1 should not be sleeping
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.190157] CPU1 is up
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.190185] smpboot: Booting Node 0 Processor 2 APIC 0x2
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.191927] cache: parent cpu2 should not be sleeping
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.192148] CPU2 is up
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.192171] smpboot: Booting Node 0 Processor 3 APIC 0x3
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.192593] cache: parent cpu3 should not be sleeping
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.192828] CPU3 is up
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.192852] smpboot: Booting Node 0 Processor 4 APIC 0x4
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.194610] cache: parent cpu4 should not be sleeping
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.194875] CPU4 is up
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.194913] smpboot: Booting Node 0 Processor 5 APIC 0x5
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.195343] cache: parent cpu5 should not be sleeping
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.195624] CPU5 is up
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.195648] smpboot: Booting Node 0 Processor 6 APIC 0x6
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.197413] cache: parent cpu6 should not be sleeping
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.197723] CPU6 is up
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.197749] smpboot: Booting Node 0 Processor 7 APIC 0x7
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.198177] cache: parent cpu7 should not be sleeping
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.198998] CPU7 is up
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.219592] ACPI: Waking up from system sleep state S3
Aug 5 16:53:23 taisph-ThinkPad-W540 kernel: [24055.228039] ACPI: EC: interrupt unblocked
...

$ lsb_release -rd
Description: Ubuntu 18.04.2 LTS
Release: 18.04
---
ProblemType: Bug
ApportVersion: 2.20.9-0ubuntu7.7
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: taisph 5021 F.... pulseaudio
 /dev/snd/controlC0: taisph 5021 F.... pulseaudio
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 18.04
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-12-04 (1705 days ago)
InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
MachineType: LENOVO 20BG0043MD
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair nvidia_modeset nvidia
Package: linux (not installed)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-55-generic root=UUID=a7c79e91-6b4a-4db0-9237-049f85e4da23 ro quiet splash vt.handoff=1
ProcVersionSignature: Ubuntu 4.15.0-55.60-generic 4.15.18
RelatedPackageVersions:
 linux-restricted-modules-4.15.0-55-generic N/A
 linux-backports-modules-4.15.0-55-generic N/A
 linux-firmware 1.173.9
Tags: bionic
Uname: Linux 4.15.0-55-generic x86_64
UpgradeStatus: Upgraded to bionic on 2018-08-06 (364 days ago)
UserGroups: adm cdrom dialout dip docker input kvm libvirt libvirtd lpadmin plugdev sambashare sudo vboxusers wireshark
_MarkForUpload: True
dmi.bios.date: 03/12/2015
dmi.bios.vendor: LENOVO
dmi.bios.version: GNET73WW (2.21 )
dmi.board.asset.tag: Not Available
dmi.board.name: 20BG0043MD
dmi.board.vendor: LENOVO
dmi.board.version: SDK0E50510 WIN
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvrGNET73WW(2.21):bd03/12/2015:svnLENOVO:pn20BG0043MD:pvrThinkPadW540:rvnLENOVO:rn20BG0043MD:rvrSDK0E50510WIN:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.family: ThinkPad W540
dmi.product.name: 20BG0043MD
dmi.product.version: ThinkPad W540
dmi.sys.vendor: LENOVO

Revision history for this message
Tais P. Hansen (taisph) wrote :
Revision history for this message
Tais P. Hansen (taisph) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1838993

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: bionic
Revision history for this message
Tais P. Hansen (taisph) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Tais P. Hansen (taisph) wrote : CRDA.txt

apport information

Revision history for this message
Tais P. Hansen (taisph) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Tais P. Hansen (taisph) wrote : IwConfig.txt

apport information

Revision history for this message
Tais P. Hansen (taisph) wrote : Lspci.txt

apport information

Revision history for this message
Tais P. Hansen (taisph) wrote : Lsusb.txt

apport information

Revision history for this message
Tais P. Hansen (taisph) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Tais P. Hansen (taisph) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Tais P. Hansen (taisph) wrote : ProcEnviron.txt

apport information

Revision history for this message
Tais P. Hansen (taisph) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Tais P. Hansen (taisph) wrote : ProcModules.txt

apport information

Revision history for this message
Tais P. Hansen (taisph) wrote : PulseList.txt

apport information

Revision history for this message
Tais P. Hansen (taisph) wrote : RfKill.txt

apport information

Revision history for this message
Tais P. Hansen (taisph) wrote : UdevDb.txt

apport information

Revision history for this message
Tais P. Hansen (taisph) wrote : WifiSyslog.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Sounds like it's a regression? Can you please find the last kernel that works?

Revision history for this message
Tais P. Hansen (taisph) wrote :

Older kernels have sadly been purged before I became aware of this. If I can get older kernel packages I'm willing to try to find the last version that worked.

Right now I'm using linux-image-generic-hwe-18.04 (= 5.0.0.23.80) and have the same issue.

Oddly, if I enable pm_trace (echo 1 > /sys/power/pm_trace) then I'm able to suspend and resume correctly.

Revision history for this message
malasa (malasa) wrote :
Download full text (8.6 KiB)

I was searching why suspend is not working anymore with 5.0.0-23 for me and found this similar bug.

Sometimes it is coming up again after trying, sometimes it freezes. I tried the echo cmd from #20, no difference for me.

But with 4.15.0-55-generic it works for me (unlike the initial report if i understood it correctly)

I have a Lenovo P52, let me know if you also want a full report.

root@p52:~# lsb_release -rd
Description: Ubuntu 18.04.3 LTS
Release: 18.04

dmesg from 5.0.0-23
[ 47.473308] wlan0: Limiting TX power to 30 (30 - 0) dBm as advertised by cc:50:0a:d0:d6:fb
[ 104.073889] PM: suspend entry (deep)
[ 104.073890] PM: Syncing filesystems ... done.
[ 104.075845] Freezing user space processes ... (elapsed 0.002 seconds) done.
[ 104.077853] OOM killer disabled.
[ 104.077854] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 104.079091] printk: Suspending console(s) (use no_console_suspend to debug)
[ 104.141272] wlan0: deauthenticating from cc:50:0a:d0:d6:fb by local choice (Reason: 3=DEAUTH_LEAVING)
[ 104.247354] e1000e: EEE TX LPI TIMER: 00000011
[ 105.341267] ACPI: EC: interrupt blocked
[ 105.445688] ACPI: Preparing to enter system sleep state S3
[ 105.452756] ACPI: EC: event blocked
[ 105.452756] ACPI: EC: EC stopped
[ 105.452756] PM: Saving platform NVS memory
[ 105.452765] Disabling non-boot CPUs ...
[ 105.453144] IRQ 159: no longer affine to CPU1
[ 105.454355] smpboot: CPU 1 is now offline
[ 105.456008] IRQ 160: no longer affine to CPU2
[ 105.457025] smpboot: CPU 2 is now offline
[ 105.458731] IRQ 161: no longer affine to CPU3
[ 105.459738] smpboot: CPU 3 is now offline
[ 105.461542] IRQ 162: no longer affine to CPU4
[ 105.462768] smpboot: CPU 4 is now offline
[ 105.464477] IRQ 163: no longer affine to CPU5
[ 105.465489] smpboot: CPU 5 is now offline
[ 105.467258] IRQ 164: no longer affine to CPU6
[ 105.468471] smpboot: CPU 6 is now offline
[ 105.470184] IRQ 165: no longer affine to CPU7
[ 105.471187] smpboot: CPU 7 is now offline
[ 105.472915] IRQ 166: no longer affine to CPU8
[ 105.473935] smpboot: CPU 8 is now offline
[ 105.475767] IRQ 167: no longer affine to CPU9
[ 105.476770] smpboot: CPU 9 is now offline
[ 105.478440] IRQ 168: no longer affine to CPU10
[ 105.479445] smpboot: CPU 10 is now offline
[ 105.482139] smpboot: CPU 11 is now offline
[ 105.485910] ACPI: Low-level resume complete
[ 105.485985] ACPI: EC: EC started
[ 105.485985] PM: Restoring platform NVS memory
[ 105.495359] Enabling non-boot CPUs ...
[ 105.495412] x86: Booting SMP configuration:
[ 105.495413] smpboot: Booting Node 0 Processor 1 APIC 0x2
[ 105.497144] cache: parent cpu1 should not be sleeping
[ 105.497169] intel_pstate: Disabling energy efficiency optimization
[ 105.497268] CPU1 is up
[ 105.497285] smpboot: Booting Node 0 Processor 2 APIC 0x4
[ 105.497670] cache: parent cpu2 should not be sleeping
[ 105.497804] CPU2 is up
[ 105.497819] smpboot: Booting Node 0 Processor 3 APIC 0x6
[ 105.498188] cache: parent cpu3 should not be sleeping
[ 105.498336] CPU3 is up
[ 105.498351] smpboot: Booting Node 0 Processor 4 APIC 0x8
[ 105.498720] cache: parent cpu4 should not be sleeping
...

Read more...

Revision history for this message
malasa (malasa) wrote :

update: i had some time and did a fresh installation of Xubuntu 18.04.3 on an USB SSD. Suspend works with Kernel 5.0, first i suspected the nvidia driver but it still works after installation of the nvidia drivers. So for me it is either a setting which i'm not aware of that is different or the main difference between these 2 installation: my Laptop runs zfs root, the USB installation is simple ext4.

Revision history for this message
Tais P. Hansen (taisph) wrote :

I still have the issue with linux-image-generic-hwe-18.04=5.0.0.25.82.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
Revision history for this message
Tais P. Hansen (taisph) wrote :

5.3.0-050300rc4-generic was slower to suspend but the same happens. The laptop is suspended less than a second and just enough to see the fading powerlight indicating sleep mode before it resumes.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Then it's not fixed in upstream.
Please find the last good kernel and first bad kernel in https://kernel.ubuntu.com/~kernel-ppa/mainline

Only need to test -rc* kernels.

Revision history for this message
Tais P. Hansen (taisph) wrote :

I've now tested kernels 4.15.0-39, 4.15.0-45, 4.15.0-50, 4.15.0-54, 4.15.0-55 and all have the same behaviour - so this does not seem to be a kernel issue after all.

I unplugged everything and tested suspend/resume on 5.0.0-25-generic which now works. Tested suspend/resume after each device was reconnected and identified the keyboard as the reason it resumes. Tried disabling all USB (XHCI/EHC*) in /proc/acpi/wakeup without success. Finally moved the keyboard to another USB port (non-SS) in the dock and I am now able to suspend without it waking up immediately.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Which dock is in use?

Revision history for this message
Tais P. Hansen (taisph) wrote :

Lenovo ThinkPad Ultra Dock Type 40A2

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
Revision history for this message
Tais P. Hansen (taisph) wrote :

I've replaced the keyboard and I'm not experiencing the issue on the USB port as I did with the old keyboard (only tested on the 5.0.0-25 hwe kernel). Not sure what could be causing that behaviour all of a sudden. The old keyboard (Logitech) didn't appear to have any noticeable issues such as a stuck key or something that might trigger a wake-up.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.