[MacBookPro11,5] wakes up and suspends in a loop while closed

Bug #1812561 reported by Selwyn
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Low
Unassigned

Bug Description

Similar bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1507472/

The first time suspending works great but after that suspending causes the laptop to wake up regardless of the method used to suspend.

Workaround: use kernel 4.19.4.

Sidenote: thanks to penalvch for explaining how to report this!

ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: linux-image-4.18.0-13-generic 4.18.0-13.14
ProcVersionSignature: Ubuntu 4.18.0-13.14-generic 4.18.17
Uname: Linux 4.18.0-13-generic x86_64
ApportVersion: 2.20.10-0ubuntu13.1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: siilwyn 1852 F.... pulseaudio
 /dev/snd/controlC1: siilwyn 1852 F.... pulseaudio
CurrentDesktop: ubuntu:GNOME
Date: Sun Jan 20 13:40:14 2019
InstallationDate: Installed on 2019-01-19 (1 days ago)
InstallationMedia: Ubuntu 18.10 "Cosmic Cuttlefish" - Release amd64 (20181017.3)
Lsusb:
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 002: ID 05ac:8290 Apple, Inc.
 Bus 001 Device 003: ID 05ac:0274 Apple, Inc.
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: Apple Inc. MacBookPro11,5
ProcFB: 0 radeondrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.18.0-13-generic root=UUID=57f2dc4c-30f7-40b6-a9db-9b6f93c214cb ro quiet splash vt.handoff=1
RelatedPackageVersions:
 linux-restricted-modules-4.18.0-13-generic N/A
 linux-backports-modules-4.18.0-13-generic N/A
 linux-firmware 1.175.1
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 06/18/2017
dmi.bios.vendor: Apple Inc.
dmi.bios.version: MBP114.88Z.0172.B25.1706181512
dmi.board.name: Mac-06F11F11946D27C5
dmi.board.vendor: Apple Inc.
dmi.board.version: MacBookPro11,5
dmi.chassis.type: 9
dmi.chassis.vendor: Apple Inc.
dmi.chassis.version: Mac-06F11F11946D27C5
dmi.modalias: dmi:bvnAppleInc.:bvrMBP114.88Z.0172.B25.1706181512:bd06/18/2017:svnAppleInc.:pnMacBookPro11,5:pvr1.0:rvnAppleInc.:rnMac-06F11F11946D27C5:rvrMacBookPro11,5:cvnAppleInc.:ct9:cvrMac-06F11F11946D27C5:
dmi.product.family: MacBook Pro
dmi.product.name: MacBookPro11,5
dmi.product.version: 1.0
dmi.sys.vendor: Apple Inc.

Revision history for this message
Selwyn (siilwyn-deactivatedaccount) wrote :
description: updated
description: updated
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
penalvch (penalvch)
summary: - MacBook Pro 2015 wakes up and suspends in a loop while closed
+ [MacBookPro11,5] wakes up and suspends in a loop while closed
description: updated
Revision history for this message
penalvch (penalvch) wrote :

Selwyn, thank you for reporting this and helping make Ubuntu better.

In order to allow additional upstream mainline kernel developers to examine the issue, at your earliest convenience, could you please test the latest mainline kernel? Please keep in mind the following:
1) The one to test is in a folder at the very top of the page (not the daily folder).
2) The release names are irrelevant.
3) The folder time stamps aren't indicative of when the kernel actually was released upstream.
4) Install instructions are available at https://wiki.ubuntu.com/Kernel/MainlineBuilds .

If testing on your main install would be inconvenient, one may:
1) Install Ubuntu to a different partition and then test this there.
2) Backup, or clone the primary install.

If the latest kernel did not allow you to test to the issue (ex. you couldn't boot into the OS) please make a comment in your report about this, and continue to test the next most recent kernel version until you can test to the issue. Once you've tested the mainline kernel, please comment on which kernel version specifically you tested. If this issue is not reproducible in the mainline kernel, please add the following tags by clicking on the yellow circle with a black pencil icon, next to the word Tags, located at the bottom of the Bug Description:
kernel-fixed-upstream
kernel-fixed-upstream-X.Y-rcZ

Where X, and Y are the first two numbers of the kernel version, and Z is the release candidate number if it exists.

If the issue is reproducible with the mainline kernel, please add the following tags:
kernel-bug-exists-upstream
kernel-bug-exists-upstream-X.Y-rcZ

Please note, an error to install the kernel does not fit the criteria of kernel-bug-exists-upstream.

Also, you don't need to apport-collect further unless specifically requested to do so.

In addition, to keep this issue relevant to upstream, please continue to test the latest mainline kernel as it becomes available.

Lastly, it is most helpful that after testing of the latest mainline kernel is complete, you mark this report Status Confirmed.

Thank you for your help.

Changed in linux (Ubuntu):
importance: Undecided → Low
status: Confirmed → Incomplete
Revision history for this message
Selwyn (siilwyn-deactivatedaccount) wrote :

Thanks for the info, I've reproduced this on the latest kernel and updated the tags!

tags: added: kernel-bug-exists-upstream kernel-bug-exists-upstream-5.0-rc2
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
penalvch (penalvch) wrote :

Selwyn, could you please provide all of the missing information from https://wiki.ubuntu.com/DebuggingKernelSuspend ?

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

If disabling wakeup on XHC helps, this means USB device wakes the system up.

Please booth with "usbcore.dyndbg=+p", reproduce the issue, and attach dmesg.

Revision history for this message
Selwyn (siilwyn-deactivatedaccount) wrote :

Thank you for your replies Christopher & Kai-Heng, sorry for the slow reply I'm trying to find time to debug and figure out how to debug.

Disabling XHC1 does not seem to solve this anymore, I guess one of the updates last week changed the behavior. Both with XHC1 enabled and disabled I get the following:
1) Suspending with `systemctl suspend`, closing the laptop lid or using the power button for the first time works perfectly.
2) Waking up by pressing a key or pressing the power button.
3) Suspending a 2nd time with...
  4a) lid open: Laptop seems to suspend but wakes up immediately to the login screen.
  4b) lid closed: Laptop seems to go in a loop, I can see the light flashing multiple times, things go haywire, after opening the lid there is a black screen with blinking cursor, can't type anything.

Attached is the dmesg output, maybe interesting info on line 1284 where it states usb2 failed to suspend.

I'll try to add more information with pm_trace.

Revision history for this message
Selwyn (siilwyn-deactivatedaccount) wrote :

Alright went through all steps! For the suspend command I replaced `pm-suspend` with `systemctl suspend`, since I don't have the first, hopefully the latter is okay too.

For the "usbcore.dyndbg=+p" step I was not sure how, I modified grub with GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.dyndbg=+p" and ran grub update, output in attached "dmesg-2-usbcore-dyndbg.txt".

description: updated
tags: added: kernel-bug-exists-upstream-5.0-rc4
removed: kernel-bug-exists-upstream-5.0-rc2
penalvch (penalvch)
description: updated
Changed in linux (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Selwyn (siilwyn-deactivatedaccount) wrote :

Thanks again Christopher! I could not send the email though, the email address "<email address hidden>" seems invalid. Any ideas?

Revision history for this message
Selwyn (siilwyn-deactivatedaccount) wrote :

The delivery status gives:

<email address hidden>: Host or domain name not found. Name service error for name=vger.linux.org type=A: Host not found ---------------------------------------------- message/delivery-status ---------------------------------------------- Reporting-MTA: dns; mail1.protonmail.ch X-Postfix-Queue-ID: A70A02008274 X-Postfix-Sender: rfc822; <email address hidden> Arrival-Date: Fri, 1 Feb 2019 10:37:45 +0000 (UTC) Final-Recipient: rfc822; <email address hidden> Original-Recipient: rfc822;<email address hidden> Action: failed Status: 5.4.4 Diagnostic-Code: X-Postfix; Host or domain name not found. Name service error for name=vger.linux.org type=A: Host not found

description: updated
penalvch (penalvch)
description: updated
Revision history for this message
Selwyn (siilwyn-deactivatedaccount) wrote :

Christopher, the workaround is invalid so I removed it. Btw. should I retry sending the email? I did not get any reply.

description: updated
Revision history for this message
Selwyn (siilwyn-deactivatedaccount) wrote :

Christopher:

1) The workaround never worked, I initially posted this before finding out the bug only happens after the first suspend.

2) I figured out what is wrong, the email "<email address hidden>" provided on https://wiki.ubuntu.com/Bugs/Upstream/kernel is wrong. Think it should be: "<email address hidden>". Just send it successfully to the latter.

Revision history for this message
penalvch (penalvch) wrote :

Selwyn, given the workaround never worked, this isn't confirmed a usb problem (although could still be due to usb).

Hence, this report would still be missing the vast majority of the information requested in https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1812561/comments/5 in order for a developer to root cause.

Changed in linux (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Selwyn (siilwyn-deactivatedaccount) wrote :

What? I spend an hour going through that page, all information is in the attachments of the post. Anyways this is confirmed to be a regression: https://marc.info/?l=linux-usb&m=154915973623396&w=2

Revision history for this message
Selwyn (siilwyn-deactivatedaccount) wrote :

There should be multiple dmesg attachments, do I have to make them public or something? For me the following are shown:
dmesg-2-systemctl-suspend-keywake.txt
dmesg-2-usbcore-dyndbg.txt
dmesg-core.txt
dmesg-devices.txt
dmesg-freezer.txt
dmesg-none.txt
dmesg-processors.txt

I'll see if I can figure out how to try that particular commit but since the Mathias confirmed it having the exact same issue I'm pretty sure.

Revision history for this message
penalvch (penalvch) wrote :

Selwyn, one may follow the below to confirm results for your hardware:
https://wiki.ubuntu.com/Kernel/KernelBisection

description: updated
Revision history for this message
penalvch (penalvch) wrote :

Selwyn, as the latest version of Ubuntu is based on 4.19.x, to confirm this is already resolved in Ubuntu, could you please test http://cdimage.ubuntu.com/daily-live/current/ and advise to the results?

penalvch (penalvch)
tags: added: needs-upstream-testing regression-potential
removed: kernel-bug-exists-upstream
Revision history for this message
Selwyn (siilwyn-deactivatedaccount) wrote :

Sorry I don't understand, could you clarify?

For posterity: 4.19.4 has no issues but the regression happened on 4.19.8 as described by Eric this happened at commit 2f31a67f01a8beb22cae754c53522cb61a005750 upstream.

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
Changed in linux (Ubuntu):
status: Expired → Fix Committed
penalvch (penalvch)
Changed in linux (Ubuntu):
status: Fix Committed → Incomplete
Revision history for this message
Selwyn (siilwyn-deactivatedaccount) wrote :
Revision history for this message
Selwyn (siilwyn-deactivatedaccount) wrote :

Sorry about that Christopher, I didn't understand what you meant in #28.
I have tested on the latest version of 19.04 on the 'default' kernel 5.0.0-13-generic and this issue is still present.

Revision history for this message
penalvch (penalvch) wrote :

Selwyn, to clarify, have you tested the commit noted in #31 with your hardware and confirmed it fixes the issue?

tags: added: disco
Revision history for this message
Selwyn (siilwyn-deactivatedaccount) wrote :

Yes, the issue is not present anymore in the mainline kernel 5.1. :)

penalvch (penalvch)
tags: added: needs-reverse-bisect
tags: added: kernel-fixed-upstream kernel-fixed-upstream-5.1
removed: needs-upstream-testing
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.