openbmc / x86-power-control

Apache License 2.0
12 stars 10 forks source link

Button interfaces does not correlate with the `phosphor-dbus-interfaces` button interface #10

Open Kostr opened 1 year ago

Kostr commented 1 year ago

Created interfaces does not correlate with the phosphor-dbus-interfaces buttons interface

Instead of the required properties x86-power-control creates interface xyz.openbmc_project.Chassis.Buttons with ButtonMasked and ButtonPressed properties:

root@ethanolx:~# busctl tree xyz.openbmc_project.Chassis.Buttons
`-/xyz
  `-/xyz/openbmc_project
    |-/xyz/openbmc_project/chassis
    | `-/xyz/openbmc_project/chassis/buttons
    |   |-/xyz/openbmc_project/chassis/buttons/id
    |   |-/xyz/openbmc_project/chassis/buttons/nmi
    |   |-/xyz/openbmc_project/chassis/buttons/power
    |   `-/xyz/openbmc_project/chassis/buttons/reset
    |-/xyz/openbmc_project/control
    | `-/xyz/openbmc_project/control/host0
    |   |-/xyz/openbmc_project/control/host0/nmi
    |   `-/xyz/openbmc_project/control/host0/restart_cause
    `-/xyz/openbmc_project/state
      |-/xyz/openbmc_project/state/chassis0
      |-/xyz/openbmc_project/state/host0
      `-/xyz/openbmc_project/state/os
root@ethanolx:~# busctl introspect xyz.openbmc_project.Chassis.Buttons /xyz/openbmc_project/chassis/buttons/power
NAME                                TYPE      SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface -         -            -
.Introspect                         method    -         s            -
org.freedesktop.DBus.Peer           interface -         -            -
.GetMachineId                       method    -         s            -
.Ping                               method    -         -            -
org.freedesktop.DBus.Properties     interface -         -            -
.Get                                method    ss        v            -
.GetAll                             method    s         a{sv}        -
.Set                                method    ssv       -            -
.PropertiesChanged                  signal    sa{sv}as  -            -
xyz.openbmc_project.Chassis.Buttons interface -         -            -
.ButtonMasked                       property  b         false        emits-change writable
.ButtonPressed                      property  b         false        emits-change

The phosphor-dbus-interfaces buttons interface contains Enabled property.

The phosphor-host-ipmid application looks for this property https://github.com/openbmc/phosphor-host-ipmid/blob/9a9ac0bcfc2df48873ca0f9725eb5255f7191d84/chassishandler.cpp#L1075

Because it can't find it, on every boot these messages are produced:

Mar 09 14:14:39 ethanolx ipmid[276]: Fail to get button Enabled property
Mar 09 14:14:39 ethanolx ipmid[276]: Fail to get button Enabled property

These messages are produced by the following lookups:

path: /xyz/openbmc_project/Chassis/Buttons/Reset0
interface: xyz.openbmc_project.Chassis.Buttons.Reset
property: Enabled

path: /xyz/openbmc_project/Chassis/Buttons/Power0
interface: xyz.openbmc_project.Chassis.Buttons.Power
property: Enabled