Believe it or not that was a good clue.
Try this. Head to the Power Options (no OS noted so I'll not be exact here) and set the Power Profile for AC power to be the same as the Battery settings.
It's likely this laptop is in need of its yearly cleaning. Is it getting the yearly?
My laptop has started to freeze anytime that I have the power cord plugged in I am trying to figure out what is causing this to happen. I use my computer a lot and I am now very limited on using it. I can only go till my battery runs out and then I have to wait to charge it again. This makes my work take longer to complete. Does anyone know what would be causing my my computer to freeze, when the power cord is plugged in?