Are there commands in the scripts that do the jobs of suspension and of waking up? I don't find them.
Why is one script stored in
/etc/pm/sleep.d/fglrx-fix, and the other in
What in the scripts that make the waking up succeed? By switching to a text console upon waking up, and switch to the graphic console (Ctrl-Alt-F7) after waking up?
The scripts are checking the first argument($1) they are given by the OS to inform them if the computer is sleeping or resuming in their
Almost all distros look for hooks(scripts) in /etc/pm/sleep.d/ to execute on sleep or resume. The scripts you found do not run the process of sleeping or resuming, they just "hook" to the process.
Yes. Strangely enough changing virtual terminals(
chvt) seem to work here, though I don't know why. Perhaps another answer will come explaining why.