<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace"><span style="font-family:Arial,Helvetica,sans-serif">On Tue, Mar 3, 2020 at 12:03 PM Allen Edwards <<a href="mailto:allen.p.edwards@gmail.com">allen.p.edwards@gmail.com</a>> wrote:</span><br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 3, 2020 at 9:11 AM Greg Oliver <<a href="mailto:oliver.greg@gmail.com" target="_blank">oliver.greg@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div style="font-family:monospace,monospace"><span style="font-family:Arial,Helvetica,sans-serif">On Tue, Mar 3, 2020 at 10:46 AM Allen Edwards <<a href="mailto:allen.p.edwards@gmail.com" target="_blank">allen.p.edwards@gmail.com</a>> wrote:</span><br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><br><br></div><div><div style="font-family:monospace,monospace">I cannot comment on why X misbehaves - over the years, especially with nVidia drivers and Xorg mesa version combos, it just happens.  It would be a good time to start using lirc and the irexec app.  It allows you to assign a script to kill anything you want to a remote control button.</div><div style="font-family:monospace,monospace"><br></div><div style="font-family:monospace,monospace">I have not used it in quite some time, so I do not have my config any longer, but I used it for this exact purpose a couple years back (and 8+ years prior).  I am fairly certain I have posted the config to this list in the past though if you search the archives.  There should be a script to kill the frontend (and restart X if needed) and restart the frontend along with the lirc configuration.</div></div></div></div></blockquote><div><br></div><div>I have a button on my remote</div><div><br>begin<br>    remote = N2QAHB000012<br>    prog = irexec<br>    button = Play+<br>    config = echo "killall  mythfrontend.real"<br>    repeat = 0<br>    delay = 0<br>end<br></div><div><br></div><div>I must admit I have not tried it.</div><div><br></div><div>The reason I have not tried it is that I want to get a way to kill things from my remote logon before I try and automate it. When my myth computer is locked up and useless from the local terminal I can still log on using PuTTY from my Windows desktop. I have tried many things to kill the locked up system and nothing has worked except restarting the myth computer.</div><div><br></div><div>I have searched the archive and it looks like all the scripts use some version of kill to stop myth and that just doesn't work on my system. </div><div><a href="https://lists.gt.net/engine?list=mythtv&do=search_results&search_type=AND&search_forum=forum_1&search_string=script+to+kill+the+frontend" target="_blank">https://lists.gt.net/engine?list=mythtv&do=search_results&search_type=AND&search_forum=forum_1&search_string=script+to+kill+the+frontend</a></div><div><br></div><div>As I have said, I programmed CTRL-ALT-BS to do the job and it works great -- unless mythfrontend is locked up and then it doesn't work. It normally restarts X but when the system is hung, it just kills the gui and locks up there<span class="gmail_default" style="font-family:monospace,monospace">.</span></div></div></div></blockquote><div><br></div><div><div style="font-family:monospace,monospace">IIRC, I used systemd to switch targets.</div><div style="font-family:monospace,monospace"><br></div><div style="font-family:monospace,monospace">systemctl isolate multi-user.target (changes to no GUI)</div><div style="font-family:monospace,monospace">systemctl isolate graphical.target (changes to GUI)</div><div style="font-family:monospace,monospace"><br></div><div style="font-family:monospace,monospace">to change runlevels completely.  Of course, this assumes you have autologin enabled with mythfrontend autostart.  This worked for me every time.</div><div style="font-family:monospace,monospace"><br></div><div style="font-family:monospace,monospace">I do not run *buntu, but I assume systemd is the same and should work.</div></div></div></div></blockquote><div><br></div><div>I tested that and it works although not a real test because the system is not hung.  One small issue is that when everything restarts there is a pop-up message on the myth screen saying that myth stopped unexpectedly and do I want to send debug information somewhere.  I am sure that can be dealt with.</div><div><br></div><div>Thanks so much for that. Without this list mythTV would be unusable. Thanks thanks thanks.</div><div><br></div><div>I now have two solutions: 1) Run in High Quality and just put up with the increase in CPU load. 2) Use vdpau and switch run levels to restart things and if that works figure out how to automate it.</div><div><br></div><div>Questions on automating it. Can I just issue those two commands one after the other or do I need to wait for the first one to finish doing its thing before issuing the second? I am sure I can figure out how to kill the popup but if anyone knows please chime in. :-)</div><div><br></div></div></div></blockquote><div><br></div><div><div class="gmail_default" style="font-family:monospace,monospace">I just put those 2 (with some extra checking) eg:</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">#!/bin/bash</div><div class="gmail_default" style="font-family:monospace,monospace">while true ; do</div><div class="gmail_default" style="font-family:monospace,monospace">    systemctl isolate multi-user.target</div><div class="gmail_default" style="font-family:monospace,monospace">    if [ $? -eq 0 ]; then</div><div class="gmail_default" style="font-family:monospace,monospace">        systemctl isolate graphical.target</div><div class="gmail_default" style="font-family:monospace,monospace">        exit 0</div><div class="gmail_default" style="font-family:monospace,monospace">    fi</div><div class="gmail_default" style="font-family:monospace,monospace">    sleep 1</div><div class="gmail_default" style="font-family:monospace,monospace">done</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">(something along those lines - untested) </div><div class="gmail_default" style="font-family:monospace,monospace">Put in a script and call the script from irexec</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div></div><div>Allen</div></div></div><br>
</blockquote></div></div>