Ubuntu – Computer completely shuts down


I've been having a problem with my Ubuntu 12.04 64-bit machine which is happening quite often and randomly.
During a normal session and without any indication that something is wrong the computer just shuts down completely as if I unplugged it from the wall..

I read somewhere that this is probably caused due to overheating so I installed the "sensors" program to monitor the CPU temperature which running it after the crash indicates that all Core temperatures are at normal levels.

Does anyone have an idea as to what might be causing the problem and most importantly if there are any log files I could examine to troubleshoot this.

Best Answer

If it does a clean shutdown, and it is a temperature problem as you guessed, that is usually indicated in /var/log/syslog as mentioned by irrational john above. I had this with a laptop and a failing CPU fan. So if e.g. it says there it's shutting down because the CPU is overheating, check also whether your CPU fan is working. Same for the other fans if anything is overheating.

On the other hand: if it simply powers-off without a clean shutdown, it rather points to a hardware failure. I had this when one core of my CPU gave up on another machine. In those cases, there won't be a related entry in the syslog (as there was no clean shutdown, but just a power-off). Here you could run some hardware checks:

  • boot to memtest to run a complete RAM check
  • use S.M.A.R.T. capabilities of your harddrive for a health check (e.g. with the smartmontools package)

Just to give a few examples.