9

I use my MacBook connected to an external monitor via HDMI with the lid closed, and plugged in to AC power (in closed clamshell mode). If I disconnect the power cord (usually happens accidentally), the external monitor will lose signal, USB devices become disconnected and I need to enter my password and unlock the screen. Is there any way to prevent my Mac from stopping HDMI input when the power is unplugged in closed clamshell mode?

I'm aware of NoSleep and InsomniaX, they work fine for preventing sleep when the lid is closed but they don't prevent screen lock when AC becomes unplugged (with closed clamshell mode).

4 Answers 4

1
+50

Just in case you weren't aware of these options, or haven't already tried this, you could change the Battery settings under Energy Saver.

Your question doesn't specify what version of macOS you're using, but here are some generic steps:

  • Go to System Preferences > Energy Saver
  • Select the Battery tab
  • Set Computer Sleep to Never
  • Set Display Sleep to Never
  • Set Graphics to Higher Performance
  • Make sure Slightly dim the display when using this power source is unchecked
  • Make sure Automatically reduce brightness before display goes to sleep is unchecked
  • Exit System Preferences

Let us know how you go.

10
  • 1
    I downvoted this because Closed Clamshell mode specifically requires that the MacBook be plugged in (again I'll direct you to that link, you are welcome for adding it) and thus messing around in basic system preferences most certainly won't do it. IMHO, this is akin to me asking how to take a live photo on an iPhone 6 and you saying to go into the camera section of Settings and mess around with a couple things. This will need a hackier solution than the one you've provided (which I am almost certain won't work) and thus downvote. If I am wrong and this does help the OP, I will upvote.
    – owlswipe
    Nov 25, 2016 at 4:16
  • 3
    This did not work for me when using USB-C to VGA adapter and external monitor. When I unplug AC macbook always goes to sleep
    – psyched
    Dec 12, 2017 at 14:11
  • 2
    @romanp Sorry to hear that, but thanks for sharing your experience. :) There's a lot I guess we're all still learning about how things will work with various adapters and displays, especially as we move more and more towards USB-C. I haven't come across any single resource that details the experience of different displays with different types of adapters and connections, but it'd certainly be handy!
    – Monomeeth
    Dec 12, 2017 at 21:55
  • 1
    For the record, I tried all of these things (MacOS 10.13.6) and still lose the monitors and have to log in again if I unplug the power adapter. Not sure why this answer is accepted.
    – emilyk
    Jul 2, 2020 at 15:24
  • 1
    I have exactly the same issue as OP but this answer doesn't work for me. MacOS 10.15.7
    – Logan Yang
    Mar 5, 2021 at 20:55
8

Those still searching, I found this seems to have solved it for me:

sudo pmset disablesleep 1

Source: https://medium.com/macoclock/how-to-prevent-macos-catalina-from-sleeping-when-connected-to-an-external-monitor-e2c876dadaf9

3
  • wow, YOU ROCK! Worked for me. Jun 13, 2022 at 3:56
  • Yes! Me too, the only thing I tried which worked. Dec 21, 2022 at 9:44
  • I assume we should do the same thing but with 0 when it's back on the power cable? Dec 21, 2022 at 9:44
1

From https://support.apple.com/en-us/HT201834, you need either "An AC power adapter or an external display that provides power over USB-C or Thunderbolt 3 (USB-C)." This seems to assume that you only have USB-C ports as the new Macs do, but it stands to reason that the older macs are also using the power of the AC adapter to run the displays.

So the only solution is to get monitors that provide the power themselves.

0

The easiest way for you to be able to use your Mac in clumshell mode is by downloading the Amphetamine app which is available free of charge and adds.

You can make this app be triggered given certain SQL-like conditions and it is going to keep your Macbook running even when the lid is closed and AC power not plugged in.

For example, my trigger schedule is enabled when my Macbook is connected to 2 or more external monitors. You can either create a trigger that suits your own case, or manually run the app when you want to.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .