How to stop your Mac from persistent ‘restarted because of a problem’ alerts

macOS recognizes when it’s been restarted without a proper shutdown or restart operation from the  menu. When that happens, you see a dialog at startup that tells you that “Your computer was restarted because of a problem,” and offers to let you send a report to Apple. There are lots of reasons that your Mac can restart, including a power failure, and you typically know why it happened.

But for some people, every time they restart their Mac after that, whether using  > Shutdown or  > Restart, they see the same error. They know everything’s all right, why doesn’t macOS?

Apple

The answer is a diagnostic file that can be left in rare circumstances after the problematic restart has resolved itself. You can fix this problem easily enough:

  1. In the Finder, choose Go > Go to Folder.
  2. Enter exactly the following and press Return: /Library/Logs/DiagnosticReports
  3. Look for any file starting with the word Sleep and ending with .diag
  4. Delete those files and empty the trash (Finder > Empty Trash).

On your next regular restart, the alert will not appear.

This Mac 911 article is in response to a question submitted by Macworld reader Henri.

Ask Mac 911

We’ve compiled a list of the questions we get asked most frequently, along with answers and links to columns: read our super FAQ to see if your question is covered. If not, we’re always looking for new problems to solve! Email yours to mac911@macworld.com, including screen captures as appropriate and whether you want your full name used. Not every question will be answered; we don’t reply to emails, and we cannot provide direct troubleshooting advice.

Source : Macworld