Suspend ends after seconds and laptop resumes

Bug #1721856 reported by Karl-Philipp Richter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Incomplete
Medium
Joseph Salisbury
Zesty
Incomplete
Medium
Joseph Salisbury

Bug Description

The suspend/standby ends after seconds and the laptop resumes like it'd wake up from suspend. I didn't use suspend for a long time (months or years) and can't even estimate when it worked for the last time.

This issue is fixed in 4.14-rc3 mainline kernel - although some parts of the installation don't work, like ZFS and nvidia-340 which might cause the problem as well.

I'm willing to do git bisect work if you confirm me that this makes sense.

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: linux-image-4.10.0-35-generic 4.10.0-35.39
ProcVersionSignature: Ubuntu 4.10.0-35.39-generic 4.10.17
Uname: Linux 4.10.0-35-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.4-0ubuntu4.5
Architecture: amd64
AudioDevicesInUse:
 BEN. PID ZUGR. BEFEHL
 /dev/snd/controlC0: richter 18896 F.... pulseaudio
CurrentDesktop: XFCE
Date: Fri Oct 6 20:21:35 2017
HibernationDevice: RESUME=UUID=1bb0bb3e-8148-4957-9673-9701bd571c0a
InstallationDate: Installed on 2015-12-12 (664 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
MachineType: LENOVO 20221
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.10.0-35-generic root=UUID=791b47e7-915d-4d5a-bce0-d7e9b660a2ab ro rootflags=subvol=ubuntu-main-root
RelatedPackageVersions:
 linux-restricted-modules-4.10.0-35-generic N/A
 linux-backports-modules-4.10.0-35-generic N/A
 linux-firmware 1.164.1
SourcePackage: linux
UpgradeStatus: Upgraded to zesty on 2017-05-01 (158 days ago)
dmi.bios.date: 07/12/2013
dmi.bios.vendor: LENOVO
dmi.bios.version: 71CN51WW(V1.21)
dmi.board.asset.tag: No Asset Tag
dmi.board.name: INVALID
dmi.board.vendor: LENOVO
dmi.board.version: 31900003WIN8 STD MLT
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Lenovo IdeaPad Z500 Touch
dmi.modalias: dmi:bvnLENOVO:bvr71CN51WW(V1.21):bd07/12/2013:svnLENOVO:pn20221:pvrLenovoIdeaPadZ500Touch:rvnLENOVO:rnINVALID:rvr31900003WIN8STDMLT:cvnLENOVO:ct10:cvrLenovoIdeaPadZ500Touch:
dmi.product.name: 20221
dmi.product.version: Lenovo IdeaPad Z500 Touch
dmi.sys.vendor: LENOVO

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :
description: updated
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
description: updated
summary: - standby ends after seconds and laptop resumes
+ Suspend ends after seconds and laptop resumes
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Can you see if this bug is fixed in upstream 4.13 or 4.10, which will tell us if the fix was already cc'd to stable.

4.10.17: http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.17/
4.13.5: http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.5/

Changed in linux (Ubuntu):
importance: Undecided → Medium
Changed in linux (Ubuntu Zesty):
status: New → Triaged
importance: Undecided → Medium
Changed in linux (Ubuntu):
status: Confirmed → Triaged
tags: added: needs-bisect
tags: added: kernel-da-key
Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

> Can you see if this bug is fixed in upstream 4.13 or 4.10, which will tell us if the fix was already cc'd to stable.

Fixed in 4.13.5 and present in 4.10.17.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

We can perform a reverse bisect to identify the commit that fixes this bug. We first need to identify the last bad kernel and first good one. Can you test the following two kernels:

v4.11: http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11
v4.12: http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.12

tags: added: performing-bisect
removed: needs-bisect
Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

> We can perform a reverse bisect to identify the commit that fixes this bug. We first need to identify the last bad kernel and first good one. Can you test the following two kernels:
>
> v4.11: http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11
> v4.12: http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.12

I tested:

4.10.17 bad
4.12.0 bad
4.12.14 bad
4.13.1 good
4.13.3 good
4.13.5 good

Please instruct for the further bisection process. Thanks for your support so far.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

To perform a bisect, we need to identify linear versions. Can you test the following two kernels:

v4.12 final: http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.12/
v4.13-rc1: http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13-rc1/

Changed in linux (Ubuntu):
assignee: nobody → Joseph Salisbury (jsalisbury)
Changed in linux (Ubuntu Zesty):
assignee: nobody → Joseph Salisbury (jsalisbury)
Changed in linux (Ubuntu):
status: Triaged → In Progress
Changed in linux (Ubuntu Zesty):
status: Triaged → In Progress
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

It looks like you may have already tested 4.12 final per comment #6. If so, we just need to figure out which 4.13 release candidate introduced the fix. So if v4.13-rc1 is still bad, we would next test -rc2, -rc3, etc until we find the good version.

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

v4.13-rc1 is good. Please tell me if you need support for this issue from me.

I'd like to take this opportunity to recommend you to improve instructions for bisecting with the mainline kernel releases and release candidates for reports like me. I'm not a Linux hacker, but I understand the principle of bisecting which is why I indicated to be ready to do bisecting work in the description. You could have directed me to a wiki article or else describing bisecting pre-work with kernel releases before bisecting commits, so that I'd have known that all sub-version including the release candidates are included into into this process. Also, if I didn't know what bisecting was, I might have tried all kernel versions instead of doing a binary search which would have most certainly caused unnecessary work.

Thanks for your support and contributions so far.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

There is a wiki page available that has some information on bisecting:
https://wiki.ubuntu.com/Kernel/KernelBisection

If you want to give the bisect a try, you can do that. I can assist with questions. Otherwise, I started a "Reverse" kernel bisect between v4.12 final and v4.13-rc1. The kernel bisect will require testing of about 10-13 test kernels.

I built the first test kernel, up to the following commit:
e5f76a2e0e84ca2a215ecbf6feae88780d055c56

The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1721856

Can you test that kernel and report back if it has the bug or not? I will build the next test kernel based on your test results.

Thanks in advance

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

> The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1721856

The _all package seems to be damaged/truncated. I'm getting `dpkg-deb: error: unexpected end of file in archive member header in linux-headers-4.12.0-041200_4.12.0-041200.201710171537_all.deb` and the package seems unusual small.

> If you want to give the bisect a try, you can do that. I can assist with questions. Otherwise, I started a "Reverse" kernel bisect between v4.12 final and v4.13-rc1. The kernel bisect will require testing of about 10-13 test kernels.

I'd be really happy if you can do the bisecting and building kernels for me to test. So, you'll build one kernel and then wait for me to report and then eventually build the next?

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

The only .deb package you need to install is:
linux-image-4.12.0-041200-generic_4.12.0-041200.201710171537_amd64.deb

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

> The only .deb package you need to install is:
linux-image-4.12.0-041200-generic_4.12.0-041200.201710171537_amd64.deb

Didn't know that, thank you. This version is good.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built the next test kernel, up to the following commit:
1849f800fba32cd5a0b647f824f11426b85310d8

The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1721856

Can you test that kernel and report back if it has the bug or not? I will build the next test kernel based on your test results.

Thanks in advance

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

 1849f800fba32cd5a0b647f824f11426b85310d8 is good, i.e. doesn't have the bug.

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

The issue is fixed with the first 17.10 kernel 4.13.0-16-generic as expected.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built the next test kernel, up to the following commit:
cbcd4f08aa637b74f575268770da86a00fabde6d

The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1721856

Can you test that kernel and report back if it has the bug or not? I will build the next test kernel based on your test results.

Thanks in advance

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

cbcd4f08aa637b74f575268770da86a00fabde6d is good. Thanks for the kernels.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built the next test kernel, up to the following commit:
1b044f1cfc65a7d90b209dfabd57e16d98b58c5b

The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1721856

Can you test that kernel and report back if it has the bug or not? I will build the next test kernel based on your test results.

Thanks in advance

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

 1b044f1cfc65a7d90b209dfabd57e16d98b58c5b is good.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built the next test kernel, up to the following commit:
892ad5acca0b2ddb514fae63fa4686bf726d2471

The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1721856

Can you test that kernel and report back if it has the bug or not? I will build the next test kernel based on your test results.

Thanks in advance

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

 892ad5acca0b2ddb514fae63fa4686bf726d2471 is bad.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built the next test kernel, up to the following commit:
e7bd9ba20a9ec7024a0566a93c22b9571a48939a

The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1721856

Can you test that kernel and report back if it has the bug or not? I will build the next test kernel based on your test results.

Thanks in advance

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

e7bd9ba20a9ec7024a0566a93c22b9571a48939a is bad.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built the next test kernel, up to the following commit:
9bc088ab66be8978fbc981ba9644468fa2c2fd3f

The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1721856

Can you test that kernel and report back if it has the bug or not? I will build the next test kernel based on your test results.

Thanks in advance

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

 9bc088ab66be8978fbc981ba9644468fa2c2fd3f is bad.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built the next test kernel, up to the following commit:
e0f3e8f14da868047c524a0cf11e08b95fd1b008

The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1721856

Can you test that kernel and report back if it has the bug or not? I will build the next test kernel based on your test results.

Thanks in advance

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

e0f3e8f14da868047c524a0cf11e08b95fd1b008 is bad.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built the next test kernel, up to the following commit:
2fcc112af37fa88f8da077d6dd3bb8e38e75adb1

The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1721856

Can you test that kernel and report back if it has the bug or not? I will build the next test kernel based on your test results.

Thanks in advance

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

2fcc112af37fa88f8da077d6dd3bb8e38e75adb1 is good.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built the next test kernel, up to the following commit:
63841b2a6969501de183efafc14d20175e402804

The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1721856

Can you test that kernel and report back if it has the bug or not? I will build the next test kernel based on your test results.

Thanks in advance

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

63841b2a6969501de183efafc14d20175e402804 is bad.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built the next test kernel, up to the following commit:
2a55e98f9f76825d78a4e6ef315c35fccabf5212

The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1721856

Can you test that kernel and report back if it has the bug or not? I will build the next test kernel based on your test results.

Thanks in advance

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

2a55e98f9f76825d78a4e6ef315c35fccabf5212 is good.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built the next test kernel, up to the following commit:
e7561f1633ac735df48c55ad09a2530e9ab9fab1

The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1721856

Can you test that kernel and report back if it has the bug or not? I will build the next test kernel based on your test results.

Thanks in advance

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

 e7561f1633ac735df48c55ad09a2530e9ab9fab1 is good.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built the next test kernel, up to the following commit:
525b8ed91671e29e187dfe02d408b11190ccf494

The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1721856

Can you test that kernel and report back if it has the bug or not? I will build the next test kernel based on your test results.

Thanks in advance

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

525b8ed91671e29e187dfe02d408b11190ccf494 is good (assuming that the kernel image package with the later timestamp is the one representing the commit).

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built the next test kernel, up to the following commit:
91d57bae08689199c8acc77a8b3b41150cafab1c

The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1721856

Can you test that kernel and report back if it has the bug or not? I will build the next test kernel based on your test results.

We should only have 2 or so more kernels to test.

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

91d57bae08689199c8acc77a8b3b41150cafab1c is good.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

The reverse bisect reported the following commit was the fix:
91d57bae0868 ("posix-timers: Make use of forward/remaining callbacks")

This commit was added to mainline as of v4.13-rc1, which means it is already in Artful(17.10) and Bionic(18.04).

That commit was not a clean cherry pick into Zesty. It requires some back porting to core timer code, which means it may not pass SRU criteria.

Can you see if the bug is fixed for you in 17.10(Artful)? It can be downloaded from:
https://launchpad.net/~canonical-kernel-security-team/+archive/ubuntu/ppa2/+build/13567624

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

Good to know, thank you for your support. The issue is fixed in 4.13.0-16-generic of Ubuntu 17.10 as stated in #16.

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