<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 10/29/2018 7:05 AM, A, Maheswari
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:DB7PR02MB4393F07453FADA45F59118FD92F30@DB7PR02MB4393.eurprd02.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Hi Matt, <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Thanks for
your response.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">I am able to
power on the Host by monitoring GPIO using
“phosphor-gpio-monitor” service.
<o:p></o:p></span></p>
<p><span style="color:windowtext">But still we need to achieve
same result by </span>
<a href="mailto:org.openbmc.buttons.Power@0.service"
moz-do-not-send="true">org.openbmc.buttons.Power@0.service</a>
in future.
<o:p></o:p></p>
<p><span style="color:windowtext">Here is the response :</span><o:p></o:p></p>
<p><span style="color:windowtext"></span># systemctl status <a
href="mailto:org.openbmc.buttons.Power@0.service"
moz-do-not-send="true">
org.openbmc.buttons.Power@0.service</a><span
style="color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">●
<a class="moz-txt-link-abbreviated" href="mailto:org.openbmc.buttons.Power@0.service">org.openbmc.buttons.Power@0.service</a> - Phosphor Power Button0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"> Loaded:
loaded
(/lib/systemd/system/org.openbmc.buttons.Power@.service;
indirect; vendor preset: enabled)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"> Active:
inactive (dead)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">hwmi~# ps |
grep button_power.exe<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">1205
root 3100 S grep button_power.exe<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">hwmi:~#<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">button_power.exe
is not running in BMC. Service status with instance 0 is
not showing any error. But button_power.exe is not running.
So that I tried with instance 1.
</span></p>
</div>
</blockquote>
<br>
Can you check if this link exists?<br>
<br>
/etc/systemd/system/obmc-standby.target.wants/org.openbmc.buttons.Power@0.service<br>
<br>
That will start the service on the way to standby. If it does
exist, then it should be running, so maybe check<br>
the journal for errors, or try running button_power.exe from the
command line and see if it crashes.<br>
<br>
(can also check that the standby target was reached with systemctl
status obmc-standby.target)<br>
<br>
If it doesn't exist, then you probably don't have <span
style="color:windowtext">OBMC_POWER_BUTTON_INSTANCES defined,
though<br>
that should be in phosphor-defaults.inc. <br>
</span><br>
<blockquote type="cite"
cite="mid:DB7PR02MB4393F07453FADA45F59118FD92F30@DB7PR02MB4393.eurprd02.prod.outlook.com">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">I think
below file is responsible for button power controlling in
OBMC.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">c/skeleton/blob/master/pwrbutton/button_power_obj.c
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Here is the
receipe file. <o:p>
</o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Cat
./meta-phosphor/recipes-phosphor/chassis/obmc-button-power.bb<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">SUMMARY =
"OpenBMC org.openbmc.Button example implementation"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">DESCRIPTION
= "A sample implementation for a button controlling a power
domain."<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">PR = "r1"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">inherit
skeleton-gdbus<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">inherit
obmc-phosphor-dbus-service<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">inherit
pkgconfig<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">SKELETON_DIR
= "pwrbutton"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext" lang="DE">FMT
= <a class="moz-txt-link-rfc2396E" href="mailto:org.openbmc.buttons.Power@{0}.service">"org.openbmc.buttons.Power@{0}.service"</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">DBUS_SERVICE_${PN}
+= "${@compose_list(d, 'FMT',
'OBMC_POWER_BUTTON_INSTANCES')}"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">If you need
journal log, then I can share it. I need to understand the
flow.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Please help
to achieve. <o:p>
</o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Thanks <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Maheswari A<o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span
style="color:windowtext;mso-fareast-language:EN-IN"
lang="EN-US">From:</span></b><span
style="color:windowtext;mso-fareast-language:EN-IN"
lang="EN-US"> Matt Spinler
<a class="moz-txt-link-rfc2396E" href="mailto:mspinler@linux.vnet.ibm.com"><mspinler@linux.vnet.ibm.com></a>
<br>
<b>Sent:</b> Saturday, October 27, 2018 1:45 AM<br>
<b>To:</b> A, Maheswari <a class="moz-txt-link-rfc2396E" href="mailto:maheswari.a@atos.net"><maheswari.a@atos.net></a><br>
<b>Cc:</b> OpenBMC Maillist
<a class="moz-txt-link-rfc2396E" href="mailto:openbmc@lists.ozlabs.org"><openbmc@lists.ozlabs.org></a><br>
<b>Subject:</b> Re: help: OpenBMC host power on from
power button press<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-IN"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal">On 10/25/2018 11:52 PM, A, Maheswari
wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi, <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I am new to openBMC project. <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">We are in the process of porting power
button gpio interrupt handling in openBMC.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">After some a lot of analysis, I found
that obmc-button-power related service are necessary to
power on the host using power button press event.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I have added POWER_BUTTON and machine
specific GPIO number and polarity in gpio_defs.json.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">While starting the
“org.openbmc.button.Power” service, I am getting the below
error.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <b><a
href="mailto:org.openbmc.buttons.Power@1.service"
moz-do-not-send="true">org.openbmc.buttons.Power@1.service</a>
- Phosphor Power Button1</b><o:p></o:p></p>
<p class="MsoNormal"><b> Loaded: [[0;1;31merror[[0m (Reason:
File exists)</b><o:p></o:p></p>
<p class="MsoNormal"><b> Active: inactive (dead)</b><o:p></o:p></p>
<p class="MsoNormal"><b> </b><o:p></o:p></p>
<p class="MsoNormal"><b>Oct 22 14:14:13 hwmi systemd[1]:
[[0;1;31m[[0;1;39m[[<a
href="mailto:0;1;31morg.openbmc.buttons.Power@1.service"
moz-do-not-send="true">0;1;31morg.openbmc.buttons.Power@1.service</a>:
Two services allocated for the same bus name org.open</b><o:p></o:p></p>
<p class="MsoNormal"><b>bmc.butto.Power, refusing
operation.[[0m</b><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Please help to figure out and proceed. <o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span style="mso-fareast-language:EN-IN"><o:p> </o:p></span></p>
<p>Hi Maheswari,<o:p></o:p></p>
<p>I'm guessing you already have an <a
href="mailto:org.openbmc.buttons.Power@0.service"
moz-do-not-send="true">
org.openbmc.buttons.Power@0.service</a> running.<o:p></o:p></p>
<p>You can check with:<o:p></o:p></p>
<p># systemctl status <a
href="mailto:org.openbmc.buttons.Power@0.service"
moz-do-not-send="true">org.openbmc.buttons.Power@0.service</a>
<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-IN">or
just check for the button_power.exe process already running.<br>
<br>
<br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Thanks <o:p></o:p></p>
<p class="MsoNormal">Maheswari A <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span style="mso-fareast-language:EN-IN"><o:p> </o:p></span></p>
</div>
</blockquote>
<br>
</body>
</html>