Macbook Air 6.2 suspend immediately resumes

Bug #1523917 reported by AG
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Most of the times laptop resumes immediately. Opening the lid, suspending manually, and closing the lid works sometimes

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: linux-image-3.19.0-39-generic 3.19.0-39.44
ProcVersionSignature: Ubuntu 3.19.0-39.44-generic 3.19.8-ckt9
Uname: Linux 3.19.0-39-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.17.2-0ubuntu1.8
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: alex 2057 F.... pulseaudio
 /dev/snd/controlC1: alex 2057 F.... pulseaudio
CurrentDesktop: Unity
Date: Tue Dec 8 08:29:03 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-07-02 (159 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
Lsusb:
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 003: ID 05ac:0291 Apple, Inc.
 Bus 001 Device 006: ID 05ac:828f Apple, Inc.
 Bus 001 Device 002: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: Apple Inc. MacBookAir6,2
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.19.0-39-generic.efi.signed root=UUID=e455bef3-753f-48d3-8a59-a01d67dff4d6 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.19.0-39-generic N/A
 linux-backports-modules-3.19.0-39-generic N/A
 linux-firmware 1.143.7
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/08/2015
dmi.bios.vendor: Apple Inc.
dmi.bios.version: MBA61.88Z.0099.B20.1509081314
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.B20.1509081314:bd09/08/2015: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
AG (alex+ubuntu-p) 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
penalvch (penalvch)
tags: added: latest-bios
Revision history for this message
penalvch (penalvch) wrote :

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

Could you please test the latest upstream kernel available from the very top line at the top of the page from http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D (the release names are irrelevant for testing, and please do not test the daily folder)? Install instructions are available at https://wiki.ubuntu.com/Kernel/MainlineBuilds . This will allow additional upstream developers to examine the issue.

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 upstream kernel, please comment on which kernel version specifically you tested. If this issue is fixed 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 report 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 mainline kernel does not fix the issue, 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.

Once testing of the latest upstream kernel is complete, please mark this report's Status as Confirmed. Please let us know your results.

Thank you for your understanding.

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Maarten Verwijs (x-contact-0) wrote :

I've tested and confirmed this bug on 4.5.0-040500rc2-generic #201601312230.

Revision history for this message
penalvch (penalvch) wrote :

Maarten Verwijs, 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
Maarten Verwijs (x-contact-0) wrote :

The fine folks at ArchLinux provide possible solutions to this issue. See: https://wiki.archlinux.org/index.php/MacBook#Suspend_and_Hibernate

I'll the steps below first and see if this solves the issue for me.

"Issues were reported where the machine would "suspend immediately after resume" in certain conditions when suspending by closing the lid. This was solved by de-selecting the option "event_when_closed_battery" in gconf-editor → gnome-power-manager → actions). "

And:

"If after suspend laptop is woken up after few seconds, may help to disable all stuff in /proc/acpi/wakeup, exclude LID0:

# echo XHC1 > /proc/acpi/wakeup
$ cat /proc/acpi/wakeup
Device S-state Status Sysfs node
P0P2 S3 *disabled
EC S3 *disabled
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 *disabled pci:0000:00:14.0
ADP1 S3 *disabled
LID0 S3 *enabled

And for permanent disabling:

$ cat /etc/udev/rules.d/90-xhc_sleep.rules

# disable wake from S3 on XHC1
SUBSYSTEM=="pci", KERNEL=="0000:00:14.0", ATTR{power/wakeup}="disabled"

If this does not work, check that ARPT is disabled, and add the corresponding rule to udev.

If this still does not work, try disabling LID0. This way suspending via lid-closing should be made impossible, so you might want to follow the instructions in this forum post to make suspending via both lid-closing and systemd possible, by using systemd services. "

Revision history for this message
Maarten Verwijs (x-contact-0) wrote :

Solved on my end by stopping XHC (bluetooth related) from allowing the macbook to resume.

To solve permanently create a file called '/etc/udev/rules.d/90-xhc_sleep.rules' and put the following in that file:

#----------------------------------------------
# disable wake from S3 on XHC1
SUBSYSTEM=="pci", KERNEL=="0000:00:14.0", ATTR{power/wakeup}="disabled"
#----------------------------------------------

After a reboot the problem has gone away.

The original reporter had this in his dmesg:

> [ 946.610514] thunderbolt 0000:07:00.0: suspend finished
> [ 946.611183] xhci_hcd 0000:00:14.0: System wakeup enabled by ACPI

Meaning that right after the suspend was completed, the machine got woken up by xhci_hcd. I have the same message in my dmesg.

This possibly also solves these similar bugs:

* https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1197482
* https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1311724

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.