Unable to logout, shutdown, restart, etc when Mythfrontend is running

Bug #174712 reported by Jovaro
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MythTV
Fix Released
Unknown
mythtv (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

Binary package hint: mythtv-frontend

When Mythtv-Frontend is running, I am unable to logout, shutdown, restart etc using the Gdm buttons.
If I click one of these buttons, the mythtv-frontend shows the "do you really want to quit Mythtv"-screen.
I would think that this is blocking the logout process.

I added a line in the .bash_logout file:

killall mythfrontend.real

But without effect.
Please let me know what other information is needed so I can post that.

Revision history for this message
Mario Limonciello (superm1) wrote : Re: [Bug 174712] Unable to logout, shutdown, restart, etc when Mythfrontend is running

This is due to the way that myth interprets the signal from when you
issue a logout. Likely itvis being issued a SIGQUIT, and using that
dialog as its handler. My opinion would be expected behavior.

--
Mario Limonciello
<email address hidden>
Sent from my iPod Touch

On Dec 7, 2007, at 11:43, Jovaro <email address hidden> wrote:

> Public bug reported:
>
> Binary package hint: mythtv-frontend
>
> When Mythtv-Frontend is running, I am unable to logout, shutdown,
> restart etc using the Gdm buttons.
> If I click one of these buttons, the mythtv-frontend shows the "do
> you really want to quit Mythtv"-screen.
> I would think that this is blocking the logout process.
>
> I added a line in the .bash_logout file:
>
> killall mythfrontend.real
>
> But without effect.
> Please let me know what other information is needed so I can post
> that.
>
> ** Affects: mythtv (Ubuntu)
> Importance: Undecided
> Status: New
>
> --
> Unable to logout, shutdown, restart, etc when Mythfrontend is running
> https://bugs.launchpad.net/bugs/174712
> You received this bug notification because you are a member of MythTV
> Ubuntu Maintainers, which is a bug contact for mythtv in ubuntu.

Revision history for this message
Jovaro (bug-jovaro) wrote :

Hmm ok. It might be expected behavior but I think it is strange anyway.
When I press the logout or quit button; I want to logout or quit.

Mythfrontend runs usually on the TV while the computer is used for other things. Often when I want to logout, the TV is off but mythfrontend might still be running on it. (I can't shut it down with the remote usually because the window usually doesn't have focus) I don't want to have to check if Mythfrontend is running before I logout.

I can imagine that there are other users that like the behavior the way it is, but in that case can't there be an option somewhere to choose what should happen?

Changed in mythtv:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Jackflap (deriziotis) wrote :

I agree, exactly the same situation here, I have mythtv running permanently on the tv.

Now I have to hack the shutdown, reboot, sleep and logout gnome actions in order to force the OS to do what it's supposed to do. This is a huge pain in the ass if you're running mythtv permanently on a second monitor.

Revision history for this message
Jackflap (deriziotis) wrote :

Well, I even emailed mythtv-users and the best workaround I managed to come up with was the following:

Since you can change a setting in the mythtv options to disable prompting on exit, when you click shutdown/reboot, it just quits mythtv without asking (but doesn't shutdown/reboot the computer). If you place mythtv in a wrapper script which shuts down the computer once mythfrontend returns, it solves the shutdown problem. So, something like this:

--
mythtv.sh

#!/bin/sh
mythfrontend
sudo /sbin/poweroff
--

You will need to add /sbin/poweroff to your sudoers file to give your user permissions to poweroff the computer. Add something like this:

ALL ALL=(ALL) NOPASSWD: /sbin/poweroff

But check https://help.ubuntu.com/community/Sudoers for more info, since it's better if you limit it to a specific user.

Unfortunately, I didn't find anything regarding reboot or logout.

Revision history for this message
Jackflap (deriziotis) wrote :

Ok, I've found an even better way of doing this which fixes the logout, reboot and shutdown functionality of gnome menus. I've put together a little HOWTO here:

http://jackflapb.wordpress.com/2008/10/19/howto-workaround-mythtvs-screwy-shutdownrebootlogout-behaviour-when-running-as-a-desktop-application/

Alex

Revision history for this message
Mario Limonciello (superm1) wrote : Re: [Bug 174712] Re: Unable to logout, shutdown, restart, etc when Mythfrontend is running

Both of those are nasty hacks. I think the underlying problem (how it
reacts to SIGQUIT) should be adjusted.

On Mon, Oct 27, 2008 at 05:37, Jackflap <email address hidden> wrote:

> Ok, I've found an even better way of doing this which fixes the logout,
> reboot and shutdown functionality of gnome menus. I've put together a
> little HOWTO here:
>
> http://jackflapb.wordpress.com/2008/10/19/howto-workaround-mythtvs-
> screwy-shutdownrebootlogout-behaviour-when-running-as-a-desktop-
> application/<http://jackflapb.wordpress.com/2008/10/19/howto-workaround-mythtvs-screwy-shutdownrebootlogout-behaviour-when-running-as-a-desktop-application/>
>
> Alex
>
> --
> Unable to logout, shutdown, restart, etc when Mythfrontend is running
> https://bugs.launchpad.net/bugs/174712
> You received this bug notification because you are a member of MythTV
> Ubuntu Maintainers, which is subscribed to mythtv in ubuntu.
>

--
Mario Limonciello
<email address hidden>

Revision history for this message
Jackflap (deriziotis) wrote :

Yeah, I know what you mean..

I've just tested this in Intrepid though and it doesn't happen any more. Cool stuff.

Revision history for this message
Mario Limonciello (superm1) wrote :

Jackflap:

So you can confirm that with no hacks in place, the root problem is gone
then?

On Mon, Nov 3, 2008 at 12:16, Jackflap <email address hidden> wrote:

> Yeah, I know what you mean..
>
> I've just tested this in Intrepid though and it doesn't happen any more.
> Cool stuff.
>
> --
> Unable to logout, shutdown, restart, etc when Mythfrontend is running
> https://bugs.launchpad.net/bugs/174712
> You received this bug notification because you are a member of MythTV
> Ubuntu Maintainers, which is subscribed to mythtv in ubuntu.
>

--
Mario Limonciello
<email address hidden>

Revision history for this message
Jackflap (deriziotis) wrote :

Yup, definitely.

Fresh intrepid install with mythtv directly from the package manager. Problem is gone.

Alex

Revision history for this message
Mario Limonciello (superm1) wrote :

Great! I'll mark it fix released then. If this comes up again at some point, someone please re-open and mark as NEW.

Changed in mythtv:
status: Triaged → Fix Released
Changed in mythtv (Ubuntu):
status: Fix Released → New
Revision history for this message
John Franklin (hondaman-nc) wrote :

This is affecting me since Jaunty update. I started with Intrepid, so I do not know if my hardware would have mimicked the behavior before Intrepid.

I am able to use
       $ gnome-session-save --force-logout
to replicate the behavior before upgrading to Jaunty. I am not a programmer, so I do not even know what SIGQUIT is, but --force-logout side-stepping it and using something more hefty which could possibly hurt things.

Since there have been changes with fast-user-switch-applet, the issue may reside there. Sorry for the delay, was chasing a rabbit (this is a joke or pun for those who are having this translated).

Revision history for this message
John Franklin (hondaman-nc) wrote :

I am truly losing patience with this one. The MythTV people say this is expected behavior and it is not their fault. When typing
killall -vs 1 mythfrontend.real
It works. Does not work for 10 (USR1), 13 (PIPE), 17, 18, 19. However, the problem was not replicated. Typed:
pkill -1 mythfrontend
And got the same results. I lost my patiences with going through all the numbers and opening it back up, so I did not go any higher than 19 (SIGSTOP). So, from the command line I tried to replicate a signal of SIGQUIT (3) to mythfrontend.real and could not get it to reproduce the problem like it does when FUSA logout option is used.

Also, added "killall mythfrontend.real" to ~/.bash_logout without any change. The signal sent to mythfrontend is causing it to respond in a manner which is canceling a running shutdown (shutdown -c). The problem is replicated by
gnome-session-save --logout
gnome-session-save --shutdown-dialog

But, as stated above,
gnome-session-save --force-logout
works as expected. What gives? What scripts or whatever are running which would cause this problem? What is the signal which is being sent from "gnome-session-save --logout" to mythfrontend?

Revision history for this message
DarioFreije (dario2004) wrote :

The same problem to me in Jaunty
I have mythtv in a separate (secundary) screen. A Tv normally off.
Thanks for the info.
First i change a setting in the mythtv options to disable prompting on exit.
And then i create a launcher in the gnome panel, with a shutdown icon, that load a script in my home named "apagatemierda.sh".
The script says:

--
#!/bin/bash
#
# close mythtv and show shutdown dialog

killall mythfrontend.real | gnome-session-save --shutdown-dialog
--

voila!

Changed in mythtv (Ubuntu):
status: New → Confirmed
Revision history for this message
John Franklin (hondaman-nc) wrote :

DarioFreije, I would rather have the problem resolved instead of trying to keep up with a script (I am not a proficient programmer) from one version of Ubuntu to the next. That is the same set up I have, secondary screen is a TV with mythfrontend running on it with the power to the TV normally off. Thank you for the script suggestion, though. In return, I will share something I learned sort of script-like I learn with this set up. I have a gnome-panel quick launcher "mythfrontend -display :0.1" to open MythTV on the TV screen. Don't know if it will work for you though.

Changed in mythtv (Ubuntu):
status: Confirmed → New
Revision history for this message
Mario Limonciello (superm1) wrote :

Wow talk about an old bug. I've actually got a patch for this though that i've submitted upstream, so until they accept it i'll mark this as triaged for us. It should hopefully make it into 0.23.

Changed in mythtv (Ubuntu):
status: New → Triaged
Changed in mythtv:
status: Unknown → Confirmed
Revision history for this message
Mario Limonciello (superm1) wrote :

This fix has been pulled in upstream, and will be available in the 0.23 (or later) autobuilds shortly. This bug will be automatically closed when the fix is uploaded to the current development release of Ubuntu (Currently Lucid Lynx).

Changed in mythtv (Ubuntu):
status: Triaged → Fix Committed
Changed in mythtv:
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythtv - 0.23.0~trunk23567-0ubuntu1

---------------
mythtv (0.23.0~trunk23567-0ubuntu1) lucid; urgency=low

  * Bump builds to start with 0.23
  * debian/control:
    - Fix vcs-bzr
    - Update depends to include ttf-droid, ttf-liberation, and ttf-dejavu.
      (LP: #224114)
    - Drop quilt build-dep, it appears to be included w/ dh7
    - Bump standards version
  * Introduces stable pulseaudio support (In Theory! :)) (LP: #311328)
  * Print message to stdout for MythTV.pm (LP: #327406)
  * debian/patches:
    - Drop 16_hal_shutdown. No longer necessary after r23518.
  * Allow shutdowns when mythtv is running (LP: #174712)
    - Comes from upstream changeset r23455.
  * Mythbackend now supports the --user flag to drop permissions from
    upstream changeset r23521.
  * Use the upstart script from the upstream contrib directory instead.
    Now uses the --user flag to drop permissions. (LP: #445953)
  * Update 30_python26_transition for changes upstream.
  * mythtv-database.templates:
    - refer to the proper location for backups.
  * Switch to use the upstream backup scripts. (LP: #469792)
  * Helps with HDTV stuttering. (LP: #451394)
  * Drop old debian/myth-*.sh scripts since we now use dbus for shutdown
    and reboot etc.
  * Drop old debian/mythtv-backend.default. It's just available for upgrades.
  * Drop old debian/mythtv-backend.init initscript. We're only supporting
    upstart going forward with these builds.
  * Drop unnecessary patch, 02_settings_pro.dpatch
  * Drop unused patch, 23_video_device_symlinks.dpatch
  * Drop unused patch, 25_skiploop_option.dpatch
  * Convert packaging to dh7.
  * Convert packaging to source v3 (w/ quilt).
  * Add debian/README.source as a symlink to the quilt README.source
  * Convert all .files into .install.
  * Refresh patches as quilt format instead
  * Rewrite get-orig-source rules to parse the changelog for version info.
  * Drop any of the Top Secret Options build flags
  * Include a custom snippet for debian/rules mythtv packages in libmyth-dev.
  * Drop old, unused templates from debian/templates.
 -- Mario Limonciello <email address hidden> Tue, 16 Feb 2010 21:23:04 -0600

Changed in mythtv (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.