Keith Thompson said:
Seriously? If you can provide details, your story could be excellent
ammunition in arguments with who equate "it works for me" with "it's
correct".
I was configuring suspend-to-disk on my GNU/Linux system, and it turned
out that the graphics state was not properly restored, resulting in a
messed up screen. Luckily, the problem could be avoided by switching to
text mode before suspending, and switching back to graphics mode after
resuming.
I didn't want to do this manually, so I modified the scripts which are run
before suspending and after resuming to switch to a text console and back.
Unfortunately, the `main' function of the program to switch virtual
terminals returned `void'. The undefined behaviour in this case had the
effect that the program incorrectly reported unsuccessful execution after
switching virtual terminals. This in turn caused the script to terminate
immediately and report unsuccessful execution to its own parent process,
the power management daemon.
An unrelated BIOS bug (maybe it was supposed to be a feature...) caused
the BIOS to retry immediately if suspend-to-disk failed. The effect was
that the system switched forth and back between graphics and text mode in
fast succession. Monitors don't like that...
Martin