Thermald is not working properly so I decided to make my own
It's a simple bash script that checks themperature for every 2 seconds and changes frequency if it's too hot. Same way as thermald should work ( but it doesn't work for AMD cpus )
Use makepkg if you're running Arch. Do it on your own if you're not :)