[MacBookAir6,2] Resumes immediately after suspend

Bug #1616214 reported by Jamon Camisso
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Based on https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1311724 I am opening this bug to tackle the issue of a Macbook Air that resumes immediately after suspending.

I have the exact same symptoms as those described in the first bug. The first suspend on battery power works without any issues. After that, even trying the 2x pm-suspend method doesn't work.

Here's an excerpt from dmesg showing the suspend:

[11363.316508] PM: Syncing filesystems ... done.
[11363.683228] PM: Preparing system for sleep (mem)
[11363.683388] Freezing user space processes ... (elapsed 0.002 seconds) done.
[11363.685415] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[11363.686602] PM: Suspending system (mem)
[11363.686629] Suspending console(s) (use no_console_suspend to debug)
[11363.686839] sd 1:0:0:0: [sda] Synchronizing SCSI cache
[11363.686890] sd 1:0:0:0: [sda] Stopping disk
[11363.689056] R8188EU: INFO indicate disassoc
[11364.057112] PM: suspend of devices complete after 370.364 msecs
[11364.079232] PM: late suspend of devices complete after 22.117 msecs
[11364.079400] thunderbolt 0000:07:00.0: suspending...
[11364.079620] thunderbolt 0000:07:00.0: stopping RX ring 0
[11364.079623] thunderbolt 0000:07:00.0: disabling interrupt at register 0x38200 bit 12 (0x1001 -> 0x1)
[11364.079628] thunderbolt 0000:07:00.0: stopping TX ring 0
[11364.079631] thunderbolt 0000:07:00.0: disabling interrupt at register 0x38200 bit 0 (0x1 -> 0x0)
[11364.079633] thunderbolt 0000:07:00.0: control channel stopped
[11364.079634] thunderbolt 0000:07:00.0: suspend finished
[11364.080060] xhci_hcd 0000:00:14.0: System wakeup enabled by ACPI
[11364.095334] pcieport 0000:05:00.0: quirk: cutting power to thunderbolt controller...
[11364.506336] mba6x_bl: Invalid response at reg: 0x1 (len: 24)
[11364.733532] mba6x_bl: failed to set brightness
[11364.733583] PM: noirq suspend of devices complete after 654.350 msecs
[11364.733853] ACPI: Preparing to enter system sleep state S3
[11364.763238] ACPI : EC: EC stopped
[11364.763238] PM: Saving platform NVS memory
[11364.763240] Disabling non-boot CPUs ...
[11364.763530] Broke affinity for irq 49
[11364.764553] smpboot: CPU 1 is now offline
[11364.776286] Broke affinity for irq 18
[11364.776293] Broke affinity for irq 44
[11364.776299] Broke affinity for irq 46
[11364.776305] Broke affinity for irq 48
[11364.776309] Broke affinity for irq 49
[11364.777347] smpboot: CPU 2 is now offline
[11364.787918] Broke affinity for irq 8
[11364.787921] Broke affinity for irq 9
[11364.787924] Broke affinity for irq 16
[11364.787927] Broke affinity for irq 18
[11364.787930] Broke affinity for irq 44
[11364.787933] Broke affinity for irq 45
[11364.787935] Broke affinity for irq 46
[11364.787937] Broke affinity for irq 47
[11364.787940] Broke affinity for irq 48
[11364.787942] Broke affinity for irq 49
[11364.787945] Broke affinity for irq 54
[11364.788969] smpboot: CPU 3 is now offline
[11364.805918] ACPI: Low-level resume complete
[11364.806002] ACPI : EC: EC started
[11364.806004] PM: Restoring platform NVS memory
[11364.806415] Enabling non-boot CPUs ...
[11364.826307] x86: Booting SMP configuration:
[11364.826309] smpboot: Booting Node 0 Processor 1 APIC 0x2
[11364.837869] cache: parent cpu1 should not be sleeping
[11364.838662] CPU1 is up
[11365.018821] smpboot: Booting Node 0 Processor 2 APIC 0x1
[11365.074966] cache: parent cpu2 should not be sleeping
[11365.075057] CPU2 is up
[11365.273364] smpboot: Booting Node 0 Processor 3 APIC 0x3
[11365.325736] cache: parent cpu3 should not be sleeping
[11365.350542] CPU3 is up
[11365.354192] ACPI: Waking up from system sleep state S3
[11365.430255] xhci_hcd 0000:00:14.0: System wakeup disabled by ACPI
[11365.431123] pcieport 0000:06:03.0: quirk: waiting for thunderbolt to reestablish PCI tunnels...
[11365.431125] pcieport 0000:06:04.0: quirk: waiting for thunderbolt to reestablish PCI tunnels...
[11365.431219] pcieport 0000:06:05.0: quirk: waiting for thunderbolt to reestablish PCI tunnels...
[11365.431309] pcieport 0000:06:06.0: quirk: waiting for thunderbolt to reestablish PCI tunnels...
[11365.446161] thunderbolt 0000:07:00.0: resuming...
[11365.446162] thunderbolt 0000:07:00.0: control channel starting...
[11365.446165] thunderbolt 0000:07:00.0: starting TX ring 0
[11365.446171] thunderbolt 0000:07:00.0: enabling interrupt at register 0x38200 bit 0 (0x0 -> 0x1)
[11365.446172] thunderbolt 0000:07:00.0: starting RX ring 0
[11365.446177] thunderbolt 0000:07:00.0: enabling interrupt at register 0x38200 bit 12 (0x1 -> 0x1001)
[11365.446181] thunderbolt 0000:07:00.0: resetting switch at 0
[11365.447441] thunderbolt 0000:07:00.0: 0: resuming switch
[11365.452967] thunderbolt 0000:07:00.0: resume finished
[11365.453101] PM: noirq resume of devices complete after 23.052 msecs
[11365.457463] PM: early resume of devices complete after 4.341 msecs
[11365.457833] pciehp 0000:06:05.0:pcie24: Timeout on hotplug command 0x1038 (issued 11364396 msec ago)
[11365.457837] pciehp 0000:06:03.0:pcie24: Timeout on hotplug command 0x1038 (issued 11364396 msec ago)
[11365.457869] pciehp 0000:06:04.0:pcie24: Timeout on hotplug command 0x1038 (issued 11364396 msec ago)
[11365.461824] pciehp 0000:06:06.0:pcie24: Timeout on hotplug command 0x1038 (issued 11364400 msec ago)
[11365.461845] rtc_cmos 00:02: System wakeup disabled by ACPI
[11365.473860] sd 1:0:0:0: [sda] Starting disk
[11365.547332] thunderbolt 0000:07:00.0: resetting error on 0:b.
[11365.547342] thunderbolt 0000:07:00.0: 0:b: hotplug: scanning
[11365.547343] thunderbolt 0000:07:00.0: 0:b: hotplug: no switch found
[11365.547347] thunderbolt 0000:07:00.0: resetting error on 0:c.
[11365.547353] thunderbolt 0000:07:00.0: 0:c: hotplug: scanning
[11365.547354] thunderbolt 0000:07:00.0: 0:c: hotplug: no switch found
[11365.801887] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[11365.802162] ata1.00: unexpected _GTF length (8)
[11365.802572] ata1.00: unexpected _GTF length (8)
[11365.802696] ata1.00: configured for UDMA/133
[11365.818069] MAC Address = ec:08:6b:1f:30:92
[11366.202398] PM: resume of devices complete after 744.933 msecs
[11366.202849] PM: Finishing wakeup.

Something that seems notable regarding the policy min/med/max policy in in /sys/class/scsi_host/host1/link_power_management_policy when managed via powertop:

If I try to toggle ' Enable SATA link power management for host1' after a suspend, powertop throws an error accessing the policy and shows 'null' in its output.

cat /proc/acpi/wakeup
Device S-state Status Sysfs node
P0P2 S3 *disabled
EC S4 *disabled platform:PNP0C09:00
HDEF S3 *disabled pci:0000:00:1b.0
RP01 S3 *disabled pci:0000:00:1c.0
RP02 S3 *disabled pci:0000:00:1c.1
RP03 S3 *disabled pci:0000:00:1c.2
ARPT S4 *disabled pci:0000:03:00.0
RP05 S3 *disabled pci:0000:00:1c.4
RP06 S3 *disabled pci:0000:00:1c.5
SPIT S3 *disabled
XHC1 S3 *enabled pci:0000:00:14.0
ADP1 S4 *disabled platform:ACPI0003:00
LID0 S4 *enabled platform:PNP0C0D:00

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-image-4.4.0-34-generic 4.4.0-34.53
ProcVersionSignature: Ubuntu 4.4.0-34.53-generic 4.4.15
Uname: Linux 4.4.0-34-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl wl
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: jamon 5746 F.... pulseaudio
 /dev/snd/controlC1: jamon 5746 F.... pulseaudio
CurrentDesktop: Unity
Date: Tue Aug 23 10:24:11 2016
MachineType: Apple Inc. MacBookAir6,2
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.4.0-34-generic root=UUID=3a76e661-9bdd-49e1-8621-013477d0c438 ro cryptdevice=/dev/sda5:cryptoroot root=/dev/mapper/UBUNTU ro splash quiet vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-4.4.0-34-generic N/A
 linux-backports-modules-4.4.0-34-generic N/A
 linux-firmware 1.157.3
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 02/22/2016
dmi.bios.vendor: Apple Inc.
dmi.bios.version: MBA61.88Z.0099.B22.1602221559
dmi.board.asset.tag: Base Board Asset Tag#
dmi.board.name: Mac-7DF21CB3ED6977E5
dmi.board.vendor: Apple Inc.
dmi.board.version: MacBookAir6,2
dmi.chassis.type: 10
dmi.chassis.vendor: Apple Inc.
dmi.chassis.version: Mac-7DF21CB3ED6977E5
dmi.modalias: dmi:bvnAppleInc.:bvrMBA61.88Z.0099.B22.1602221559:bd02/22/2016:svnAppleInc.:pnMacBookAir6,2:pvr1.0:rvnAppleInc.:rnMac-7DF21CB3ED6977E5:rvrMacBookAir6,2:cvnAppleInc.:ct10:cvrMac-7DF21CB3ED6977E5:
dmi.product.name: MacBookAir6,2
dmi.product.version: 1.0
dmi.sys.vendor: Apple Inc.

Revision history for this message
Jamon Camisso (jamon) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote : Re: Macbook Air resumes immediately after suspend

Did this issue start happening after an update/upgrade? Was there a prior kernel version where you were not having this particular problem?

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.8 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.8-rc3

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Jamon Camisso (jamon) wrote :

I've had a go with linux-image-4.8.0-040800rc3-generic_4.8.0-040800rc3.201608212032_amd64 and the behaviour is the same, suspend immediately wakes up.

I also tried last week with linux-image-4.7.0-040700-generic_4.7.0-040700.201608021801_amd64 and it was present there.

Marked as confirmed and tagged as requested.

Please let me know if there is any more information that I can gather.

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

Jamon Camisso, could you please provide the missing information from https://wiki.ubuntu.com/DebuggingKernelSuspend ?

tags: added: latest-bios
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Ketil (ubuntu-rytmisk) wrote :

I have the same problem on a Macbook pro retina. It works sometimes after a reboot, but always fails again after the first suspend.

Ketil

Revision history for this message
Balint Reczey (rbalint) wrote :

Same on Debian with 3.16.36-1+deb8u2

Revision history for this message
penalvch (penalvch) wrote :

Ketil (ubuntu-rytmisk), it will help immensely if you filed a new report with the Ubuntu repository kernel (not mainline/upstream) via a terminal:
ubuntu-bug linux

Please feel free to subscribe me to it.

For more on why this is helpful, please see https://wiki.ubuntu.com/ReportingBugs.

Revision history for this message
Ketil (ubuntu-rytmisk) wrote :

Ok. I'll do my best. Here I follow the instructions from https://wiki.ubuntu.com/DebuggingKernelSuspend
1)As described above. The Macbook seems to suspend when closing the lid and then wakes again which is shown by the apple on the back och the lid lightning up

2) Closing the lid (but even doing it through the shut down menu in mate and unity)

3) See 2

4) Attached

The rest follows.

Revision history for this message
Ketil (ubuntu-rytmisk) wrote :

echo freezer > /sys/power/pm_test
gives:

none core processors platform devices [freezer]

Revision history for this message
Ketil (ubuntu-rytmisk) wrote :

echo devices > /sys/power/pm_test
gives:

none core processors platform [devices] freezer

Revision history for this message
Ketil (ubuntu-rytmisk) wrote :

echo platform > /sys/power/pm_test
gives:

none core processors [platform] devices freezer

Revision history for this message
Ketil (ubuntu-rytmisk) wrote :

echo core > /sys/power/pm_test
gives:

none [core] processors platform devices freezer

Revision history for this message
Ketil (ubuntu-rytmisk) wrote :

echo none > /sys/power/pm_test
gives:
[none] core processors platform devices freezer

Revision history for this message
Ketil (ubuntu-rytmisk) wrote :

11)
cat /sys/kernel/debug/suspend_stats
success: 4
fail: 0
failed_freeze: 0
failed_prepare: 0
failed_suspend: 0
failed_suspend_late: 0
failed_suspend_noirq: 0
failed_resume: 0
failed_resume_early: 0
failed_resume_noirq: 0
failures:
  last_failed_dev:

  last_failed_errno: 0
   0
  last_failed_step:

Revision history for this message
Ketil (ubuntu-rytmisk) wrote :

Ah - thanks. I tried to do the last thing from the wiki: sudo sh -c "sync && echo 1 > /sys/power/pm_trace && pm-suspend" and my computer just died. I had to hold power like forever before it would reboot...

Ketil

Revision history for this message
Ketil (ubuntu-rytmisk) wrote :

New try:
echo freezer > /sys/power/pm_test

Revision history for this message
Ketil (ubuntu-rytmisk) wrote :

echo devices > /sys/power/pm_test

Revision history for this message
Ketil (ubuntu-rytmisk) wrote :

echo platform > /sys/power/pm_test

Revision history for this message
Ketil (ubuntu-rytmisk) wrote :

echo processors > /sys/power/pm_test

Revision history for this message
Ketil (ubuntu-rytmisk) wrote :

echo core > /sys/power/pm_test

Revision history for this message
Ketil (ubuntu-rytmisk) wrote :

echo none > /sys/power/pm_test

Revision history for this message
penalvch (penalvch) wrote :

Ketil (ubuntu-rytmisk), apologies for my confusing you. Please perform the instructions noted in https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1616214/comments/8 , versus post attachments/comments in this report.

Revision history for this message
Ketil (ubuntu-rytmisk) wrote :
penalvch (penalvch)
summary: - Macbook Air resumes immediately after suspend
+ [MacBookAir6,2] Resumes immediately after suspend
Revision history for this message
Ketil (ubuntu-rytmisk) wrote :

Here is more info obviously.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1638788
When I tried to run "echo XHC1 > /proc/acpi/wakeup" - it suspended correctly

Ketil

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.