Computer shutdown by itself [SOLVED]

I was away from my computer for a few minutes and it just shutdown all by itself. I have my power settings all set to never so I can manually make changes or shut it down so I don't know why it did that. I have a dual boot system running Windows 10 and Ubuntu MATE. I have a HP laptop i7 with 8gb RAM Intel 620 Graphics. Not sure what else to include. Any help is greatly appreciated! So far it hasn't done it again but I'm going to let it idle for a bit and see if it does it again

I tried to edit this topic but it wouldn't let me for some reason. I have an HP 17-x115dx laptop.
Here are the specs: https://support.hp.com/us-en/document/c05333566
Also it only does this when I'm on Ubuntu MATE. It doesn't do it when I'm on Windows 10. I left it idle for 20 minutes on Windows 10 and it never shutdown. Not sure what could cause that to happen in Ubuntu MATE.

Well I left it on for an hour in Ubuntu MATE and it stayed on so not sure what happened earlier.

Well it did it again twice. Not sure what is causing it to do that. I've checked my settings to see if there's anything that could be causing it to shutdown but I can't find anything. Also it only does this when it's idle. When I'm on my computer working it stays on. Any thoughts on this issue?

Did you check the power management settings in the control center?

Yes I did and I stated that in one of the above posts. I have my power management settings set to never so that I can manually make changes or shutdown the computer

Maybe there's some command I can enter in the terminal to see what's going on? I don't know just guessing

I set the screensaver to active so that it will keep the computer busy and so far it hasn't shutdown by itself again. Hopefully that fixes this issue

The same problem was with my notebook. Temperature control helped.

How do I enable that?

It overheated and so I added more cooling.