dnd_is_screensaver_inhibited no longer works

Bug #1440825 reported by Nobuto Murata
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
notify-osd (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Notifications are still shown even if the system inhibits screensaver(expecting dnd_is_screensaver_inhibited state).

The code seems to expect "GetInhibitors" method is in "org.gnome.ScreenSaver", but the method is no longer there. The equivalent is "IsInhibited" method in org.gnome.SessionManager.

https://people.gnome.org/~mccann/gnome-session/docs/gnome-session.html#org.gnome.SessionManager.IsInhibited
## unit32:8 = (Inhibit the session being marked as idle)
$ dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.IsInhibited uint32:8
method return sender=:1.24 -> dest=:1.284 reply_serial=2
   boolean true

[src/dnd.c]
    100 static DBusGProxy*
    101 get_screensaver_proxy (void)
    102 {
    103 if (gsmgr == NULL)
    104 {
    105 DBusGConnection *connection = dbus_get_connection ();
    106 gsmgr = dbus_g_proxy_new_for_name (connection,
    107 "org.gnome.ScreenSaver",
    108 "/org/gnome/ScreenSaver",
    109 "org.gnome.ScreenSaver");
    110 }
    111
    112 return gsmgr;
    113 }
    114
    115 gboolean
    116 dnd_is_screensaver_inhibited ()
    117 {
    118 GError *error = NULL;
    119 gboolean inhibited = FALSE;
    120 char **list;
    121
    122 if (! get_screensaver_proxy ())
    123 return FALSE;
    124
    125 if (dbus_g_proxy_call_with_timeout (
    126 gsmgr, "GetInhibitors", 2000, &error,
    127 G_TYPE_INVALID,
    128 G_TYPE_STRV, &list,
    129 G_TYPE_INVALID))

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: notify-osd 0.9.35+15.04.20150126-0ubuntu1
ProcVersionSignature: Ubuntu 3.19.0-12.12-generic 3.19.3
Uname: Linux 3.19.0-12-generic x86_64
ApportVersion: 2.17-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Apr 7 01:49:02 2015
DesktopSession: 'ubuntu'
EcryptfsInUse: Yes
GtkTheme: 'Ambiance'
IconTheme: 'ubuntu-mono-dark'
InstallationDate: Installed on 2015-02-28 (37 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Alpha amd64 (20150228)
MachineType: FUJITSU FMVS54KR
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.19.0-12-generic.efi.signed root=/dev/mapper/ubuntu--vg-root ro quiet splash vt.handoff=7
RelatedPackageVersions:
 xserver-xorg 1:7.7+7ubuntu4
 libgl1-mesa-glx 10.5.2-0ubuntu1
 libdrm2 2.4.59-0ubuntu1
 xserver-xorg-video-intel 2:2.99.917-1~exp1ubuntu2build1
 xserver-xorg-video-ati 1:7.5.0-1ubuntu2
SourcePackage: notify-osd
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 01/07/2013
dmi.bios.vendor: FUJITSU // Phoenix Technologies Ltd.
dmi.bios.version: Version 1.06
dmi.board.name: FJNB24F
dmi.board.vendor: FUJITSU
dmi.board.version: D2
dmi.chassis.type: 10
dmi.chassis.vendor: FUJITSU
dmi.modalias: dmi:bvnFUJITSU//PhoenixTechnologiesLtd.:bvrVersion1.06:bd01/07/2013:svnFUJITSU:pnFMVS54KR:pvr:rvnFUJITSU:rnFJNB24F:rvrD2:cvnFUJITSU:ct10:cvr:
dmi.product.name: FMVS54KR
dmi.sys.vendor: FUJITSU
glxinfo: Error: [Errno 2] No such file or directory: 'glxinfo'

Related branches

Revision history for this message
Nobuto Murata (nobuto) wrote :
Revision history for this message
Nobuto Murata (nobuto) wrote :

The attached patch would "fix" the issue. However the dnd_is_screensaver_inhibited is broken at least for a few years now, users of caffeine[1] or indicator-session-idle-inhibit[2] might feel the "fix" is a regression, i.e. notification suddenly stops working by notify-osd update.

[1] https://launchpad.net/caffeine
[2] https://github.com/oyvindstegard/indicator-session-idle-inhibit

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "notify-osd_dnd.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in notify-osd (Ubuntu):
status: New → Confirmed
importance: Undecided → High
tags: added: rls-w-incoming
Revision history for this message
Sebastien Bacher (seb128) wrote :

The code looks wrong indeed but I can't reproduce the issue (using totem or libreoffice impress no notifications are showing over them), do you step to trigger the bug as an user?

Revision history for this message
Nobuto Murata (nobuto) wrote :

changelog was not properly applied, but this was fixed as a part of 0.9.35+15.10.20151014-0ubuntu1.

====
notify-osd (0.9.35+15.10.20151014-0ubuntu1) wily; urgency=medium

  [ Lars Uebernickel ]
  * Only request rgba visuals on composited screens (LP: #1473269)

 -- Sebastien Bacher <email address hidden> Wed, 14 Oct 2015 09:50:19 +0000

notify-osd (0.9.35+15.10.20151013.1-0ubuntu1) wily; urgency=medium

  [ CI Train Bot ]
  * New rebuild forced.

  [ Lars Uebernickel ]
  * Only request rgba visuals on composited screens (LP: #1473269)

 -- Sebastien Bacher <email address hidden> Tue, 13 Oct 2015 15:50:35 +0000

notify-osd (0.9.35+15.10.20151005-0ubuntu1) wily; urgency=medium

  * Remove leftover debug statement and fix identation issue

 -- Sebastien Bacher <email address hidden> Mon, 05 Oct 2015 14:27:28 +0000

notify-osd (0.9.35+15.10.20150915-0ubuntu1) wily; urgency=medium

  [ Lars Uebernickel ]
  * Render in native resolution on hidpi displays (LP: #1374301)

 -- Sebastien Bacher <email address hidden> Tue, 15 Sep 2015 09:24:19 +0000

notify-osd (0.9.35+15.04.20150126-0ubuntu2) UNRELEASED; urgency=medium

  * dnd_is_screensaver_inhibited no longer works due to obsoleted dbus
    method. replace it by an equivalent dbus call, LP: #1440825

 -- Nobuto Murata <email address hidden> Tue, 07 Apr 2015 17:47:18 +0900

Changed in notify-osd (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Shane Synan (digitalcircuit) wrote :

Echoing @nobuto's remarks, this is a rather unpleasant surprise moving from Ubuntu 14.04 to Ubuntu 16.04. I use Caffeine to keep the system awake during important background tasks and when I can see the screen while not actually at the keyboard. Unfortunately, now notifications don't work in such cases.

As this is technically working according to design, should I file a bug report with the Ayatana project, NotifyOSD, is one expected to change org.gnome.desktop.session.idle-timeout in a script, or..?

Pardon the noise if I should have contacted elsewhere first.

Revision history for this message
Shane Synan (digitalcircuit) wrote :

Following up with my previous comment, this affects playing music or videos in Totem, which is included in the default Ubuntu install. Even if the player window is minimized, no notifications will display. Someone unsuspecting might be led to think notifications are broken.

As before, if I should file a new bug, or any of the other options mentioned in the last comment, I'd be happy to do so!

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.