Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Fedora keeps waking up from sleep with laptop lid closed

I've just installed Fedora 26 on a 15" late 2013 MacBook Pro. Most things work great except for one big issue. When I close the lid the Apple logo turns off and the laptop goes to sleep. After a short while (maybe 20 seconds) the light comes back on again for a few seconds before turning off. This keep repeating ad nauseum. It's almost as if something is waking the Mac up but I don't what. I have no peripherals plugged in.

This is the contents of /etc/systemd/logind.conf:

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#UserTasksMax=33%

As you can see, I've tried uncommenting HandleLidSwitch and LidSwitchIgnoreInhibited but to no avail.

Any idea how I can figure out what is causing this behaviour?

Fedora keeps waking up from sleep with laptop lid closed

I've just installed Fedora 26 on a 15" late 2013 MacBook Pro. Most things work great except for one big issue. When I close the lid the Apple logo turns off and the laptop goes to sleep. After a short while (maybe 20 seconds) the light comes back on again for a few seconds before turning off. This keep repeating ad nauseum. It's almost as if something is waking the Mac up but I don't what. I have no peripherals plugged in.

This is the contents of /etc/systemd/logind.conf:

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#UserTasksMax=33%

As you can see, I've tried uncommenting HandleLidSwitch and LidSwitchIgnoreInhibited but to no avail.

Any idea how I can figure out what is causing this behaviour?

* Update*

Ok so here's the output of dmesg immediately after the Apple light came on with the lid shut:

[ 1117.266379] PM: Syncing filesystems ... done.
[ 1118.609049] PM: Preparing system for sleep (mem)
[ 1118.609204] Freezing user space processes ... (elapsed 0.016 seconds) done.
[ 1118.626072] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 1118.627495] PM: Suspending system (mem)
[ 1118.627549] Suspending console(s) (use no_console_suspend to debug)
[ 1118.627934] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1118.628214] ACPI : EC: event blocked
[ 1118.633548] ERROR @wl_notify_scan_status : 
[ 1118.633549] wlp2s0 Scan_results error (-22)
[ 1118.935330] sd 0:0:0:0: [sda] Stopping disk
[ 1118.937880] PM: suspend of devices complete after 310.137 msecs
[ 1118.937882] PM: suspend devices took 0.310 seconds
[ 1118.949359] PM: late suspend of devices complete after 11.476 msecs
[ 1118.949630] thunderbolt 0000:07:00.0: suspending...
[ 1118.949633] ACPI : EC: interrupt blocked
[ 1118.951136] xhci_hcd 0000:00:14.0: System wakeup enabled by ACPI
[ 1118.951165] thunderbolt 0000:07:00.0: stopping RX ring 0
[ 1118.951167] thunderbolt 0000:07:00.0: disabling interrupt at register 0x38200 bit 12 (0x1001 -> 0x1)
[ 1118.951174] thunderbolt 0000:07:00.0: stopping TX ring 0
[ 1118.951177] thunderbolt 0000:07:00.0: disabling interrupt at register 0x38200 bit 0 (0x1 -> 0x0)
[ 1118.951184] thunderbolt 0000:07:00.0: control channel stopped
[ 1118.951184] thunderbolt 0000:07:00.0: suspend finished
[ 1119.876361] PM: noirq suspend of devices complete after 927.032 msecs
[ 1119.886557] ACPI: Preparing to enter system sleep state S3
[ 1119.887304] ACPI : EC: EC stopped
[ 1119.887304] PM: Saving platform NVS memory
[ 1119.887309] Disabling non-boot CPUs ...
[ 1119.901292] smpboot: CPU 1 is now offline
[ 1119.908644] smpboot: CPU 2 is now offline
[ 1119.910240] smpboot: CPU 3 is now offline
[ 1119.916823] smpboot: CPU 4 is now offline
[ 1119.924641] smpboot: CPU 5 is now offline
[ 1119.926652] smpboot: CPU 6 is now offline
[ 1119.928223] smpboot: CPU 7 is now offline
[ 1119.948380] ACPI: Low-level resume complete
[ 1119.948437] ACPI : EC: EC started
[ 1119.948437] PM: Restoring platform NVS memory
[ 1119.948740] Suspended for 2.102 seconds
[ 1119.950873] Enabling non-boot CPUs ...
[ 1119.950920] x86: Booting SMP configuration:
[ 1119.950921] smpboot: Booting Node 0 Processor 1 APIC 0x2
[ 1120.036523]  cache: parent cpu1 should not be sleeping
[ 1120.089504] microcode: sig=0x40661, pf=0x20, revision=0xf
[ 1120.153363] CPU1 is up
[ 1120.153405] smpboot: Booting Node 0 Processor 2 APIC 0x4
[ 1120.235645]  cache: parent cpu2 should not be sleeping
[ 1120.359598] CPU2 is up
[ 1120.359647] smpboot: Booting Node 0 Processor 3 APIC 0x6
[ 1120.433679]  cache: parent cpu3 should not be sleeping
[ 1120.551712] CPU3 is up
[ 1120.551756] smpboot: Booting Node 0 Processor 4 APIC 0x1
[ 1120.558473]  cache: parent cpu4 should not be sleeping
[ 1120.558538] microcode: sig=0x40661, pf=0x20, revision=0x17
[ 1120.558670] CPU4 is up
[ 1120.558693] smpboot: Booting Node 0 Processor 5 APIC 0x3
[ 1120.579354]  cache: parent cpu5 should not be sleeping
[ 1120.608262] CPU5 is up
[ 1120.608292] smpboot: Booting Node 0 Processor 6 APIC 0x5
[ 1120.635121]  cache: parent cpu6 should not be sleeping
[ 1120.676064] CPU6 is up
[ 1120.676093] smpboot: Booting Node 0 Processor 7 APIC 0x7
[ 1120.708573]  cache: parent cpu7 should not be sleeping
[ 1120.767460] CPU7 is up
[ 1120.852770] ACPI: Waking up from system sleep state S3
[ 1120.854140] ACPI : EC: interrupt unblocked
[ 1120.854493] pcieport 0000:06:05.0: quirk: waiting for thunderbolt to reestablish PCI tunnels...
[ 1120.854494] pcieport 0000:06:03.0: quirk: waiting for thunderbolt to reestablish PCI tunnels...
[ 1120.854495] pcieport 0000:06:04.0: quirk: waiting for thunderbolt to reestablish PCI tunnels...
[ 1120.854496] pcieport 0000:06:06.0: quirk: waiting for thunderbolt to reestablish PCI tunnels...
[ 1120.855734] xhci_hcd 0000:00:14.0: System wakeup disabled by ACPI
[ 1120.866030] thunderbolt 0000:07:00.0: resuming...
[ 1120.866031] thunderbolt 0000:07:00.0: control channel starting...
[ 1120.866032] thunderbolt 0000:07:00.0: starting TX ring 0
[ 1120.866038] thunderbolt 0000:07:00.0: enabling interrupt at register 0x38200 bit 0 (0x0 -> 0x1)
[ 1120.866039] thunderbolt 0000:07:00.0: starting RX ring 0
[ 1120.866043] thunderbolt 0000:07:00.0: enabling interrupt at register 0x38200 bit 12 (0x1 -> 0x1001)
[ 1120.866046] thunderbolt 0000:07:00.0: resetting switch at 0
[ 1120.874167] thunderbolt 0000:07:00.0: 0: resuming switch
[ 1120.878315] thunderbolt 0000:07:00.0: resume finished
[ 1120.930721] PM: noirq resume of devices complete after 76.765 msecs
[ 1120.931083] PM: early resume of devices complete after 0.343 msecs
[ 1120.931201] ACPI : EC: event unblocked
[ 1120.931240] ACPI : button: The lid device is not compliant to SW_LID.
[ 1120.931255] rtc_cmos 00:02: System wakeup disabled by ACPI
[ 1120.941453] sd 0:0:0:0: [sda] Starting disk
[ 1120.967452] thunderbolt 0000:07:00.0: resetting error on 0:b.
[ 1120.967475] thunderbolt 0000:07:00.0: 0:b: hotplug: scanning
[ 1120.967476] thunderbolt 0000:07:00.0: 0:b: hotplug: no switch found
[ 1120.967502] thunderbolt 0000:07:00.0: resetting error on 0:c.
[ 1120.967523] thunderbolt 0000:07:00.0: 0:c: hotplug: scanning
[ 1120.967525] thunderbolt 0000:07:00.0: 0:c: hotplug: no switch found
[ 1121.032571] pciehp 0000:06:00.0:pcie204: Device 0000:07:00.0 already exists at 0000:07:00, cannot hot-add
[ 1121.032572] pciehp 0000:06:00.0:pcie204: Cannot add device at 0000:07:00
[ 1121.254173] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 1121.254423] ata1.00: unexpected _GTF length (8)
[ 1121.254841] ata1.00: unexpected _GTF length (8)
[ 1121.254890] ata1.00: configured for UDMA/133
[ 1123.388494] pciehp 0000:00:1c.0:pcie004: link training error: status 0x1001
[ 1123.388495] pciehp 0000:00:1c.0:pcie004: Failed to check link status
[ 1123.388516] PM: resume of devices complete after 2457.520 msecs
[ 1123.388646] PM: resume devices took 2.458 seconds
[ 1123.388669] PM: Finishing wakeup.
[ 1123.388670] Restarting tasks ... done.
[ 1123.406284] video LNXVIDEO:00: Restoring backlight state
[ 1123.412526] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[ 1124.112484] xhci_hcd 0000:00:14.0: Cannot set link state.
[ 1124.112488] usb usb2-port4: cannot disable (err = -32)
[ 1125.672454] xhci_hcd 0000:00:14.0: Cannot set link state.
[ 1125.672457] usb usb2-port4: cannot disable (err = -32)
[ 1125.672480] xhci_hcd 0000:00:14.0: Cannot set link state.
[ 1125.672482] usb usb2-port4: cannot disable (err = -32)

Output of cat /proc/acpi/wakeup

$ cat /proc/acpi/wakeup
Device  S-state   Status   Sysfs node
P0P2      S3    *disabled  pci:0000:00:01.0
PEG1      S3    *disabled
EC    S4    *disabled  platform:PNP0C09:00
GMUX      S3    *disabled  pnp:00:03
HDEF      S3    *disabled  pci:0000:00:1b.0
RP03      S3    *disabled  pci:0000:00:1c.2
ARPT      S4    *disabled  pci:0000:02:00.0
RP04      S3    *disabled  pci:0000:00:1c.3
RP05      S3    *disabled  pci:0000:00:1c.4
XHC1      S3    *enabled   pci:0000:00:14.0
ADP1      S4    *disabled  platform:ACPI0003:00
LID0      S4    *enabled   platform:PNP0C0D:00

This is Late 2013 MacBook Pro 15" quad core with 8 GB RAM.

The only apps running were Chromium and I had opened (and then closed the window of) Nylas.

Does this help?