Hereunder, an example of the operation performed by the control device 10 of the image forming apparatus 1 according to the second embodiment will be described, with reference to the flowchart shown in FIG. 12. Here, the flowchart of FIG. 12 is the same as that shown in FIG. 6, except that step S11, to be performed after step S4, is added, and therefore only step S11 will be described hereunder. In the second embodiment, the controller 100 closes the solenoid valves SV which have thus far been open, upon deciding that the image forming apparatus 1 is set to the maintenance mode (YES at step S1). In addition, the controller 100 causes the display device 473 to display the remedy for the sensor malfunction (step S9), when closing the solenoid valves SV.