After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 600488 - Totem is leaking session inhibitors
Totem is leaking session inhibitors
Status: RESOLVED FIXED
Product: gnome-screensaver
Classification: Deprecated
Component: general
2.28.x
Other Linux
: Normal major
: ---
Assigned To: gnome-screensaver maintainers
gnome-screensaver maintainers
Depends on:
Blocks:
 
 
Reported: 2009-11-02 22:35 UTC by Chris Coulson
Modified: 2009-11-03 00:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a patch (2.85 KB, patch)
2009-11-02 22:57 UTC, Matthias Clasen
none Details | Review

Description Chris Coulson 2009-11-02 22:35:45 UTC
I'm running Totem 2.28.2. When I watch a video, Totem creates an inhibitor on org.gnome.ScreenSaver to prevent the session from going idle and activating the screensaver. When I stop the video, the inhibitor is cleaned up (as expected).

However, if I close Totem whilst the video is still playing, Totem does not clean up the inhibitor and this is then leaked for the remainder of my session (hence preventing the screensaver from activating automatically and locking the screen when I walk away from my machine).

There are 2 issues here:

1) Totem doesn't appear to be cleaning up inhibitor's when it closes whilst a video is playing

2) Totem is using the org.gnome.ScreenSaver interface (which just proxies inhibit requests to org.gnome.SessionManager). gnome-session will clean up inhibitors when the owner of the inhibitor disappears from the session bus without cleaning up properly. However, this does not work for inhibitors that are proxied through org.gnome.ScreenSaver, because gnome-session thinks that gnome-screensaver is the owner of the inhibitor. Totem needs to be migrated to use org.gnome.SessionManager to benefit from the additional safeguards provided if, for example, Totem crashes whilst it has an inhibitor open.
Comment 1 Matthias Clasen 2009-11-02 22:57:09 UTC
Created attachment 146784 [details] [review]
a patch

The problem is that gnome-screensaver forgets to remove the session inhibit if the originator falls off the bus. It does remove the session inhibit correctly if the originator uninhibits.
Comment 2 Fabio Durán Verdugo 2009-11-02 23:03:42 UTC
can anybody confirm this is fix?
Comment 3 Matthias Clasen 2009-11-03 00:04:50 UTC
I've committed a cosmetically different fix, after review from Jon McCann.