I installed several versions of Linux on a 2015 Macbook Pro. Everything generally worked great except for suspend/wake up (also known as “sleep”), which puts the computer into a low power state when not being used

I first tried several different versions (distros) of Linux including Zorin OS, Linux Mint, Ubuntu and Cosmic OS/Pop!_OS

Suspend worked on all distros, but waking up from suspend mode failed most of the time or all of the time depending on the distro used.

With help of Grok AI, I found a solution that fixed the problem for me.

In Terminal, use the command:

sudo nano /etc/tmpfiles.d/disable-acpi-wakeup.conf

And then add the following:

# Disable ACPI wake sources (XHC1 for USB, LID0 for lid) on boot
w+ /proc/acpi/wakeup - - - - XHC1
w+ /proc/acpi/wakeup - - - - LID0

Press Ctrl O to output or save the file, then press Enter, and then Ctrl-X to exit the editor. 

Type the command:
sudo systemd-tmpfiles --create

The above may work on may versions of Linux but if it does not (and it did not work for me), try this instead = change the 2 lines beginning with w+ to the following single line in the file you just created:

w /proc/acpi/wakeup - - - - XHC1\nLID0

Save that file and type
sudo systemd-tmpfiles --create

This file will also run when the system is restarted.

How to check the wake up sources - type this command:
cat /proc/acpi/wakeup

You want to see that XHC1 and LID0 are "disabled".

The other alternative is to create a service - this did not work for me, though.

sudo nano /etc/systemd/system/disable-wake.service

Then add the following using the text editor:
[Unit]
Description=Disable ACPI wake sources
After=multi-user.target

[Service]
Type=oneshot
ExecStart=/bin/sh -c 'echo XHC1 > /proc/acpi/wakeup; echo LID0 > /proc/acpi/wakeup'
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
sudo systemctl enable disable-wake.service
sudo systemctl start disable-wake.service
sudo systemctl status disable-wake.service (should exit without error)

If you get an error (as I did), you may wish to change the ExectStart line to
ExecStart=/bin/sh -c 'echo "XHC1" > /proc/acpi/wakeup; echo "LID0" > /proc/acpi/wakeup'

I did not test that.

Leave a Reply

Coldstreams