Black screen on boot and loud fan, external display works, very slow

My iMac 27” late 2013 has a black screen on boot up, a very loud fan. I plugged in a second display works to show the desktop. But the computer is VERY slow and on investigation I see that the mac kernel is running the CPU at 250% or higher. The machine is so slow it’s almost impossible to use in this state. How do I restore the main screen and normal performance?

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0

crwdns2942205:01crwdne2942205:0:

Let's get a bit more info here. What happened? Did you smell something burnt? Did you open the system? Do you use a surge protector or UPS?

crwdns2934271:0crwdnd2934271:0crwdne2934271:0

crwdns2934285:0crwdne2934285:0