GNOME Bugzilla – Bug 600488
Totem is leaking session inhibitors
Last modified: 2009-11-03 00:04:50 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.
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.
can anybody confirm this is fix?
I've committed a cosmetically different fix, after review from Jon McCann.