tpm tpm0: Error (28) sending savestate before suspend

Bug #1891502 reported by smrtalecopq
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Upon clicking suspend via Log Out... button in Xubuntu and also via systemctl suspend, the screen turns to black for 2 sec but then brings me back to log in screen instead of suspending.

This was not an issue in 18.04. Currently on fresh install of 20.04.1.

Aug 13 08:12:59 laptop kernel: [87528.628302] PM: suspend entry (s2idle)
Aug 13 08:13:00 laptop kernel: [87529.250844] printk: Suspending console(s) (use no_console_suspend to debug)

Aug 13 08:13:00 laptop kernel: [87529.250844] printk: Suspending console(s) (use no_console_suspend to debug)
Aug 13 08:13:00 laptop kernel: [87529.555272] tpm tpm0: Error (28) sending savestate before suspend
Aug 13 08:13:00 laptop kernel: [87529.555287] PM: __pnp_bus_suspend(): tpm_pm_suspend+0x0/0x80 returns 28
Aug 13 08:13:00 laptop kernel: [87529.555292] PM: dpm_run_callback(): pnp_bus_suspend+0x0/0x20 returns 28
Aug 13 08:13:00 laptop kernel: [87529.555296] PM: Device 00:01 failed to suspend: error 28
Aug 13 08:13:00 laptop kernel: [87529.929361] PM: Some devices failed to suspend, or early wake event detected
Aug 13 08:13:01 laptop kernel: [87530.458095] PM: suspend exit
Aug 13 08:13:01 laptop systemd[1]: systemd-suspend.service: Succeeded.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: linux-image-5.4.0-42-generic 5.4.0-42.46
ProcVersionSignature: Ubuntu 5.4.0-42.46-generic 5.4.44
Uname: Linux 5.4.0-42-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.6
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: smrtalec 1174 F.... pulseaudio
CasperMD5CheckResult: skip
CurrentDesktop: XFCE
Date: Thu Aug 13 08:25:19 2020
InstallationDate: Installed on 2020-08-10 (2 days ago)
InstallationMedia: Ubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
MachineType: Hewlett-Packard HP Compaq 2510p Notebook PC
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.4.0-42-generic root=UUID=bf5ecda3-8bba-45a8-8f73-038836aa1952 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-5.4.0-42-generic N/A
 linux-backports-modules-5.4.0-42-generic N/A
 linux-firmware 1.187.2
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 11/11/2011
dmi.bios.vendor: Hewlett-Packard
dmi.bios.version: 68MSP Ver. F.30
dmi.board.name: 30C9
dmi.board.vendor: Hewlett-Packard
dmi.board.version: KBC Version 75.28
dmi.chassis.type: 10
dmi.chassis.vendor: Hewlett-Packard
dmi.modalias: dmi:bvnHewlett-Packard:bvr68MSPVer.F.30:bd11/11/2011:svnHewlett-Packard:pnHPCompaq2510pNotebookPC:pvrF.30:rvnHewlett-Packard:rn30C9:rvrKBCVersion75.28:cvnHewlett-Packard:ct10:cvr:
dmi.product.family: 103C_5336AN
dmi.product.name: HP Compaq 2510p Notebook PC
dmi.product.sku: KR918UT#ABA
dmi.product.version: F.30
dmi.sys.vendor: Hewlett-Packard

Revision history for this message
smrtalecopq (smrtalecopq) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

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

I have hit the same issues with my old laptop Compaq 2510p

It works fine with kernel 4.x.x. For all 5.x.x I can suspend the first time, but then after that I no longer be able to suspend.

Revision history for this message
Steve Kieu (msh-computing) wrote :

I just complied and test the latest mainline kernel 5.9.0-rc1 from kernel.org and problem is not fixed.

It might be the bios firmware need to be updated but given the old laptop HP did not offer any update anymore.

Revision history for this message
smrtalecopq (smrtalecopq) wrote :

Can confirm 5.9.0-rc1 did not work for me (following the instruction at https://wiki.ubuntu.com/Kernel/MainlineBuilds). I also experienced the same behavior where it worked the first time but not after that.

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

Would it be possible for you to do a kernel bisection?

First, find the last -rc kernel works and the first -rc kernel doesn’t work from http://kernel.ubuntu.com/~kernel-ppa/mainline/

Then,
$ sudo apt build-dep linux
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
$ cd linux
$ git bisect start
$ git bisect good $(the working version you found)
$ git bisect bad $(the non-working version found)
$ make localmodconfig
$ make -j`nproc` deb-pkg
Install the newly built kernel, then reboot with it.
If it still have the same issue,
$ git bisect bad
Otherwise,
$ git bisect good
Repeat to "make -j`nproc` deb-pkg" until you find the offending commit.

Revision history for this message
smrtalecopq (smrtalecopq) wrote :

I got the following -rc kernels narrowed down. Will continue later.
5.0.0-rc8 good
5.1.0-rc1 bad

Revision history for this message
smrtalecopq (smrtalecopq) wrote :

a3fbfae82b4cb3ff9928e29f34c64d0507cad874 is the first bad commit
commit a3fbfae82b4cb3ff9928e29f34c64d0507cad874
Author: Jarkko Sakkinen <email address hidden>
Date: Mon Nov 5 02:07:56 2018 +0200

    tpm: take TPM chip power gating out of tpm_transmit()

    Call tpm_chip_start() and tpm_chip_stop() in

    * tpm_chip_register()
    * tpm_class_shutdown()
    * tpm_del_char_device()
    * tpm_pm_suspend()
    * tpm_try_get_ops() and tpm_put_ops()
    * tpm2_del_space()

    And remove these calls from tpm_transmit(). The core reason for this
    change is that in tpm_vtpm_proxy a locality change requires a virtual
    TPM command (a command made up just for that driver).

    The consequence of this is that this commit removes the remaining nested
    calls.

    Signed-off-by: Jarkko Sakkinen <email address hidden>
    Reviewed-by: Stefan Berger <email address hidden>
    Tested-by: Stefan Berger <email address hidden>
    Reviewed-by: Jerry Snitselaar <email address hidden>
    Reviewed-by: James Bottomley <email address hidden>
    Tested-by: Alexander Steffen <email address hidden>

 drivers/char/tpm/tpm-chip.c | 38 ++++++++++++++++++++++----------------
 drivers/char/tpm/tpm-interface.c | 18 +++++++++---------
 drivers/char/tpm/tpm.h | 9 ---------
 drivers/char/tpm/tpm2-space.c | 5 ++++-
 drivers/char/tpm/tpm_tis_core.c | 4 ++++
 drivers/char/tpm/tpm_vtpm_proxy.c | 3 +--
 6 files changed, 40 insertions(+), 37 deletions(-)

Revision history for this message
smrtalecopq (smrtalecopq) wrote :

Any update? @kaihengfeng Thanks

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

Can you please install the latest mainline kernel and attach dmesg here?
https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.10-rc2/amd64/

Revision history for this message
smrtalecopq (smrtalecopq) wrote :

dmesg attached below after install and reboot.

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

Forgot to ask you to suspend to reproduce the problem, then attach the dmesg...

Revision history for this message
smrtalecopq (smrtalecopq) wrote :

dmesg attached, after one successful suspend and one subsequent failed suspend.

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

Ok, can you please also attach dmesg under 5.0.0-rc8, with two suspend cycles?

Revision history for this message
smrtalecopq (smrtalecopq) wrote :

Attached dmesg after 2 suspend cycles on 5.0.0rc8

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

Was able to suspend and wake 3 times consecutively with no apparent error using this kernel (#17).

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
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.