One of the things that the Coronavirus induced lockdown has made me appreciate is the advantages of a big monitor on your home office desk. That, and a laptop that actually has an HDMI port for it. If you’re a Mac user like I am, stuck at home trying to work on an external monitor with your laptop, chances are you don’t want to have your laptop’s screen shining on the periphery of your vision. That’s very distracting. So you probably want to close the lid of your laptop and use the external display as the main monitor, right. Plus you wanna do that without connecting a power adapter all the time. So here’s how you can use a MacBook in clamshell mode without a power adapter.
Use MacBook in Clamshell Mode without a Power Adapter
Why Do MacBooks Not Support This by Default?
Why do we need an entire article on how to do this? Well, turns out, Apple will not let you do that unless you have a power adapter connected to your MacBook. Take a look at the company’s official help document about this. Now when I was getting started with this whole set up, I took Apple’s word for it and kept using my MacBook with the charger connected to it at all times, knowing full well that it will destroy my battery’s health. It did just that, and my battery doesn’t charge anymore. Now I’m stuck using my laptop as a glorified desktop, and with an impossibly throttled CPU to boot.
Fortunately for you, this made me look for ways to use a MacBook in clamshell mode without keeping the charger always connected to it, and I found the solution.
MacBooks handle power in ways that are not very obvious. You know, unless you do what I did and lose yourself in forum discussions talking about the ‘hibernatemode’ command and the various power states of a MacBook. I’ll give you the long and the short of it.
Basically, when you close the lid of your MacBook, it sleeps. That means it stops giving power to external displays, drives, even the ethernet port (if it has one). Now a user normally expects the laptop to be intelligent enough to know that an external display is connected to it. That obviously means I want to use it as a primary screen. But, our overlord Apple knows what we want better than we do, and doesn’t allow this particular set up to work.
There are a bunch of terminal commands you can use to disable sleep, and we will discuss those in a later section, but chances are you don’t want to mess with terminal commands and a simple one-click solution is really all you’re looking for.
Save Mac Battery by Using It in Clamshell Mode without Power Adapter
Now that we know that the issue is that the MacBook goes to sleep on closing the lid even if we have an external display connected to it, the solution is simple. We need to prevent that sleep from happening. But you can’t just use a simple Caffeine-type app to solve this problem. That’s because the hall sensor on your MacBook detects when the lid is closed and just puts it to sleep regardless of everything else.
Using a Third Party App
You must have heard of the app ‘Amphetamine’ which is a hugely popular Mac app that controls sleep states for the Mac based on triggers and what not. While the app originally did not have the capability to solve our problem, it has since been updated and actually can help us get out of this pickle.
- For starters, head over to the Mac App Store and download Amphetamine (Free).
- Launch the app, and you will be greeted with a screen like this one. Click ‘Next‘ and follow the instructions.
- Now, click on the Amphetamine icon in the menu bar.
- Head over to ‘Quick Preferences’ and uncheck the box next to ‘Allow system sleep when display is closed’.
- You will see a warning pop-up suggesting that you install Amphetamine Enhancer. This is optional, but recommended. You can simply click on the button that says ‘Get Amphetamine Enhancer’ to head over to the website and download the helper app. Alternatively, just click here to download it.
- Install the helper and launch it. Select ‘Closed-Display Mode Fail-Safe’ from the sidebar and click on ‘Install’.
- Once again, click on the Amphetamine icon in the menu bar. Ensure that you have unchecked the box next to ‘Allow system sleep when display is closed‘.
That’s it, you can now use your MacBook in clamshell mode without having to connect your AC power adapter to it.
Using Terminal Commands
If you don’t want to use a third party app to get this done, or you just want to play around with Terminal commands and figure things out for yourself, there are some commands that can achieve similar results.
Note: I have not tested these commands because Apple recommends not changing the hibernatemode using the pmset command, and these commands do just that. However, these commands will disable your laptop’s sleep on lid-close trigger, so they should also solve the problem of being unable to use your laptop in clamshell mode without the power adapter. That said, use them at your own risk.
With that warning out of the way, here’s what you need to do.
- First, launch terminal and run the following command to see your default ‘hibernatemode’ setting. Make sure you note this down.
pmset -g | grep hibernatemode
- Now, run the following commands in the terminal.
sudo pmset -a sleep 0 sudo pmset -a hibernatemode 0 sudo pmset -a disablesleep 1
These commands will disable sleep on your MacBook, and you should be able to use your Mac in clamshell mode without an AC adapter connected.
You can always revert the changes by running the following commands in the terminal
sudo pmset -a sleep 1 sudo pmset -a hibernatemode <original hibernatemode value | usually 3 on a MacBook> sudo pmset -a disablesleep 0
Use MacBook in Clamshell Mode without AC Adapter, and Save Your Battery Health
I may have knowingly caused my MacBook Pro’s battery to become completely unusable to the point where it doesn’t even charge anymore, but you don’t have to follow in my footsteps. Now that you know how you can use an external display with your MacBook and not have to keep an adapter connected to it all the time, go ahead and set up your work from home desk with your brand new monitor and enjoy working on a bigger screen with more real estate. Oh, and whatever you do, don’t take Apple’s word on things like this. Meanwhile, I’ll go and try to figure out if I should buy the M1 MacBook Air or the M1 MacBook Pro.
The terminal commands got the job done. I can now use an external monitor with the MacBook running on battery. Thanks.
Hi! I come form a linux laptop and this was a must for me with my new MacBook. Amphetamine doesn’t work on m2 MacBook Air as for now (September 2022). I created 2 aliases on my .zshrc for enabling and disabling hibernation when I want to work on clamshell mode (with the full 3 commands united by ‘&&’ to make it one line of code), and now I just go to the terminal and type SleepOff and start working, or sleepOn to restore the default hibernation profile.
Thank you so much for the tutorial! The command part of it may be more for us developer audience but I suggest everyone tries to do it this way if Amphetamine doesn’t work, ask me if you have any questions!
YOU RULE, DUDE!! This is the way.
So the only thing in this article that I needed to do was:
pmset -a disablesleep 1
And that did the trick. Not sure if the others are necessary in some cases and not others, but a one-liner is the way to go if possible. Also makes it an easy rollback, just set disablesleep back to 0. Running macOS 12.5.
I found another app called “AlDente” which allows you to keep your battery at 60% while having the power adapter connected all the time. This way you won’t even waste charging cycles.
DON’T DO THIS IT WILL HARM YOUR SSD LIFE as it will always keep running ( even at the time when you are not using your laptop) , just PLACE A SHEET OF PAPER between the laptop covering the camera module to emulate the same behaviour
What does happen when placing a piece of paper right there? Care to elaborate? I do not get this advice as of now.
Thanks
This is complete bullshit. Having an SSD powered while not using it does not damage it. If is has any effect at all, it gives the flash controller time to rearrange data for wear leveling, which extends the SSDs life.
So technically the MacBook won’t sleep, so will the battery drain overnight when i’m not using it ?
Important to note that you have to START A SESSION for that to work, thanks great article
Thank you so much for commenting this. Seems so simple, yet of course it’s easily missed. Thanks again
I am in the process of setting up the Amphetamine solution.
Does my MacBook still go to sleep if don’t deactivate the session but take it off the external display?
Thank you soooo much for the article! I used the terminal commands and now my Macbook pro works perfect on external monitor when the lid is closed w/o been plugged in. God bless you! 24.02.2022
Just got a new monitor and need you to know that even in 2022, your article has been the most helpful to get me all set up with clamshell mode using the Amphetamine app 🙂 Thanks!
RIP my battery is half dead already 🙁 and I just found out that leaving it plugged in killed the battery. Still I’m grateful for coming across this article, such a lifesaver. Thanks a lot
Don’t forget to set Amphetamine to start a session on logon ;). After that briljant en preventing the use of one extra cable on my desk. THANK YOU!
Just Amazing… Finally got this after so many months.
Thank you so much; the terminal commands worked for me 🙂
Thank you So much!! It works like a charm!!
Thanks a lot. It works perfectly!!
While it isn’t a good idea to keep the power adaptor plugged-in all the time, Apple has addressed the battery health optimisation with Big Sur. It cycles between battery and power brick. It even (occasionally) keeps the battery below 80% so as to not increase the charge cycles thereby increasing battery life.
Hi! I followed the instruction using Amphetamine but mine didn’t work. Is there something else I’m missing? The Allow system to sleep when display is off I already unchecked. Thanks in advance for any help.
Thank you so much. These commands worked like a charm.
Please help me to use the commands
Thanks in advance
it works on my MacBook air m1, Thanks Beebom such an amazing article.
Hi man! So glad I found this article, just bought my M1 pro a few days ago. Thank you so much for sharing this <3
just bought a new monitor and u solved my worries for the battery, thanks!
just bought a new monitor and u solved my worries for the battery. Thanks!
Wow, works great. Thank you!!!!
Nice. it works. thanks for sharing…
Worked.. Thank you so much man!!
Works good, Thank you!
I supposed you cannot turn your Macbook to sleep mode when using this app or else, you have to open your MacBook lit. Would be helpful if we can wake it up without opening the lit
I followed your steps with my MacBook Air m1. Unfortunately when I close the lid the external display turns off. I restarted and the box is unchecked. Still turns off. Do you any ideas?
you have to start the session. I hope this will help
Beebom is a legend.
Thank you for saving my Macbook Air 2017’s battery!
Also, I just upgraded my SSD to an NVMe (Kingston A2000) with an adapter.
Oh boy, it just extended the life!
Neat and well explained. Thanks, Akshay. I finally have my Mac under control 😀
I used the terminal commands and it seems to work perfectly now. Thanks so much!!!
Thank you so much, it is so useful
There is one step left out for Amphetamine! Start a New Session Indefinitely – the behaviour described in this article only applies if the Amphetamine app is “On”, i.e. there is a current active session. The Amphetamine Icon will also rotate in your menu bar. Thank you so much – this absolutely works!
Thank you very much!
I got the app! But still doesn’t let me use clamshell mode without the charger plugged in:((
I’m using Amphetamine (the app 😉 for years as well as Macbooks in clamshell mode. Since my new M1 Macbook refuses to work in clamshell mode, I googled and found your article. It was about the fifth one I read about the topic, but the only one that provided a solution. So easy, so well described and, in my case, without the need of any unknown app. Thank you so much, you saved my day (that is, workday one on my new Macbook).
Greetings from France!
thank you <3
DUDE! Thank you SO much !!