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 360537 - Disable screensaver when playing video
Disable screensaver when playing video
Status: RESOLVED INCOMPLETE
Product: totem
Classification: Core
Component: Movie player
2.16.x
Other All
: Normal minor
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-10-08 01:26 UTC by j_greenhouse
Modified: 2007-03-20 23:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
screen-saver-fix (641 bytes, patch)
2006-10-16 08:29 UTC, Niklas Mellegård
none Details | Review
totem-really-disable-ssaver.patch (1.13 KB, patch)
2006-10-16 08:55 UTC, Bastien Nocera
committed Details | Review
Log generated by gnome-screensaver (123.06 KB, text/plain)
2006-11-05 16:53 UTC, Niklas Mellegård
  Details
gnome-ssaver log (134.91 KB, text/plain)
2006-11-06 09:09 UTC, Niklas Mellegård
  Details

Description j_greenhouse 2006-10-08 01:26:06 UTC
Stop the screen saver from kicking in when we are playing movies. I find myself having to move the mouse every couple of minutes or else my desktop gets locked.

 

Other information:
This should be in totem as well as in the totem plugins for browsers.
Comment 1 Bastien Nocera 2006-10-08 15:57:56 UTC
For the movie player, we only do that when in fullscreen. For the web browser plugin, I guess we should do the same when we implement the fullscreen mode.

Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.


*** This bug has been marked as a duplicate of 354181 ***
Comment 2 j_greenhouse 2006-10-08 16:22:08 UTC
Bastien for the totem movie player. I am in full screen, and my desktop does get locked when playing...
So this is not just a duplicate of 354181
Comment 3 Bastien Nocera 2006-10-09 15:59:47 UTC
Reopening.
Comment 4 Niklas Mellegård 2006-10-16 08:29:12 UTC
Created attachment 74783 [details] [review]
screen-saver-fix

This patch fixes the problem with the screensaver in fullscreen mode
Comment 5 Bastien Nocera 2006-10-16 08:55:17 UTC
Created attachment 74784 [details] [review]
totem-really-disable-ssaver.patch

Simplify screensaver_is_running_dbus()
Comment 6 Bastien Nocera 2006-10-16 08:57:48 UTC
I have no idea why your patch would fix this bug, to be fair. I've updated it to simplify the code somewhat. Let me know whether it fixes it, and I'll push it to stable and HEAD, thanks.
Comment 7 Niklas Mellegård 2006-10-16 10:52:46 UTC
(In reply to comment #6)
> I have no idea why your patch would fix this bug, to be fair. I've updated it
> to simplify the code somewhat. Let me know whether it fixes it, and I'll push
> it to stable and HEAD, thanks.
> 

Indeed, it seems weird... Execution in the enable/disable_scr_saver never went past the call to screensaver_is_running_dbus without the explicit comparisons.

Preprocessor-oddities?
Comment 8 Bastien Nocera 2006-10-16 11:02:45 UTC
Something like that ;)

Does the patch work?
Comment 9 Niklas Mellegård 2006-10-16 13:01:37 UTC
(In reply to comment #8)
> Something like that ;)
> 
> Does the patch work?
> 

Yep, it seems to work just fine!
Comment 10 Bastien Nocera 2006-10-16 13:12:59 UTC
Fixed in HEAD and gnome-2-16, thanks!

2006-10-16  Bastien Nocera  <hadess@hadess.net>

        * src/totem-scrsaver.c: (screensaver_is_running_dbus),
        (totem_scrsaver_disable), (totem_scrsaver_enable):
        Modified patch from Niklas Mellegård <nmellegard@hotmail.com> to
        really disable the screensaver (weird stuff) (Closes: #360537)
Comment 11 William Jon McCann 2006-10-16 13:40:22 UTC
What compiler and arch are you using?
Comment 12 Niklas Mellegård 2006-10-21 10:12:51 UTC
(In reply to comment #10)
> Fixed in HEAD and gnome-2-16, thanks!
> 
> 2006-10-16  Bastien Nocera  <hadess@hadess.net>
> 
>         * src/totem-scrsaver.c: (screensaver_is_running_dbus),
>         (totem_scrsaver_disable), (totem_scrsaver_enable):
>         Modified patch from Niklas Mellegård <nmellegard@hotmail.com> to
>         really disable the screensaver (weird stuff) (Closes: #360537)
> 

Ermm... Now all of a sudden it's reverted back to not working again (still using the Totem build that did work). 
Sorry about this... 

William:
I'm using 
* gcc (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)
* Linux LapLin 2.6.17-10-generic #2 SMP Fri Oct 13 18:45:35 UTC 2006 i686 GNU/Linux

Comment 13 Bastien Nocera 2006-10-30 23:43:09 UTC
If this still the case, I'll leave you in the good hands of Jon, because I have no idea how to debug that (most likely a configuration problem mind you).
Comment 14 William Jon McCann 2006-10-31 16:18:18 UTC
Ok, please update gnome-screensaver to CVS HEAD from today.  With that we can do:

1. Kill running gnome-screensaver
2. Run: gnome-screensaver --no-daemon --debug > /tmp/gs-debug.log 2>&1
3. Start totem
4. Play something
5. Run: sleep 5; dbus-send --session --dest=org.gnome.ScreenSaver   --type=method_call --print-reply --reply-timeout=2000   /org/gnome/ScreenSaver   org.gnome.ScreenSaver.GetInhibitors
6. Enter fullscreen in totem
7. Post the /tmp/gs-debug.log and the results of step 5 here

Comment 15 Niklas Mellegård 2006-11-05 16:53:51 UTC
Created attachment 76034 [details]
Log generated by gnome-screensaver

Result of step 5:
Error org.freedesktop.DBus.Error.UnknownMethod: Method "GetInhibitors" with signature "" on interface "org.gnome.ScreenSaver" doesn't exist
Comment 16 William Jon McCann 2006-11-05 17:04:44 UTC
Ok, well you didn't update to CVS.  I guess I should have also said to wait at step 6 until the screensaver activates while you are in fullscreen totem.  I assume it did not because there is nothing in the log to indicate that it did.  Is that correct?
Comment 17 Niklas Mellegård 2006-11-06 09:09:01 UTC
Created attachment 76073 [details]
gnome-ssaver log

Ok, here's another try:
* Totem freshly checked-out from CVS
* gnome-ssaver setup to kick in after 1 min (and does)
* The log should contain two ssaver start occasions
* Result of step 5 is still the same as before
Comment 18 William Jon McCann 2006-11-06 15:59:56 UTC
Thanks for the update.  If we want to test using GetInhibitors we'll need gnome-screensaver from CVS HEAD not totem.  However, I'm not sure it will help much here anyway.

So, to recap.  In the first debug log we saw that totem correctly inhibited the screensaver activation.  In the second it did not and the screensaver activated.

I'm assuming that gnome-screensaver was connected to the session bus correctly since we don't see any error messages in the log.

So, the problem may be in Totem or in D-Bus.

Can you:

1. Verify that Totem is being built with D-Bus support.  

   The best way is to check the config.h file for #define WITH_DBUS 1.

2. Run totem from the command line and see if we get any warnings or errors.  Maybe Bastien can suggest other ways to debug here.

3. Repeat the steps we outlined above.

Thanks.
Comment 19 Niklas Mellegård 2006-11-07 08:49:52 UTC
Indeed, totem wasn't built with D-Bus support! 
I added the #define and no screensaver kicked in, removed it and it did again.
Comment 20 Niklas Mellegård 2006-11-07 17:51:27 UTC
The logging output from running autogen.sh says that dbus is indeed found and dbus-binding-tools as well. But still config.h does not get the define-statement...
I made a recursive grep on all files checked out from the cvs, but nowhere (except in src/totem-scrsaver.c) does the string WITH_DBUS appear.
Error in the configuration scripts (or have I totally misunderstood the whole thing)?

Comment 21 Bastien Nocera 2007-03-20 23:40:14 UTC
No information provided in the last 3 months. Please reopen your bug if it was closed in error.