[mythtv-users] Mythfrontend doesn't restore screensaver if it crashes during playback
Michael T. Dean
mtdean at thirdcontact.com
Sat Jul 23 17:07:03 UTC 2011
On 07/23/2011 09:08 AM, Yianni Vidalis wrote:
> Maybe it's not a bug per se, but it is annoying. Mythfrontend
> disables, as expected, the screensaver and dpms settings before
> entering playback. If, for whatever reason, mythfrontend crashes
> during playback, when I re-run it it doesn't remember that it disabled
> those settings and the screensaver never kicks in.
>
> It would be very convenient to have a flag like "I disabled the
> screensaver" which could be checked upon startup so that it would
> re-enable it at initialisation.
>
mythfrontend never disables screen savers for /exactly/ this reason.
Instead, mythfrontend "pokes" the (supported) screensaver every 50s
during playback to keep it from activating.
Your screen saver (which I would assume is KDE screensaver, since we
directly support xscreensaver and GNOME screensaver and don't directly
support KDE screensaver***) is disabling itself because we changed the
DPMS value (because we didn't find a "supported" screensaver running.
The best "fix" for the issue you noticed is for mythfrontend to use a
standard desktop utility that manages screensaver state--xdg-screenaver
( http://portland.freedesktop.org/xdg-utils-1.0/xdg-screensaver.html )
of the xdg-utils package ( http://portland.freedesktop.org/wiki/ )--so
that if mythfrontend crashes, the external utility will properly
re-enable the screensaver.
Johnny Walker actually wrote a patch that added xdg-screensaver support
to MythTV, and I put it in (before 0.24), but once people started using
it, we found out that xdg-screensaver failed on several systems
(including both KDE and GNOME screensaver based systems). So, I ripped
out the xdg-screensaver support (also before 0.24), debugged
xdg-screensaver, and submitted 3 patches to fix it. 1 patch of the 3,
the one that fixes GNOME screensaver support to work using a better
design than the one that was in xdg-screensaver, has been incorporated
into the master/development branch (and is not in the 1.1.0-rc1
"release"). The 2 that are required to fix KDE screensaver (the one
screensaver we don't directly support in mythfrontend--that instead
takes its own cues off our flipping the DPMS state of the display)
haven't yet been applied.
Until freedesktop fixes xdg-screensaver, we can't use xdg-screensaver in
MythTV. As soon as a version of xdg-screensaver is released with the
fixes, I will restore the xdg-screensaver support, but with a version
test to make sure the version installed is current enough to use.
Unfortunately, though, GNOME and KDE developers seem to be vehemently
opposed to the idea of a single desktop utility that controls any
screensaver the user might choose to run (and does the right thing when
complex apps like mythfrontend crash)--even to the point of designing
the API for their screensavers to be less-than-friendly to the idea.
Developers in both camps have said that any application that wants to
interface with the screensaver should have its own code specifically for
disabling their particular screensaver--so they want us to add code for
xscreensaver and KDE screensaver and GNOME screensaver and
no-screensaver-but-DPMS-only (and xlockmore and ...), and to update all
that code (and somehow push the updates out to the users who get the
updated versions of the screensavers) as the screensaver changes or the
API is extended or ... (As an outsider looking in, it seems like these
guys have never heard of Unix-style design. Then again, I may just be
misinterpreting the statements I've seen from them.)
Sorry for the rant, but I'm still very upset with the DE developers idea
of how things should work.
Mike
*** Note, also, that just switching your system to use the GNOME
screensaver may not work, either, because some versions of GNOME
screensaver were shipped with broken gnome-screensaver-command--which
means that our poke is not working on those systems. Switching to
xscreensaver, however, should make everything work properly--even in the
event of a crash of mythfrontend.
More information about the mythtv-users
mailing list