<html><body><div style="font-family: Arial; font-size: 12pt; color: #000000"><DIV aria-label="Compose body"><BR></DIV>
<DIV><BR></DIV>
<HR id=zwchr>

<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: Helvetica,Arial,sans-serif; FONT-WEIGHT: normal; COLOR: #000; FONT-STYLE: normal; TEXT-DECORATION: none" data-mce-style="color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><B>From: </B>"Michael Watson" <michael@thewatsonfamily.id.au><BR><B>To: </B>swaldman@firecloud.org.uk, "Discussion about MythTV" <mythtv-users@mythtv.org><BR><B>Sent: </B>Monday, March 9, 2015 4:38:34 PM<BR><B>Subject: </B>Re: [mythtv-users] Mythwelcome & Hibernate problem<BR>
<DIV><BR></DIV>
<DIV class=moz-cite-prefix>On 10/03/2015 5:58 AM, Simon Waldman wrote:<BR></DIV>
<BLOCKQUOTE cite=mid:CANNYjbj8Pbj+ctsSbuU9xCkawq83GAT=pTJCPFknexVaLeKEHw@mail.gmail.com>
<DIV dir=ltr>
<DIV class=gmail_extra>
<DIV class=gmail_quote>On 8 March 2015 at 21:53, Simon Waldman <SPAN dir=ltr><<A href="mailto:lists@firecloud.org.uk" target=_blank data-mce-href="mailto:lists@firecloud.org.uk">lists@firecloud.org.uk</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid" data-mce-style="margin: 0 0 0               .8ex; border-left: 1px #ccc solid; padding-left: 1ex;">
<DIV dir=ltr>
<DIV>
<DIV>
<DIV>If I type "sudo hibernate" at a terminal, it works. If I use the menu within Mythwelcome and select "Shutdown now", it works. But if I let the idle timer count to zero, it gets as far as stopping the backend service and then nothing further happens - visibly, or in the Hibernate log.<BR></DIV></DIV></DIV></DIV></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>So, I've been trying to think about what could be different between selecting "shutdown now" in Mythwelcome, and letting the idle timer count down. There's one possibly that occurs; perhaps those who know could confirm or deny it?<BR><BR></DIV>
<DIV>Is it possible that, despite being configured through MythWelcome, the shutdown command when the machine is idle actually comes from mythbackend?<BR></DIV>
<DIV>In that case, the hibernate script would presumably be a child process of mythbackend, so when it stops mythbackend, it would itself be killed.<BR></DIV>
<DIV>That makes some sense, if it's true. Is it?<BR><BR></DIV>
<DIV>Thanks :-)<BR></DIV>
<DIV> <BR clear=all></DIV></DIV>-- <BR>
<DIV class=gmail_signature>Simon Waldman<BR><A href="mailto:swaldman@firecloud.org.uk" target=_blank data-mce-href="mailto:swaldman@firecloud.org.uk">swaldman@firecloud.org.uk</A></DIV></DIV></DIV><BR></BLOCKQUOTE>Easy to test your theory.  Have your backend hibernate script spawn a background task that does the hibernation.<BR><BR><BR>I had the same problem with suspend, as soon as the backend stopped, the suspend process was also killed. The following resolved this.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: Helvetica,Arial,sans-serif; FONT-WEIGHT: normal; COLOR: #000; FONT-STYLE: normal; TEXT-DECORATION: none" data-mce-style="color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;">I changed the server halt command to this</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: Helvetica,Arial,sans-serif; FONT-WEIGHT: normal; COLOR: #000; FONT-STYLE: normal; TEXT-DECORATION: none" data-mce-style="color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;">setsid /opt/mythtv/bin/systemshutdown.sh</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: Helvetica,Arial,sans-serif; FONT-WEIGHT: normal; COLOR: #000; FONT-STYLE: normal; TEXT-DECORATION: none" data-mce-style="color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;">that is a script that in turn includes "sudo /usr/sbin/pm-suspend"</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: Helvetica,Arial,sans-serif; FONT-WEIGHT: normal; COLOR: #000; FONT-STYLE: normal; TEXT-DECORATION: none" data-mce-style="color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;">The setsid command runs it under a different session and prevents the suspend from being killed when the back end is killed</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: Helvetica,Arial,sans-serif; FONT-WEIGHT: normal; COLOR: #000; FONT-STYLE: normal; TEXT-DECORATION: none" data-mce-style="color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: Helvetica,Arial,sans-serif; FONT-WEIGHT: normal; COLOR: #000; FONT-STYLE: normal; TEXT-DECORATION: none" data-mce-style="color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;">Peter</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: Helvetica,Arial,sans-serif; FONT-WEIGHT: normal; COLOR: #000; FONT-STYLE: normal; TEXT-DECORATION: none" data-mce-style="color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"> </DIV></div></body></html>