There is provided an image forming apparatus which is capable of operating
in a stable condition and in an efficient manner by omitting automatic
adjustment in the case where there is no necessity of carrying out the
automatic adjustment when the image forming apparatus returns from a
power-saving mode to a normal mode. A CPU shifts the operation mode of
the image forming apparatus to a power-saving mode in which power
consumption is saved. The CPU detects at least one of a status of the
image forming apparatus before the operation mode is shifted to the
power-saving mode and a status of the image forming apparatus in the
power-saving mode. The CPU determines the contents of a return process
executed when the operation mode returns to a normal mode from the
power-saving mode, according to the detected status of the image forming
apparatus.