pop-os / pop

A project for managing all Pop!_OS sources
https://system76.com/pop
2.47k stars 87 forks source link

DELL 9550: No suspend on Linux 5.11 Kernel #1612

Open psii opened 3 years ago

psii commented 3 years ago

Distribution (run cat /etc/os-release):

NAME="Pop!_OS"
VERSION="20.10"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 20.10"
VERSION_ID="20.10"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=groovy
UBUNTU_CODENAME=groovy
LOGO=distributor-logo-pop-os

Related Application and/or Package Version (run apt policy $PACKAGE NAME):

linux-system76:
  Installed: 5.11.0.7612.13~1616168001~20.10~cf74746
  Candidate: 5.11.0.7612.13~1616168001~20.10~cf74746
  Version table:
 *** 5.11.0.7612.13~1616168001~20.10~cf74746 1001
       1001 http://ppa.launchpad.net/system76/pop/ubuntu groovy/main amd64 Packages
        100 /var/lib/dpkg/status

Issue/Bug Description: After the recent upgrade of the linux kernel from 5.8 to 5.11, suspend does not work anymore. When booting into the previous 5.8 kernel, suspend works as expected.

Steps to reproduce (if you know): N/A

Expected behavior: Closing the lid, or selecting "Suspend" should suspend the notebook.

Other Notes: dmesg outputs the following:

Apr 02 00:56:12 pop-os kernel: brcmfmac 0000:02:00.0: brcmf_pcie_pm_enter_D3: Timeout on response for entering D3 substate
Apr 02 00:56:12 pop-os kernel: PM: pci_pm_suspend(): brcmf_pcie_pm_enter_D3+0x0/0x160 [brcmfmac] returns -5
Apr 02 00:56:12 pop-os kernel: PM: dpm_run_callback(): pci_pm_suspend+0x0/0x170 returns -5
Apr 02 00:56:12 pop-os kernel: PM: Device 0000:02:00.0 failed to suspend async: error -5
Apr 02 00:56:12 pop-os kernel: PM: Some devices failed to suspend, or early wake event detected
Apr 02 00:56:12 pop-os kernel: ------------[ cut here ]------------
Apr 02 00:56:12 pop-os kernel: TPM returned invalid status
Apr 02 00:56:12 pop-os kernel: WARNING: CPU: 7 PID: 11770 at drivers/char/tpm/tpm_tis_core.c:205 tpm_tis_status+0x82/0x90
Apr 02 00:56:12 pop-os kernel: Modules linked in: rfcomm vmnet(OE) vmw_vsock_vmci_transport vboxnetadp(OE) vsock vboxnetflt(OE) vmw_vmci>
Apr 02 00:56:12 pop-os kernel:  btrtl coretemp snd_timer videobuf2_common rapl btbcm btintel input_leds videodev intel_cstate bluetooth >
Apr 02 00:56:12 pop-os kernel:  fb_sys_fops psmouse cec rc_core i2c_i801 nvme thunderbolt i2c_smbus nvme_core rtsx_pci drm intel_lpss_pc>
Apr 02 00:56:12 pop-os kernel: CPU: 7 PID: 11770 Comm: systemd-sleep Tainted: G           OE     5.11.0-7612-generic #13~1616168001~20.1>
Apr 02 00:56:12 pop-os kernel: Hardware name: Dell Inc. XPS 15 9550/0N7TVV, BIOS 1.13.1 12/12/2019
Apr 02 00:56:12 pop-os kernel: RIP: 0010:tpm_tis_status+0x82/0x90
Apr 02 00:56:12 pop-os kernel: Code: 25 28 00 00 00 75 2b c9 c3 31 c0 80 3d be 03 77 01 00 75 e4 48 c7 c7 8c 3a 84 86 88 45 ef c6 05 ab >
Apr 02 00:56:12 pop-os kernel: RSP: 0018:ffff9d7f02b27a08 EFLAGS: 00010286
Apr 02 00:56:12 pop-os kernel: RAX: 0000000000000000 RBX: ffff91bcc2b54000 RCX: ffff91c45e1d8ac8
Apr 02 00:56:12 pop-os kernel: RDX: 00000000ffffffd8 RSI: 0000000000000027 RDI: ffff91c45e1d8ac0
Apr 02 00:56:12 pop-os kernel: RBP: ffff9d7f02b27a20 R08: ffffffff86e734c0 R09: ffff9d7f02b279a0
Apr 02 00:56:12 pop-os kernel: R10: 0000000000000000 R11: ffff9d7f02b27898 R12: ffff91bcc2b54000
Apr 02 00:56:12 pop-os kernel: R13: ffff91bcc324a918 R14: ffff91c4040ec000 R15: ffff91bcc2b54000
Apr 02 00:56:12 pop-os kernel: FS:  00007fd39050f980(0000) GS:ffff91c45e1c0000(0000) knlGS:0000000000000000
Apr 02 00:56:12 pop-os kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Apr 02 00:56:12 pop-os kernel: CR2: 000000000232d346 CR3: 0000000837584002 CR4: 00000000003706e0
Apr 02 00:56:12 pop-os kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Apr 02 00:56:12 pop-os kernel: DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Apr 02 00:56:12 pop-os kernel: Call Trace:
Apr 02 00:56:12 pop-os kernel:  tpm_tis_send_data+0x42/0x250
Apr 02 00:56:12 pop-os kernel:  ? down_timeout+0x3c/0x60
Apr 02 00:56:12 pop-os kernel:  tpm_tis_send_main+0x32/0xf0
Apr 02 00:56:12 pop-os kernel:  tpm_tis_send+0x30/0xa0
Apr 02 00:56:12 pop-os kernel:  tpm_try_transmit+0x64/0x1d0
Apr 02 00:56:12 pop-os kernel:  tpm_transmit+0x92/0x250
Apr 02 00:56:12 pop-os kernel:  tpm_transmit_cmd+0x2a/0x90
Apr 02 00:56:12 pop-os kernel:  tpm1_do_selftest+0x8c/0x130
Apr 02 00:56:12 pop-os kernel:  tpm_tis_resume+0x48/0x60
Apr 02 00:56:12 pop-os kernel:  ? pnp_bus_suspend+0x20/0x20
Apr 02 00:56:12 pop-os kernel:  pnp_bus_resume+0x6b/0xa0
Apr 02 00:56:12 pop-os kernel:  dpm_run_callback+0x50/0x110
Apr 02 00:56:12 pop-os kernel:  device_resume+0xad/0x200
Apr 02 00:56:12 pop-os kernel:  dpm_resume+0xd5/0x2b0
Apr 02 00:56:12 pop-os kernel:  dpm_resume_end+0x13/0x30
Apr 02 00:56:12 pop-os kernel:  suspend_devices_and_enter+0x158/0x230
Apr 02 00:56:12 pop-os kernel:  enter_state+0x131/0x184
Apr 02 00:56:12 pop-os kernel:  pm_suspend.cold+0x22/0x6d
Apr 02 00:56:12 pop-os kernel:  state_store+0x2b/0x60
Apr 02 00:56:12 pop-os kernel:  kobj_attr_store+0x12/0x20
Apr 02 00:56:12 pop-os kernel:  sysfs_kf_write+0x3f/0x50
Apr 02 00:56:12 pop-os kernel:  kernfs_fop_write_iter+0x13b/0x1d0
Apr 02 00:56:12 pop-os kernel:  new_sync_write+0x114/0x1a0
Apr 02 00:56:12 pop-os kernel:  vfs_write+0x1c4/0x270
Apr 02 00:56:12 pop-os kernel:  ksys_write+0x67/0xe0
Apr 02 00:56:12 pop-os kernel:  __x64_sys_write+0x1a/0x20
Apr 02 00:56:12 pop-os kernel:  do_syscall_64+0x38/0x90
Apr 02 00:56:12 pop-os kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Apr 02 00:56:12 pop-os kernel: RIP: 0033:0x7fd391235d57
Apr 02 00:56:12 pop-os kernel: Code: 0d 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 >
Apr 02 00:56:12 pop-os kernel: RSP: 002b:00007fffdc233278 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Apr 02 00:56:12 pop-os kernel: RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007fd391235d57
Apr 02 00:56:12 pop-os kernel: RDX: 0000000000000004 RSI: 00007fffdc233330 RDI: 0000000000000004
Apr 02 00:56:12 pop-os kernel: RBP: 00007fffdc233330 R08: 0000000000000004 R09: 0000000000000000
Apr 02 00:56:12 pop-os kernel: R10: 00007fd3912d4040 R11: 0000000000000246 R12: 0000000000000004
Apr 02 00:56:12 pop-os kernel: R13: 000055d7dd4c62d0 R14: 0000000000000004 R15: 00007fd3913118c0
Apr 02 00:56:12 pop-os kernel: ---[ end trace 8be171155d2fee5d ]---
psii commented 3 years ago
$ sudo dmesg |grep 0000:02:00.0
[    0.446459] pci 0000:02:00.0: [14e4:43ba] type 00 class 0x028000
[    0.446483] pci 0000:02:00.0: reg 0x10: [mem 0xdd800000-0xdd807fff 64bit]
[    0.446499] pci 0000:02:00.0: reg 0x18: [mem 0xdd400000-0xdd7fffff 64bit]
[    0.446629] pci 0000:02:00.0: supports D1 D2
[    0.446631] pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    4.892824] brcmfmac 0000:02:00.0: Direct firmware load for brcm/brcmfmac43602-pcie.Dell Inc.-XPS 15 9550.txt failed with error -2
[    4.893557] brcmfmac 0000:02:00.0: Direct firmware load for brcm/brcmfmac43602-pcie.txt failed with error -2
[    5.405859] brcmfmac 0000:02:00.0 wlp2s0: renamed from wlan0
[22048.412717] brcmfmac 0000:02:00.0: brcmf_pcie_pm_enter_D3: Timeout on response for entering D3 substate
[22048.412820] PM: Device 0000:02:00.0 failed to suspend async: error -5
[22056.316639] brcmfmac 0000:02:00.0: brcmf_pcie_pm_enter_D3: Timeout on response for entering D3 substate
[22056.316713] PM: Device 0000:02:00.0 failed to suspend async: error -5
bflanagin commented 3 years ago

Hey @psii mind giving us one more test and letting us know the results.

Install fwts via apt and then run

sudo fwts s3 

It takes a little time to run the test but it will give you a success or failure for the tests as it runs them.

psii commented 3 years ago

Sure!

Results generated by fwts: Version V20.09.00 (2020-09-17 18:08:13).

Some of this work - Copyright (c) 1999 - 2020, Intel Corp. All rights reserved.
Some of this work - Copyright (c) 2010 - 2020, Canonical.
Some of this work - Copyright (c) 2016 - 2020, IBM.
Some of this work - Copyright (c) 2017 - 2020, ARM Ltd.

This test run on 06/04/21 at 20:43:58 on host Linux pop-os 5.11.0-7612-generic
#13~1617215757~20.10~97a8d1a-Ubuntu SMP Thu Apr 1 21:09:17 UTC 2 x86_64.

Command: "fwts s3".
Running tests: s3.

s3: Sleep suspend/resume test.
--------------------------------------------------------------------------------
Test 1 of 1: Sleep suspend/resume test.
Defaulted to 1 test, use --s3-multiple=N to run more S3 cycles
S3 cycle 1 of 1
Detecting the power method.
Response to CanSuspend is yes
User allowed to execute the CanSuspend action
Using logind as the default power method.
Requesting Suspend action
Skipping the minimum delay (0) and using a 3 seconds delay instead
S3 duration = 17.
pm-action returned 0 after 17 seconds.
FAILED [MEDIUM] ShortSuspend: Test 1, Unexpected: S3 slept for 17 seconds, less
than the expected 30 seconds.
FAILED [CRITICAL] PmDevicesFailedToSuspend: Test 1, CRITICAL Kernel message:
[99174.870657] PM: Some devices failed to suspend, or early wake event detected
Message repeated 1 times.

ADVICE: This is a bug picked up by the kernel, but as yet, the firmware test
suite has no diagnostic advice for this particular problem.

Suspend/Resume Timings:
  Could not determine time to suspend.
  Could not determine time to resume.
Completed S3 cycle(s)
Found 1 errors in kernel log.
Found 1 PM related suspend issues.
PASSED: Test 1, No device errors detected.
PASSED: Test 1, No kernel oopses detected.
PASSED: Test 1, No kernel WARN_ON warnings detected.
PASSED: Test 1, No s2idle errors detected.
Found 2 errors and 0 oopses doing 1 suspend/resume cycle(s).
PASSED: Test 1, All suspends took less than 15.00 seconds.
PASSED: Test 1, All resumes took less than 15.00 seconds.

================================================================================
6 passed, 2 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.
================================================================================

6 passed, 2 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.

Test Failure Summary
================================================================================

Critical failures: 1
 s3: CRITICAL Kernel message: [99174.870657] PM: Some devices failed to suspend, or early wake event detected

High failures: NONE

Medium failures: 1
 s3: Unexpected: S3 slept for 17 seconds, less than the expected 30 seconds.

Low failures: NONE

Other failures: NONE

Test           |Pass |Fail |Abort|Warn |Skip |Info |
---------------+-----+-----+-----+-----+-----+-----+
s3             |    6|    2|     |     |     |     |
---------------+-----+-----+-----+-----+-----+-----+
Total:         |    6|    2|    0|    0|    0|    0|
---------------+-----+-----+-----+-----+-----+-----+