I noticed with the help of psensors that my CPU overheats to 90-97 degrees celcius if it gets above 2.5GHz. I am using a Lenovo Y720 laptop. I tested this both in games and by CPU stress test. I found a script on:
http://seperohacker.blogspot.com/2012/10/linux-keep-your-cpu-cool-with-frequency.html?m=1
that lets you throttle the CPU, which I have used to throttle it down to 2GHz and the temperatures are fine. The bad thing about this however is that this means I can never use my laptops full power which is not acceptable for me as my CPU has the power to get up to 3.8GHz (i7 7700HQ). I also have a NVIDIA GTX 1060 GPU, but it seems it has nothing to do with this (which I first thought) as the overheating happens regardless of using the GPU or not. This does not happen on Windows so it must be something on Ubuntu (I use 18.04). Does anyone know something about this or perhaps a fix that does not limit me to only be able to run Max 2GHz.