A computer powersupply is actually two powersupply in one box.
You have the main powersupply, which power your PC. It provide normally the -12, 3.3, 5 and 12V at 400-1000W or sometime even more if the guy that built the pc was crazy! This one is switched on and off by the motherboard.
You also have a secondary powersupply. This one is a way smaller one that deliver 5V at 1-3A only. Some phone chargers can actually provide more power than most of them! That is 5-15W only. Most are in the 1-2A range, so 5-10W. This one is always on. If the powersupply is plugged in the wall and the switch on the back of the powersupply is on (if it even exists) then that one is on. Ever saw that always on green led on the motherboard? Well, it is there to say “Hey! Don’t forget to disconnect the power before going any maintenance because there is still power here!!!”
Now… That 5V always on, called 5V Standby, shortened to 5VSTB, also power a microcontroller and some other part of the motherboard. When you select restart in windows, what actually happen is that windows send a signal to that microcontroller to reset everything. Some computer will not shutdown, some like mine does. So, what actually happen is that the microcontroller get the “reset” signal, turn off the powersupply, wait a second or two, then turn it back on.
The same microcontroller is often the one that manage the power button on the front of your case. When you press on it, that microcontroller get a signal, and can take a few actions:
* if the computer is off, turn it on.
* if the computer is on, and the bios setting is set to delay, then send a signal to the OS to shut down NOW. Else turn off the power.
* If the computer is on and the button is held for more than 4 seconds, then turn off the power. Take note that this can cause data corruption so don’t do that unless the computer is frozen. It is also the equivalent of pulling the plug off the wall.
Now, remember I said something about some that just reset? Well, instead of shutting off and on the power, another way is to actually issue a reset to most controllers in the computers. There is basically a wire that connect those chips together, and when you send the signal (usually that wire get grounded to reset), the chip should return to it’s powered on state and lose all the data and state it was currently at. Magic word: should. See, sometime the electronics crash in some weird way, and the chip can’t reset it for some reason to a default state. This can be by design (aka this shouln’t happen so let’s not put the circuit to reset it), by design flaw (the circuit is there, but a ‘bug’ exists that make it not work proprelly), or sometime it is because the chip itself is damaged (but can still work flawlessly in most cases) or some part can have been skipped on purpose (the programmer just need to send some command to reset the values). For the last one, surprise, some programmers don’t do what they must do, and skip over the “Those default values are not reset” part of the datasheet thru created a software bug that cause it to then misbehave.
The last one is why they are sometime doing the power reset instead: it do not soft reset, but hard reset. This ensure that everything is always resetted, all the time, no matter what crashed and how.
As a side note, when the computer goes into standby, the main powersupply is turned off, and the standby one is what power the ram and some other stuff with important volatile data. The rest is saved to disk or just reinitialised when it get powered on again. This is why it wake up so fast when in standby: everything is still loaded in ram. All it need to do is reinitialise the video card and the like. But all of your opened programs are still in memory. The computer still use a tiny bit of power, a few watts. Lose the power and you lose everything that was opened. The downside is that it take time to dump the ram content to disk, which may be significant if you have lots of ram and a mechanical hard drive. Hard drives are SLOW!
For completeness, hybernation is simmilar to standby, except that it dump the content of the ram on the disk then shut off the computer. At power on it reload the content into ram and reinit the hardware.The computer basically take no power.
Also, microsoft also made an hybrid mode. It hybernate, but do not shut down the computer (it put it in standby). If you turn it back on, it behave like in standby, but if it lose power then it behave like in hybernation. Kinda the best of both world. The downside is: it take some time to dump the ram content to the disk at standby time, same as in hybernation mode.
Latest Answers