Ask Your Question
2

Fedora keeps waking up from sleep with laptop lid closed

asked 2017-11-07 08:59:42 -0500

Topogram gravatar image

updated 2017-11-08 09:08:46 -0500

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 ...
(more)
edit retag flag offensive close merge delete

Comments

you could check the mb bios for wake on lan and see if that is enabled.

SteveEbey73701 gravatar imageSteveEbey73701 ( 2017-11-07 14:11:19 -0500 )edit

Intel Smart Connect also can sort of wake sleeping computer, though I'm not sure if it can be enabled or disabled on a Mac.

ozeszty gravatar imageozeszty ( 2017-11-07 17:27:59 -0500 )edit

What does dmesg output after such wakeup?

ozeszty gravatar imageozeszty ( 2017-11-07 17:31:31 -0500 )edit

Need a complete journalctl -b -o short-monotonic to see what might be going on. Also what model Macbook. Also the output of cat /proc/acpi/wakeup.

cmurf gravatar imagecmurf ( 2017-11-07 21:26:22 -0500 )edit

@steveebey73742: I disabled wake for LAN access within macOS (dual boot system). I don't think there is BIOS on Macs. Hasn't hepled though.

@ozeszty: I've edited the question with the output of dmesg.

@cmurf: I've edited the question with the output of cat /proc/acpi/wakeup

Topogram gravatar imageTopogram ( 2017-11-08 08:48:55 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2017-11-09 13:11:42 -0500

Topogram gravatar image

I figured it out. Turns out the USB 3.0 bus was waking it up. All I had to do was disable XHCI in /proc/acpi/wakeup and it fixed the problem. I’ve blogged about how to make the change permanent.

edit flag offensive delete link more

Comments

Yeah, I think there might be a XHCI regression in recent kernels (4.13.n) because I've been having to echo XHC to /proc/acpi/wakeup to prevent this same problem description.

cmurf gravatar imagecmurf ( 2017-11-11 16:47:16 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-11-07 08:59:42 -0500

Seen: 852 times

Last updated: Nov 09 '17