Suspend on MacBook Air

Created Saturday 10 August 2024

A MacBook Air is a very light sleeper. The slightest perturbation will wake it up, and I've been finding mine in my bag warm and with a half-dead battery from time to time, but not consistently, when running LInuxMint.

from https://superuser.com/questions/1495343/ubuntu-on-macbook-pro-doesnt-suspend-properly'


Ubuntu on Macbook Pro doesn't suspend properly

Asked 4 years, 9 months ago
Modified 4 years, 9 months ago
Viewed 8k times
6

I have installed Ubuntu 19.10 on my late 2015 Macbook Pro with Retina. When I close the lid, the apple logo turns off indicating that it's gone to sleep , however, after a few seconds the light come back on. This seems to keep happenning where the light goes off but then comes back on.

Anyone know what might be causing this and/or how to fix it. It's killing my battery with the current situtation pretty quickly.

Okay so there isn't a proper fix for this yet and there's an open bug here.

I followed the workaround mentioned here and while it's not perfect, it does the job for now.

cat /proc/acpi/wakeup

Check to see that XHC1 and LID0 are enabled. If they are, disabling them will fix the problem. After disabling them, the only way to wake up your computer from suspend is by using the power button.

To do this type to following command (vim can be any cli editor)

sudo vim /etc/systemd/system/suspend-fix.service

Then add the following text and save:

[Unit]
Description=Fix for the suspend issue
[Service]
Type=oneshot
ExecStart=/bin/sh -c "echo XHC1 > /proc/acpi/wakeup && echo LID0 > /proc/acpi/wakeup"
[Install]
WantedBy=multi-user.target

And then run the following:

systemctl enable suspend-fix.service
systemctl start suspend-fix.service
Disabling only XHC1 is not recommended if you have this bug, since it may result in glitchy behavior.

Share
Improve this answer
Follow
answered Oct 31, 2019 at 1:35
reggaemahn's user avatar
reggaemahn
22922 silver badges1010 bronze badges
Add a comment