Fixing a Sleep Crash Issue on a Macbook Pro

Mar 23,2018 at 07:30 pm By Ben Hutton

Like most of the developers I work with my system of choice is at 15" Macbook Pro.  Whether or not you like Apple for the kind of work I do MacOS provides a good balance of Open Source tools and commercial support.  I've certaintly had a better experience overall than on Windows or Linux.

Unfortunately quite recently my Macbook started crashing while in sleep mode while all on battery.  This quite often occured when I had to quickly close the lid and go somewhere.  For some reason when I got to the other end the fans were very loud and the system wouldn't wake up.  

I initially tried to solve this myself by whiping the OS, reinstalling and restoring my account from a timemachine backup.  This unfortunately proved to be unsuccessfull.  Following doing this over a weekend I discovered that the following Monday morning when I started my laptop at the office it informed me that my machine was not compatible with the OS and would only start up in Recovery of Safe mode.  Since I work a block from and Apple store I took it into the genius bar and was able to have it quickly repaired.  They also tested the laptop and discovered that one of the heat sensors war erroring.  This was quickly fixed by cleaning the dust out of the internals.  I discovered this is free of charged at an Apple store.

This unfortunately did not resolved the issue so I had to book and appointment to have it thoroughly tested.  I was informed that the system was fixed and picked it up.  Strangely they were not apple to tell me the cause of the crashes.  That concerned me as I had no doubt there was an issue.  The laptop once again crashed, this time while using it on the train while heading home.  I once again contacted Apple and they asked me to return the laptop.  This time I got the full VIP treatment and someone started working on the straight away and also phoned me several times during the day with updates.  This time I was quite clear that it had only crashed while under battery power.  They informed me they could not get it to crash using their network boot OS and could get it to regularly crash with the system of the local drive.  They then proceeded to whipe it and load a clean copy of the OS (with my approval).

Unfortunately it didn't take long to start crashing again.  This time I decided to have another go myself, though I waited until Friday night as I use this machine for work.  This time I decided to load the original OS shipped with the system which is Yosemiti (It's a mid 2014 model).  Unfortunately this also crashed in the same way and did so 2-3 times during coffee at a local cafe.  

Fortunely this time around I discovered what I have discovered so far is a resolution to the issue.  That being doing the following:


Do not do anything like this without a backup.  Messing around with Kernel modules could leave you with an unbootable system.

Disable System Integrity Protection

First you need to disable the System Integrity Protection.  You can do that with the following command:

csrutil disable

Move the offending Kernel Modules

Once this is done move the following files from /System/Library/Extensions.













Then reboot the system.  If the issue you had was the same of mine then it should stabilise.

Leave a comment

Login to Comment

Copyright © 2017 | Ben Hutton