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