1# Power Loss 2 3## Overview 4 5Power distribution in a computer system is complex. It typically flows from a 6wall outlet to power supplies to voltage regulators to system components. Other 7devices may exist between the wall outlet and the power supplies, such as an 8Uninterruptible Power Supply (UPS) or an Enclosure Power Distribution Unit 9(ePDU). 10 11A **brownout** is a partial reduction in voltage to the power supplies. In some 12situations, the standby voltage rails are still powered on but the main voltage 13rails are powered off. As a result, the BMC may still be running, but the host 14processor and other system components have lost power. 15 16A **blackout** is a complete loss of power to the power supplies. 17 18In a multiple chassis system, a brownout or blackout might only occur in some of 19the chassis. 20 21## System behavior during a brownout 22 23If the chassis was powered off when the brownout occurred, the 24`phosphor-power-sequencer` application will take no action. 25 26If the chassis was powered on when the brownout occurred, the power sequencer 27device will normally change the chassis power good (pgood) signal from true to 28false. `phosphor-power-sequencer` will isolate the failure to the power supply 29rail. `phosphor-power-sequencer` will log a power supply error. This error will 30specify the problem was the input voltage rather than the power supply hardware. 31See [Power Good Faults](pgood_faults.md) for more information. 32 33## System behavior during a blackout 34 35### Single chassis system 36 37The system loses all power. It will be completely off until utility power is 38restored. 39 40When power is restored, if the system was previously powered on, it may be 41automatically powered on again by the `phosphor-chassis-state-manager` 42application. This depends on the Auto Power Restart settings. 43 44### Multiple chassis system 45 46If the blackout affects all chassis, the system loses all power. It will behave 47as described above for a single chassis system. 48 49If the blackout only affects some chassis, the following steps will occur: 50 51- The `phosphor-chassis-power` application will do the following: 52 - Detect which chassis are experiencing a blackout. 53 - Set the `Status` property of the 54 `xyz.openbmc_project.State.Decorator.PowerSystemInputs` D-Bus interface to 55 `Fault` for the chassis experiencing a blackout. 56- The `Available` property will be set to false for chassis that are 57 experiencing a blackout. 58 - This is due to the `PowerSystemInputs` `Status` property being set to 59 `Fault` for the chassis. 60- If the BMC was reset by hardware due to the blackout, the following will 61 occur: 62 - `phosphor-power-sequencer` will read the pgood signal for each chassis and 63 use that value for the `state` and `pgood` properties of the 64 `org.openbmc.control.Power` D-Bus interface for the chassis. 65 - For chassis experiencing a blackout, the `state` and `pgood` properties 66 will be set to 0. 67 - `phosphor-chassis-state-manager` will obtain the previous on/off state of 68 each chassis from saved data. 69 - `phosphor-chassis-state-manager` will determine if a power problem has 70 occurred by checking if the following are all true: 71 - At least one chassis was previously on and is now off. 72 - The host operating system is not running or communicating 73 - If a power problem has occurred, `phosphor-chassis-state-manager` will do 74 the following: 75 - Log an error 76 - Power the system [off](powering_off.md) and then [on](powering_on.md) 77 again. The chassis with `Available` set to false will **not** be powered 78 on. 79 80See [Chassis Status](chassis_status.md) for more information on the D-Bus 81chassis status properties. 82