I have a 15" Mid 2012 Retina MacBook Pro (2.7ghz i7, 16gb of RAM) that I use as a headless server in my house. It's currently running 10.15.7, which is the last supported MacOS release it can run.
When I leave the machine running, screen open but brightness all the way down, the fan CONSTANTLY runs. As soon as I turn the brightness up and start using the computer, or remote in with a VNC client (I'm using the one that's an extension for chrome) the fan stops running. Looking at Activity monitor, there's a kernel_task that using around 15% of the CPU that immediately stops when I remote in or start using the computer. You can see the task and drop in CPU usage in the attached screenshot (screenshot taken after the %CPU has dropped, but you can see kernel_task, and the associated load on the graph at the bottom).
I've done a clean install of 10.15.7, and the only programs I have installed are: Chrome, Docker, pi-hole running in Docker, and Homebridge (for homekit).
I thought it might just be spotlight re-indexing the computer, but it's been about a week and the problem hasn't gone away. I have tried a SMC and PRAM reset, and neither have helped. It's pretty much running a clean install, other than the programs I have listed.
Does anyone have any tips for figuring out what is causing kernel_task to use the CPU so often? Why does it go away when I start using the computer?