[mythtv-users] CTRL-ALT-BACKSPACE

Allen Edwards allen.p.edwards at gmail.com
Fri Mar 8 17:36:34 UTC 2019


On Fri, Mar 8, 2019 at 8:54 AM Stephen Worthington <stephen_agent at jsw.gen.nz>
wrote:

> On Fri, 8 Mar 2019 07:17:37 -0800, you wrote:
>
> >On Fri, Mar 8, 2019 at 3:16 AM Stephen Worthington <
> stephen_agent at jsw.gen.nz>
> >wrote:
> >
> >> On Thu, 7 Mar 2019 22:45:16 -0800, you wrote:
> >>
> >> >I upgraded from Mythbuntu8 to mythbuntu18. X just froze and we used to
> use
> >> >CTRL-ALT-BS but I know it has been removed.
> >> >
> >> >I have been Googling this and found that this was replaced by
> >> >AysRq-rightAlt-K but that doesn't work. Then I found a nice gui
> checkbox
> >> >that restored it but that isn't there.  I found several different
> files I
> >> >could create, all different, and the instructions below that look like
> >> they
> >> >might work but I don't want to blow up the system so can someone tell
> me
> >> if
> >> >this is correct for Mythbuntu 18? (I modified it slightly to use nano).
> >> >Basically I found almost a dozen ways to enable this in xfce but they
> were
> >> >all different.  In the past very bad things happened when I just
> followed
> >> >online instructions.  That is why I am asking for help
> >> >
> >> >Thanks,
> >> >
> >> >Allen
> >> >
> >> >Enable the key combination Ctrl+Alt+Backspace
> >> >
> >> >   1.
> >> >
> >> >   Open the Terminal and run sudo nano /etc/default/keyboard
> >> >   2.
> >> >
> >> >   Find the line:
> >> >   XKBOPTIONS=""
> >> >   3.
> >> >
> >> >   Replace it with:
> >> >   XKBOPTIONS="terminate:ctrl_alt_bksp"
> >> >   4.
> >> >
> >> >   Save the modified file and close it.
> >> >   5.
> >> >
> >> >   Reboot your computer to take affect.
> >>
> >> If you are using lightdm (as I do with Xubuntu 18), then log in from a
> >> terminal (Alt-F1) or ssh and do "sudo systemctl restart lightdm" to
> >> restart X.  That works pretty well for me, so I did not investigate
> >> any further the various keystroke options.
> >>
> >> Thank you for the suggestion but it doesn't solve the problem.
> >
> >While the lightdm command worked on a test this morning, the system was
> not
> >hung up so not sure if it would have worked last night.
> >
> >The issue last night was that Myth was frozen and the cursor was off.  In
> >spite of no cursor, I was able to open system logoff command and click
> >Logoff but Myth would not close and prevented X from closing.  The logoff
> >attempt was met with a message "Myth is not responding do you want force a
> >close, Y/N" or something like that but it did not respond to a "Y" from
> the
> >keyboard so I was unable to logoff and had to use the power button.  The
> >power button did not fully turn off the computer and I had to do a long
> >press to force the computer to shut off.  Basically a hot mess. With
> >Mythbuntu-8 this would happen one or two times a year and the simple key
> >sequence would restart X and all was good.  My wife could do it without
> >calling me down to issue some system commands.
>
> That sounds like just a mythfrontend lockup, rather than X locking up
> completely.  If you already have a window running a terminal in the
> background when it happens, you should be able to just do Alt-Tab as
> many times as necessary to get to that terminal.  Then from there do:
>
> ps -e | grep mythfrontend
>
> to find the PID for mythfrontend (or mythfrontend.real if it is
> Ubuntu).  Then kill that process:
>
> sudo kill <pid>
>
> You usually need to do that command twice to actually kill
> mythfrontend.  Or if mythfrontend is completely locked up, then you
> may need to use:
>
> sudo kill -9 <pid>
>
> If you are running the XFCE desktop (Xubuntu), then you should also be
> able to do Ctrl-Esc to bring up a menu where you can run a terminal
> window from, or Ctrl-Alt-T to open a terminal window.  Or you can use
> Ctrl-Alt-F1 to open a terminal directly in full screen mode.
>
> WARNING: After a bad shutdown like using the power off button or after
> a power failure, you need to check all your filesystems on all
> partitions - there is a reasonable chance that any filesystem that had
> a write in progress at the time of the shutdown will be corrupt
> somewhere.  The fsck checks done automatically at boot time will
> likely not find and fix such corruption.  You must a full "fsck -C -f
> /dev/<partition id>" on all partitions that were mounted at the time,
> and then that should fix any errors.  If you see any errors that
> needed fixing, then run the command again on that partition as many
> times as necessary until it runs without any errors to be fixed.
> Failing to do this allows the corruption of the filesystem to remain
> in place, and if any writes take place to corrupt files or corrupt
> filesystem tables, then the corruption will likely spread and make the
> partition unusable and unfixable - you can lose your entire system.
>
> You can do fsck repairs like this by booting from a live DVD or live
> USB, or from another bootable partition that has the same or later
> version of the filesystem drivers and fsck programs.  I do this by
> having a second bootable partition on my SSD, which has a script to do
> all the fsck commands.  Booting from the normal boot partition in
> repair mode is not able to do an fsck on the boot partition itself,
> but can be used once the boot partition has been fixed to run fsck on
> all the other partitions.
>
> After you have clean filesystems, you then need to do a full check and
> repair on the mythconverg database.  If it was being written to at the
> time of the bad shutdown, any tables that were being modified at the
> time may be crashed.  If a recording was in progress, typically the
> recordedseek table will be crashed.  Unfortunately, when mythbackend
> tries to record and it then writes to recordedseek, if the table is
> crashed, all you get is some error messages in the mythbackend.log
> file.  It appears that mythbackend is recording happily, when all the
> time the writes to recordedseek are failing.  This does not stop a
> recording from succeeding, but on playback there will be problems.  It
> is possible to fix recordedseek, then use the "mythcommflag --rebuild"
> command to add the correct recordedseek table entries for a recording
> where this happens, but it is much better to fix the database before
> that.  And if any table other than recordedseek is crashed, the
> consequences are usually worse - if you write to other crashed tables,
> you can corrupt the table completely to where it is unrepairable, and
> that can mean you lose the entire database.  Fortunately, crashes of
> other tables are rare.  To check and repair the database, run the
> optimize_mythdb script.  It is here in Ubuntu:
>
> /usr/share/doc/mythtv-backend/contrib/maintenance/optimize_mythdb.pl
>
> That script should also be being run from /etc/cron.daily to prevent
> any problems with database corruption.  Database corruption does
> happen occasionally due to minor software bugs, and unless you are
> running optimize_mythdb regularly to fix that corruption, it can and
> usually will spread and eat your database.
>
> >Even if that worked, CTRL-ALT-Backspace is a lot easier to use.  By the
> >way, Alt-F1 does not bring up a terminal window on my system for some
> >reason.
>
> Sorry, I mis-typed that.  It is Ctrl-Alt-F1 for a terminal.
>
> >What I need is something like CTRL-ALT-Backspace, or the SysRq-Alt-K
> (which
> >did not work) so that my wife can restart X.  While I appreciate knowing
> >about the systemctl command, it is not "wife friendly" at least in the
> case
> >of my wife. The power button would be an option but it interrupts
> >recordings and even it didn't really work last night,  I needed the long
> >press.
>
> The power button is not a good option at all, due to the possible loss
> of files, whole partitions, the database, or the entire system.  It
> should only be used as a last resort, and must be followed by the full
> check and fix procedure as above.
>
> >Allen


Funny (sort of).  If you read the reason that CTRL-ALT-Backspace was
removed it said that most users use the power button.  I believe the power
button is set to just close Linux in a  nice controlled way.  Pressing and
holding the button like I did last night is like a power off and I only did
that when I was positive the system was quiet and hung up.

That said, I did flip the breaker and that clearly did a power off. It was
a comedy of errors that caused this. I accidently put my stove into Self
Clean and I could not stop it so flipped the breaker for what I thought was
the stove but was actually the upstairs power distribution panel which also
feeds Myth to get it on the same power as the projector.  Anyway, now I am
concerned about my filesystem.

I have one drive, sdb1 so I am assuming that is what I need to check. Not
sure if I have a bootable DVD but I am sure I need to leave now so will try
and figure it out when I return.

Allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20190308/ad285b96/attachment.html>


More information about the mythtv-users mailing list