Suspend(sleep) mystery for linux distros ?

First, it is hardware priority.

You push the power switch momentarily, and it puts the cpu to sleep. Then when you push it again momentarily, it is back in operation. This is on the very elementary level, a signal to the sleep pin on the motherboard. If you push the power on switch for 5-8 seconds non-stop, then the computer powers off illegally(software is not reset correctly before power off).

Then, on the bios(basic IO system), the setup is for the power switch to put the cpu to sleep; then it will wake on external signal from modem, ethernet, etc. from your network. It is obvious that anyone sending your a message should wake up your computer to receive it and store the message on hdd or in dram.

It should not wake on any other signal except from the power switch, if you are available to push the key youself.

Next, if you use software interrupt to put cpu to sleep; then the pin on the cpu had to be inverted(0V or Vcc) to wake up cpu to continue as if nothing had happened. This is how cpucool did the trick. And they do with seperate ALU and FPU too; one is always asleep while the other works.

Well, good luck on your next try?

If suspend to ram or hdd means data is reset and stored in different locations, you still need a wake on some signal to reactivate cpu. The logic here is confused. You never worry about where the data is when you wake up the cpu. The next keyboard or mouse input will instruct cpu properly. So wake on input to console is proper. Monitors wake on input to mouse or keyboard?