[mythtv-users] first remote button press is ignored

Joey Morris rjmorris.list at zoho.com
Sun Jan 28 19:14:35 UTC 2018


Roger Siddons <dizygotheca at ntlworld.com> wrote on Thu, Jan 25, 2018 at 10:06:53AM +0000:
> On Wed, 24 Jan 2018 22:47:00 -0500
> Joey Morris <rjmorris.list at zoho.com> wrote:
> > I build from source, so I'll look into adding some logging around the
> > LIRC code, including the part Roger noted where it ignores events if
> > the screen is asleep. It might be the weekend before I have time for
> > that.
> > 
> My (quick) look suggests there's only 3 paths;
> 
> 1. A big fat logging error - Bad keycode
> 2. A key event, which is handled like any other keyboard key
> 3. Ignore it because the screen is supposedly asleep
> 
> I would just comment out those lines and see if starts working.
> 
> If so, then it may be related to DBus & the screensaver support
> added in 0.28. https://code.mythtv.org/trac/ticket/12414#comment:5

Mythfrontend's DBus/screensaver behavior appears to be the source of the issue.
I describe a solution at the end of this message, although I wonder if there is
a better one.

Adding some log messages to the section of code Roger is referring to (in the
MythMainWindow::customEvent function in libs/libmythui/mythmainwindow.cpp), I
saw that the first button press was ignored because the following condition was
true:

    if (GetMythUI()->GetScreenIsAsleep())
        return;

So MythTV thinks my screen is asleep when it receives the first button press.
But why?

I have these messages in my log when I start mythfrontend:

    screensaver-dbus.cpp:61 (ScreenSaverDBusPrivate) - ScreenSaverDBus:
      Created for DBus service: org.freedesktop.ScreenSaver
    screensaver-dbus.cpp:57 (ScreenSaverDBusPrivate) - ScreenSaverDBus:
      Could not connect to dbus: The name org.freedesktop.PowerManagement.Inhibit
      was not provided by any .service files
    screensaver-dbus.cpp:57 (ScreenSaverDBusPrivate) - ScreenSaverDBus:
      Could not connect to dbus: The name org.mate.SessionManager was not
      provided by any .service files
    screensaver-dbus.cpp:57 (ScreenSaverDBusPrivate) - ScreenSaverDBus:
      Could not connect to dbus: The name org.gnome.SessionManager was not
      provided by any .service files
    screensaver-x11.cpp:82 (ScreenSaverX11Private) - ScreenSaverX11Private:
      DPMS is disabled.

When I begin playback, I have this message:

    screensaver-dbus.cpp:82 (Inhibit) - ScreenSaverDBus:
      Successfully inhibited screensaver via org.freedesktop.ScreenSaver.
      cookie 63. nom nom

And then immediately after the first button press (the one that is ignored), I
have this message:

    screensaver-dbus.cpp:102 (UnInhibit) - ScreenSaverDBus:
      Screensaver uninhibited via org.freedesktop.ScreenSaver

Searching for these messages led to a few tickets and mailing list threads:

    https://code.mythtv.org/trac/ticket/12435
    https://code.mythtv.org/trac/ticket/12438
    https://lists.gt.net/mythtv/dev/585861
    https://lists.gt.net/mythtv/users/593738

The mailing list threads are a little old (2015), long, and may not be entirely
relevant to this particular case, but I'm including them for reference.

Based on a comment in https://code.mythtv.org/trac/ticket/12435, I recompiled
with --disable-qt5dbus, and the first button press is no longer ignored! None of
the above log messages appear anymore except this one when mythfrontend starts:

    screensaver-x11.cpp:82 (ScreenSaverX11Private) - ScreenSaverX11Private:
      DPMS is disabled.

Just to recap my setup: I'm running mythtv 29 on Debian Buster with XFCE, no
screensaver installed, and DPMS disabled. I don't have any particular reason to
avoid a screensaver or DPMS; I just haven't seen a need for them on this
machine.

So compiling with --disable-qt5dbus is a solution, but is it the right solution?
Does other mythfrontend functionality rely on dbus that will be affected by this
change? Should I just install a screensaver?



More information about the mythtv-users mailing list