When transferring large files, there are times when I want to close the lid on my MacBook Pro laptop. It’s running on Mac OSX Mojave 10.14.5 and after several minutes of research, there’s not a built-in function to disable laptop sleep. Apple may have very good reasons for that.

But there are times when we can manage the risk of a closed lid with a running laptop.

Here’s the solution. Install and run the free utility InsomniaX- Keep your Mac awake the easy way. I downloaded it from download.cnet.com/InsomniaX/3000-2094_4-97713.html – but, it’s an older piece of software that was last updated 3 years ago, i.e. 2016.

However, there are 2 caveats:

Installing InsomniaX On OSX 10.12 and afterward

It seems that on systems with gatekeeper active, the kext module is not correctly loaded, if when the option Disable Lid Sleep is pressed the icon doesn’t change you are most likely affected. In that case use the following workaround [ed.note: Spotlight > Terminal]:

  1. Disable Gatekeeper: sudo spctl --master-disable
  2. Launch InsomniaX and enable the option disable lid sleep, fill out the administration password prompt if needed
  3. Rejoice, InsomniaX should be working and the kext should now be trusted by the system
  4. Re-Enable Gatekeeper:
  • Either use: sudo spctl --master-enable
  • Or change the selector in Preferences->Security & Privacy->Generic back to AppStore & Signed Apps (Or even the more strict AppStore Only)

Thank You Andrew James

Thank you Andrew James for creating this very awesome utility!