Macbook running Ubuntu 18.04 won't go to sleep
Solution 1
The link from BrainCore's answer above gives these instructions: Occasionally the Macboook Air may wake up immediately after suspend. To fix this:
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 disable these settings, create the following service that runs on startup:
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.
Solution 2
I was searching for a solution, and stumbled on your question, and then this answer: https://wiki.archlinux.org/index.php/Mac#Wake_Up_After_Suspend
Works for me. You'll need to use the power button to unsuspend.
ToniAz
Updated on September 18, 2022Comments
-
ToniAz over 1 year
I have a Macbook pro running Ubuntu 18.04 with GNOME 3. I use my laptop in 2 setups:
- Closed lid with a monitor
- Open lid with no monitor
I've been noticing that when I pull my laptop out of my bag, it's very hot and the Apple logo is lit. Here is how I usually suspend my laptop.
Setup 1:
- I click the battery/audio/wifi icon
- I press Alt so that the Power icon turns into a Pause icon
- I hit the Pause icon
- I watch the Apple logo on the back of my laptop turn off, then turn on again, then turn off.
- I unplug and put away my laptop.
NOTE: If I do not unplug my laptop from the monitor, the monitor goes black briefly, then I see the login screen!
Setup 2:
- I click the battery/audio/wifi icon
- I press Alt so that the Power icon turns into a Pause icon
- I hit the Pause icon
- I close the lid
- I watch the Apple logo on the back of my laptop turn off, then turn on again, then turn off I put away my laptop
- List item
Why won't my Macbook pro go to sleep? I do not want to shut down every time I go out.
-
dazza5000 over 5 yearsI have this same issue. Did you determine a fix?
-
ToniAz over 5 years@dazza5000 nah, only more problems.
-
dazza5000 over 5 yearsI upgraded to 18.10 and have more reliability around going to sleep and resuming.
-
Melebius about 5 yearsWelcome to Ask Ubuntu! Please do not post answers depending on external links. Put the relevant part into your answer (or post the link as a comment to the question if you have enough reputation). See How to Answer for details.
-
ToniAz about 5 yearsThank you very much! But this ship has sailed, and I subbed out Ubuntu for Mojave.