An image forming apparatus, comprising a first controller, a second controller, a printer unit and a power supply unit, wherein: - the printer unit is configured to form an image on a sheet; - the first controller is configured to control shifting a state of the apparatus from a normal mode to a power saving mode; - the power supply unit is configured to supply power to the first controller and the printer unit in the normal mode, and to supply a minimum necessary amount of power for operation to the first controller and to stop power supply to the printer unit in the power saving mode; - the first controller is configured to store setting information indicating whether the wake-up of the printer unit before the wake-up of the first controller is valid, before shifting the state of the apparatus from the normal mode to the power saving mode and as a result of checking a user authentication setting; - the first controller is configured to notify a wake-up condition for waking up the apparatus from the power saving mode to the normal mode to the second controller, before shifting the state of the apparatus from the normal mode to the power saving mode, the wake-up condition being that a packet is received from a printer port; - the second controller is configured to, when a packet is received in the power saving mode, determine whether the wake-up condition is satisfied, and determine whether the packet includes specific information indicating a print job when the wake-up condition is satisfied; - the second controller is configured to give a notification to the first controller that a packet including the specific information is received and the wake-up condition is satisfied; and - the first controller is configured to, in response to the notification and when the setting information is valid, supply power from the power supply unit to the printer unit by opening a port for restarting power supply to the printer unit, before supplying power to the first controller. - the printer unit is configured to form an image on a sheet; - the first controller is configured to control shifting a state of the apparatus from a normal mode to a power saving mode; - the power supply unit is configured to supply power to the first controller and the printer unit in the normal mode, and to supply a minimum necessary amount of power for operation to the first controller and to stop power supply to the printer unit in the power saving mode; - the first controller is configured to store setting information indicating whether the wake-up of the printer unit before the wake-up of the first controller is valid, before shifting the state of the apparatus from the normal mode to the power saving mode and as a result of checking a user authentication setting; - the first controller is configured to notify a wake-up condition for waking up the apparatus from the power saving mode to the normal mode to the second controller, before shifting the state of the apparatus from the normal mode to the power saving mode, the wake-up condition being that a packet is received from a printer port; - the second controller is configured to, when a packet is received in the power saving mode, determine whether the wake-up condition is satisfied, and determine whether the packet includes specific information indicating a print job when the wake-up condition is satisfied; - the second controller is configured to give a notification to the first controller that a packet including the specific information is received and the wake-up condition is satisfied; and - the first controller is configured to, in response to the notification and when the setting information is valid, supply power from the power supply unit to the printer unit by opening a port for restarting power supply to the printer unit, before supplying power to the first controller.