Quote Originally Posted by ajgreeny View Post
I have now moved the thread to Apple Hardware Users which as suggested is much more appropriate and a better fit for this query.
Quote Originally Posted by him610 View Post
@amitbloomberg7
Not to worry. You came to the right place. There are real experts that dwell in Ubuntu forums. They are patient, friendly, and very helpful. I have learned a great deal by just reading the issues and responses in these forums.
Welcome to the forums.
Quote Originally Posted by TheFu View Post
No worries. Moving this thread to the Apple HW sub-forum isn't something you can do.

Now that MAFoElffen is in this thread, you'll get better help. I suspect there are many Mac experts, but as I never read the Apple subforum here, I don't recognize any names.

Thank you very much guys!
Someone reffered me to this great article, and it solved the problem (or at least enabled me to turn off auto restart): https://williamlam.com/2013/02/enabl...r-failure.html
There are 2 options:
1. Boot into recovery (cmd + R) then open terminal and type: pmset autorestart 0 (1 is on).
2. Inside Ubuntu, open terminal and sign into root (sudo su -) then type: setpci -s 0:1f.0 0xa4.b=1 (there's another link in there for more information on this one).
It is still interesting why it autorestarted when the computer was initially turned off so I'll keep reading about it.