Fix sleep by lid close on laptops

For anyone who also has this problem where the laptop just refuses to sleep after closing the lid this might help. One requirement is that you already have working sleep when putting your hack to sleep manually (via Apple logo menu).

So all my ports (usb and Video!) where mapped correctly and I also followed the vanilla guide to fix every sleep issue and still, my laptop refused to go to sleep after closing the lid. The solution to this was quite easy:

  1. Download and install HibernationFixup.kext to your EFI partition in C/k/o
  2. change your hibernation mode (from usually 0) to 3, which is the standard sleep mode on laptops referred to as „safe sleep“, with this command sudo pmset -a hibernatemode 3
  3. restart macOS and profit

that was actually all I had to do and now everytime I close my lid the laptop sleeps perfectly fine

Hope this can help someone, let me know your experience!

Kext: https://github.com/acidanthera/HibernationFixup

Info about different hibernation modes: https://www.insanelymac.com/forum/topic/299721-sleep-hibernation-how-it-works-and-how-to-use/

Bonus. A quick explanation about this commands: pmset -a hibernatemode 0 will save sleepimage only to RAM, this will be Sleep only. pmset -a hibernatemode 1 will save sleepimage only to Disk, this will be a kind of "Soft" Hibernation. pmset -a hibernatemode 3 will save sleepimage to RAM AND Disk, this will be Safe Sleep, first the system will Sleep and later Hibernate. pmset -a hibernatemode 25 will save sleepimage only to Disk and Remove Power from RAM and some more devices, this will be "Real" Hibernation.

submitted by /u/Kasti0
[link] [comments]