Your computer runs hundreds of processes simultaneously in the background and at times due to different reasons it decides to freeze and not respond. In such times, the only way to shut down your PC is to press the power button and shut it down forcibly.
Shutting down your PC forcibly may or may not cause damage to its hardware depending on how you do it. Pressing the power button to is considered perfectly safe to shut down your PC whereas directly unplugging the power supply from the CPU is where the tricky part comes in and can cause damage to your hardware.
What happens when you use the power button to shut down your PC?
Nothing gets fried. Your power button does not directly control the flow of current. Your power button connects physically to your motherboard (via cable), and the motherboard connects with the power supply.
When you hit that button just once, it’s a soft power down that for instance Windows can catch and then shut down/sleep/suspend properly.
When you hold the power button in (about 3 seconds) you get the hard shutdown, which means the power just cuts without waiting for a signal that shut down/sleep/suspend has succeeded. Nothing gets fried or damaged, data integrity is ignored.
A power supply is 100% equipped to deal with sudden power loss, like if you pull out the power cord from the socket. It’s not going to send voltage spikes through the system. It’ll shut everything down uncontrolled, but not in a harmful way.
Your graphics card also will not suffer from this or even the pulling of the cord.
Also read: 60Hz vs 120Hz vs 144Hz vs 240Hz displays
What happens if you pull the power cord or cut power supply to shut down your PC? Does it hurt the CPU?
This depends on if you have a surge protector or a UPS installed or not. If not, yes, it can hurt certain parts in your CPU like mechanical HDDs or the motherboard itself.
Hardware without moving parts (not counting fans) won’t get affected by force shutdowns, well maybe there’s the possibility of corrupted data. Now, for HDDs, it can damage the “needle” that reads the disk contents.
To elaborate on HDD damage a little: as far as I know all modern HDDs move the head back into resting position when they suddenly lose power. This can fail, but it’s somewhat safe.
How to customise what your PC’s power button does
You can change what happens when you press your power button to shut down your PC on Windows by following the steps mentioned below:
Search and open Control Panel on your computer.
Look for the System and Security tab and open it.
Search for Power Options and click on “change what the power buttons do” under it.
You can now change what happens when you press the power button.
So, shutting down your PC with the power button is perfectly fine and safe and will not cause any damage to your computer or the CPU. Disconnecting the power supply to shut down your machine forcibly is not advised as you might lose data.