The MacBook is my favorite tool for work, and I don’t see any shortcomings in it, except for one thing.
If, for example, you connect a TV to it in order to broadcast a movie via an HDMI cable, you cannot close the lid. Otherwise, the laptop will immediately go into sleep mode.
It was not possible to solve this problem using standard tools and settings, simply because macOS Sonoma does not have the “do not enter standby mode when closing the lid” menu item. Therefore, below we will talk about two ways to overcome the “drowsiness” of a MacBook – using external utilities or simply executing it in the Terminal.
Ability #1. Amphetamine utility
👉 Download Amphetamine for free.
The application is compatible with all MacBooks, regardless of processor. Works great on my MacBook Air M2.
Once installed and launched, a new “tablets” icon will appear in the top menu bar of your MacBook. Now you will see a drop-down menu with options for the application, as well as a settings item.
The abundance of options is pleasantly surprising and this is what the lines in the main menu of the application mean:
● Indefinitely—prohibition of the operating mode without time limits, until manual shutdown.
● Minutes, hours – prohibits mode switching for a fixed number of minutes or hours.
● Other time/until – prohibits a specific mode for a period of time or until a specific current time.
● While the application is running—until the selected application from the list is running.
● While the file is downloading – while the file is being downloaded from the Internet
Important: Initially, activating any option disables playback mode and turns off the screen only on a MacBook with the lid open. The application worked and after closing the lid, you need to uncheck the box next to “Allow the system to go into sleep mode when the display is closed” in the “Quick Settings” section.
If you want to prevent your MacBook from falling asleep with the lid closed, uncheck this box.
In the application settings menu, it is also possible to set timings for activating the lockscreen, turning off the screen, and even periodic electrical movement so that the laptop, on the contrary, does not go into sleep mode.
Nothing – minus the lack of Russian language. But this is not scary, because all the parameters in the menu are clear.
Personally, I configured Amphetamine so that it prohibits the MacBook from going into sleep mode only while the LC media player is running. So if I play a video through this player and close the lid, the picture on the TV does not disappear and continues to show me the movie. Cheers cheers.
Yes, there are other similar applications, but only in the case of Amphetamine I did not notice any bugs, malfunctions or other surprises. And this application is updated regularly, unlike its analogues.
So take advantage.
👉 Download Amphetamine for free.
Method No. 2. Executing a command in Terminal
If you don’t want to (or can’t) download apps from the Mac App Store, there’s an alternative way to select playback mode.
To do this, launch the Terminal application, and in the window that appears, copy this command:
sudo pmset -a disables sleep 1
Then enter your password to confirm the command.
The sleep function is also disabled here when the MacBook lid is closed, although without the ability to customize conditions, as is the case with the Amphetamine application.
And in order to return your Apple device to the ability to go to sleep with the lid closed, you need to enter another command in the same Terminal:
sudo pmset -a disabled sleep 0
Please note that if you activate sleep mode using a command in Terminal, your MacBook will use the same battery charge when the lid is closed as when it is open. Therefore, if you need a feature for a certain period of time, be sure to deactivate it.
Bookmark this procedure, it will definitely come in handy.
Source: Iphones RU

I am a professional journalist and content creator with extensive experience writing for news websites. I currently work as an author at Gadget Onus, where I specialize in covering hot news topics. My written pieces have been published on some of the biggest media outlets around the world, including The Guardian and BBC News.