<div class="gmail_quote">On Mon, Jan 17, 2011 at 7:00 AM, Dave M G <span dir="ltr">&lt;<a href="mailto:martin@autotelic.com">martin@autotelic.com</a>&gt;</span> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
MythTV users,<br>
<br><br>
It works... almost. What it does is turn of the screen, and then a few<br>
seconds later, the screen comes on again. Then I hit the green power<br>
button again, and this time the screen goes off and stays off.<br>
<br></blockquote><div>Try adding a sleep for 1 or 2 seconds before the standby.  See below.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
If the screen is off and I want to turn it on, that works fine. No need<br>
to press it twice. The problem only occurs when trying to turn the<br>
screen off.<br>
<br></blockquote><div>Actually, you may not need to press _that_ button.  Any keyboard or mouse press will take the monitor out of standby (but not restore the volume unfortunately). </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
#!/bin/bash<br>
<br>
VOLUME=$(aumix -vq | awk &#39;{ print $3 }&#39; )<br>
MONITOR=$( xset -q | grep Monitor | awk &#39; { print $3 $4 } &#39; )<br>
<br>
case &quot;$MONITOR&quot; in<br>
&quot;On&quot;)<br></blockquote><div>   sleep 2 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
xset dpms force standby<br>
if [ &quot;$VOLUME&quot; != &quot;0&quot; ] ; then<br>
mute<br>
fi<br>
;;<br>
*)<br>
xset dpms force on<br>
if [ &quot;$VOLUME&quot; == &quot;0&quot; ] ; then<br>
mute # unmute actually, but it is the same script.<br>
fi<br>
;;<br>
esac</blockquote><div><br></div><div>Be patient for the one or two seconds.</div><div><br></div><div>Dave </div></div>