Become a MacRumors Supporter for $25/year with no ads, private forums, and more!

Help! Updated to macOS 10.12.4, MBP randomly shuts off

adrianlondon

macrumors 68030
Nov 28, 2013
2,857
2,827
Switzerland
Not sure if my symptoms were the same, but this is what I had a month or so ago (I'm currently on a beta of 10.12.5 and it's not happened again recently) but my screen would turn off / go blank and it sounded like the fans were on. Couldn't do anything for up to half a minute or so after which I could turn it back on again.

Turned out it was going into hibernation as it thought the battery was empty. I did an SMC and NVRAM reset which seemed to fix the issue.
 
  • Like
Reactions: Shurland
Comment

Taz Mangus

macrumors 603
Mar 10, 2011
5,197
1,372
Not sure if anyone's still reading, but thanks to this issue I've discovered a whole new part of me. A quality I never thought I had: superstition.

Early on I discovered that my laptop is less likely to shut down if Spotlight indexing is running (which could run for hours). Interestingly, turning off Spotlight made the issue even worse, so I kept Spotlight running and thought it had nothing to do with it. I thought I tried everything.

My MacBook could easily restart 10-20 times/day and it was super annoying. On April 20 I noticed that my laptop never shut down while I was watching a video on YouTube. Despite all the common sense, in the morning of April 21, I found myself a long 10-hour YouTube video. I was desperate. I chose a calming recording of rain. No restart that day. I was both furious and speechless. I was in awe. I felt hope. I was becoming superstitious. Countless times I was imagining the last flight of my MacBook on a sunny day. Thankfully, there was a calming rain playing in the background. Over the next 3 days I experienced 4 shut downs in total.

On April 23, in the morning, I decided it's time for some heavy guns. I left the safe harbor of a calming rain and ran a script with an infinite loop in the terminal. Over the next 5 days I experienced 3 shut downs. 2 of which were within 5 minutes of booting up because I forgot to run the script.

My MacBook is not shutting down anymore. My MacBook lasts 2 hours on a battery. I have no explanation for this. Someone please confirm I'm not crazy. Run `while do done` in Terminal and let me know if it helped. (Btw I'm still running 10.11 because I'm too scared of changing anything, I'll try to upgrade to Sierra over the weekend.)

tl;dr no shut downs if there's something utilizing the cpu, wtf

Hi Jerry,

Create a new partition on your internal hard drive. Load a clean copy of 10.12.4 to the new partition and leave it that way, don't reload anything from your primary partition. Boot to the new partition and use it for awhile clean. See if the issue happens. When you are done simply delete the new partition and reboot back to your primary partition. This will give you a sanity check.
 
Comment

SalukiTD

macrumors newbie
May 3, 2017
6
0
Not sure if anyone's still reading, but thanks to this issue I've discovered a whole new part of me. A quality I never thought I had: superstition.

Early on I discovered that my laptop is less likely to shut down if Spotlight indexing is running (which could run for hours). Interestingly, turning off Spotlight made the issue even worse, so I kept Spotlight running and thought it had nothing to do with it. I thought I tried everything.

My MacBook could easily restart 10-20 times/day and it was super annoying. On April 20 I noticed that my laptop never shut down while I was watching a video on YouTube. Despite all the common sense, in the morning of April 21, I found myself a long 10-hour YouTube video. I was desperate. I chose a calming recording of rain. No restart that day. I was both furious and speechless. I was in awe. I felt hope. I was becoming superstitious. Countless times I was imagining the last flight of my MacBook on a sunny day. Thankfully, there was a calming rain playing in the background. Over the next 3 days I experienced 4 shut downs in total.

On April 23, in the morning, I decided it's time for some heavy guns. I left the safe harbor of a calming rain and ran a script with an infinite loop in the terminal. Over the next 5 days I experienced 3 shut downs. 2 of which were within 5 minutes of booting up because I forgot to run the script.

My MacBook is not shutting down anymore. My MacBook lasts 2 hours on a battery. I have no explanation for this. Someone please confirm I'm not crazy. Run `while do done` in Terminal and let me know if it helped. (Btw I'm still running 10.11 because I'm too scared of changing anything, I'll try to upgrade to Sierra over the weekend.)

tl;dr no shut downs if there's something utilizing the cpu, wtf



Hi there Jerry008,

I am having exactly the same thing you have/had...been to the "Genius Bar" 3 times...no help. I would like to try what you've done ie, running the while do done thing. I consider myself fairly skilled in computers, but scripting and code are outside of my skill set.

Thanks in advance for any help,

Pat
 
Comment

jerry008

macrumors newbie
Apr 7, 2017
12
4
Hi there Jerry008,

I am having exactly the same thing you have/had...been to the "Genius Bar" 3 times...no help. I would like to try what you've done ie, running the while do done thing. I consider myself fairly skilled in computers, but scripting and code are outside of my skill set.

Thanks in advance for any help,

Pat

Just open Terminal app, write `while do done` (without quotes) and press Enter. If you've done it correctly, nothing will seemingly happen, but if you check Activity Monitor, there should be a process called `bash` utilizing about 99.5% of your CPU.

Btw, I'm running Sierra now and experiencing the same issues. I still haven't tried to install macOS on a clean partition as Taz Mangus has suggested, but it's a great idea and will do that as soon as I have some free time.
 
Comment

SalukiTD

macrumors newbie
May 3, 2017
6
0
Just open Terminal app, write `while do done` (without quotes) and press Enter. If you've done it correctly, nothing will seemingly happen, but if you check Activity Monitor, there should be a process called `bash` utilizing about 99.5% of your CPU.


Thanks Jerry! When I run the command...both copy/paste and directly type in the command I get an error...see image...

[/IMG]
Screenshot 2017-05-21 11.36.16.png


Thanks for any suggestions!

Pat
 
Comment

jerry008

macrumors newbie
Apr 7, 2017
12
4
Ooops, sorry, I was using a different terminal. You should be able to use `while true ; do continue ; done` in your case.
 

Attachments

  • upload_2017-5-21_18-46-22.png
    upload_2017-5-21_18-46-22.png
    11.9 KB · Views: 445
Comment

SalukiTD

macrumors newbie
May 3, 2017
6
0
Beautiful! Thanks again. Just cause I'm a nerd...what is this doing specifically? Will this slow down other apps? Make the computer run hot? Thanks again Jerry, I appreciate your kind assistance!

Pat
 
Comment

jerry008

macrumors newbie
Apr 7, 2017
12
4
This will utilize 100% of one of your CPU cores. You should have around 4-8 of them, so you should not feel any difference in speed most of the time. However, it will make your laptop significantly hotter and also drain your battery much faster.

If you want to kill it, you can kill it in Activity Monitor. Also don't forget to run it every time you reboot your computer.

Just to be clear, this is not a long term solution, this is just to validate whether utilizing CPU somehow helps prevent random shut downs.
 
Comment

SalukiTD

macrumors newbie
May 3, 2017
6
0
Thanks! Makes perfect sense. I have a new machine coming tomorrow, but I was hoping to use this guy as a backup machine!

Pat
 
Comment

dsemf

macrumors 6502
Jul 26, 2014
409
90
Thanks! Makes perfect sense. I have a new machine coming tomorrow, but I was hoping to use this guy as a backup machine!

Pat
Here is a low cpu usage version:
Code:
while :; do sleep 1; done
I am assuming that the once a second is adequate to prevent the problem.

Use control-c to stop it.

DS
 
Comment

jerry008

macrumors newbie
Apr 7, 2017
12
4
Actually once a second is not adequate. I've tried to go as low as 0.000001 second wait and still experienced an occasional shut down (even though not as common).

Thanks! Makes perfect sense. I have a new machine coming tomorrow, but I was hoping to use this guy as a backup machine!

Pat

Have you had a chance to try this?
 
Comment

lanzan

macrumors newbie
Jun 13, 2017
1
0
Same issue but began less than an hour after updating to 10.12.5. Went to Genius, they think it is hardware and want to make me pay out of warranty flat rate to fix for $550!

Y'all have been quite of late, have any of you found a solution?
 
Comment

jerry008

macrumors newbie
Apr 7, 2017
12
4
No solution found, but... I found out that running this Python script utilizing only about 14% of CPU is sufficient to prevent shutdowns:
Code:
from time import sleep

while True:
    sleep(0.00002)

Honestly, I have no idea. I feel stupid just for suggesting it, but... If I'm running this... My machine does not shut down anymore.
 
Comment

Taz Mangus

macrumors 603
Mar 10, 2011
5,197
1,372
No solution found, but... I found out that running this Python script utilizing only about 14% of CPU is sufficient to prevent shutdowns:
Code:
from time import sleep

while True:
    sleep(0.00002)

Honestly, I have no idea. I feel stupid just for suggesting it, but... If I'm running this... My machine does not shut down anymore.

Have you tried a clean install of 10.12.5 as a sanity check as I suggested previously?
 
  • Like
Reactions: DeltaMac
Comment

jerry008

macrumors newbie
Apr 7, 2017
12
4
Have you tried a clean install of 10.12.5 as a sanity check as I suggested previously?

Sorry, haven't had time to do this. But I keep it back in my mind, still planning to do it once I find a couple of hours of free time.
 
Comment

kmuldner

macrumors newbie
Jun 24, 2017
1
0
No solution found, but... I found out that running this Python script utilizing only about 14% of CPU is sufficient to prevent shutdowns:
Code:
from time import sleep

while True:
    sleep(0.00002)

Honestly, I have no idea. I feel stupid just for suggesting it, but... If I'm running this... My machine does not shut down anymore.
I have exactly the same problem (random shutdowns). Genius bar no help (no issue found by them). Clean reinstall no help / Clean wipe of everything no help. Resetting of PRAM/ any other possible thing no help. But running the script prevents shutdowns (has so far for the last month). Thank you - and WHY???????
 
Comment

chrisdelambert

macrumors newbie
Jul 10, 2017
6
0
Berlin
I almost bought a brand new MacBook Pro because of this random shutdown issue after upgrading to 10.12.5! It has been driving me crazy - I did a fresh install and it still crashes - it is definitely an issue with Sierra. Anyway for me also this python script / or 10 hour youtube video works fine. I just need to remember to run one before I start working. I really hope Apple fixes this.

BTW - does anyone have a quick way to run a python script at startup?
 
Comment

smorhaim

macrumors newbie
Jul 17, 2017
5
0
Not sure if anyone's still reading, but thanks to this issue I've discovered a whole new part of me. A quality I never thought I had: superstition.

Early on I discovered that my laptop is less likely to shut down if Spotlight indexing is running (which could run for hours). Interestingly, turning off Spotlight made the issue even worse, so I kept Spotlight running and thought it had nothing to do with it. I thought I tried everything.

My MacBook could easily restart 10-20 times/day and it was super annoying. On April 20 I noticed that my laptop never shut down while I was watching a video on YouTube. Despite all the common sense, in the morning of April 21, I found myself a long 10-hour YouTube video. I was desperate. I chose a calming recording of rain. No restart that day. I was both furious and speechless. I was in awe. I felt hope. I was becoming superstitious. Countless times I was imagining the last flight of my MacBook on a sunny day. Thankfully, there was a calming rain playing in the background. Over the next 3 days I experienced 4 shut downs in total.

On April 23, in the morning, I decided it's time for some heavy guns. I left the safe harbor of a calming rain and ran a script with an infinite loop in the terminal. Over the next 5 days I experienced 3 shut downs. 2 of which were within 5 minutes of booting up because I forgot to run the script.

My MacBook is not shutting down anymore. My MacBook lasts 2 hours on a battery. I have no explanation for this. Someone please confirm I'm not crazy. Run `while do done` in Terminal and let me know if it helped. (Btw I'm still running 10.11 because I'm too scared of changing anything, I'll try to upgrade to Sierra over the weekend.)

tl;dr no shut downs if there's something utilizing the cpu, wtf

This makes no sense!!!!!!!!!! The CPU thing fixed my crashing issues!!!

15" MBP Mid-2014, randomly crashing sometimes 2 minutes after boot, sometimes never in 12 hours... I have been rebooting 10-20 times a day... even in safe mode.. Apple bar couldn't find a thing... kept it for 2 days... nothing..

Then I ran into this forum and saw this about maxing the CPU.... PROBLEM FIXED.

Of course it didn't crash while at Apple... they maxed out the CPU to stress test it..

I simply did this on the terminal:

yes > /dev/null

Maxing out 1 core.... Computer hasn't crashed in over an hour... right before doing this it was crashing every 60 seconds.

Now the real questions is... WTF is going on ?

Of course I already rested everything, reinstalled.3 times, formatted HD using filling 0's, didn't restore Timemachine, tried different versions.. etc etc. nothing helped.. except this!!!!!!!!!!!!

Can anyone help???????? I just spent $2000 on another MBP on eBay this morning since I couldn't work...... So now I need to sell this one, but want to sell it in working condition!!!!!!!!!!!

Help!!!!!
 
Comment

Taz Mangus

macrumors 603
Mar 10, 2011
5,197
1,372
This makes no sense!!!!!!!!!! The CPU thing fixed my crashing issues!!!

15" MBP Mid-2014, randomly crashing sometimes 2 minutes after boot, sometimes never in 12 hours... I have been rebooting 10-20 times a day... even in safe mode.. Apple bar couldn't find a thing... kept it for 2 days... nothing..

Then I ran into this forum and saw this about maxing the CPU.... PROBLEM FIXED.

Of course it didn't crash while at Apple... they maxed out the CPU to stress test it..

I simply did this on the terminal:

yes > /dev/null

Maxing out 1 core.... Computer hasn't crashed in over an hour... right before doing this it was crashing every 60 seconds.

Now the real questions is... WTF is going on ?

Of course I already rested everything, reinstalled.3 times, formatted HD using filling 0's, didn't restore Timemachine, tried different versions.. etc etc. nothing helped.. except this!!!!!!!!!!!!

Can anyone help???????? I just spent $2000 on another MBP on eBay this morning since I couldn't work...... So now I need to sell this one, but want to sell it in working condition!!!!!!!!!!!

Help!!!!!

Find the crash log and post here in a quoted block. I understand you are frustrated but sometimes tracking an issue like you have can be tricky because it is intermittent and not quick to reproduce. By any chance do you have anything plugged into the ports on the computer when it crashes?

Another suggestion is to give AppleCare a call. Speak with a senior advisor. Sometimes that can get you results.
 
Comment

chrisdelambert

macrumors newbie
Jul 10, 2017
6
0
Berlin
This makes no sense!!!!!!!!!! The CPU thing fixed my crashing issues!!!

15" MBP Mid-2014, randomly crashing sometimes 2 minutes after boot, sometimes never in 12 hours... I have been rebooting 10-20 times a day... even in safe mode.. Apple bar couldn't find a thing... kept it for 2 days... nothing..

Then I ran into this forum and saw this about maxing the CPU.... PROBLEM FIXED.

Of course it didn't crash while at Apple... they maxed out the CPU to stress test it..

I simply did this on the terminal:

yes > /dev/null

Maxing out 1 core.... Computer hasn't crashed in over an hour... right before doing this it was crashing every 60 seconds.

Now the real questions is... WTF is going on ?

Of course I already rested everything, reinstalled.3 times, formatted HD using filling 0's, didn't restore Timemachine, tried different versions.. etc etc. nothing helped.. except this!!!!!!!!!!!!

Can anyone help???????? I just spent $2000 on another MBP on eBay this morning since I couldn't work...... So now I need to sell this one, but want to sell it in working condition!!!!!!!!!!!

Help!!!!!

Well I have been about 5 days now with no crashes thanks to an automator script I am running at login. No crashes. It uses one thread, at 12% CPU. As long as it is running my computer won't crash. If I kill that process though, it crashes. So weird, but it works for now. Maybe Apple will identify and fix in the next version of macOS...
 
Comment

Weylin

macrumors newbie
Apr 19, 2017
3
0
macOS Sierra 10.12.6 just came out a few days ago. Has anyone tried this new version (without the shell or python scripts)?
 
Comment

Taz Mangus

macrumors 603
Mar 10, 2011
5,197
1,372
I almost bought a brand new MacBook Pro because of this random shutdown issue after upgrading to 10.12.5! It has been driving me crazy - I did a fresh install and it still crashes - it is definitely an issue with Sierra. Anyway for me also this python script / or 10 hour youtube video works fine. I just need to remember to run one before I start working. I really hope Apple fixes this.

BTW - does anyone have a quick way to run a python script at startup?

When say you did a fresh install, did you migrate any data over from Time Machine after the install? Or are you using a absolutely clean install?
 
Comment

chrisdelambert

macrumors newbie
Jul 10, 2017
6
0
Berlin
When say you did a fresh install, did you migrate any data over from Time Machine after the install? Or are you using a absolutely clean install?

Fresh install - Absolutely clean install and no restored data. With no extra installed applications other than VS code, it still crashed.
[doublepost=1500917496][/doublepost]BTW since I am running a small script I have not had one crash. Has been a couple of weeks now.
 
Comment

jackbrucesimpson

macrumors newbie
Aug 14, 2017
3
0
This exact issue started for me the very same day I updated to 10.12.6 - never had the problem before. Computer does not randomly shut off if I use an ethernet cable, but it will frequently shut down whilst using wifi.
 
Comment

chrisdelambert

macrumors newbie
Jul 10, 2017
6
0
Berlin
Good to know, I haven't bothered updating to the latest I will wait for the new macOS and see if that fixes it. Out of interest are you running a Macbook Pro 15inch late 2013?
 
Comment
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.