I am running an Ubuntu
18.04.1 with kernel
4.15.0-29-generic, and my laptop (Macbookpro retina 15inch, mid 2015,
MacBookPro11,5) wakes up automatically a few seconds after sleep. When I look at the logs in
\var\log\syslogs the wakeup event shows up as:
Aug 6 15:51:53 Shire NetworkManager: <info> [1533595913.5200] manager: sleep: wake requested (sleeping: yes enabled: yes).
I have already looked at all the other questions and answers for this, but my problem still persists as follows:
Following this question and its answers, the output of
cat /proc/acpi/wakeup is
Device S-state Status Sysfs node PEG0 S3 *disabled pci:0000:00:01.0 GFX0 S3 *disabled pci:0000:01:00.0 PEG1 S3 *disabled pci:0000:00:01.1 PEG2 S3 *disabled pci:0000:00:01.2 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 *enabled pci:0000:04:00.0 RP04 S3 *disabled pci:0000:00:1c.3 XHC1 S3 *enabled pci:0000:00:14.0 ADP1 S4 *disabled platform:ACPI0003:00 LID0 S4 *enabled platform:PNP0C0D:00
and I have isolated the problem to be the
ARPT entry. If I lookup the pci for this entry via
lspci I get
04:00.0 Network controller: Broadcom Limited BCM43602 802.11ac Wireless LAN SoC (rev 01), which matches the log info that the wake-up is caused by network.
Here is the weird part: I use
sudo sh -c "echo ARPT > /proc/acpi/wakeup" to disable the wakeup functionality of
ARPT, and it changes the status to disabled correctly, but when I put the laptop to sleep it still wakes up after just a few seconds! More surprisingly, when it wakes up and I check the
/proc/acpi/wakeup I see that the
ARPT entry has returned to enabled by itself! Note that this does not happen after a restart, but just immediately after disabling the wakeup entry and suspending. It seems that some other script keeps changing this while the laptop is in sleep.
Other things I tried with NO result:
- Stopped network manager via
sudo service netwrok-manager stop, but the laptop still wakes up.
- Disabled power management of wifi by using
sudo iwconfig wlan0 power off
- Made sure Wake on WLAN (WoWLAN) is off by following this article
I tried disabling both the
XHC1 and only leaving
LID0 enabled (laptop lid), and the system still wakes up after a few seconds. But this time when it wakes up the settings in
/proc/acpi/wakeup is kept as it was and is not automatically reverted.
With the new kernel
4.15.0-32 the laptop does not wake anymore when the lid is closed, but it still wakes up by itself when the lid is open and it has gone to sleep. At least now I can put my laptop in my backpack without worrying to run out of battery, and also apparently this is a Kernel problem and I doubt I can hack my way around it without spending significant time.