[MacBookAir5,2] Resumes immediately after suspend

Bug #1638788 reported by miiiiitico
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Medium
Unassigned

Bug Description

with default settings the laptop will immediately resume after sending to sleep (regardless of by closing the LID or though the menu option "suspend")

the workaround is disabling the LID ACPI action by running:

echo LID0 >/proc/acpi/wakeup

this will fix the problem. obviously however just simply opening the lid won't wake the laptop anymore. so one has to manually press the power button.

(I used ubuntu-bug linux, so hopefully all info should be attached) I'm running out of the box, up2date yakkety. without any external repos or custom compiled applications

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: linux-image-4.8.0-26-generic 4.8.0-26.28
ProcVersionSignature: Ubuntu 4.8.0-26.28-generic 4.8.0
Uname: Linux 4.8.0-26-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.20.3-0ubuntu8
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: toby 2327 F.... pulseaudio
CurrentDesktop: Unity
Date: Wed Nov 2 21:49:50 2016
EcryptfsInUse: Yes
HibernationDevice: RESUME=UUID=ba2577eb-f563-46c3-adb9-47967c8c5851
InstallationDate: Installed on 2016-10-17 (16 days ago)
InstallationMedia: Ubuntu 16.10 "Yakkety Yak" - Release amd64 (20161012.2)
MachineType: Apple Inc. MacBookAir5,2
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.8.0-26-generic.efi.signed root=UUID=add8c949-ae19-4310-aede-4a9007ea7514 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-4.8.0-26-generic N/A
 linux-backports-modules-4.8.0-26-generic N/A
 linux-firmware 1.161
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/11/2015
dmi.bios.vendor: Apple Inc.
dmi.bios.version: MBA51.88Z.00EF.B04.1509111654
dmi.board.asset.tag: Base Board Asset Tag#
dmi.board.name: Mac-2E6FAB96566FE58C
dmi.board.vendor: Apple Inc.
dmi.board.version: MacBookAir5,2
dmi.chassis.type: 10
dmi.chassis.vendor: Apple Inc.
dmi.chassis.version: Mac-2E6FAB96566FE58C
dmi.modalias: dmi:bvnAppleInc.:bvrMBA51.88Z.00EF.B04.1509111654:bd09/11/2015:svnAppleInc.:pnMacBookAir5,2:pvr1.0:rvnAppleInc.:rnMac-2E6FAB96566FE58C:rvrMacBookAir5,2:cvnAppleInc.:ct10:cvrMac-2E6FAB96566FE58C:
dmi.product.name: MacBookAir5,2
dmi.product.version: 1.0
dmi.sys.vendor: Apple Inc.

Revision history for this message
miiiiitico (miticotoby) 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
miiiiitico (miticotoby) wrote : Re: Macbook Air resumes immidiately after suspend

let me know if I can provide anything else

Revision history for this message
penalvch (penalvch) wrote :

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

In order to allow additional upstream developers to examine the issue, at your earliest convenience, could you please test the latest upstream kernel available from http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D ? Please keep in mind the following:
1) The one to test is at the very top line at the 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 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.

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

It is most helpful that after testing of the latest upstream kernel is complete, you mark this report Status Confirmed.

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

Thank you for your help.

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

I now tested the latest kernel now and the same results.

Ketil

penalvch (penalvch)
summary: - Macbook Air resumes immidiately after suspend
+ [MacBookAir5,2] Resumes immediately after suspend
Revision history for this message
miiiiitico (miticotoby) wrote :

tested as well using mainline 4.9.0-040900rc3-generic. same results.

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
penalvch (penalvch) wrote :

miiiiitico, to clarify, did this problem not occur in a Ubuntu release prior to 16.10?

tags: added: kernel-bug-exists-upstream kernel-bug-exists-upstream-4.9-rc3
Revision history for this message
Ketil (ubuntu-rytmisk) wrote :

I answer this as well: No I did not experience this bug on the 16.04
Ketil

Revision history for this message
miiiiitico (miticotoby) wrote :

for me the XHC1 doesn't fix the issue ;/ only the LID0 ...

but regarding the issue on other releases: yes I did have this issue before, but unfortunately I can't remember which release that was, I'm guessing 14.04 or something. the fix for me was the same as here. at the time I blamed it on a faulty LID switch or something. but now I actually completely replaced the laptop and did a complete fresh new install of 16.10 and still see this issue (the replacement is the exact same model as my old one)

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

Sad news since the XHC1 fixes it for me... Must be two bugs then...
Ketil

Revision history for this message
penalvch (penalvch) wrote :

miiiiitico, to further clarify, at any point since you first installed Ubuntu on the computer with the older release was the issue not reproducible?

Revision history for this message
miiiiitico (miticotoby) wrote :

it's hard to say. I definitely *did* see this issue in 14.04 and fixed it with the same workaround. the problem is that at the time I didn't investigate too much since I just blamed it on a faulty LID switch and the workaround was acceptable for me.
I had the LID0 disabled on every bootup through rc.local and never did a fresh install until now when I received a whole new laptop. so all upgrades from 14.04 through 16.04 just had the rc.local untouched with LID0 disabled.

also, reading the feedback from Ketil and working on this more I noticed that disabling XHC1 *sometimes* would work for me too. but not all the time. I have yet to figure out a pattern when it would work with only XHC1 vs when LID0 needs to be disabled as well

Revision history for this message
penalvch (penalvch) wrote :

miiiiitico, to keep this relevant to upstream, one would want check for, and test the latest mainline kernel (now 4.9-rc4) as it is released.

Could you please advise?

tags: added: trusty
Revision history for this message
miiiiitico (miticotoby) wrote :

hmmm right now I'm having a hard time reproducing this at all. I'm currently on stock 4.8.0-27-generic kernel and right now I do NOT experience the issue at all.

I've done a fair amount of further troubleshooting and this is what seems to be the pattern for me:

- the problem seems to have completely disappeared since powering OFF the laptop (not just restart)

- once the problem starts to appear initially disabling XHC1 will be enough and the laptop will sleep correctly.

- eventually for whatever reason disabling XHC1 is no longer enough and disabling LID0 is required - disabling LID0 seems to always fix the problem

- I'm unclear what makes the problem appear in the first place. right now I've been running 4.8.0-27-generic for a few days with multiple sleeps/wakeups without workaround (both XHC1 and LID0 enabled) without any issue

- I should also state that when testing 4.9-rc3 a few days ago I never fully powered off the laptop. I merely rebooted into the new kernel (and than back into the old stock one) which never fixed the problem. only the complete power off fixed it.

I can post more again when the problem starts to occur again. or if anybody knows of anything that I could test now (when its working) and again when it breaks? (i.e. dunno dump the ACPI event registers of some sort? I'm not very familiar with the inner workings of ACPI)

sorry guys, I can post more once it starts happening again...

Revision history for this message
Eugene (eugene-tarasov) wrote :

I have tested linux-image-4.9.0-040900-generic - bug is still here: my laptop always resumes from suspend by itself (as well as with 4.8.0-32-generic)
with left from upgrade linux-image-4.4.0-47-generic - laptop suspends as well

root@spectre:~# acpitool -w | grep enabled
  51. PWRB S4 *enabled platform:PNP0C0C:00

Laptop is HP Spectre 13 X5B66EA#ACB

Can I provide some info to help to fix it?

Revision history for this message
penalvch (penalvch) wrote :

Eugene, 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
Launchpad Janitor (janitor) wrote :

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

Changed in linux (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Sergio Arboleda (sergiogeek7) wrote :

Ubuntu 16.04. I'm having this issue too... "echo XHC1 > /proc/acpi/wakeup" fixed but I don't know how to make it permanent. thanks

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

Sergio,

Do you also use MBA5,2?
If not, please file another bug.

Revision history for this message
Devin (venable-devin) wrote :

Ubuntu 16.04. I have the same issue on macbook pro.

Revision history for this message
penalvch (penalvch) wrote :

Devin (venable-devin), if you want your issue addressed then file a new report via a terminal:
ubuntu-bug linux

Please feel free to subscribe me to it.

Revision history for this message
Beat (beat-c) wrote :

Ubuntu 20.04 with kernel 5.4.0-89-generic on MacbookPro10,1 still have this issue from time to time (espescially when a lot of apps are open, and after a first sleep-wakeup that worked.

The XHC1 doesn't fix the issue but the LID0 does.
echo LID0 >/proc/acpi/wakeup

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.