4

Everyday when I come back to my system it will be shutoff no matter what I do, if I log out, it'll be shutdown, if I restart it will be shutdown. A grep through the log files shows me this:

2018-03-29 16:06:29.964161-0500 0x4a8      Default     0x0                  0      kernel: (AppleSMC) Previous shutdown cause: 3
2018-03-29 18:30:34.297536-0500 0x435      Default     0x0                  0      kernel: (AppleSMC) Previous shutdown cause: 3
2018-03-30 09:42:33.355573-0500 0x420      Default     0x0                  0      kernel: (AppleSMC) Previous shutdown cause: 3

The 3 means hard reboot (or so I've gathered) but I'm not rebooting my system. Is there a way for me to tell what is causing my reboots or if there is an application that is crashing that could be causing this?

EDIT:

I've figured out that the 3 is a dirty forced shutdown, so this leaves the question, how can I determine what is causing the issue?

7
  • 1
    It is recommended to contact Apple authorised service provider and get your Mac diagnosed by a technician. It probably appears to be some kind of hardware issue. If you bought an AppleCare, you may be eligible for free service and repairs.
    – Nimesh Neema
    Commented Mar 30, 2018 at 16:50
  • 1
    Possible duplicate of Unexpected shut downs
    – fsb
    Commented Mar 30, 2018 at 16:50
  • @NimeshNeema I'd do that, but I'm the sysadmin, so I like challenges lol. Commented Mar 30, 2018 at 16:59
  • As indicated by the log output and the symptoms, it seems to be a hardware problem. Hence the suggestion.
    – Nimesh Neema
    Commented Mar 30, 2018 at 17:00
  • 1
    Close voters: Not a dupe because the OP has specifically identified the shutdown cause unlike the linked question.
    – Allan
    Commented Mar 30, 2018 at 21:17

2 Answers 2

5

I actually believe I've found a fix for this.

I started greping through all the log files from when this issue started happening looking for a pattern. As it turns out the pattern is that the GoogleSoftwareUpdateDaemon runs everytime right before the crash happens:

Mar 30 13:33:55 <COMP-NAME> GoogleSoftwareUpdateDaemon[19078]: 2018-03-30 13:33:55.245 GoogleSoftwareUpdateDaemon[19078/0x7fff77030000] [lvl=2] -[KeystoneDaemon main] GoogleSoftwareUpdateDaemon inactive, shutdown.
Mar 30 13:34:00 localhost kernel[0]: Previous shutdown cause: 3

So doing some research, this is a updater that is secretly installed by Google (it is nowhere in their terms of service, nor is there a warning for it) what this does is update your Google applications every 5 hours. In order to disable this you can do the following:

defaults write com.google.Keystone.Agent checkInterval 0

What that command will do is set the interval for checking to 0. This is probably not recommended since security updates are important, so you can also set the interval for once a week:

defaults write com.google.Keystone.Agent checkInterval 604800

Now apparently this updater takes up very minuscule amounts of resources, but what they don't tell you is that it depends on how much Google software is on your system, it runs all the updates at one time. For example, if you have Google Chrome, Google Drive, and Google Hangouts installed, it will attempt to run updates for all of those pieces of software at once.

So what I did is the first option, set it to 0 and watched the computer for over an hour. Nothing happened, restarted and it boot right up, watched for another hour and it didn't crash or turn off. Going to assume this was the problem and move on with my life.

8
  • 2
    Thanks for coming back to share your findings on this. I'm sure it'll be helpful to other users! :) Since this is a highly unusual way for a hard shutdown to occur (I don't recall ever seeing a software cause for this particular type of shutdown), can I encourage you to send a bug report to Google about this? Here's how to. Finally, welcome to Ask Different! I hope you find this site a valuable resource! :)
    – Monomeeth
    Commented Mar 30, 2018 at 23:09
  • @Monomeeth I've already been in contact with them, I've also asked them to provide where in the ToS it says a daemon is installed. Still waiting, will provide a link once I've gotten an answer. Commented Apr 2, 2018 at 13:14
  • @CertifcateJunky Where did you find these logs and how exactly did you search through them?
    – Ska
    Commented Apr 23, 2018 at 19:45
  • @Ska it's in your syslog Commented Apr 23, 2018 at 21:47
  • @CertifcateJunky You mean /var/log folder and all the files there, or?
    – Ska
    Commented Apr 24, 2018 at 9:44
4

A shutdown cause of "3" is a hard shutdown - when you press and hold the power button.

More than likely there's a contaminant causing a short that is forcing the button to engage (electrically speaking) thus making your Mac "see" an ACPI shutdown.

Try cleaning it but you may have to have it replaced.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .