I've just started using a Linux/Unix-like OS. I'm using Backbox which is Ubuntu based and I had a question,

Whenever my laptop overheats, it shuts down and turns off automatically without any previous warnings/notifications or whatsoever. I'd like someone to help me with this, I want to know how I can change what happens like instead of turning off completely, just hibernate. Because I've lost a whole lot of unsaved work because of this. I have Windows along with Backbox but Windows just hibernates in the case of overheating while Backbox just turns off.

Please help me with this,